Jump to content
MakeWebGames

Recommended Posts

Posted

So for example in the lucky boxes, i want one of the cases to give an item ID 99 to that user - how would i change this query?

$money=rand(330, 3300);

print "You find \${$money} in the box.)";

$db->query("UPDATE users SET money=money+{$money} WHERE userid={$userid}");

break;

  • 2 months later...
Posted

Re: [V2] Add item query

Wow, this is old....but no-one answered, and I actually know this one:

(note: found topic using search function >.>)

 

$itemidexplore=x;
$gain=rand(1,100);
print "Inside the box were $gain bandaids.";
$db->query("INSERT INTO inventory   VALUES('',$itemidexplore,$userid,$gain)",$c); 

 

change x to the id number of the item you want to input. Say if your bandaids were id number 2, you'd put $itemidexplore=2;

Posted

Re: [V2] Add item query

ummm.....don't use that.....use item_add..

item_add(userfor,itemid,quanity);

Example.....For you item id 99 and 1 of it.

item_add($ir['userid'],99,1);

Simple.....This auto qualifies the items.

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...