Jump to content
MakeWebGames

Randomizer.


The Coder

Recommended Posts

A "randomizer" item? Care to elaborate?

Its a item that when used has a variety of prizes, e.g from money ranged 3mill to 10 mill, crystals ranged from 50 crystals to 200 crystals and so on. :)

If you don't have this item, you should create it, it will grab in so many donators. :)

And thanks guys, I see what your trying to do, you mean when the DP is credited to the user, you will get a random prize along with it, correct if I am wrong? But I need an item which does this. :)

Link to comment
Share on other sites

Something like this"

 

if ($dpitem==whatever)
	$given=rand(1,4);
	{
		if($given==1)
		{
		$gain=rand(10,10
		item_add($userid,itemx,$gain);
		echo"You were just given {$gain} of itemx.";
		}
		if($given==2)
		{
		$gain=rand(1,50)
		item_add($userid,itembb,$gain);
		echo"You were just given a {$gain} of itemb.";
		}
		if($given==3)
		{
		$gain=rand(10000,50000)
		$db->query("UPDATE users SET money=money+$gain WHERE userid=$userid");
		echo"You were just given ${$gain} money.";
		}
		if($given==4)
		{
		$gain=rand(100,200)
		$db->query("UPDATE users SET crystals=crystals+$gain WHERE userid=$userid");
		echo"You were just given ${$gain} money.";
		}

	}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...