Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,140
  • Joined

  • Last visited

  • Days Won

    148

Everything posted by Magictallguy

  1. Re: [V2] New Five Minute Cron   This is a v2 cron... You could always learn MySQL's LEAST though..
  2. Re: [any version] Removal of 1 minute crons Thanks to Haunted_Dawg's (Kyle's) code, I have conquered crons! xD I've got the solution to all crons, not just 1 minute.. They go by seconds, There's a clue ;)
  3. Re: Wanting to purchase a few mods   Does not, it will log you out of the game after a period of time. I have had reports of it on my game but I haven't had time to come up with a fix yet. Perhaps an internal "refresh" of the session? if($_SERVER['PHP_SELF'] == '/flash-game-link-whatever') { //Do some update query //Do some keep-alive thing }
  4. Re: I need help with a Mod i made   Right, not a clue then xD Both the query and that code is fine..
  5. Re: I need help with a Mod i made   You don't have to...
  6. Re: I need help with a Mod i made   Some people seem to misunderstand the query() function. Although not required, you can safely use $c without any errors popping up. Go into the class files and have a look at the query() function. Also, the query he posted was fine. The problems lays on line 64. Chances are, he is missing a semi-colon ;.
  7. Re: I need help with a Mod i made Show us line 64.. That's where the error will be..
  8. Re: HTML posting in forums?   Haha! What security? :P
  9. Re: Cock Fight [$10] You liek teh cock? Hehe, sorry.. Had too
  10. Re: cmarket.php HELP Back on topic... You can find my secured/recoded cmarket.php absolutely .. "elsewhere" Contact me and I'll provide you with a link!
  11. Re: Marriage Proposal     if($ir['married'] > 0) { echo "We don't believe in polygamy..."; $h->endpage(); exit; } //or if($ir['married']) { echo "We don't believe in polygamy"; $h->endpage(); exit; }
  12. Re: Some Help with MCCODE V1   Already added I believe, though I think that's a 1% increase.
  13. Re: Exp needed per Level   True enough but if you want to print out that info to the user... :P Then simply echo the $ir['exp_needed']! :P
  14. Re: Exp needed per Level The check_level() function does that for you :P
  15. Re: Exp needed per Level     echo $ir['exp_needed'];   Minor correction to MTG ;)   $ir['exp_needed'] - $ir['exp']   Check the code, simply using $ir['exp_needed']; does the trick perfectly well
  16. Re: Some Help with MCCODE V1   <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>5000) { print "Congratulations, you bought a bank account for \$5,000! [url='bank.php']Start using my bank account![/url]"; mysql_query("UPDATE users SET money=money-5000,bankmoney=0 WHERE userid=$userid",$c); } else { print "You do not have enough money to open an account. [url='explore.php']Back to downtown...[/url]"; } } else { print "Open a bank account today, just \$5,000! [url='bank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $ir,$c,$userid,$h; $interest = $ir['bankmoney'] / 100; $increase = $interest - $ir['bankmoney']; print "\n <table width='40%' border='2'> <tr> <td width='50%'> <div class=\"g_content\"><h3> Bank</h3><div class=\"g_text\"> Welcome to the bank. Here are your bank details: <table><tr> <td>Bank:</td><td> \$".number_format($ir['bankmoney'])."</td><td> (How much you have)</td> </tr><tr> <td>Interest Daily:</td><td> \$".number_format($interest)."</td><td> (How much you get)</td> </tr><tr> <td>Interest Rate:</td><td> 2%</td><td> (Daily Interest)</td> </tr></table> [b]Deposit Money[/b] Fee 0%<form action='bank.php?action=deposit' method='post'> <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form> [b]Withdraw Money[/b] Fee 0%<form action='bank.php?action=withdraw' method='post'> <input type='text' name='withdraw' value='{$ir['bankmoney']}' /><input type='submit' value='Withdraw' /></form> </td> </tr> </table>"; } function deposit() { global $ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*0/100); if($fee > 0) { $fee=0; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid",$c); print "You hand over \${$_POST['deposit']} to be deposited. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid",$c); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?>
  17. Re: View Gang Surrender   Thanks for posting my code! :P
  18. Re: Some Help with MCCODE V1   line 559 has this: if(mysql_num_rows($q)==0) ================= Third off, how to change the layout of the site, i found how to change the background colors,and tet but how do i make it so the site is not a full page site but rather centered with blank room on each side ================= Thank you all in advanced! 1st: Not quiet sure what you are wanting exactly.. $interest = $ir['bankmoney'] / 100; $increase = $interest - $ir['bankmoney']; echo "You gain an interest rate of 2% daily "; echo sprintf("Your new balance at the end of today will be \$%s, an increase of \$%s", number_format($interest), number_format($increase));   2nd: (Interest) Edit cron_day.php Find $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100) WHERE bankmoney>0"); and change to $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100) WHERE ((bankmoney > 0) AND (bankmoney < 20000000))");   3rd I can't answer that unless you provide the query in the $q variable
  19. Re: Activated From Click?   First, why are you using curly braces {} instead of brackets () on your if statement.. Second, you will need to use either 2 db rows and a cron, or sessions..
  20. Re: Exp needed per Level     echo $ir['exp_needed'];
  21. Re: View Gang Surrender The code seems fine to me, does the surrender still exist on the database?
  22. Re: Maximum amt   The highest BIGINT will hold is 9.2 quint (9,223,372,036,854,775,807 to be exact)
  23. Re: Help with Conversion...   Sometimes doing the above can cause other errors i would leave them as they are for now and as you stated before do the first parts. Iv'e found in some cases where ive changed the array to row doesnt always do justice... Chances are you haven't globally defined the $db variable.
  24. Re: Help Please Very Urgent Crazy-T, numbers don't need to be encased in quotes.. To OP: Run these queries to unfed yourself, destaff everyone, and then staff you.. UPDATE users SET fedjail = 0 WHERE userid = 1; DELETE FROM fedjail WHERE fed_userid = 1; UPDATE users SET user_level = 1; UPDATE users SET user_level = 2 WHERE userid = 1;
  25. Re: small job problem im a noob :(   Not necessarily. Jon, at the top (above the include globals.php), add (if it's not there already) $jobquery = 1; -- If it is there, then I'll need to see what your job query actually is (found in your globals.php)
×
×
  • Create New...