Jump to content
MakeWebGames

Mccodes Help


Renkia

Recommended Posts

Morning MWG/MCC Forum:

Now, since I have found out 'Pokemon' is programmed in C, I am just waiting for a friend on a forum to reply & help me for some starters. (http://www.cplusplus.com/forum/) In the mean time while I am waiting. I Would just like to know some information on a modification& what it does/whatdoesthisemans/whyisthatfaster? Etc.

Code by SHAD / Click >> Here << for the link

 

print' Throw a grenade ';
$query=mysql_query("SELECT `inv_itemid` FROM `inventory` where `inv_itemid` = $gid && `inv_userid` = $userid");$i=mysql_fetch_array($query); // How is this including the performance? 
if(!$i['inv_itemid'] == $gid) // What does (!$i) mean?{print "Invalid Item";exit;}
if(!isset($_POST['ID'])) {print "User id: 
";
} else {
$_POST['ID'] = abs(floatval($_POST['ID'])); // Does (abs) mean absent?  :P 
$maxMembs = $db->fetch_row($db->query("SELECT COUNT(`userid`) AS `u` FROM `users`")); if($_POST['ID'] > $maxMembs['u']) // What's the (['u']) for?{echo "Invalid user!";$h->endpage();}$ht = mt_rand($mintime,$maxtime);mysql_query("UPDATE `users` SET `hp` = 1, `will` = 0, `hospital` = {$hosptime}, `hospreason` = 'Bombed by {$ir['username']}' WHERE `userid` = {$_POST['ID']}"); event_add($_POST['ID'],"{$ir['username']} [{$ir['userid']}] threw a grenade at you, causing some severe effects. ",$c); // What's ($c) mean? Config?
item_remove($userid, $gid, 1);print" You have successfully threw your grenade .";}$h->endpage();?>

 

Sorry about the code. I Sorted it out 4 times, but It won't code up neatly. :S

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