There is a bad bug in DK when you are in a fight with a monster much more powerful then you are. when you try to run it sends you to Midworld (0 lat, 0 long) but yet says you are still exploring. also it does it automatically. as if you ran away but appeared in an invalid location..
Here is the code in Fight.php
This coding may need to be edited to suit your game. I will not modify this code anymore.
to find this code with ease search for if (isset($_POST["run"])) { and its at the bottom..
Original..
if ($userrow["currenthp"] <= 0) {
$newgold = ceil($userrow["gold"]/0);
$newhp = ceil($userrow["maxhp"]/4);
$updatequery = doquery("UPDATE {{table}} SET currenthp='$newhp',currentaction='In Town',currentmonster='0',currentmonsterhp='0',currentmonstersleep='0',currentmonsterimmune='0',currentfight='0',latitude='0',longitude='0',gold='$newgold' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$playerisdead = 1;
}
}
}
$updatequery = doquery("UPDATE {{table}} SET currentaction='Exploring' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
header("Location: index.php");
die();
Fixed..
if ($userrow["currenthp"] <= 0) {
$newgold = ceil($userrow["gold"]/2);
$newhp = ceil($userrow["maxhp"]/4);
$updatequery = doquery("UPDATE {{table}} SET currenthp='$newhp',currentaction='In Town',currentmonster='0',currentmonsterhp='0',currentmonstersleep='0',currentmonsterimmune='0',currentfight='0',latitude='0',longitude='0',gold='$newgold' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$playerisdead = 1;
$page = "<div align=\"center\"><img src=\"images/races/{{gender}}/{{charrace}}_dead.jpg\" border=\"0\" /></div><BR>You turn to run away and the beast lays one last blow on you!<br /><b>You have been Killed.</b><br /><br />As a consequence, you've lost half of your gold. <br /><br />You have been taken back to <a href=\"index.php\">Kingson</a> and treated for your wounds.";
display("$page", "You have died.."); die();
//header("Location: index.php"); die;
}
}
}
else
{
$updatequery = doquery("UPDATE {{table}} SET currentaction='Exploring' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
header("Location: index.php");
die();
}
-Sled