Matsu Posted January 19, 2009 Posted January 19, 2009 If I want to change the gym so it lets you train all stats at once, would I do it like this? Change: $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); to $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour', 'All Stats' => 'all'); $_POST['amnt']=abs((int) $_POST['amnt']); and after: 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."; } add: elseif($stat=="all") { print "You lift some weights, run on a tradmill, go swimming, and move boxes of gym equipment. You have gained {$gain} strength by doing {$_POST['amnt']} sets of weights. You have gained {$gain} agility by doing {$_POST['amnt']} minutes of running. You have gained {$gain} guard by doing {$_POST['amnt']} minutes of swimming. You have gained {$gain} labour by moving {$_POST['amnt']} boxes. You now have {$inc} strength, {$inc2} agility, {$inc3} guard, {$inc4} labour and {$inc5} energy left."; } I'm new to coding, and working as an admin on someone else's game, so I don't want to make the change and mess it up without being sure it's the right way to code this. Sorry if it sounds like too much of a newbie question for these forums. Never mind. We decided to use Nyna's gym modification, so it doesn't really matter. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.