Jump to content
MakeWebGames

bladewolf2010

Members
  • Posts

    369
  • Joined

  • Last visited

Everything posted by bladewolf2010

  1. firefox has an add-on that allows you to see in the iphone view :P
  2. it's easy to edit
  3. This is a small mod that makes it so when a player gains X amount of stat it'll half it. So if player earns 1000 normally and reaches the total (10,000) it'll half so the player would earn 500. I know it's a small simple little thing, but someone might want it :) Alright this is how you install it. First off, put this into your phpMyAdmin: [mysql]ALTER TABLE `users` ADD `stat_total` int(10) NOT NULL ;[/mysql] Second, put this in your day_cron.php: $db->query("UPDATE users SET stat_total=0");   Third, put this in your gym.php with the query's $db->query("UPDATE `users` SET `stat_total` = `stat_total` + $gain WHERE (`userid` = ".$userid.")");   Forth, put this in your gym.php above the query's or under if($ir['jail']) { $gain/=2; } if($ir['stat_total'] >= '1000') { $gain /=2;}   You can change the 1000 with any number you see suitable :)
  4. The only thing I don't understand on it is the : false; and isset I got help doing it. But I did it. No copy and pasting except for the first few lines.   edit- isset is check to see if the number (example attack.php?ID=2) That number is set.
  5. Now stale mates, thanks to Illusion for his amazing free mods :P   <?php $menuhide=1; $atkpage=1; include 'globals.php'; $_GET['ID'] = (isset($_GET['ID']) && ($_GET['ID'])) ? intval($_GET['ID']) : false; $_GET['wepid'] = (isset($_GET['wepid']) && ($_GET['wepid'])) ? intval($_GET['wepid']) : false; $_GET['nextstep'] = (isset($_GET['nextstep']) && ($_GET['nextstep'])) ? intval($_GET['nextstep']) : false; $_GET['hp'] = (isset($_GET['hp']) && ($_GET['hp'])) ? intval($_GET['hp']) : false; $_GET['attacklost'] = (isset($_GET['attacklost']) && ($_GET['attacklost'])) ? intval($_GET['attacklost']) : false; $_GET['attacking'] = (isset($_GET['attacking']) && ($_GET['attacking'])) ? intval($_GET['attacking']) : false; $_GET['maxhp'] = (isset($_GET['maxhp']) && ($_GET['maxhp'])) ? intval($_GET['maxhp']) : false; if(!$_GET['ID']) { echo'No ID selected.'; exit($h->endpage()); } if(!$_GET['ID']) { echo 'WTF you doing, bro?'; exit($h->endpage()); } else if($_GET['ID'] == $userid) { echo 'Only the crazy attack themselves.'; exit($h->endpage()); } else if ($ir['hp'] <= 1) { echo 'Only the crazy attack when their unconscious. [url="index.php"]Back[/url]'; exit($h->endpage()); } else if ($_SESSION['attacklost'] == 1) { echo "Only the losers of all their EXP attack when they've already lost. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; exit($h->endpage()); } //get player data $youdata=$ir; $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $odata=$db->fetch_row($q); $myabbr=($ir['gender']=="Male") ? "his" : "her"; $oabbr=($ir['gender']=="Male") ? "his" : "her"; if($ir['attacking'] && $ir['attacking'] != $_GET['ID']) { echo 'Bad, bad, bad girl. [url="index.php"]Back[/url]'; $_SESSION['attacklost']=0; exit($h->endpage()); } if($odata['hp'] == 1) { echo 'This player is unconscious. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } if($_GET['nextstep'] > 100) { echo'<center><span style="color: red;">STALEMATE!</span> This fight is going knowhere you may as well go home! [url='index.php']> Back[/url]</center>'; $h->endpage(); event_add($odata['userid'],"[url='viewuser.php?u=$userid']{$youdata['username']}[/url] Tried to beat you but stalemated.",$c); event_add($youdata['userid']," You Tried to beat [url='viewuser.php?u=$userid']{$odata['username']}[/url] but stalemated.",$c); exit; } else if($odata['hospital']) { echo 'This player is in hospital. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['hospital']) { echo 'While in hospital you can\'t attack. [url="hospital.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['jail']) { echo 'This player is in jail. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['jail']) { echo 'While in jail you can\'t attack. [url="jail.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['travelling']) { echo 'That player is travelling. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } echo '<table width=100%><tr><td colspan=2 align=center>'; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/2) { $youdata['energy']-= floor($youdata['maxenergy']/2); $me=floor($youdata['maxenergy']/2); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { echo 'You can only attack someone when you have 50% energy'; exit($h->endpage()); } } $_SESSION['attacking']=1; $ir['attacking']=$odata['userid']; $db->query("UPDATE users SET attacking={$ir['attacking']} WHERE userid=$userid"); $_GET['wepid'] = (int) $_GET['wepid']; $_GET['nextstep'] = (int) $_GET['nextstep']; //damage if($_GET['wepid'] != $ir['equip_primary'] && $_GET['wepid'] != $ir['equip_secondary']) { echo 'Stop trying to abuse a game bug. You can lose all your EXP for that. [url="index.php"]> Home[/url]'; $db->query("UPDATE users SET exp=0 where userid=$userid",$c); die(""); } $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000)); $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95)); if(rand(1,100) <= $hitratio ) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$odata['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $mydamage-=$db->fetch_single($q3); } if($mydamage < -100000) { $mydamage=abs($mydamage); } else if($mydamage < 1) { $mydamage=1; } $crit=rand(1,40); if($crit==17) { $mydamage*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $mydamage/=(rand(20,40)/10); } $mydamage=round($mydamage); $odata['hp']-=$mydamage; if($odata['hp']==1) { $odata['hp']=0;$mydamage+=1; } $db->query("UPDATE users SET hp=hp-$mydamage WHERE userid={$_GET['ID']}"); echo '<span style="color: red;">'. number_format($_GET['nextstep']) .'. Using your '. $r1['itmname'] .' you hit '.$odata['username'].' doing '.$mydamage.' damage ('. number_format($odata['hp']) .')</span> '; $_SESSION['attackdmg']+=$mydamage; $_SESSION['attacklog'] .= '<span style="color: red;">'. number_format($_GET['nextstep']) .'. Using your '. $r1['itmname'] .' you hit '. $odata['username'] .' doing '. $mydamage .' damage '. number_format($odata['hp']) .'</span> '; } else { echo '<span style="color: red;">'. number_format($_GET['nextstep']) .'. You tried to hit '. $odata['username'] .' but missed ('. number_format($them['hp']) .')</span> '; $_SESSION['attacklog'] .= '<span style="color: red;">'. number_format($_GET['nextstep']) .'. You tried to hit '. $odata['username'] .' but missed ('. number_format($odata['hp']) .')</span> '; } if($odata['hp'] <= 0) { $odata['hp']=0; $_SESSION['attackwon']=$_GET['ID']; $db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}"); echo ' [b]What do you want to do with '.$odata['username'].' now?[/b] <form action="attackwon.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Mug Them" /></form> <form action="attackbeat.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Hospitalize Them" /></form> <form action="attacktake.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Leave Them" /></form>'; } else { //choose opp gun $eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$odata['equip_primary']}, {$odata['equip_secondary']})"); if(mysql_num_rows($eq) == 0) { $wep="Fists"; $dam=(int)((((int) ($odata['strength']/$ir['guard']/100)) +1)*(rand(8000,12000)/10000)); } else { $cnt=0; while($r=$db->fetch_row($eq)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000)); } $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95)); if(rand(1,100) <= $hitratio) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$ir['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $dam-=$db->fetch_single($q3); } if($dam < -100000) { $dam=abs($dam); } else if($dam < 1) { $dam=1; } $crit=rand(1,40); if($crit==17) { $dam*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $dam/=(rand(20,40)/10); } $dam=round($dam); $youdata['hp']-=$dam; if ($youdata['hp']==1) { $dam+=1; $youdata['hp']=0; } $db->query("UPDATE users SET hp=hp-$dam WHERE userid=$userid"); $ns=$_GET['nextstep']+1; echo '<span style="color: red;">'.$ns.'. Using '.$oabbr.' '.$wep.' '.$odata['username'].' hit you doing '.$dam.' damage '.($youdata['hp']).'</span> '; $_SESSION['attacklog'].='<span style="color: blue;">'.$ns.'. Using '.$oabbr.' '.$wep.' '.$odata['username'].' hit '.$ir['username'].' doing '.$dam.' damage '.($youdata['hp']).'</span> '; } else { $ns=$_GET['nextstep']+1; echo '<span style="color: red;">'.$ns.'. '.$odata['username'].' tried to hit you but missed '.($youdata['hp']).'</font> '; $_SESSION['attacklog'].='<span style="color: blue;">'.$ns.'. '.$odata['username'].' tried to hit '.$ir['username'].' but missed '.($youdata['hp']).'</span> '; } if($youdata['hp'] <= 0) { $youdata['hp']=0; $_SESSION['attacklost']=1; $db->query("UPDATE users SET hp=0 WHERE userid=$userid"); echo '<form action="attacklost.php?ID='.$_GET['ID'].'"method="post"><input type="submit" value="Continue" />'; } } } else if ($odata['hp'] < 5) { echo 'You can only attack those who have health'; exit($h->endpage()); } else if ($ir['gang'] == $odata['gang'] && $ir['gang'] > 0) { echo 'You are in the same gang as '.$odata['username'].'! What are you smoking today dude!'; exit($h->endpage()); } else if ($youdata['energy'] < $youdata['maxenergy']/2) { echo 'You can only attack someone when you have 50% energy'; exit($h->endpage()); } else if ($youdata['location'] != $odata['location']) { echo 'You can only attack someone in the same location!'; exit($h->endpage()); } else { } echo '</td></tr>'; if($youdata['hp'] <= 0 || $odata['hp'] <= 0) { echo '</table>'; } else { $vars['hpperc']=round($youdata['hp']/$youdata['maxhp']*100); $vars['hpopp']=100-$vars['hpperc']; $vars2['hpperc']=round($odata['hp']/$odata['maxhp']*100); $vars2['hpopp']=100-$vars2['hpperc']; $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); echo '<tr><td colspan=2 align="center">Attack with: '; if($db->num_rows($mw) > 0) { while($r=$db->fetch_row($mw)) { if(!$_GET['nextstep']) { $ns=1; } else { $ns=$_GET['nextstep']+2; } if($r['itmid']==$ir['equip_primary']) { echo '[b]Primary Weapon:[/b] '; } if($r['itmid']==$ir['equip_secondary']) { echo '[b]Secondary Weapon:[/b] '; } echo "[url='attack.php?nextstep=$ns&ID={$_GET[']{$r['itmname']}[/url] "; } } else { echo 'You have nothing to fight with.'; } echo '</table>'; echo "<table width='50%' align='center'><tr><td align=right>Your Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10></td><tr><td align=right>Opponents Health: </td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10></td></tr></table>"; } exit($h->endpage()); ?>
  6. Like a stalemate?
  7. Hehe, thanks DJK, I plan on giving it 100% from now, no shortcuts anymore :)
  8. This is attack.php attempting to do stuff correctly now.   <?php $menuhide=1; $atkpage=1; include "globals.php"; $_GET['ID'] = (isset($_GET['ID']) && ($_GET['ID'])) ? intval($_GET['ID']) : false; $_GET['wepid'] = (isset($_GET['wepid']) && ($_GET['wepid'])) ? intval($_GET['wepid']) : false; $_GET['nextstep'] = (isset($_GET['nextstep']) && ($_GET['nextstep'])) ? intval($_GET['nextstep']) : false; $_GET['hp'] = (isset($_GET['hp']) && ($_GET['hp'])) ? intval($_GET['hp']) : false; $_GET['attacklost'] = (isset($_GET['attacklost']) && ($_GET['attacklost'])) ? intval($_GET['attacklost']) : false; $_GET['attacking'] = (isset($_GET['attacking']) && ($_GET['attacking'])) ? intval($_GET['attacking']) : false; $_GET['maxhp'] = (isset($_GET['maxhp']) && ($_GET['maxhp'])) ? intval($_GET['maxhp']) : false; if(!$_GET['ID']) { echo'No ID selected.'; exit($h->endpage()); } if(!$_GET['ID']) { echo 'WTF you doing, bro?'; exit($h->endpage()); } else if($_GET['ID'] == $userid) { echo 'Only the crazy attack themselves.'; exit($h->endpage()); } else if ($ir['hp'] <= 1) { echo 'Only the crazy attack when their unconscious. [url="index.php"]Back[/url]'; exit($h->endpage()); } else if ($_SESSION['attacklost'] == 1) { echo "Only the losers of all their EXP attack when they've already lost. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; exit($h->endpage()); } //get player data $youdata=$ir; $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $odata=$db->fetch_row($q); $myabbr=($ir['gender']=="Male") ? "his" : "her"; $oabbr=($ir['gender']=="Male") ? "his" : "her"; if($ir['attacking'] && $ir['attacking'] != $_GET['ID']) { echo 'Bad, bad, bad girl. [url="index.php"]Back[/url]'; $_SESSION['attacklost']=0; exit($h->endpage()); } if($odata['hp'] == 1) { echo 'This player is unconscious. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['hospital']) { echo 'This player is in hospital. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['hospital']) { echo 'While in hospital you can\'t attack. [url="hospital.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['jail']) { echo 'This player is in jail. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['jail']) { echo 'While in jail you can\'t attack. [url="jail.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['travelling']) { echo 'That player is travelling. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } echo '<table width=100%><tr><td colspan=2 align=center>'; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/2) { $youdata['energy']-= floor($youdata['maxenergy']/2); $me=floor($youdata['maxenergy']/2); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { echo 'You can only attack someone when you have 50% energy'; exit($h->endpage()); } } $_SESSION['attacking']=1; $ir['attacking']=$odata['userid']; $db->query("UPDATE users SET attacking={$ir['attacking']} WHERE userid=$userid"); $_GET['wepid'] = (int) $_GET['wepid']; $_GET['nextstep'] = (int) $_GET['nextstep']; //damage if($_GET['wepid'] != $ir['equip_primary'] && $_GET['wepid'] != $ir['equip_secondary']) { echo 'Stop trying to abuse a game bug. You can lose all your EXP for that. [url="index.php"]> Home[/url]'; $db->query("UPDATE users SET exp=0 where userid=$userid",$c); die(""); } $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000)); $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95)); if(rand(1,100) <= $hitratio ) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$odata['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $mydamage-=$db->fetch_single($q3); } if($mydamage < -100000) { $mydamage=abs($mydamage); } else if($mydamage < 1) { $mydamage=1; } $crit=rand(1,40); if($crit==17) { $mydamage*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $mydamage/=(rand(20,40)/10); } $mydamage=round($mydamage); $odata['hp']-=$mydamage; if($odata['hp']==1) { $odata['hp']=0;$mydamage+=1; } $db->query("UPDATE users SET hp=hp-$mydamage WHERE userid={$_GET['ID']}"); echo '<span style="color: red;">'. number_format($_GET['nextstep']) .'. Using your '. $r1['itmname'] .' you hit '.$odata['username'].' doing '.$mydamage.' damage ('. number_format($odata['hp']) .')</span> '; $_SESSION['attackdmg']+=$mydamage; $_SESSION['attacklog'] .= '<span style="color: red;">'. number_format($_GET['nextstep']) .'. Using your '. $r1['itmname'] .' you hit '. $odata['username'] .' doing '. $mydamage .' damage '. number_format($odata['hp']) .'</span> '; } else { echo '<span style="color: red;">'. number_format($_GET['nextstep']) .'. You tried to hit '. $odata['username'] .' but missed ('. number_format($them['hp']) .')</span> '; $_SESSION['attacklog'] .= '<span style="color: red;">'. number_format($_GET['nextstep']) .'. You tried to hit '. $odata['username'] .' but missed ('. number_format($odata['hp']) .')</span> '; } if($odata['hp'] <= 0) { $odata['hp']=0; $_SESSION['attackwon']=$_GET['ID']; $db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}"); echo ' [b]What do you want to do with '.$odata['username'].' now?[/b] <form action="attackwon.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Mug Them" /></form> <form action="attackbeat.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Hospitalize Them" /></form> <form action="attacktake.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Leave Them" /></form>'; } else { //choose opp gun $eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$odata['equip_primary']}, {$odata['equip_secondary']})"); if(mysql_num_rows($eq) == 0) { $wep="Fists"; $dam=(int)((((int) ($odata['strength']/$ir['guard']/100)) +1)*(rand(8000,12000)/10000)); } else { $cnt=0; while($r=$db->fetch_row($eq)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000)); } $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95)); if(rand(1,100) <= $hitratio) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$ir['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $dam-=$db->fetch_single($q3); } if($dam < -100000) { $dam=abs($dam); } else if($dam < 1) { $dam=1; } $crit=rand(1,40); if($crit==17) { $dam*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $dam/=(rand(20,40)/10); } $dam=round($dam); $youdata['hp']-=$dam; if ($youdata['hp']==1) { $dam+=1; $youdata['hp']=0; } $db->query("UPDATE users SET hp=hp-$dam WHERE userid=$userid"); $ns=$_GET['nextstep']+1; echo '<span style="color: red;">'.$ns.'. Using '.$oabbr.' '.$wep.' '.$odata['username'].' hit you doing '.$dam.' damage '.($youdata['hp']).'</span> '; $_SESSION['attacklog'].='<span style="color: blue;">'.$ns.'. Using '.$oabbr.' '.$wep.' '.$odata['username'].' hit '.$ir['username'].' doing '.$dam.' damage '.($youdata['hp']).'</span> '; } else { $ns=$_GET['nextstep']+1; echo '<span style="color: red;">'.$ns.'. '.$odata['username'].' tried to hit you but missed '.($youdata['hp']).'</font> '; $_SESSION['attacklog'].='<span style="color: blue;">'.$ns.'. '.$odata['username'].' tried to hit '.$ir['username'].' but missed '.($youdata['hp']).'</span> '; } if($youdata['hp'] <= 0) { $youdata['hp']=0; $_SESSION['attacklost']=1; $db->query("UPDATE users SET hp=0 WHERE userid=$userid"); echo '<form action="attacklost.php?ID='.$_GET['ID'].'"method="post"><input type="submit" value="Continue" />'; } } } else if ($odata['hp'] < 5) { echo 'You can only attack those who have health'; exit($h->endpage()); } else if ($ir['gang'] == $odata['gang'] && $ir['gang'] > 0) { echo 'You are in the same gang as '.$odata['username'].'! What are you smoking today dude!'; exit($h->endpage()); } else if ($youdata['energy'] < $youdata['maxenergy']/2) { echo 'You can only attack someone when you have 50% energy'; exit($h->endpage()); } else if ($youdata['location'] != $odata['location']) { echo 'You can only attack someone in the same location!'; exit($h->endpage()); } else { } echo '</td></tr>'; if($youdata['hp'] <= 0 || $odata['hp'] <= 0) { echo '</table>'; } else { $vars['hpperc']=round($youdata['hp']/$youdata['maxhp']*100); $vars['hpopp']=100-$vars['hpperc']; $vars2['hpperc']=round($odata['hp']/$odata['maxhp']*100); $vars2['hpopp']=100-$vars2['hpperc']; $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); echo '<tr><td colspan=2 align="center">Attack with: '; if($db->num_rows($mw) > 0) { while($r=$db->fetch_row($mw)) { if(!$_GET['nextstep']) { $ns=1; } else { $ns=$_GET['nextstep']+2; } if($r['itmid']==$ir['equip_primary']) { echo '[b]Primary Weapon:[/b] '; } if($r['itmid']==$ir['equip_secondary']) { echo '[b]Secondary Weapon:[/b] '; } echo "[url='attack.php?nextstep=$ns&ID={$_GET[']{$r['itmname']}[/url] "; } } else { echo 'You have nothing to fight with.'; } echo '</table>'; echo "<table width='50%' align='center'><tr><td align=right>Your Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10></td><tr><td align=right>Opponents Health: </td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10></td></tr></table>"; } exit($h->endpage()); ?>
  9. something secure? <tt>Site Offline</tt>
  10. You wanted to see something I secured I showed you. You didn't ask for something that works.. Now it'd be better if it worked.. But it doesn't don't like it then oh well.
  11. At the time, I thought it did.   <?php include (DIRNAME(__FILE__) . '/globals.php'); if (isset($_GET['delete']) AND !is_numeric($_GET['delete'])) { echo 'Please make sure it\'s a valid event ID!'; exit($h->endpage); } else { echo '[b]Event ID has been deleted![/b]'; $db->query('DELETE FROM `events` WHERE `evID` = '.$_GET['delete'].' AND `evUSER` = `'.$_SESSION['userid'].'`'); } if (isset($_GET['delall']) AND !ctype_digit($_GET['delall']) { echo 'You have no events.'; exit($h->endpage); } else { echo 'This will delete all your events. Are you sure? <a href = "events.php?delall2=1">Yes</a> - <a href = "index.php">No</a>'; exit($h->endpage); } if (isset($_GET['delall2']) AND !ctype_digit($_GET['delall2']) { echo 'You have no events.'; exit($h->endpage); } else { echo '[b]All event\'s have been deleted![/b]'; $db->query("DELETE FROM `events` WHERE `evUSER` = `".$_SESSION['userid']."`"); exit($h->endpage); } echo '[b]Latest 10 events[/b]'; echo "<a href = 'events.php?delall=1'>Delete All Events</a>"; echo "<table width = '75%' cellpadding = '1' class = 'table'> <tr><th>Time</th><th>Event</th><th>Links</th></tr>"; $QUERYGET = $db->query("SELECT `evUSER` , `evTIME` , `evID` , `evREAD` FROM `events` WHERE `evUSER` = `".$_SESSION['userid']."` ORDER BY `evTIME` DESC LIMIT 10"); while ($EV = mysql_fetch_row($QUERYGET)) { echo "<tr><td>".date('F j Y, g:i:s a',$EV->evTIME); if(!$EV->evREAD) { echo ' [b]New![/b]'; } echo "</td><td>".$EV->evTEXT."</td><td><a href = 'events.php?delete=".$EV['evID']."'>Delete</a></td></tr>"; } echo '</table>'; if ($ir->new_events => 1) { $db->query("UPDATE `events` SET `evREAD` = 1 WHERE `evUSER` = `".$_SESSION['userid']."`"); $db->query("UPDATE `users` SET `new_events` = 0 WHERE `userid` = `".$_SESSION['userid']."`"); } $h->endpage(); ?>
  12. No it's the real deal. I gave it to him..
  13. The code posted by Kieran-R isn't my code.. I claimed it as mine at the time because I was a money hungry bastard.. I got the code from a different game that I was helping.
  14. @Ruler- Do remember that MWG is not the only place that McCode users go to. This site is where a little bit of them go to. I get security jobs often, thank you very much. If I'm not getting anyone from here then so be it. I could care less honestly. @Kieran-R- It's really easy to edit a screen shot.
  15.   I never offered to secure anything for you first off. I don't even use that, so before you go saying shit make sure you know what your saying ;)
  16. Link me.
  17. @Danny everyone asks for help at some point. Just because I do it for $50 don't mean nothing.. Maybe I'm just being nice or got nothing better to do. Price don't have to deal with anything.
  18. Thank you blade..
  19. Haha, love how much people say so much yet no one here has ever seen my work. :P oh well
  20. @Joshua I bought it not him :P
  21. I'd recommend him to anyone. Does great work, and is very patient.
  22. I'll buy this :P
  23. bladewolf2010

    deleted

    off topic Neither of you can spell his name, it's Rasheed. Not resheed or raheed.
  24. Eh, no sense in trying to argue with it. Kind of pointless :P Don't have time for special Olympics
×
×
  • Create New...