Jump to content
MakeWebGames

boots

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by boots

  1. Fatal error: Call to undefined function mkglobal() in /home/content/46/8879046/html/addsareas.php on line 34 does anyone know how to fix this
  2. if i take out   $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']);   i dont understand what these line do, do i just leave them ?
  3. whats wrong with the number_format function ? Lucky Taken out( int) in index.php still no change gym stats show as they should just index.php seems to be the prob,
  4. does your cron send a event ?
  5. After removing the magic_quotes i got this to work ok, but i also have a prob with the cron when i run the cron i get this error Parse error: syntax error, unexpected T_STRING in /home/bootson/public_html/mafia/cron_lottery.php on line 121 any help please   } if(!empty($potWin)) { $winners = implode(",", $potWin); } elseif(empty($potWin)) { $winners = "NA"; } $insertDone = ("INSERT INTO lotterydone (ldID, ldNUMBERS, ldZERO, ldONE, ldTWO, ldTHREE, ldFOUR, ldFIVE, ldSIX, ldPOT, ldPOTWIN, ldTIME) VALUES('','". $wn ."', ". $zero .", ". $one .", ". $two .", ". $three .", ". $four .", ". $five .", ". $six .", ". $jackpot .", '". $winners ."', UNIX_TIMESTAMP())"); mysql_query($insertDone) OR die("Could not insert into lottery done: ". mysql_error()); if($six == 0) { $jp = $jackpot; } elseif($six > 0) { $jp = 0; } $updateJackpot = ("UPDATE lotteryDetails SET lotjackpot = ". abs(@intval($jp)) .""); mysql_query($updateJackpot) OR die("Could not update jackpot: ". mysql_error()); } else { event_add(1, "No lottery this week. <img src="images/smilies/frown.png" border="0" alt="" title="Frown" class="inlineimg" />"); ......this is line 121 } $truncate = ("TRUNCATE TABLE lotterytickets");
  6. <br><table width=90% border=0 height='150' class=table3 style= text-align:center; >"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['robskill']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['robrank']=get_rank($ir['robskill'],'robskill'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['robskill']=number_format($ir['robskill']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts);   this is my stat info from index.php   </tr>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "<tr> <td width=50%><b>Name:</b> {$ir['username']}</td><td><b>Crystals:</b> {$cm}</td></tr><tr> <td><b>Level:</b> {$ir['level']}</td> <td><b>Exp:</b> {$exp}%</td></tr><tr> <td><b>Money:</b> $fm</td> <td><b> Gang:</b> "; $qs=$db->query("SELECT * FROM gangs WHERE gangID={$ir['gang']}"); $rs=$db->fetch_row($qs); if(!$db->num_rows($qs) )   this is the only bit i can find int unless im missing somthing
  7. sorry guys but still got a prob Warning: sprintf() [function.sprintf]: Too few arguments in /home/bootson/public_html/test/rentaspy.php on line 217 QUERY ERROR: Query was Resource id #30 reads all the info stats,lev money and all but still get that error
  8. Ok guy all is well thanks for you help :)
  9. the 1st 1 seems to work well move me forward lol now i get this error Query was SELECT `level`, `username`, `equip_primary`, `equip_secondary`, `equip_armor`, `money`, `rating`, `bankmoney`, `crimexp`, `crystals` FROM `users` WHERE userid = 7 starting to think do i really need a spy in my game :)
  10. Thanks guys but still not working i have removed http://" and target- blank whick normally works ok but this time no joy Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/bootson/public_html/ravan/rentaspy.php on line 16   <?php /*-------------------------------------------------------------- -- RentASpy -- Compatible: Mono Country Version 2 -- Script Verion: 3.0 -- Made by: Zero-Affect --------------------------------------------------------------*/ include "globals.php"; // If you want it so anyone can use this modification remove the next 4 lines $_GET['ID']=abs((int) $_GET['ID']); $_GET['PAID']=abs((int) $_GET['PAID']); if(!$ir['donatordays']) { echo 'Invalid Command. Only donators can access this area. ><a href='index.php'>Go Home</a>'; $h->endpage(); exit; } $sql = sprintf('SELECT `level`, `username`, `equip_primary`, `equip_secondary`, `equip_armor`, `money`, `rating`, `bankmoney`, `crimexp`, `crystals` FROM `users` WHERE userid = %u', $_GET['ID']); $sql = $db->query($sql); $r=$db->fetch_row($sql); if($_GET['ID']==$userid) { echo 'Invalid Command. Why would you wanna spy on yourself? ><a href='index.php'>Go Home</a>'; $h->endpage(); exit; } if($_GET['ID'] && $_GET['PAID']) { $cost=$r['level']*2000; if($_GET['PAID']!=$cost) { echo 'Invalid Command. Quit trying to abuse bugs. ><a href='index.php'>Go Home</a>'; $h->endpage(); exit; } if($_GET['PAID']>$ir['money']) { echo 'Invalid Command. You dont have enough money to spy on '.$r['username'].'. ><a href='index.php'>Go Home</a>'; $h->endpage(); exit; } $rand=rand(1,15); if($rand==1) { $ql = sprintf('SELECT `username` FROM users WHERE userid = %u', $userid); $ql = $db->query($ql); $n=$db->fetch_row($ql); $query = sprintf('UPDATE `users` SET money=money-%u WHERE userid = %u', $_GET['PAID'], $userid); $db->query($query); print '<b>Your spy has been caught. Your name may have been mentioned.</b>'; event_add($_GET['ID'],"<a href=\'viewuser.php?u=$userid\" target=\"_blank\">{$n['username']}</a> tried to rent a spy on you but failed."); } else { $query = sprintf('UPDATE `users` SET money=money-%u WHERE userid = %u', $_GET['PAID'], $userid); $db->query($query); $sta = sprintf('SELECT `strength`, `agility`, `guard`, `labour`, `IQ` FROM userstats WHERE userid = %u', $_GET['ID']); $sta = $db->query($sta); $sats=$db->fetch_row($sta); $we = sprintf('SELECT `itmname` FROM items WHERE itmid = %u', $r['equip_primary']); $we = $db->query($we); $pri=$db->fetch_row($we); $we1 = sprintf('SELECT `itmname` FROM items WHERE itmid = %u', $r['equip_secondary']); $we1 = $db->query($we1); $sey=$db->fetch_row($we1); $we2 = sprintf('SELECT `itmname` FROM items WHERE itmid = %u', $r['equip_armor']); $we2 = $db->query($we2); $arm=$db->fetch_row($we2); if(!$pri['itmname']) { $prim="None"; } else { $prim="{$pri['itmname']}"; } if(!$sey['itmname']) { $secon="None"; } else { $secon="{$sey['itmname']}"; } if(!$arm['itmname']) { $arm="None"; } else { $arm="{$arm['itmname']}"; } if($sats['strength'] > $ir['strength']) { $stren="<font color=red>Weaker</font>"; } elseif($sats['strength'] == $ir['strength']) { $stren="<font color=blue>Equal</font>"; } else { $stren="<font color=green>Stronger</font>"; } if($sats['agility'] > $ir['agility']) { $agility="<font color=red>Weaker</font>"; } elseif($sats['agility'] == $ir['agility']) { $agility="<font color=blue>Equal</font>"; } else { $agility="<font color=green>Stronger</font>"; } if($sats['guard'] > $ir['guard']) { $guard="<font color=red>Weaker</font>"; } elseif($sats['guard'] == $ir['guard']) { $guard="<font color=blue>Equal</font>"; } else { $guard="<font color=green>Stronger</font>"; } if($sats['labour'] > $ir['labour']) { $labour="<font color=red>Weaker</font>"; } elseif($sats['labour'] == $ir['labour']) { $labour="<font color=blue>Equal</font>"; } else { $labour="<font color=green>Stronger</font>"; } if($sats['IQ'] > $ir['IQ']) { $IQ="<font color=red>Weaker</font>"; } else if($sats['IQ'] == $ir['IQ']) { $IQ="<font color=blue>Equal</font>"; } else { $IQ="<font color=green>Stronger</font>"; } $money=number_format($r['money']); $bmoney=number_format($r['bankmoney']); echo "<table width='75%' border='1' class='h'> <tr><th>Primary</th><th>Secondary</th><th>Armor</th></tr> <tr><td>$prim</td><td>$secon</td><td>$arm</td></tr> </table> <table width='75%' border='1' class='h'> <tr><th>Stats</th> <th>Your Stats</th><th>Compare</th></tr> <tr><td>Strength: {$sats['strength']}</td><td>Strength: {$ir['strength']}</td><td><center><b>$stren</b></center></td></tr> <tr><td>Agility: {$sats['agility']}</td><td>Agility: {$ir['agility']}</td><td><center><b>$agility</b></center></td></tr> <tr><td>Guard: {$sats['guard']}</td><td>Guard: {$ir['guard']}</td><td><center><b>$guard</b></center></td></tr> <tr><td>Labour: {$sats['labour']}</td><td>Labour: {$ir['labour']}</td><td><center><b>$labour</b></center></td></tr> <tr><td>IQ: {$sats['IQ']}</td><td>IQ: {$sats['IQ']}</td><td><center><b>$IQ</b></center></td></tr></table> <table width='75%' border='1'> <tr><td><center><a href=\'attack.php?ID={$_GET['ID']}\" target=\"_blank\"><b>Attack?</b></a></center></td></tr> </table> <table width='45%' border='1' class='h'> <tr><th>$$$</th><th>Misc</th></tr> <tr><td>Money: \${$money}</td><td>Rating: {$r['rating']}</td></tr> <tr><td>Bank Money: \${$bmoney}</td><td>Crime exp: {$r['crimexp']}</td></tr> <tr><td>Crystals {$r['crystals']}</td><td>Level: {$r['level']}</td></tr> </table> <table width='75%' border='1' class='h'> <tr><th>Name</th> <th>Ammount</th></tr>"; $z = sprintf('SELECT `inv_itemid`, `inv_qty` FROM inventory WHERE inv_userid = %u ORDER BY inv_itemid DESC', $_GET['ID']); $z = $db->query($z); while($e=$db->fetch_row($z)) { $t = sprintf('SELECT `itmname` FROM items WHERE itmid = %u', $e['inv_itemid']); $t = $db->query($t); $itm=$db->fetch_row($t); print "<tr><td><b>{$itm['itmname']}</b></td><td><b>{$e['inv_qty']}</b></td></tr>"; } print "</table> <a href=\'attack.php?ID={$_GET['ID']}\" target=\"_blank\">Back To Profile.</a></br> Created By Zero-Affect"; } } else if($_GET['ID']) { $cost=$r['level']*2000; print "<b>You are hiring a spy on {$r['username']}</b> It will cost you $$cost for the spys expenses. But be warned spying is not always 100% successful. <form action='rentaspy.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> <input type='hidden' name='PAID' value='$cost' /> <input type='submit' value='Hire Spy'/></form>"; } $h->endpage(); ?>   line 16 is as shown this is what i have at line 16 now <a href='index.php'>Go Home</a>';
  11. Can some-one Please repost this i have so many errors with it, i think the forum messed up the code when they changed to the new layout, i have made some changes but still having probs :(
  12. Already done that, my stats show in the database,so i dont think the prob is there,maybe wrong i dont know Im lost,it just ingame where the stats dont show it caps at 2.1 bill :(
  13. thanks peter but all sorted :)
  14. Thanks Dj :)
  15. The script is for my voting page i have items as rewards for voters , the problem is when items are given they go in the inventory as single items. i want them to group together instead of loads of single items if they get a will potion then it adds to the rest of the will potions not a long list of potions
  16. Im trying to change this so they dont add to the inventory as single items   if($r['rewardtype'] == 3) { $juk=mysql_query("SELECT * FROM items WHERE itmid=$reward",$c); $item=mysql_fetch_array($juk); mysql_query("INSERT INTO votes values ($userid,$id)",$c); mysql_query("INSERT INTO inventory values ('',$reward,$userid,1)",$c); <<<<<<<<<< this line event_add($userid,"Thank you for voting! You have receieved a/an {$item['itmname']}!", $c); } if($r['rewardtype'] == 4)   this is what i have so far but still cant get it to work   if($r['rewardtype'] == 3) { $juk=mysql_query("SELECT * FROM items WHERE itmid=$reward",$c); $item=mysql_fetch_array($juk); mysql_query("INSERT INTO votes values ($userid,$id)",$c); item_add($userid,$reward,1)",$c); event_add($userid,"Thank you for voting! You have receieved a/an {$item['itmname']}!", $c); } if($r['rewardtype'] == 4)
  17. still having the same prob can some-one please help
  18. Parse error: syntax error, unexpected '/', expecting '}' in /home/bootson/public_html/mafia/inventory.php on line 134       $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print"</td><td>[img=itmpics/{$i[]"; <<<<<<<<<<<<<<< this is line 134 $usershop=$db->query("select * from usershops where userid=$userid"); if(mysql_num_rows($usershop)!=0) { $addtoshop="[<a href='addtoshop.php?ID={$i['inv_id']}'>Put in Shop</a>]"; } print "</td><td>[<a href='iteminfo.php?ID={$i['itmid']}'>Info</a>] [<a href='itemsend.php?ID={$i['inv_id']}'>Send</a>] [<a href='itemsell.php?ID={$i['inv_id']}'>Sell</a>] [<a href='imadd.php?ID={$i['inv_id']}'>Add To Market</a>] $addtoshop"; $usershop=$db->query("select * from usershops where userid=$userid");
  19. Gym.php <?php $macropage="gym.php"; require "globals.php"; if($ir['hospital']) { die("<prb>This page cannot be accessed while in hospital.</prb>"); } $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); if(!$ir['jail']) { print "<div class='gympage'> <div class='gympart'> <div class='gymtxt'><img src='images/gym_txt.jpg' alt='' /></div> </div>"; } else { print " <div class='gympage'> <div class='gympart'></div> "; } if($_POST['stat'] && $_POST['amnt']) { $stat=$statnames[$_POST['stat']]; if(!$stat) { die("<prb><br>This stat cannot be trained.</prb>"); } if($_POST['amnt'] > $ir['energy']) { print("<prb><font color='red'>You do not have enough energy to train that much.</font></prb>"); } else { $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } } if($ir['jail']) { $gain/=2; } $db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid"); $inc=$ir[$stat]+$gain; $inc2=$ir['energy']-$_POST['amnt']; if($stat=="strength") { print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> You start to lift some weights, You go heavier and heavier until You are out of energy.<br /> You have gained {$gain} strength by doing {$_POST['amnt']} sets of weights.<br /> You now have {$inc} strength and {$inc2} energy left. </div></div> "; } elseif($stat=="agility") { print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> You Begin to run on the treadmill, You keep tapping the faster button till you fly off the damn thing!.<br /> You have gained {$gain} agility by doing {$_POST['amnt']} minutes of running.<br /> You now have {$inc} agility and {$inc2} energy left. </div></div> "; } elseif($stat=="guard") { print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> You jump into the pool and begin swimming, you keep flapping your arms in the water like Michael Felps, you get a cramp and almost drown.<br /> You have gained {$gain} guard by doing {$_POST['amnt']} minutes of swimming.<br /> You now have {$inc} guard and {$inc2} energy left. </div></div> "; } elseif($stat=="labour") { print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> You walk over to the front desk, and ask the manager If you can volunteer to help the gym out, He says unload the boxes In the back, You unload boxes until the gym closes<br /> You have gained {$gain} labour by unloading {$_POST['amnt']} boxes.<br /> You now have {$inc} labour and {$inc2} energy left. </div></div> "; } $ir['energy']-=$_POST['amnt']; $ir[$stat]+=$gain; } } $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); if( $ir['energy'] == "0" ) { print " <table width='90%'><tr><td><p> You dont have any energy for taining <a href='crystaltemple.php?spend=refill'><font color='green'>[Refill Energy]</font></a></p></td></tr></table> <br /> "; } else { print " <table width='90%'><tr><td><p> You can train up to <prb> {$ir['energy']} </prb> times with your current energy.</p></td></tr></table> <br />"; } print " <table width='90%' class='table'> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Strength'></input> <th width='15%'><ph2>Strength:</ph2></th> <td width='15%'>{$ir['strength']}</td> <td width='10%'>Rank {$ir['strank']}</td> <td width='40%'>Times to train: <input name='amnt' type='text' style='color: black;background-color: white;' value='{$ir['energy']}' > </input> </td> <td width='20%'> <input type=image name='submit' src='images/trainbtn.jpg' alt='Home' border='0''> </input> </td> </form> </tr> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Agility'></input> <th width='15%'><ph2>Agility:</ph2></th> <td width='15%'>{$ir['agility']}</td> <td width='10%'>Rank {$ir['agirank']}</td> <td width='40%'>Times to train: <input type='text' style='color: black; background-color: white;' name='amnt' value='{$ir['energy']}'></input></td> <td width='20%'><input type=image name='submit' src='images/trainbtn.jpg' alt='Home' border='0''> </input> </td> </form> </tr> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Guard'></input> <th width='15%'><ph2>Guard:</ph2></th> <td width='15%'>{$ir['guard']}</td> <td width='10%'>Rank {$ir['guarank']}</td> <td width='40%'>Times to train: <input type='text' style='color: black; background-color: white;' name='amnt' value='{$ir['energy']}'></input></td> <td width='20%'><input type=image name='submit' src='images/trainbtn.jpg' alt='Home' border='0''> </input> </td> </form> </tr> <tr> <form action='gym.php' method='post'> <input type='hidden' name='stat' value='Labour'></input> <th width='15%'><ph2>Labour:</ph2></th> <td width='15%'>{$ir['labour']}</td> <td width='10%'>Rank {$ir['labrank']}</td> <td width='40%'>Times to train: <input type='text' style='color: black; background-color: white;' name='amnt' value='{$ir['energy']}'></input></td> <td width='20%'><input type=image name='submit' src='images/trainbtn.jpg' alt='Home' border='0''> </input> </td> </form> </tr> </table><br />"; $h->endpage(); ?>
  20. yeah BIGINT would work as well, but the prob don't seem to be with the DB as the higher stats show, but in game they show with the 2 bill cap
  21. which files do you want ?
  22. Hi i have changed my tables in user stats and all is well, stats show ok in the DB but ingame they still show with 2bill cap how can i change this ? strength agility and gaurd set at decimal(13,0) and all stats show ok in the tables please help
  23. I have sorted it now made some changes in docrime php all seems good :)
  24. This is my global_func.php   function check_level() { global $db; global $ir,$c,$userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['exp'] >= $ir['exp_needed']) { $expu=$ir['exp']-$ir['exp_needed']; $ir['level']+=1; $ir['exp']=$expu; $ir['energy']+=1; $ir['brave']+=1; $ir['maxenergy']+=1; $ir['maxbrave']+=1; $ir['hp']+=50; $ir['maxhp']+=50; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); $db->query("UPDATE users SET level=level+1,exp=$expu,energy=energy+1,brave=brav e+1,maxenergy=maxenergy+1,maxbrave=maxbrave+1, hp=hp+50,maxhp=maxhp+50 where userid=$userid"); } } function get_rank($stat, $mykey) { global $db; global $ir,$userid,$c; $q=$db->query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0") ; return $db->fetch_single($q)+1; } this is one of the formula's iam using ((WILL*0.7)/35.9)+(LEVEL/125),, this crime gives $1900 if i boost the money to say 80000 the exp goes mad i can make my 1st level in 1/2 clicks i dont want ti give too much money out but i dont want my players complaining it takes to long to make a level ,maybe i need a new crime system, Im learning as i go along not good with coding please help
  25. I dont understand how the crimes work, i mean when i set the EXP high, the exp dont go up any faster, yet if i increase the money reward the EXP and level go up faster i have tested it out so many ways all started at level 1, i just dont get it? y do i get more EXP when i raise the money yet if i rase the EXP when i make a new crime the EXP don't move up any faster, all i want is to set the money reward for the crime that dont efect the EXP, and the crime EXP to level up Am i missing somthing here ????
×
×
  • Create New...