Jump to content
MakeWebGames

RedZone

Members
  • Posts

    45
  • Joined

  • Last visited

    Never

Everything posted by RedZone

  1. Re: Let see LOL! Would help if I posted the code. haha   <?php $macropage="gym.php"; include "globals.php"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$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['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $tot=$ir['strength']+$ir['guard']+$ir['agility']+ $gain; $tot=number_format($tot); if($ir['hospital']) { die("This page cannot be accessed while in hospital."); } print "<h3>Gym</h3><table bgcolor='black' style='width: 100%; border: 1px solid #282828;'> <tr> <td>You can currently train {$ir['energy']} times. "; $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); if(!$ir['jail']) 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; } $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 "You trained {$_POST['amnt']} times and gained {$gain} strength."; } elseif($stat=="agility") { print "You trained {$_POST['amnt']} times and gained {$gain} speed."; } elseif($stat=="guard") { print "You trained {$_POST['amnt']} times and gained {$gain} defense."; } elseif($stat=="labour") { print "You trained {$_POST['amnt']} times and gained {$gain} seamanship."; } elseif($stat=="all") { print "You trained {$_POST['amnt']} times and gained {$gain} strength. You trained {$_POST['amnt']} times and gained {$gain} speed. You trained {$_POST['amnt']} times and gained {$gain} defense."; } 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'); $ir['strength']=number_format($ir['strength']); $ir['guard']=number_format($ir['guard']); $ir['agility']=number_format($ir['agility']); print"<center> <table width='90%' align='center'> <tr> <td rowspan='3' width='10'> </td> <td rowspan='3' width='60'> </td> <td align='center'>[b]Strength[/b]</td> <td align='center'>[b]Defense[/b]</td> <td align='center'>[b]Speed[/b]</td> <td rowspan='3' width='10'> </td> <td rowspan='3' width='60'> [b]Refill:[/b] [url='crystaltemple.php?spend=refill']Energy[/url] [url='crystaltemple.php?spend=refillsleep']Sleep[/url] </td> </tr> <tr> <td align='center'><input type='text' name='amnt' value='{$ir['energy']}' size='5' maxlength='5'></td> <td align='center'><input type='text' name='amnt' value='{$ir['energy']}' size='5' maxlength='5'></td> <td align='center'><input type='text' name='amnt' value='{$ir['energy']}' size='5' maxlength='5'></td> </tr> <tr> <td align='center'><input type='submit' name='stat' value='All Strength'></td> <td align='center'><input type='submit' name='stat' value='All Defense'></td> <td align='center'><input type='submit' name='stat' value='All Speed'></td> </tr> <tr> <td colspan='7' align='center'> <input type='submit' name='train' value='Train'></td> </tr> </table> </center> </form> <h3>Attributes</h3><table bgcolor='black' style='width: 100%; border: 1px solid #282828;'> <tr> <td width='15%'>Strength:</td> <td width='35%'>{$ir['strength']}</td> <td width='15%'>Defense:</td> <td width='35%'>{$ir['guard']}</td> </tr><tr> <td width='15%'>Speed:</td> <td width='35%'>{$ir['agility']}</td> <td width='15%'>Total:</td> <td width='35%'>$tot</td> </tr></table>"; $h->endpage(); ?>
  2. Lets see who's a real coder.. I can't seem to get my gym to work right.... If some can tell me whats wrong or if they can fix it let me know. I'm going NUTS! :x
  3. Okay, for some reason my viewuser is not working for the mod I made up... Let me tell ya about it. Its an option we made in the edit user in admin to change the color of peoples names. (Drop down option) Well we got it to work with the header but for some reason its not working with the viewuser.php... I used the same strip of code I used from header.php on viewuser.php if($ir['color']){$u='<font color="#'.$ir['color'].'">'.$ir['username'].'</font>';} Now for viewuser.php i used if($r['color']){$u='<font color="#'.$r['color'].'">'.$r['username'].'</font>';} It ain't working..... Even when I keep the $ir nothing is working its like its totally reading over the color part. It shows the username but no color.
  4. Re: Levels Doesn't work :? :?
  5. I got a question this is VERY annoying. My game has bunnys on it like level 2000 players and when like level 5's beat the level 2000 to gain EXP/Levels every time they click on something they go up 1 level till they catch up to the amount of exp gained. Any ideas how to fix this? I wanna be able to show the right level the first time.
  6. Re: Clone Yeah, it looks like a pain in the butt. :lol:
  7. Re: Clone Cleaner. Matches what I got. :-D
  8. Does anyone think they can make a clone from: http://v2.ruletheseas.com/index.php?on=hall_of_fame I have tried for over an hour. I can't get it to work right. :? :?
  9. Re: List of Things. $$$ Well, just hit me up on whats going down.
  10. Re: List of Things. $$$ Haha, I will take you up on that offer. :mrgreen:
  11. Re: List of Things. $$$ Well, I wanna say that. 1,2,3,4 are all done. Now I need, 5 and some new ones. 6. Mugging people just like attack.php 7. Better Newspaper system where members can post there own stuff in the newspaper and they have to pay for it. 8. Avatar system that allows members to upload there own avatar.
  12. Well, as you probably seen in my other thread (attack.php), I am working on lots of changes to my website. I have changed a crap load already. What I need help with is a few things. I will list them. 1. Displaying Gang Tag on header.php at the top. 2. Making the Player of the week script work for player of the hour in header.php. 3. Showing the city name in the menu. 4. Get my voting page to be able to send points to the members who clicked the links. 5. Turn one of these car mods into a boat/ship mod and be able to train there boating skills in the gym to do ship attacks with other members. Later on when I build my cash up. I will hire someone to do quest for me and setup monsters for different city. Now, I'm some what very knowledgeable on how do somethings, just getting help to be put in the right direction is really what I need. I'm not very good with coding but I can learn fast if shown, I've learned how to do lots with this script already. I'm able to throw some money at the person who helps me with this and finishes. I just wanna finish this project and make it work good. If someone is able to do 1 or all of these things PM me with what you can do and charging price or if free even better, I know some. Remember I'm not a million air, I have only little and I'm welling to work out stuff with you. :wink: Thanks.
  13. Re: Attack.php But isn't that the attack.php part? Cause this puts in $hospreason = "Attacked by "; into the SQL so it shows there.... right?
  14. Re: Attack.php YAY! :-D It worked, BUT when you look in the hospital it says. " rscott4581 Attacked by 19" So it doesnt show who it was attacked by. :-(
  15. Re: Attack.php I checked 3 times 340 is that line. Do you wanna see the whole attack.php file? Here's what I got so far.. From like 325 to 343.  
  16. Re: Attack.php Now I'm getting: "Parse error: syntax error, unexpected '}', expecting ']' in /home/marfiaga/public_html/attack.php on line 340" On this line... print " {$r['username'}.";
  17. Re: Attack.php Nope still same error.. "Parse error: syntax error, unexpected T_IF in /home/marfiaga/public_html/attack.php on line 334"   $hospreason = "Attacked by ".if($r['gang']) { print "[url='gangs.php?action=view&ID={$r['][<font color='{$r['gangCOLOR']}'>{$r['gangPREF']}</font>][/url]"; } print "[url='viewuser.php?u={$r['] {$r['username']}[/url].";
  18. Re: Attack.php No I still don't see it. :? :?
  19. Okay, so I'm changing a crap load of stuff on Mccodes V2. I got my gang tag color working and I'm trying to get it to show up in the hospital by the person who attacked them. This is what I use in every other part but for some reason I'm not sure why its not working in attack.php. I get this ERROR: "Parse error: syntax error, unexpected T_IF in /home/GAMER/public_html/attack.php on line 334" Line 334 is $hospreason = "Attacked by "   if($theirhp <= 0){ // attacker won $winner = $user_class['ID']; $_SESSION['count']=0; $theirhp = 0; $moneywon = floor($attack_person['money'] /10); $expwon = 150 - (25 * ($user_class['level'] - $attack_person['level'])); $expwon = ($expwon < 0) ? 0 : $expwon; $hosptime=20; $hospreason = "Attacked by ".if($r['gang']) { print "[url='gangs.php?action=view&ID={$r['][<font color='{$r['gangCOLOR']}'>{$r['gangPREF']}</font>][/url]"; } print "[url='viewuser.php?u={$r['] {$r['username']}[/url]."";
×
×
  • Create New...