Guest User

Untitled

a guest
Jun 17th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. function character($id){
  2. $result = mysql_query ("SELECT * FROM phaos_characters WHERE id = '$id'");
  3. // $result = mysql_query ("SELECT * FROM phaos_characters WHERE username = '$username'");
  4. if ($row = mysql_fetch_array($result)) {
  5. //define main vars
  6. $this->id=$row["id"];
  7. $this->name=$row["name"];
  8. $this->user=$row["username"];
  9. $this->cclass=$row["class"];
  10. $this->race=$row["race"];
  11. $this->sex=$row["sex"];
  12. $this->image=$row["image_path"];
  13. $this->image2=$row["image_path1"];
  14. $this->age=$row["age"];
  15. $this->location=$row["location"];
  16. //define attribute vars
  17. $this->strength = $row["strength"];
  18. $this->strengthbase = $row["strength"];
  19. $this->dexterity = $row["dexterity"];
  20. $this->dexteritybase = $row["dexterity"];
  21. $this->wisdom = $row["wisdom"];
  22. $this->wisdombase = $row["wisdom"];
  23. $this->constitution = $row["constitution"];
  24. $this->constitutionbase = $row["constitution"];
  25. //define changeable vars
  26. $this->hit_points = $row["hit_points"];
  27. $this->stamina_points=$row["stamina"];
  28. if($row['level'] == 0 OR $row['level'] == "") {
  29. $this->level = 1;
  30. } else {
  31. $this->level = (int)$row['level'];
  32. }
  33. $this->xp = (int)$row["xp"];
  34. $this->gold = $row["gold"];
  35. $this->stat_points = $row["stat_points"];
  36. //define equipment vars
  37. $this->weapon = $row["weapon"];
  38. $this->neck = $row["neck"];
  39. $this->ring = $row["ring"];
  40. $this->armor = $row["armor"];
  41. $this->boots = $row["boots"];
  42. $this->shield = $row["shield"];
  43. $this->gloves = $row["gloves"];
  44. $this->helm = $row["helm"];
  45. $this->helmet = $row["helm"];
Add Comment
Please, Sign In to add comment