Jump to content
MakeWebGames

Recommended Posts

Posted

Recently it's come to my attention that players are able to "attack someone until they have 0 health, go do some mining and then come back to pummel them before the tick gives them health"

I'm going on the assumption that this isn't supposed to happen since it has set that players lose exp when they leave a fight to go to another page.

Is there a fix to prevent players from leaving then re-entering a fight?

Posted

Sorry, shouldn't of put such an exact quote XD

The problem is that they (player a) are attacking player b, dropping the player b's health to 0 health, 'leave' the fight with health (player a), then player a can come back and defeat player b while player b still has 0 health.

Considering the experience drop they recieve when they 'leave' I don't think this should happen.

Posted

You could add some sort of restriction that a player can not be attacked unless they have at least 33%, 50%, etc, health.

Something such as:

if($playerb['health'] < ($playerb['maxhealth']*0.5)) //0.5 for 50% health

{

die("message");

}

Posted
if($_GET['nextstep'] && $odata['hp'] <= 33)
{
if($ir['attacking'] == 0)
{
print "<center>The enemy is too wary to attack. Try again at a more opportune time.

[[url='index.php'] Go Back [/url]]";
$h->endpage();
exit;
}
}

 

What I currently have for the health.

 

*** Fixed, thank you again Equinox

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