Jump to content
MakeWebGames

Vyp3r2oo9

Members
  • Posts

    127
  • Joined

  • Last visited

    Never

Everything posted by Vyp3r2oo9

  1. Re: Gym Problem -- 100 Max Energy!   To what? :|
  2. Well - I bought a mod which requires 100 Max Energy but donators can have 150 Max Energy - But in my Gym I need to kind of "Convert" it so it fits the mod.. The problem is: It says "Times to Train" and a 0 in the box - Whereas I check my Energy Bar - I have 50 Energy Left -- And If i hit F5 it continues to train and starts going into MINUS numbers. Here is my attempt at doing it myself (Yes im posting the whole code to the V2 Gym..)   <?php $macropage="gym.php"; include "globals.php"; if($ir['hospital']) { die("This page cannot be accessed while Injured in Action."); } $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); if(!$ir['jail']) { print "<h3>Gym</h3><hr />"; } else { print "<h3>Jail Gym</h3><hr />"; } if($_POST['stat'] && $_POST['amnt']) { $stat=$statnames[$_POST['stat']]; if(!$stat) { die("This stat cannot be trained."); } if($_POST['amnt'] > $ir['energy']) { print("You do not have enough energy to train that much.<hr />"); } 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; } $tim=($_POST['amnt']*5); $db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - $tim WHERE `userid` = $userid"); $inc=$ir[$stat]+$gain; $inc2=$ir['energy']-$_POST['amnt']; if($stat=="strength") { print "You begin lifting some weights. You have gained {$gain} strength by doing {$_POST['amnt']} sets of weights. You now have {$inc} strength and {$inc2} energy left."; } elseif($stat=="agility") { print "You begin running on a treadmill. You have gained {$gain} agility by doing {$_POST['amnt']} minutes of running. You now have {$inc} agility and {$inc2} energy left."; } elseif($stat=="guard") { print "You jump into the pool and begin swimming. You have gained {$gain} guard by doing {$_POST['amnt']} minutes of swimming. You now have {$inc} guard and {$inc2} energy left."; } elseif($stat=="labour") { print "You walk over to some boxes filled with gym equipment and start moving them. You have gained {$gain} labour by moving {$_POST['amnt']} boxes. You now have {$inc} labour and {$inc2} energy left."; } print "<hr />"; $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'); print "Choose the stat you want to train and the times you want to train it. You can train " . (int)($ir['energy'] /= 5) . " times with the energy you have.<hr /> <form action='gym.php' method='post'> Stat: <select type='dropdown' name='stat'> <option style='color:red;' value='Strength'>Strength (Have {$ir['strength']}, Ranked {$ir['strank']}) <option style='color:blue;' value='Agility'>Agility (Have {$ir['agility']}, Ranked {$ir['agirank']}) <option style='color:green;' value='Guard'>Guard (Have {$ir['guard']}, Ranked {$ir['guarank']}) <option style='color:brown;' value='Labour'>Labour (Have {$ir['labour']}, Ranked {$ir['labrank']}) </select> Times to train: <input type='text' name='amnt' value= " . (int)($ir['energy']) . " /> <input type='submit' value='Train' /></form>"; $h->endpage(); ?>   Would love a Free Fix :D But if not Im willing to pay in about 2 days - but would need the fix A.S.A.P. So I can release my game and start getting donations to pay :)
  3. Re: Page Tutorials [$5]   Your retarded, or stupid, or something. First, the image is NOT the same, just because its a light bulb doesn't mean that it is the same light bulb. Second I added the same features, so? Half the mods for sale here are probably already found on torncity if not more, so why don't you go into every other thread and say that?   Hell, We can see you dont read many topics :-o I think somebody is going for the TC style on their game - And so what?, Whats the matter with that?
  4. Re: Count Users Clicks   Before where you added it try adding a ; or a "; -- Dont flame this post -- Im still learning :roll:
  5. Re: online/offline/total users :-o :-o :-o
  6. Re: Energy Orb [$5] Couldnt you just add somewhere where it defines the users max energy something liike... (Please excuse my bad coding - Im still not great) if($ir['donatordays']>1) set ($ir['maxenergy']=150) on all of the energy-comsuptive pages (attack, gym etc) Or could this work as like overwriting the max energy on the header.php Dont flame me for being a newbie coder :roll: Just an idea, thats all EDIT: This wont work :roll: Just realised that the energy increases as you level up (I think) so It would need a percentage equation in there
  7. Re: Guess the next poster Nope ;P Ghetto
  8. Re: [v2] Family's [$30]   You ant got one good comment in your body do you? And no this is nothing like pets, i bought this and its nothing like pets. Never thought I'd see the day when you say: "I bought" something..
  9. Re: Crime Formular Asked Coldblooded.. He said increase the 2.5 e.g. Increase the 2.5 to make the crime harder. Decrease the 2.5 to make the crime easier.
  10. Re: [V2]Lock Down[V2] My "5-Easy-Steps" Lockdown :wink:. 1. Buy real hosting that has a cPanel. 2. Click "Password Protect Directorys". 3. Click public_html or the directory you want to password. 4. Tick the box saying "Password protect this directory", type something in the "Name the protected directory" box. 5. Create a user and remember the username and password. There! That just saved you about 5 minutes of putting a mod on that you're most likely never going to use now you have seen this ;D But it could be good if you dont have time to logon to the cPanel (Although I'm always on my cPanel 8-)) Advantages : If you have helpers you can create a username for them too. This protects all of your files in the directory.   NOTE: The owner isn't always ID: 1 - If they dont know how to install a game they might get their coder to do it
  11. Re: Hide n Seek ;\ wth. How does it Encourage spamming? If Im actually replying something useful to the topic ;\ The link to the "Selling my test game!!" was missing so I replied telling him that. Also in the rules I made it quite clear the reply must be relevant to the topic itself with a little bit at the end with your word in it.. God ;| Only trying to liven it up a bit
  12. Re: Mafia Game Script v1.0 details (FREE UPDATES FOR LIFE) I'll buy it as soon as I get another £33.50 ! :D
  13. Righty, Hide n Seek isn't too hard and pretty self explanatory ;P The first poster has to post a reply in 1 topic in 3 different subforums/categorys with a certain word e.g. Bananananananaphone Rules : The reply in each subforum/category has to be relevant to the topic. The Certain Word must be at the bottom of the post. You must post the Certain Word here before you start! The person who finds the word must reply with the link to it! :D -------------------------------------- Go! My word is : Bananananananaphone
  14. Re: Cheburn (adam) Torncity He is in his 50s and lives in Estonia - according to him. http://www.torncity.com//profiles.php?XID=1 - Notice their all girls in his Profile Signature - Paedo :P http://whois.domaintools.com/torncity.com ;) Im bored, Anybody want to play Hide n Seek? :O
  15. Re: smf theme for mccodes??? :o I thought it was a guy who had made a crap login page for his game :O
  16. Re: FaceBook vs. MySpace Its the most popular at my college
  17. Re: [mccode] Improved Estate Agents for v2.0 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/battlefi/public_html/estate.php on line 4 Your current property: The houses you can buy are listed below. Click a house to buy it. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/battlefi/public_html/estate.php on line 47
  18. Re: Free Updated Newspaper   I was going to call you silly then - for leaving the game name at the top and on browser tab... But when i googled - 2,500,000 results ;) So your pretty clever :lol:
  19. Re: FaceBook vs. MySpace Just thought I'd pop in.. and say Bebo beats 'em all in the UK ;)
  20. Re: Crons Guide Have you never heard of editing your own post H1TMAN93 ... I mean wth - 4 Posts in a row
  21. Re: $15 drop down explore Gah! Didnt see the last 3 posts! Waste of time now ;)
  22. While swimming around you find $$$cashhhQUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid=110' at line 1 Query was UPDATE users SET money=money+ WHERE userid=110   This is a bug that was reported to me by a member of my game.. I have restored scuba.php to the earliest backup I have and it still doesnt fix it - So I was thinking it maybe in MySQL tables -- Which I've never really been good at so any help would be greatly appreciated!
  23. Re: Which mysql query?   I Second that! Lol - release the frustration!
  24. Re: SQL Injections Ok, So I forgot to mention I used a website..? :D
  25. Vyp3r2oo9

    Torchwood

    Re: Torchwood Heh ;) Bit late catching on - Lost starts uhh.. 3rd February in the UK - Been waiting for that for a while :)
×
×
  • Create New...