-
Notifications
You must be signed in to change notification settings - Fork 7
/
move.php
38 lines (29 loc) · 790 Bytes
/
move.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
include('db.php');
session_name("icsession");
session_start();
include('varset.php');
if($_POST['direction'] == "North" && $chary != "100")
$chary ++;
if($_POST['direction'] == "East" && $charx != "100")
$charx ++;
if($_POST['direction'] == "South" && $chary != "1")
$chary --;
if($_POST['direction'] == "West" && $charx != "1")
$charx --;
if($charx == "25" && $chary == "25"){
$location = "Duel Ground";
}else{
$location = "Castle";
}
if($_POST['goDuelGround'] == "Yes"){
$charx = "25";
$chary = "25";
$location = "Duel Ground";
}
$query = mysql_query("UPDATE characters SET posx='".$charx."', posy='".$chary."', location='".$location."' WHERE username='".$charname."'");
if($_POST['goDuelGround'] == "Yes"){
include('duelground.php');
}
include('updatestats.php');
?>