Jump to content
MakeWebGames

Blade Maker

Members
  • Posts

    518
  • Joined

  • Last visited

Everything posted by Blade Maker

  1. Ok well I decided I am not good enough to sell these yet which is why I posted it for free, whats the big deal?
  2. Gosh who would have thought me making a free mod would make all this happen. Are you guys trying to stop beginners from learning? Pretty soon the mccode mods stuff is going to go dead if this keeps up.
  3. Ok I will keep making free mods.
  4. Did I fix it now?
  5. I modified the sending script into a stealing script, I will fix the event I just made that really quick I said I do not know if it works yet.
  6. Ok will do I will give my self a month or so....
  7. Thanks Jaaaccckkk....
  8. No I made this mod, now stop.
  9. Fixed....
  10. This is a very simple mod I thought of making. Put this code near the top of globals.php:   $randomevent = (rand(1,600)); if($randomevent == 134){ $db->query("UPDATE `users` SET money=money+'5000' WHERE userid=$userid"); event_add($userid,"You won $5000 from the random event."); } else if($randomevent == 250){ $db->query("UPDATE `users` SET money=money-'1000' WHERE userid=$userid"); event_add($userid,"You lost $1000 from the random event."); } else if($randomevent == 560){ $db->query("UPDATE `users` SET crystals=crystals+'5' WHERE userid=$userid"); event_add($userid,"You won 5 crystals from the random event"); } else   I believe I did this right, but I just made it up as I thought of it. Enjoy this basic mod. Fixed...
  11. Ok I edited it, is it better?
  12. Yeah I would like to learn also, thanks.
  13. OK thanks for the tip.
  14. Ok thanks, other then that how is it?
  15. I decided that I want to become a good coder when it comes to modding mccodes. So I am no longer selling the stealing mod instead you all can have it for free! To get this all you have to do is tell me how I did! Also the crystal bank was not made by me so I do not know if it is debugged, I found it in the old free modifications forum.   steal.php: <?php include "globals.php"; $ITEMSELECT = $db->query("SELECT `inv_itemid` FROM `inventory` WHERE `inv_userid`={$_GET['ID']} ORDER BY RAND() LIMIT 1"); $row=$db->fetch_row($ITEMSELECT); $user = $db->query("SELECT * FROM `inventory` WHERE `inv_userid`=$userid"); $item = $row['inv_itemid']; $get_user_stats = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE userid={$_GET['ID']}")); $playerlevel = $get_user_stats['level']; $ran = (rand(0,10)); $_GET['ID'] = abs((int) $_GET['ID']); $_POST['money'] = abs((int) $_POST['money']); if(!((int)$_GET['ID'])) { print "Invalid User ID"; } else if($_GET['ID'] == $userid) { print "Haha, what does stealing money from yourself do anyway?"; } else $mu=$db->query("SELECT userid FROM users WHERE userid=$userid AND steal_timestamp > unix_timestamp()-(60*30)"); $mug=$db->num_rows($mu); if($mug){ die(" Sorry, you stole from someone in the past 30 Minutes. <meta http-equiv='refresh' content='2; url=index.php'>"); }else if($ir['level'] >= ($playerlevel+20)){ die(" You cannot rob someone who is 20 levels or more then you. <meta http-equiv='refresh' content='2; url=index.php'>"); } else { if($playerlevel >=($ir['level']+20)){ die(" You cannot rob someone who is 20 or more levels higher then you. <meta http-equiv='refresh' content='2; url=index.php'>"); } else if($ran > 4){ $db->query("UPDATE users SET steal_timestamp = unix_timestamp() WHERE userid=$userid"); die(" You stole nothing. <meta http-equiv='refresh' content='2; url=index.php'>"); } else if(!empty($item)){ if($ran == 0){ if($row['inv_qty'] > 1){ if($row['inv_itemid'] == $user['inv_itemid'] && $row['inv_qty'] >= $user['inv_qty']){ $db->query("UPDATE `inventory` SET inv_qty=inv_qty+'1' WHERE inv_itemid=$item AND inv_userid=$userid"); $db->query("UPDATE `inventory` SET inv_qty=inv_qty-'1' WHERE inv_itemid=$item AND inv_userid={$_GET['ID']}"); } else $db->query("UPDATE `inventory` SET inv_qty=inv_qty-'1' WHERE inv_itemid=$item AND inv_userid={$_GET['ID']}"); $queryreg = mysql_query(" INSERT INTO `inventory` VALUES ('','$item','$userid','1') "); } else $db->query("UPDATE `inventory` SET inv_userid=$userid WHERE inv_itemid=$item"); $db->query("UPDATE `inventory` SET inv_userid=$userid WHERE inv_itemid=$item AND userid={$_GET['ID']}"); $db->query("UPDATE users SET steal_timestamp = unix_timestamp() WHERE userid=$userid"); print " You stole 1 item from [b]{$get_user_stats['username']}[/b]. Go check it out in your inventory! <meta http-equiv='refresh' content='2; url=index.php'>"; event_add($_GET['ID'],"{$ir['username']} stole an item from you.",$c); } } else if($get_user_stats['crystals'] > 0){ if($ran == 1){ $db->query("UPDATE users SET crystals=crystals+'1' WHERE userid=$userid"); $db->query("UPDATE users SET crystals=crystals-'1' WHERE userid={$_GET['ID']}"); $db->query("UPDATE users SET steal_timestamp = unix_timestamp() WHERE userid=$userid"); print " You stole 1 crystal from [b]{$get_user_stats['username']}[/b]. <meta http-equiv='refresh' content='2; url=index.php'>"; event_add($_GET['ID'],"{$ir['username']} stole 1 crystal from you.",$c); } } else if(strlen($get_user_stats['money']) < 3){ $amount = '0'; } else if(strlen($get_user_stats['money']) == 3){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 1); $amount = $random_number * $money; } else if(strlen($get_user_stats['money']) == 4){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 2); $amount = $random * $money; } else if(strlen($get_user_stats['money']) == 5){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 3); $amount = $random * $money; } else if(strlen($get_user_stats['money']) == 6){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 4); $amount = $random * $money; } else if(strlen($get_user_stats['money']) == 7){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 5); $amount = $random * $money; } else if(strlen($get_user_stats['money']) == 8){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 6); $amount = $random * $money; } else if(strlen($get_user_stats['money']) == 9){ $random = (rand(3,12)); $money = substr(($get_user_stats['money']), 0, 7); $amount = $random * $money; } if($amount == 0){ die("Player has very little money, it would be pointless to steal very little. <meta http-equiv='refresh' content='2; url=index.php'>"); } else if($get_user_stats['money'] < $amount){ die("Player does not have any money at this time. <meta http-equiv='refresh' content='2; url=index.php'>"); } else $db->query("UPDATE users SET money=money+$amount WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$amount WHERE userid={$_GET['ID']}"); $db->query("UPDATE users SET steal_timestamp = unix_timestamp() WHERE userid=$userid"); print " You stole \${$amount} from [b]{$get_user_stats['username']}[/b]. <meta http-equiv='refresh' content='2; url=index.php'>"; event_add($_GET['ID'],"{$ir['username']} stole \${$amount} from you.",$c); print "</table>"; } $h->endpage(); ?>   Run these sql: [mysql]ALTER TABLE `users` ADD `steal_timestamp` INT( 11 ) NOT NULL DEFAULT 'No Message'; [/mysql]   crystalsbank.php: <?php include "globals.php"; print "<h3>crystal Bank</h3>"; if($ir['crystalsbank']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money'] == 25000) { print "Congratulations, you bought a crystals bank account for \$25,000! [url='crystalsbank.php']Start using my account[/url]"; $db->query("UPDATE users SET money=money-25000,crystalsbank=0 WHERE userid=$userid"); } else { print "You do not have enough Money to open an account. [url='explore.php']Back to town...[/url]"; } } else { print "Open a crystals bank account today, just \$25,000! [url='crystalsbank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $db, $ir,$c,$userid,$h; print "[b]You currently have {$ir['crystalsbank']} crystals in the bank.[/b] <table width='75%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Deposit crystals[/b] <form action='crystalsbank.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['crystalsbank']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw crystals[/b] There is no fee on withdrawals.<form action='crystalsbank.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['crystalsbank']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['crystals']) { print "You do not have enough crystals to deposite in the bank bank."; } else { $gain=$_POST['deposit']-$fee; $ir['crystals']+=$gain; $db->query("UPDATE users SET crystalsbank=crystalsbank+$gain, crystals=crystals-{$_POST['deposit']} where userid=$userid"); print "You hand over {$_POST['deposit']} to be deposited, $gain is added to your account. [b]You now have {$ir['crystalsbank']} in the bank.[/b] [url='crystalsbank.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['crystalsbank']) { print "You do not have enough crystals to withdraw from the bank."; } else { $gain=$_POST['withdraw']; $ir['crystalsbank']-=$gain; $db->query("UPDATE users SET crystalsbank=crystalsbank-$gain, crystals=crystals+$gain where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have {$ir['crystalsbank']} in the bank.[/b] [url='crystalsbank.php']> Back[/url]"; } } $h->endpage(); ?>   Run this sql: [mysql] ALTER TABLE `users` ADD `crystalbank` INT( 11 ) NOT NULL DEFAULT '-1'; [/mysql]   I do not know if the crystal bank works as I stated above I found it in the old posts. I hope you like it and if you find any bugs NOT sloppy code but bugs please let me know. I did edit something and did not test it so there might be a bug but I doubt it....Thanks!
  16. Ok thanks.....
  17. A mod where you can join different clans/gangs whichever. Has that been made yet?
  18. I would like to make some money so I am offering my service to anyone who needs modifications to mccodes version 2. Examples well only 1 so far: Stealing Mod | Random Event Mod Payment Method: Paypal. Price: $1 per 50 lines. Code: HTML and PHP, if needed some javascript.   Thank you for reading and I hope you will be interested.
  19. Now changed to $3 as it does not have a item bank or anything.
  20. I changed it to $5. Enjoy.
  21. Just to let everyone know I did list this mod for $8 on the marketplace. Let me know if that is a good price.
  22. Just happened to me at 1:00 am Est, and man its painful.
  23. Looks a lot better, I don't even think I can do that.
  24. I would also just make the links on the top of the page devided by | or something.
×
×
  • Create New...