charliemanson Posted January 17, 2009 Share Posted January 17, 2009 I need some help....want to make times longer....cant figure out........ <?php $atkpage=1; include "globals.php"; $_GET['ID']=abs((int) $_GET['ID']); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($_SESSION['attackwon'] != $_GET['ID']) { die ("Cheaters don't get anywhere."); } if($db->num_rows($od)) { $r=$db->fetch_row($od); $gq=$db->query("SELECT * FROM gangs WHERE gangID={$r['gang']}"); $ga=$db->fetch_row($gq); if($r['hp'] == 1) { print "What a cheater u are."; } else { print "You beat {$r['username']} "; $qe=$r['level']*$r['level']*$r['level']; $expgain=rand($qe/2,$qe); $expperc=(int) ($expgain/$ir['exp_needed']*100); print "and gained $expperc% EXP! You hide your weapons and drop {$r['username']} off outside the hospital entrance. Feeling satisfied, you walk home."; $hosptime=rand(40,120); $db->query("UPDATE users SET exp=exp+$expgain WHERE userid=$userid"); $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Left by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"{$ir['username']} attacked you and left you lying outside the hospital.",$c,'combat'); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-2,'$atklog');"); $_SESSION['attackwon']=0; $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT-1 WHERE gangID={$r['gang']}"); $ga['gangRESPECT']-=1; $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT+1 WHERE gangID={$ir['gang']}"); print " You earnt 1 respect for your gang!"; } //Gang Kill if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); } $npcs=array( ); if($r['user_level']==0) { $q=$db->query("SELECT * FROM challengebots WHERE cb_npcid={$r['userid']}"); if ($db->num_rows($q)) { $cb=$db->fetch_row($q); $qk=$db->query("SELECT * FROM challengesbeaten WHERE userid=$userid AND npcid={$r['userid']}"); if(!$db->num_rows($qk)) { $m=$cb['cb_money']; $db->query("UPDATE users SET money=money+$m WHERE userid=$userid"); print " You gained \$$m for beating the challenge bot {$r['username']}"; $db->query("INSERT INTO challengesbeaten VALUES($userid, {$r['userid']})"); } } } } } else { print "You beat Mr. non-existant!"; } $h->endpage(); ?> anything i can adjust? :mrgreen: Quote Link to comment Share on other sites More sharing options...
Miniman Posted January 17, 2009 Share Posted January 17, 2009 Re: adjusting "left in the streets" Hospital time $hosptime=rand(40,120); That's what you need to change, The higher the numbers, The more time they go into hospital for. Quote Link to comment Share on other sites More sharing options...
charliemanson Posted January 17, 2009 Author Share Posted January 17, 2009 Re: adjusting "left in the streets" Hospital time i tried that..... Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted January 18, 2009 Share Posted January 18, 2009 Re: adjusting "left in the streets" Hospital time that is what you change. Are you sure you even are editing the right page? Quote Link to comment Share on other sites More sharing options...
charliemanson Posted January 18, 2009 Author Share Posted January 18, 2009 Re: adjusting "left in the streets" Hospital time fixed...thanks...... Quote Link to comment Share on other sites More sharing options...
charliemanson Posted January 18, 2009 Author Share Posted January 18, 2009 Re: adjusting "left in the streets" Hospital time problem was i had 2 files for it ...wasn't pulling off right one...DUH!!! Quote Link to comment Share on other sites More sharing options...
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.