Jump to content
MakeWebGames

Recommended Posts

Posted

Im aware of a attack bug in V2 i was just wondering if someone might have a fix for it i avhe tried everthing i know what ot do.. can cant figure it out. Of course im not going to say the bug exactly but what i will say is its a bug where they can attack someoen no matter if they are in the same location or gang....For the people that know about this one will know what i mean any help would be greatly appreciated.

Posted

Re: Attack Bug

First Find :

else if ($odata['hp'] < 5)
{
print "You can only attack those who have health";
$h->endpage();
exit;
}

 

Then Underneath Add :

else if ($ir['gang'] == $odata['gang'] && $ir['gang'] > 0)
{
print "You are in the same gang as {$odata['username']}! What are you smoking today dude!";
$h->endpage();
exit;
}

 

Then Find :

else if ($youdata['energy'] < $youdata['maxenergy']/2)
{
print "You can only attack someone when you have 50% energy";
$h->endpage();
exit;
}

 

Add Underneath :

else if ($youdata['location'] != $odata['location'])
{
print "You can only attack someone in the same location!";
$h->endpage();
exit;
}

 

I Think Thats It

Posted

Re: Attack Bug

I know of one attack bug that is found in V2 but i don't know if this is what you are looking for but it may help you and others..

Find in attacklost.php:

<?php
$atkpage=1;
include "globals.php";
if ($ir['hospital'] > 0 || $ir['jail'] > 0) { die("You cannot access this page while you are in the hospital or in jail."); }
$_GET['ID']==abs((int) $_GET['ID']);
$_SESSION['attacking']=0;
$_SESSION['attacklost']=0;

 

Add this under the previous code as mentioned above:

if($ir['attacking']==0)
{
print "WTF are you trying to do?";
$h->endpage();
$_SESSION['attacking']=0;
$ir['attacking']=0;
$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");
exit;
}

Join the conversation

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

Guest
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...