Jump to content
MakeWebGames

JAMESOMIGHTY

Members
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JAMESOMIGHTY

  1. just stick it above $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0");
  2. thanks, i'll be using this
  3. should be interesting...
  4. i did this in a rush ok :P
  5. go have your little argument on your own thread lmao
  6. well my games to do with zombies so it sort of fits for me, it can be easily changed to what you want though ;)
  7. you can catch rats, you can sell yours rats (the sell price changing each day), the amount of rats you can catch goes up by one every minute (there can be a maximum of 100 rats to catch at a time)   <?php include "globals.php"; $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; switch($_GET['action']) { case 'catch': catch_1(); break; case 'catchsub': catch_1_sub(); break; case 'sell': sell_1(); break; case 'sellsub': sell_1_sub(); break; default: rat_index(); break; } function rat_index() { global $ir,$userid,$db,$h; echo " You have a cage.... You see some rats.... time to catch!!! [url='catchrats.php?action=catch']CATCH SOME RATS!!![/url] <font color=white>There are {$ir['rats']} rats left to catch</font> <font color=lime>Todays rat sell price is [b]$/{$ir['ratsell']}[/b] per rat,</font> <font color=yellow>You have {$ir['yourrats']} rats in your cage</font> <font color=purple>[url='catchrats.php?action=sell']SELL YOUR RATS</font>[/url]"; } function catch_1() { global $ir,$userid,$db,$h; if($ir['rats'] ==0) { echo "No rats to catch, come back in a minute or so"; exit; } echo "<font color=lime> <h2>You caught a rat!</font></h2> {$ir['rats']} rats left to catch [url='catchrats.php?action=catch']CATCH ANOTHER RAT[/url] [url='catchrats.php?action=rats']Back[/url]"; mysql_query("UPDATE `users` SET `yourrats`=`yourrats`+1, `rats`=`rats`-1 WHERE (`userid`=".$_SESSION['userid'].")"); } function sell_1() { global $ir,$userid,$db,$h; if($ir['yourrats'] ==0) { echo "You have no rats to sell"; exit; } $amount=$ir['ratsell']; echo " <h2><font color=lime>You sold a rat for $/{$ir['ratsell']}</font></h2> {$ir['yourrats']} rats left to sell [url='catchrats.php?action=sell']SELL ANOTHER RAT[/url] [url='catchrats.php?action=rats']Back[/url]"; mysql_query("UPDATE `users` SET `yourrats`=`yourrats`-1, `money`=`money`+$amount WHERE (`userid`=".$_SESSION['userid'].")"); } $h->endpage; ?>   sqls [mysql] ALTER TABLE users ADD rats INT(11) DEFAULT 100; ALTER TABLE users ADD ratsell INT(11) DEFAULT 50; ALTER TABLE users ADD yourrats INT(11) DEFAULT 0;[/mysql] cron_day.php $rats=rand(1,100); $db->query("UPDATE users SET ratsell=$rats");   cron_minute.php $db->query("UPDATE users SET rats=rats+1 WHERE rats < 100");
  8. yes i get the message, anyway i was just saying you could just do this rather than making a whole new file, its up to you what you put in it
  9. or you can put it in header.php if you want
  10. rather than waste your time adding a whole new file for the starter pack just add this to the top of loggedin.php   if($ir['starter'] ==0) { $db->query("UPDATE users SET crystals=crystals+100 WHERE userid=$userid",$c); $db->query("UPDATE users SET money=money+10000 WHERE userid=$userid",$c); $db->query("UPDATE users SET donatordays=donatordays+5 WHERE userid=$userid",$c); $db->query("UPDATE users SET starter=1 WHERE userid=$userid"); $db->query("INSERT INTO inventory VALUES('',1,$userid,100)"); $db->query("INSERT INTO inventory VALUES('',2,$userid,100)"); event_add($ir['userid'],"you were given a complementary starter pack to get you going",$c); }   and run this [mysql]ALTER TABLE users ADD starter INT(11) DEFAULT 0;[/mysql]
  11. you choose whether to go left or right in the maze, if you get it right your jackpot increases, if you get it wrong your jackpot reduces to 0, you can choose whether to gamble your money and possibly win more or just take it and leave. maze.php <?php include "globals.php"; if ($ir['mazeturns'] == 0) { echo "<center>You can only do this once a day!</center>"; exit; } echo "<h2>THE MAZE</h2> "; if($_GET['action'] == 'maze') { echo "Welcome to the maze! [url='maze.php?action=entermaze']<center>Enter the maze</center>[/url]"; } if($_GET['action'] == 'entermaze') { echo "Which way would you like to go? [url='maze.php?action=right']<center>Go Right</center>[/url] [url='maze.php?action=left']<center>Go Left</center>[/url] "; } if($_GET['action'] == 'right') { $rand=rand(1,2); $money=$ir['mjackpot']*5; if($rand == 1) { $db->query(sprintf("UPDATE `users` SET `mjackpot`= `mjackpot` *%d WHERE (`userid`=%d)", 5, $userid)); echo "<font color=lime>Congratulations! you took the right path and your jackpot was increased to $$money</font> [url='maze.php?action=right']<center>Go Right</center>[/url] [url='maze.php?action=left']<center>Go Left</center>[/url] [url='maze.php?action=money']<center>Take the money and run</center>[/url]"; } if($rand == 2) { $db->query(sprintf("UPDATE `users` SET `mazeturns`= %d WHERE (`userid`=%d)", 0, $userid)); echo "You took the wrong path :( come back tomorrow :) [url='index.php']<center>Go Home</center>[/url]"; } } if($_GET['action'] == 'left') { $rand=rand(1,2); $money=$ir['mjackpot']*5; if($rand == 1) { $db->query(sprintf("UPDATE `users` SET `mjackpot`= `mjackpot` *%d WHERE (`userid`=%d)", 5, $userid)); echo "<font color=lime>Congratulations! you took the right path and your jackpot was increased to $$money</font> [url='maze.php?action=right']<center>Go Right</center>[/url] [url='maze.php?action=right']<center>Go Left</center>[/url] [url='maze.php?action=money']<center>Take the money and run</center>[/url]"; } if($rand == 2) { $db->query(sprintf("UPDATE `users` SET `mazeturns`= %d WHERE (`userid`=%d)", 0, $userid)); echo "You took the wrong path :( come back tomorrow :) [url='index.php']<center>Go Home</center>[/url]"; } } if($_GET['action'] == 'money') { echo "<font color=lime>You have claimed your jackpot of $/{$ir['mjackpot']}</font> [url='index.php']<center>Go Home</center>[/url]"; $db->query(sprintf("UPDATE `users` SET `mazeturns`= %d WHERE (`userid`=%d)", 0, $userid)); $db->query(sprintf("UPDATE `users` SET `money`=`money`+%d WHERE (`userid`=%d)", $ir['mjackpot'], $userid)); } $h->endpage; ?>   sqls [mysql]ALTER TABLE users ADD mazeturns INT(11) DEFAULT 1; ALTER TABLE users ADD mjackpot INT(11) DEFAULT 10000;[/mysql] crons (cron_day.php) $db->query("UPDATE users SET mazeturns=1"); $db->query("UPDATE users SET mjackpot=10000");
  12. crons? could that realy be a possible problem?
  13. so what do i do?
  14. basically sometimes some of my members houses just vanishes leaving a blank space in the the viewuser page and not being able to buy or sell a house, i've been trying to fix it but i cannot figure out what the problem is, i know its nothing to do with the estate page cos i've reuploaded it like 5 times, any help would be great :)
  15. ok i have this bit of code in my header to stop session hijacking but occasionaly it can make users suddenly log into other users accounts and be able to do stuff!   } if(isset($_SESSION['userAgent']) && sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION['userAgent']) { echo ('[b]An error has occured with your account, please Sign-In again. Click <a href = "/login.php">HERE</a> to go to the sign in page.[/b]'); session_unset(); session_destroy(); $h->endpage(); exit(); } else { $_SESSION['userAgent'] = sha1($_SERVER['HTTP_USER_AGENT']); }   if anyone can see a problem with this pls post the fix!!!
  16. thanks for the advice guys :D
  17. wow my first ever mod and you come out with a comment like that? thanks for the confidence boost :thumbsup:
  18. wow is no one else interested in this mod ?(
  19. well i made it pretty clear that its not mine and i know i hadnt paid for so whats the problem? It just seems all the free chat boxes are the same on mwg so as i said i thought it might of been a nice alternative
  20. ok i found this error in the script so had to change it a bit, if you had already added the mod before this was posted simply run this [mysql]ALTER TABLE users ADD eguards INT(11) DEFAULT 0;[/mysql] replace the estate.php again, add the file estateguards.php thats in the first post, otherwise juast add it normaly
  21. thanks wxr!!! they work perfectly now :) thanks for trying to help though kdawg08 dude, plus you can edit that mod you said as much as you want :)
  22. well whatever i like it, anyway CAN ANYONE HELP! anyone who has done crons on hosting24.com pls post the template of the cron here! and ive NEVER heard of godaddy before lol
  23. hey thats a realy good host and how is it not well known? its like one of the most used!
  24. hell no is it free $8 a month :D
×
×
  • Create New...