
Oo-Savage-oO
Members-
Posts
91 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Oo-Savage-oO
-
I added this bit of code snippet to the header to make missions mod but now it isnt working I tried everything but it doesnt work Here is my header <?php header('X-UA-Compatible: IE=EmulateIE8'); ob_start ("ob_gzhandler"); header("Cache-Control: must-revalidate"); $count = 3; $x = -1; while($x < $count) { $security = array("ID","viewforum","viewtopic"); $x++; $_GET[$security[$x]] = abs(@intval($_GET[$security[$x]])); } class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>{$set['game_name']}</title> <meta http-equiv="content-language" content="en"/> <meta name="Distribution" content="Global"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <link rel="stylesheet" type="text/css" href="custom.css" /> </head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> <style type="text/css"> img { border: none; } </style> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $_SERVER['REMOTE_ADDR']; $IP = mysql_real_escape_string($IP); $IP = $db->escape($IP); $db->query("UPDATE users SET laston=unix_timestamp(), lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die (" <body> Your account may be broken. Please mail support@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print " You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0, attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = " <font color=red>{$ir['username']}</font> ";$d="[img=donator.gif]"; } $gn=""; global $staffpage; $bgcolor = '999999'; if($ir['mission'] != 0) { $mq=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']."",$c); if(mysql_num_rows($mq)== 0) { mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c); } $rm=mysql_fetch_array($mq); if($rm['location_on']== 1) { if($rm['location_value'] != $ir['location']) { mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c); event_add($ir['userid'],"Your mission has been ended because you have moved city.",$c); } } if($rm['item_on']== 1 && $rm['attack_on']== 0) { $invq=mysql_query("SELECT * FROM inventory WHERE inv_userid=".$userid." AND inv_itemid=".$rm['item_value']."",$c); if(mysql_num_rows($invq)) { $exp=rand($ir['level'],$ir['level']*5); mysql_query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c); $mission=($ir['mission']); mysql_query("INSERT INTO missdone VALUES ($userid,$mission);",$c); mysql_query("DELETE FROM inventory WHERE inv_userid=$userid AND inv_itemid=".$rm['item_value']."",$c); event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c); } } if($rm['item_on']== 0 && $rm['attack_on']== 0) { mysql_query("UPDATE users SET mission=0 WHERE userid=".$userid."",$c); $owner=1; event_add($owner,"The mission $rm[name] mission ($rm[id]) is not set to a mission, Please do so.",$c); } if($rm['item_on']== 0 && $rm['attack_on']== 1) { $usa=$_SESSION['mission_attack']; $aa=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']." AND attack_value=".$_SESSION['mission_attack']."",$c); if(mysql_num_rows($aa)) ?{ ?$exp=rand($ir['level'],$ir['level']*10); mysql_query("UPDATE users SET mission=0, money=money+".$rm['money'].", crystals=crystals+".$rm['crystals'].", exp=exp+".$exp.", mission_counter=mission_counter+'1' WHERE userid=".$userid."",$c); $mission=($ir['mission']); mysql_query("INSERT INTO missdone VALUES ($userid,$mission);",$c); event_add($ir['userid'],"You have completed the mission and you was credited your reward.",$c); } } //Display Pic $display_pic = $ir['display_pic']; if(!$display_pic) { $display_pic="/images/noav.png"; } print <<<OUT <div id="hd"> <div class="hd_displaypic">[img=$display_pic]</div> <div class="hd_username"> [b]Name:[/b] [url="viewuser.php?u={$ir['userid']}"] $gn{$u} [{$ir['userid']}] $d[/url] </div></div> <ul id="menu"> [*][url="index.php"]Home[/url] [*][url="inventory.php"]Inventory[/url] [*][url="explore.php"]City[/url] [*][url="viewuser.php?u={$ir['userid']}"]Profile[/url] [*][url="bank.php"]Bank[/url] [*][url="gym.php"]Gym[/url] [*][url="bank.php"]Test[/url] [*][url="gym.php"]Test[/url] [*][url="logout.php"]Logout[/url] [/list] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top" align="left" style="padding-left:10px;"> <span class='icons1' style='padding-left:24px;'></span>[b]Money:[/b] {$fm} <span class='icons2' style='padding-left:24px;'></span>[b]Level:[/b] {$ir['level']} <span class='icons3' style='padding-left:24px;'></span>[b]Crystals:[/b] {$ir['crystals']} <hr /> <div class="stat_bars"> <div>[b]Energy:[/b]</div> <a href="#" class="Tooltip"><span>Current Energy:{$enperc}%</span> <img src=images/bar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10></a> </div> <div class="stat_bars"> <div>[b]Will:[/b]</div> [url="#"]<span>Current Will: {$wiperc}%</span><img src=images/bar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10>[/url] </div> <div class="stat_bars"> <div>[b]Brave:[/b]</div> [url="#"]<span>Current Brave: {$ir['brave']}/{$ir['maxbrave']}</span><img src=images/bar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10>[/url] </div> <div class="stat_bars"> <div>[b]EXP:[/b]</div> [url="#"]<span>Current EXP: {$experc}%</span><img src=images/bar.png width=$experc height=10><img src=redbar.png width=$exopp height=10>[/url] </div> <div class="stat_bars"> <div>[b]Health:[/b]</div> [url="#"]<span>Current Health: {$hpperc}%</span><img src=images/bar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10>[/url] </div> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die(" [b] <font color=red size=+1> You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die(" [b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '999999'; print ' </td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td> <td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print ' </td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td> <td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; //Shows useronline & Total Users $q=$db->query(" SELECT userid FROM users WHERE laston>unix_timestamp()-100*60 ORDER BY laston DESC"); $r1=$db->num_rows($q); $q=$db->query("SELECT userid FROM users"); $r2=$db->num_rows($q); print <<<OUT </center> </td></tr></table> </td><td class="rgrad"></td> </tr><tr><td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"></td> <td class="dgrad" align="center">Total Users [url="userlist.php"]$r2[/url] | Users Online [url="usersonline.php"]$r1[/url] </td> <td class="dgradr"></td> </tr></table> </td></tr></table> </body> </html> OUT; } } ?> This is the error Parse error: syntax error, unexpected '{' in /home/mafiacou/public_html/header.php on line 133 Please help!!!!
-
I got a paid host from a friend but what about domain, is cz.cc o.k
-
I dont know if this is the rite place to post it but i couldn't find any where else. I want you all to give you your ideas of what you think of this. Since I am not that old I don't have a paypal, yet I could ofcourse use my dads but I dont wanna. But I wanna create a game, not for earning money just for a hobby. If I create a game on a free domain and a free host(a good host allowing minute crons, and domain s cz.cc) but dont add the donator pack system, add donator days but making it not for real life cash for in game points What do u guys say will this plan work or will no one join my game due to free host and domain
-
u can use something like this <a href="link" title="title" onmouseover="document.ken.src='hover image'" onmouseout="document.ken.src='non hover image'"> Simple
-
Hey I am using RIchards multiple house mod found here: [mccode v2] Multiple Houses I am also using advanced marriage mod found here: http://makewebgames.io/board791/31174-need-advanced-marriage I have interegate the advanced marriage mod to make it shared house by using scripts i found here :Requesting - [Mccodes V2} Shared house mod Now I need to change richards multiple house mod in such a way that a users spouse can see his spouse's other houses and can also move into them. Note: I am also using richards house rental mod found here: [mccode v2] House Rentals so update properties.php for there otherwise my house rental will be ruined
-
Hey can someone send me a honor awards or a link to one if not then please help me fix this file. <?php include_once(DIRNAME(__FILE__) . '/globals.php'); if (!isset($_GET['action'])){ print "<h3>Honor Awards</h3> <h2>[url='HonorExchange.php'] <font color = blue>Exchange Your awards here![/url] </h3> <font color = tan>Level Awards. [url='h2.php?action=level5']Level 5 Honor Award[/url] [url='h2.php?action=level10']Level 10 Honor Award[/url] [url='h2.php?action=level15']Level 15 Honor Award[/url] [url='h2.php?action=level20']Level 20 Honor Award[/url] [url='h2.php?action=level25']Level 25 Honor Award[/url] [url='h2.php?action=level30']Level 30 Honor Award[/url] Crime Awards. [url='h2.php?action=c500']500 crimes completed[/url] [url='h2.php?action=c1000']1000 crimes completed[/url] [url='h2.php?action=c1500']1500 crimes completed[/url] [url='h2.php?action=c2000']2000 crimes completed[/url] [url='h2.php?action=c2500']2500 crimes completed[/url] Money Awards. [url='h2.php?action=1mill']1 million cash[/url] [url='h2.php?action=5mill']5 million cash[/url] [url='h2.php?action=10mill']10 million cash[/url] [url='h2.php?action=20mill']20 million cash[/url] [url='h2.php?action=50mill']50 million cash[/url] [url='h2.php?action=100mill']100 million cash[/url] Gang Awards. [url='h2.php?action=g100']100 Days in Gang[/url] [url='h2.php?action=g200']200 Days in Gang[/url] [url='h2.php?action=g300']300 Days in Gang[/url] [url='h2.php?action=g400']400 Days in Gang[/url] [url='h2.php?action=g500']500 Days in Gang[/url] Donator Awards. [url='h2.php?action=d150']150 Donator Days[/url] [url='h2.php?action=d200']200 Donator Days[/url] [url='h2.php?action=d300']300 Donator Days[/url] [url='h2.php?action=d400']400 Donator Days[/url] [url='h2.php?action=d500']500 Donator Days[/url] </a>"; } if($_GET['action']=='level5') { if ($ir['level'] <5) { echo "You need to be level 5 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level5'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award one time! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level5')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 5. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level10') { if ($ir['level'] <10) { echo "You need to be level 10 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level10'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award one time! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level10')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 10. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level15'){ if ($ir['level'] <15) { echo "You need to be level 15 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level15'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level15')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 15. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level20'){ if ($ir['level'] <20) { echo "You need to be level 20 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level20'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level20')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 20. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level25'){ if ($ir['level'] <25) { echo "You need to be level 25 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level25'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level25')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations or reaching level 25. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='level30'){ if ($ir['level'] <30) { echo "You need to be level 30 to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='level30'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'level30')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on reaching level 30. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c500'){ if ($ir['crimesdone'] <500) { echo "You need to have done 500 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 500 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c1000'){ if ($ir['crimesdone'] <1000) { echo "You need to have done 1000 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes1000'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes1000')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 1000 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c1500'){ if ($ir['crimesdone'] <1500) { echo "You need to have done 1500 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes1500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes1500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 1500 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c2000'){ if ($ir['crimesdone'] <2000) { echo "You need to have done 2000 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes2000'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes2000')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 2000 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='c2500'){ if ($ir['crimesdone'] <2500) { echo "You need to have done 2500 crimes to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='crimes2500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'crimes2500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on completing 2500 crimes. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='5mill'){ if (($ir['money']+$ir['bankmoney']) <5000000) { echo "You need to have 5 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='5mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'5mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 5 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='10mill'){ if (($ir['money']+$ir['bankmoney']) <10000000) { echo "You need to have 10 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='10mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'10mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 10 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='20mill'){ if (($ir['money']+$ir['bankmoney']) <20000000) { echo "You need to have 20 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='20mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'20mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 20 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='50mill'){ if (($ir['money']+$ir['bankmoney']) <50000000) { echo "You need to have 50 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='50mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'50mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 50 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='100mill'){ if (($ir['money']+$ir['bankmoney']) <100000000) { echo "You need to have 100 million in your bank and/or onhand to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='100mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'100mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 100 million. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g100'){ if ($ir['daysingang'] <100) { echo "You need to have been in a gang for 100 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g100'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g100')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 100 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g200'){ if ($ir['daysingang'] <200) { echo "You need to have been in a gang for 200 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g200'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g200')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 200 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g300'){ if ($ir['daysingang'] <300) { echo "You need to have been in a gang for 300 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g300'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g300')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 300 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g400'){ if ($ir['daysingang'] <400) { echo "You need to have been in a gang for 400 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g400'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g400')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 400 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='g500'){ if ($ir['daysingang'] <500) { echo "You need to have been in a gang for 500 days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='g500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'g500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having been in a gang for 500 days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d150'){ if ($ir['donatordays'] <150) { echo "You need to have 150 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d150'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d150')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 150 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d200'){ if ($ir['donatordays'] <200) { echo "You need to have 200 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d200'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d200')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 200 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d300'){ if ($ir['donatordays'] <300) { echo "You need to have 300 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d300'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d300')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 300 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d400'){ if ($ir['donatordays'] <400) { echo "You need to have 400 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d400'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d400')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 400 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } if($_GET['action']=='d500'){ if ($ir['donatordays'] <500) { echo "You need to have 500 donator days to access here..."; echo " [url='h2.php']Go Back to Honor Awards[/url] "; $h->endpage(); } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='d500'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "[url='h2.php']Back to Honor Awards[/url] "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'d500')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having at least 500 donator days. You have been credited with one honor award."; print "[url='h2.php']Back to Honor Awards[/url] "; } } $h->endpage(); ?> the prob is for e.g i want level 25 award i am not level 25 but i click the linkit comes written that "you need to be level 25 to access here" but still i get a honor and the query is written to database
-
Can anyone make a racing mod for v2 or if it has been done before please give me the link. I want the racing mod like the one on mccodes.com but prob is that is v1 and I am no good coder to convert it to v2.
-
This is my header <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-image:url(background.jpg); margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: white; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:link { color: white;text-decoration: none; } a:hover { color: grey;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#000000; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#000000; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(headgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(headgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } #menu { width: 12em; background: #000000; } #menu ul { list-style: none; margin: 0; padding: 0; } #menu a, #menu h2 { font: bold 12px/16px arial, helvetica, sans-serif; display: block; border-width: 1px; border-style: solid; border-color: #1f1f1f; margin: 0; padding: 3px 4px; } #menu h2 { color: #000; background: #fff; text-transform: uppercase; } #menu a { color: #fff; background: #000000; text-decoration: none; } #menu a:hover { color: #a00; background: #fff; } #menu ul ul ul { position: absolute; top: 0; left: 0; } #menu li {position: relative;} #menu ul ul ul { position: absolute; top: 0; left: 100%; width: 100%; } div#menu ul ul ul, div#menu ul ul li:hover ul ul {display: none;} div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {display: block;} <!--[if IE]> <style type="text/css" media="screen"> body { behavior: url(csshover.htc); font-size: 100%; } #menu ul li {float: left; width: 100%;} #menu ul li a {height: 1%;} #menu a, #menu h2 { font: bold 1.0em/1.8em arial, helvetica, sans-serif; } #easyTooltip{ padding:5px 10px; border:1px solid #195fa4; background:#195fa4 url(bg.gif) repeat-x; color:#fff; } </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $gn=""; global $staffpage; $bgcolor = '000000'; if($ir['marriage']) { $do_1= mysql_query("SELECT * FROM users WHERE userid={$ir['marriage']}"); $r = $db->fetch_row($do_1); if($r['maxwill'] > $ir['maxwill']) { $db->query("UPDATE users SET shared = maxwill, maxwill = {$r['maxwill']} WHERE userid = $userid"); $db->query("UPDATE users SET shared = 'owner' WHERE userid = {$ir['marriage']}"); } else if($ir['maxwill'] > $r['maxwill']) { $db->query("UPDATE users SET shared = maxwill, maxwill = {$ir['maxwill']} WHERE userid = {$ir['marriage']}"); $db->query("UPDATE users SET shared = 'owner' WHERE userid = $userid"); } else { $db->query("UPDATE users SET shared = 'owner' WHERE userid = {$ir['marriage']}"); $db->query("UPDATE users SET shared = 'owner' WHERE userid = $userid"); } } $Auction = mysql_query("SELECT `ID`,`SellerID`,`ItemID`,`CurrentBid`,`Time`,`TimeLeft` FROM `gAuction` WHERE (`Time` - ".time()." + `TimeLeft` < 1)")or die(mysql_error()); while($Auction2 = mysql_fetch_array($Auction)) { $AuctionBids = mysql_query("SELECT `ID`,`aID`,`BidderID`,`CurrentBid2` FROM `gAuctionBids` WHERE (`aID` = ".$Auction2['ID'].")")or die(mysql_error()); $atime = $Auction2['Time'] - time() + $Auction2['TimeLeft']; if($atime < 1 && !mysql_num_rows($AuctionBids)) { event_add($Auction2['SellerID'],'Your auction finished without any bids.'); mysql_query("INSERT INTO `inventory` VALUES ('',".$Auction2['ItemID'].",".$Auction2['SellerID'].",1)") or die(mysql_error()); mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".$Auction2['ID'].")")or die(mysql_error()); } elseif($atime < 1 && mysql_num_rows($AuctionBids)) { $AuctionBids = mysql_fetch_array($AuctionBids); event_add($Auction2['SellerID'],'Your auction has finished, the maximum bid was $'.number_format($Auction2['CurrentBid']).''); event_add($AuctionBids['BidderID'], 'You\'ve won the auction!'); mysql_query("UPDATE `users` SET `money` = `money` + ".abs(intval($Auction2['CurrentBid']))." WHERE (`userid` = ".$Auction2['SellerID'].")")or die(mysql_error()); mysql_query("INSERT INTO `inventory` VALUES ('',".$Auction2['ItemID'].",".$AuctionBids['BidderID'].",1)")or die(mysql_error()); mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".$Auction2['ID'].")")or die(mysql_error()); mysql_query("DELETE FROM `gAuctionBids` WHERE (`aID` = ".$Auction2['ID'].")")or die(mysql_error()); } } print <<<OUT [img=cworld.png] <hr /> <table width="80%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] [url='viewuser.php?u={$ir[']$gn{$u}[/url] [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} [b]Crystals:[/b] {$ir['crystals']} [[url='logout.php']Emergency Logout[/url]] <hr /> [b]Energy:[/b] {$enperc}% <img src=greenbar.gif width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=greenbar.gif width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=greenbar.gif width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=greenbar.gif width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=greenbar.gif width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"></td> <td class="dgrad"></td> <td class="dgradr"></td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } ?>
-
Hi people I just experienced a problem and I cant fix it I think it has to due with the header The problem is that I can only view my game on firefox i cant view it on any other browser Please help
-
I need help on this new header i am making i get this error Parse error: syntax error, unexpected T_LNUMBER in /home/********/public_html/header.php on line 488 Line 488 is print "</td><td width="85%" bgcolor="#000000" valign="top"><center><center>[img=images/New/minwidth.png]</center> <hr /> "; The entire function is function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '000000'; { print "</td><td width="85%" bgcolor="#000000" valign="top"><center><center>[img=images/New/minwidth.png]</center> <hr /> "; } if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } } Pleas help
-
But in my game i dont give a damn careabout money i am even planning to delete the donator ting and not make it for real money but for in game cash
-
That has been made but if u still want it its simple
-
<?php $macropage = "gym.php"; include "globals.php"; global $db, $h, $ir, $userid; if ($ir['hospital']) { echo " <font color=black>You cannot access the gym whilst in hospital</font></p>"; $h->endpage(); exit; } $prefs = isset($_SESSION['gymprefs']) ? $_SESSION['gymprefs'] : array('what' => "all", 'expend' => "100%"); $what = $prefs['what']; $expend = $prefs['expend']; $maxenergy= $ir['energy']; $message = false; $sql = sprintf("SELECT us.strength, us.agility, us.guard, us.labour, u.energy, u.will, u.jail FROM users u LEFT JOIN userstats us ON (u.userid = us.userid) WHERE (u.userid = %u) AND (u.user_level < 3)", $userid); $row = $db->fetch_row($db->query($sql)); $formID = preg_replace("`^([0-9A-F]{8})([0-9A-F]{4})([0-9A-F]{4})([0-9A-F]{4})([0-9A-F]{12})$`ms", "{\\1-\\2-\\3-\\4-\\5}", strtoupper(md5(serialize(array(session_id(), "Gym", null))))); if (isset($_POST['formID']) && is_string($_POST['formID']) && ($_POST['formID'] === $formID)) { $what = isset($_POST['what']) && is_string($_POST['what']) && preg_match("`^((all)|(strength)|(agility)|(guard)|(labour))$`ims", $_POST['what']) ? strtolower($_POST['what']) : $what; $expend = isset($_POST['expend']) && is_string($_POST['expend']) && preg_match("`^((100%)|(75%)|(50%)|(25%)|(value))$`ims", $_POST['expend']) ? strtolower($_POST['expend']) : $expend; $value = isset($_POST['value']) && is_string($_POST['value']) && preg_match("`^\d+$`ims", $_POST['value']) ? @intval($_POST['value']) : 0; $sql = sprintf("SELECT energy, will FROM users WHERE (userid = %u)", $userid); $rs = $db->query($sql); $info = $db->fetch_row($rs); $energy = $row['energy']; $will = $row['will']; $exp = $row['exp']; $gexp = $energy/rand(1,3); switch ($expend) { case "100%": $value = $row['energy']; break; case "75%": $value = $row['energy'] * 0.75; break; case "50%": $value = $row['energy'] * 0.50; break; case "25%": $value = $row['energy'] * 0.25; break; default: break; } $value = floor($value); if ($value > $row['energy']) $message = "<span style='color:#C00;'><font color=black>You don't have enough energy</font></span>"; else { $prefs = array('what' => $what, 'expend' => $expend); $gain = 0; $will = $row['will']; for ($i = 0; $i < $value; $i++) { $gain += mt_rand(1, 3) / mt_rand(500, 900) * mt_rand(500, 900) * (($will + 20) * (($ir['gymlevel']/rand(3,12)) / 150)); $will = max(0, $will - mt_rand(1, 3)); } if ($row['jail']) $gain *= 0.5; $row['will'] = floor($will); $row['energy'] -= $value; switch ($what) { case "all": $message = sprintf("<span style='color:#070;'><font color=black>You gain %s in each stat</font></span>", number_format($gain * 0.25, 2)); $row['strength'] += $gain * 0.25; $row['agility'] += $gain * 0.25; $row['guard'] += $gain * 0.25; $row['labour'] += $gain * 0.25; break; case "strength": $message = sprintf("<span style='color:#070;'><font color=black>You gain %s in strength</font></span>", number_format($gain, 2)); $row['strength'] += $gain; break; case "agility": $message = sprintf("<span style='color:#070;'><font color=black>You gain %s in agility</font></span>", number_format($gain, 2)); $row['agility'] += $gain; break; case "guard": $message = sprintf("<span style='color:#070;'><font color=black>You gain %s in guard</font></span>", number_format($gain, 2)); $row['guard'] += $gain; break; case "labour": $message = sprintf("<span style='color:#070;'><font color=black>You gain %s in labour</font></span>", number_format($gain, 2)); $row['labour'] += $gain; break; } $sql1 = sprintf("UPDATE userstats SET strength = %.6f, agility = %.6f, guard = %.6f, labour = %.6f WHERE (userid = %u)", $row['strength'], $row['agility'], $row['guard'], $row['labour'], $userid); $sql2 = sprintf("UPDATE users SET will = %u, energy = %d WHERE (userid = %u)", $row['will'], $row['energy'], $userid); $db->query("UPDATE users SET gymxp=gymxp+{$_POST['value']} WHERE userid=$userid"); $db->query($sql1); $db->query($sql2); } $_SESSION['gymprefs'] = $prefs; } $row['ranks'] = array ( 'strength' => $db->fetch_single($db->query(sprintf("SELECT COUNT(userid) FROM userstats WHERE (strength > %.6f)", $row['strength']))) + 1, 'agility' => $db->fetch_single($db->query(sprintf("SELECT COUNT(userid) FROM userstats WHERE (agility > %.6f)", $row['agility']))) + 1, 'guard' => $db->fetch_single($db->query(sprintf("SELECT COUNT(userid) FROM userstats WHERE (guard > %.6f)", $row['guard']))) + 1, 'labour' => $db->fetch_single($db->query(sprintf("SELECT COUNT(userid) FROM userstats WHERE (labour > %.6f)", $row['labour']))) + 1, 'total' => $db->fetch_single($db->query(sprintf("SELECT COUNT(userid) FROM userstats WHERE (strength + agility + guard + labour > %.6f)", $row['strength'] + $row['agility'] + $row['guard'] + $row['labour']))) + 1, ); echo "<style type='text/css'>"; echo "#gym { }"; echo "#gym h3, #gym p { }"; echo "#gym table { width:90%;border-collapse:collapse; }"; echo "#gym th { border:solid 1px #333;background:#F6F6F6 url(th.png);padding:3px;color:#333; }"; echo "#gym td { border:solid 1px #CCC;padding:3px;color:#CCC; }"; echo "#gym { }"; echo "</style>"; echo "<div id='gym'>"; echo sprintf("<h3><font color=black>%sGym</font></h3>", $ir['jail'] ? "Jail " : ""); if ($message) echo sprintf(" %s</p>", $message); echo "<form name='train' id='train' action='gym.php' method='post' style='padding:0;margin:0;'>"; echo sprintf("<input type='hidden' name='formID' value='%s' />", $formID); echo "<table cellpadding='0' cellspacing='0'>"; echo "<tr>"; echo "<th class='sub' style='width:50%;'><font color=Red>Train</font></th>"; echo "<th class='sub' style='width:50%;'><font color=Red>Expend</font></th>"; echo "</tr>"; echo "<tr>"; echo "<td style='line-height:200%;'>"; echo sprintf("<input type='radio' name='what' id='what0' value='all' %sstyle='vertical-align:middle;' /><label for='what0' style='cursor:pointer;'><font color=black>All (25%% energy in each) [Rank #%s]</label></font> ", $what === "all" ? "checked='checked' " : "", number_format($row['ranks']['total'])); echo sprintf("<input type='radio' name='what' id='what1' value='strength' %sstyle='vertical-align:middle;' /><label for='what1' style='cursor:pointer;'><font color=black>Strength (%s) [Rank #%s]</label></font> ", $what === "strength" ? "checked='checked' " : "", number_format($row['strength']), number_format($row['ranks']['strength'])); echo sprintf("<input type='radio' name='what' id='what2' value='agility' %sstyle='vertical-align:middle;' /><label for='what2' style='cursor:pointer;'><font color=black>Agility (%s) [Rank #%s]</label></font> ", $what === "agility" ? "checked='checked' " : "", number_format($row['agility']), number_format($row['ranks']['agility'])); echo sprintf("<input type='radio' name='what' id='what3' value='guard' %sstyle='vertical-align:middle;' /><label for='what3' style='cursor:pointer;'><font color=black>Guard (%s) [Rank #%s]</label></font> ", $what === "guard" ? "checked='checked' " : "", number_format($row['guard']), number_format($row['ranks']['guard'])); echo sprintf("<input type='radio' name='what' id='what4' value='labour' %sstyle='vertical-align:middle;' /><label for='what4' style='cursor:pointer;'><font color=black>Labour (%s) [Rank #%s]</label></font> ", $what === "labour" ? "checked='checked' " : "", number_format($row['labour']), number_format($row['ranks']['labour'])); echo "</td>"; echo "<td style='line-height:200%;'>"; echo sprintf("<input type='radio' name='expend' id='expend0' value='100%%' %sstyle='vertical-align:middle;' /><label for='expend0' style='cursor:pointer;'><font color=black>100%% Energy</label></font> ", $expend === "100%" ? "checked='checked' " : ""); echo sprintf("<input type='radio' name='expend' id='expend1' value='75%%' %sstyle='vertical-align:middle;' /><label for='expend1' style='cursor:pointer;'> 75%% Energy</label></font> ", $expend === "75%" ? "checked='checked' " : ""); echo sprintf("<input type='radio' name='expend' id='expend2' value='50%%' %sstyle='vertical-align:middle;' /><label for='expend2' style='cursor:pointer;'><font color=black>50%% Energy</label></font> ", $expend === "50%" ? "checked='checked' " : ""); echo sprintf("<input type='radio' name='expend' id='expend3' value='25%%' %sstyle='vertical-align:middle;' /><label for='expend3' style='cursor:pointer;'><font color=black>25%% Energy</label></font> ", $expend === "25%" ? "checked='checked' " : ""); echo sprintf("<input type='radio' name='expend' id='expend4' value='value' %sstyle='vertical-align:middle;' onclick='document.train.value.focus();' /><label for='expend4' style='cursor:pointer;'><input type='text' id='value' name='value' value='{$row['energy']}' size='8' onfocus='this.select();' /> Energy</label> ", $expend === "value" ? "checked='checked' " : "");//(C)2008,Nyna echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan='2' style='text-align:center;padding:6px;'>"; echo "<input type='submit' name='submit' value='Train' />"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</form>"; echo "</div>"; $h->endpage(); ?> Here is nynas gym mod updated sorry for the time it took it was becaz i am a noob Now if u want to increase level along with gym level (mainly for deano i am not using this) then in global func.php find funtion check_gymlevel u know the one i posted function check_gymlevel() { global $db; global $ir,$c,$userid; $gexpu=$ir['gymxp']-$ir['gexp_needed']; $gneeded=$ir['gexp_needed']*$ir['gymlevel']; if($ir['gymxp'] >= $ir['gexp_needed']) { $ir['gymlevel']+=1; $ir['gymexp']=$gexpu; $ir['gexp_needed']+=$gneeded; $ir['gexp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); $db->query("UPDATE users SET gymlevel=gymlevel+1,gymxp=$gexpu,gexp_needed=gexp_needed+$gneeded where userid=$userid"); } } Replace it with function check_gymlevel() { global $db; global $ir,$c,$userid; if($ir['gymxp'] >= $ir['gexp_needed']) { $gexpu=$ir['gymxp']-$ir['gexp_needed']; $gneeded=$ir['gexp_needed']*$ir['gymlevel']; $expplus=$ir['exp_needed']/rand(3,8); $ir['gymlevel']+=1; $ir['gymxp']=$gexpu; $ir['gexp_needed']+=$gneeded; $ir['gexp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); $db->query("UPDATE users SET gymlevel=gymlevel+1,gymxp=$gexpu,gexp_needed=gexp_needed+$gneeded,exp=exp+$expplus where userid=$userid"); } }
-
I will do that I
-
Hey when u put back the original gym plz also tell me whether its working caz i tested it in a hurry
-
I will try and fix it in the morning
-
I want the banner free just layout i am willing to pay upto 150$
-
This is my first mod ever. I know it is simple but i tmay be a bit useful I also liked to give credit to Sniko from who i got this idea from. Please dont give rude comments it is my first mod ever Here it goes first the queries: ALTER TABLE `users` ADD `gexp_needed` decimal(11,4) NOT NULL default '50.0000'; ALTER TABLE `users` ADD `gymlevel` int(11) NOT NULL default '1'; ALTER TABLE `users` ADD `gymxp` decimal(11,4) NOT NULL default '0.0000'; Then open up global_func.php and add this under above ?> function check_gymlevel() { global $db; global $ir,$c,$userid; if($ir['gymxp'] >= $ir['gexp_needed']) { $gexpu=$ir['gymxp']-$ir['gexp_needed']; $gneeded=$ir['gexp_needed']*$ir['gymlevel']; $ir['gymlevel']+=1; $ir['gymexp']=$gexpu; $ir['gexp_needed']+=$gneeded; $db->query("UPDATE users SET gymlevel=gymlevel+1,gymxp=$gexpu,gexp_needed=gexp_needed+$gneeded where userid=$userid"); } } Then open up globals.php and find check_level(); add underneath check_gymlevel(); Then open header.php and find $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; Replace with: $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $gymperc=(int) ($ir['gymxp']/$ir['gexp_needed']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $gymopp=100-$gymperc; Then in the same file find [b]Energy:[/b] {$enperc}% <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=navybar.png width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> Add underneath: [b]Gym Exp:[/b] {$gymperc}% <img src=greenbar.png width=$gymperc height=10><img src=redbar.png width=$gymopp height=10> <hr /> Then in header find: [b]Crystals:[/b] {$ir['crystals']} Add underneath [b]Gym Level:[/b] {$ir['gymlevel']} Then open Gym.php find 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"); replace it with else { $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)*(($ir['gymlevel']/rand(3,12))/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"); $db->query("UPDATE users SET gymxp=gymxp+{$_POST['amnt']} WHERE userid=$userid"); That is it i know it is a bit long but that is because i am not a good coder I hpe u like it. P.S For People with a Gym Level Under 12 it sometimes decreases the gain of a stat then the normal one but once u have a gym level of lets say 20-30 u have a increase in the gain of a stat then the normal one If there is prob plz post Tested on my game
-
I am building on sneakos idea i am alsmost done withit just a couple of minuts
-
The only thing he did was make a header and I dont understand why he made more photos
-
u just have to add a query where all the other query's are when i get on my pc i will tell u what to do
-
I am no designer and my designer isnt coming online for a month so i need a banner which says Crime-World Thanks, and if anyone gets the time I also need a decent login currently i am using a small update of basic mccodes one
-
whats the difference between blog and forum and which is better
-
This is a pretty good mod i am using it but i changed it from chaos bomb to Hitman agency