Jump to content



Recommended Posts

Ok im not really sure where to begin.Ok my attack mug dosent give the EXP nor the money it says it does.Am i Over looking sumin?


-- Mono Country v1.0 BETA
-- A product of DBS-entertainment
-- Copyright held 2005 by Dabomstew
-- INDEX.php
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
require "header.php";
$h = new headers;
include "mysql.php";
global $c;
include "clean.php";
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$lv=date('F j, Y, g:i a',$ir['laston']);

$_GET['ID']=abs((int) $_GET['ID']);
$od=mysql_query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c);
if($_SESSION['attackwon'] != $_GET['ID'])
die ("Cheaters don't get anywhere.");
if($r['hp'] == 1)
print "What a cheater u are.";
$stole=(int) (rand($r['money']/500,$r['money']/20));
print "You beat {$r['username']} and stole \$$stole";
$expperc=(int) ($expgain/$ir['exp_needed']*100);
print " and gained $expperc% EXP!";
mysql_query("UPDATE users SET attackwon=attackwon+1,exp=exp+$expgain,money=money+$stole WHERE userid=$userid",$c);
mysql_query("UPDATE users SET attacklost=attacklost+1,hp=1,money=money-$stole WHERE userid={$r['userid']}",$c);
event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] attacked you and stole $stole.",$c);

mysql_query("UPDATE users SET hp=1,hospital=hospital+20+(rand()*20),hospreason='Attacked by {$ir['username']}' WHERE userid={$r['userid']}",$c) ;
mysql_query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),$stole,'$atklog');",$c);
$warq=mysql_query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})",$c);
if (mysql_num_rows($warq) > 0)
mysql_query("UPDATE gangs SET gangRESPECT=gangRESPECT-1 WHERE gangID={$r['gang']}",$c);
mysql_query("UPDATE gangs SET gangRESPECT=gangRESPECT+0 WHERE gangID={$ir['gang']}",$c);

print "You beat Mr. non-existant!";
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...