Jump to content
MakeWebGames

gear4life

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

gear4life's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Money Gym i gt this error   Fatal error: Cannot redeclare money_formatter() (previously declared in /home/badboyz/public_html/global_func.php:2) in /home/badboyz/public_html/global_func.php on line 5
  2. Re: Money Gym is this v2           Posts: 2   View Profile Email Personal Message (Offline) Ignore   Money Gym « on: October 05, 2007, 08:24:09 PM » Reply with quoteQuote Heres a gym for people who dont have any crystals. <?php /* money gym mod */ session_start(); include "globals.php"; 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $out=""; $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['money'] > 0;$i++) { if ($ir['money'] > 0) { $gain=rand(1,3)/rand(100,300)*rand(100,300)*(($ir['will']+20)/150); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=100; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train'];   mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,money=money-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(1,3)); if ($ir['will'] >= $wu) { $ir['will']-=$wu; mysql_query("UPDATE users SET money=money-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET money=money-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['money']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough money to train."; } } $stat=$ir[$st]; $i--; $out="You begin training your $st. You have gained $tgain $st by training it $i times. You now have $stat $st and {$ir['money']} money left. "; } else { $out="<h3>Money Gym: Main Lobby<h3>"; } $h->userdata($ir,$lv,$fm); $h->menuarea(); print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['money']} times. <form action='mgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?>
  3. Re: [mccode] crystal slots hus downsy007
  4. Re: [mccode] crystal slots how to convert mods can any1 learn me
  5. Re: [Mccode][Free] House Pictures any1 gt it for v2
×
×
  • Create New...