Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("game.php");
- $id = $_GET['id'];
- $attack = $_GET['attack'];
- $sql="SELECT * FROM an_enemies WHERE id=$id";
- $result=mysql_query($sql);
- while($row=mysql_fetch_array($result))
- {
- $ename = $row["name"];
- $ehp = $row["hp"];
- $etype = $row["type"];
- }
- $sql="SELECT * FROM an_enemy WHERE id=$etype";
- $result=mysql_query($sql);
- while($row=mysql_fetch_array($result))
- {
- $emaxhp = $row["maxhp"];
- }
- $hp = get_stat("hp");
- $maxhp = 100+10*get_stat("end");
- if($attack = 0)
- {
- $ehp = $ehp - rand(1,20);
- $hp = $hp - rand(1,20);
- }
- $sql="UPDATE an_enemies SET hp=$ehp WHERE id=$id";
- $result=mysql_query($sql);
- set_stat("hp",$hp);
- header('Location: index.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement