aboutsummaryrefslogtreecommitdiffstats
path: root/inc/perso.inc
diff options
context:
space:
mode:
authoralexichi <alexbankai96@gmail.com>2016-05-05 23:06:29 +0200
committeralexichi <alexbankai96@gmail.com>2016-05-05 23:09:21 +0200
commitf171811a44364f605712aff1ca0808bfe570ef6e (patch)
treea970a69853e19ef43d97c2f48d61a6fb34637ff6 /inc/perso.inc
parent1efc4a15c8ab913bf8bdb1aef9f3b5720b3b7762 (diff)
downloadcandybox-f171811a44364f605712aff1ca0808bfe570ef6e.tar.gz
candybox-f171811a44364f605712aff1ca0808bfe570ef6e.tar.bz2
candybox-f171811a44364f605712aff1ca0808bfe570ef6e.tar.xz
candybox-f171811a44364f605712aff1ca0808bfe570ef6e.zip
add xp system and perso server side
Diffstat (limited to 'inc/perso.inc')
-rw-r--r--inc/perso.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/inc/perso.inc b/inc/perso.inc
new file mode 100644
index 0000000..075f8ae
--- /dev/null
+++ b/inc/perso.inc
@@ -0,0 +1,17 @@
+<?php
+function sendPerso() {
+ if(!empty($_SESSION["perso"]))
+ return $_SESSION["perso"];
+ else return false;
+}
+
+function updatePerso(){
+ $hp = $_POST["hp"];
+ $xp = $_POST["xp"];
+ $lv = $_POST["lv"];
+ $_SESSION["perso"]["hp"] = $hp;
+ $_SESSION["perso"]["xp"] = $xp;
+ $_SESSION["perso"]["lv"] = $lv;
+}
+
+?>