Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function character($id){
- $result = mysql_query ("SELECT * FROM phaos_characters WHERE id = '$id'");
- // $result = mysql_query ("SELECT * FROM phaos_characters WHERE username = '$username'");
- if ($row = mysql_fetch_array($result)) {
- //define main vars
- $this->id=$row["id"];
- $this->name=$row["name"];
- $this->user=$row["username"];
- $this->cclass=$row["class"];
- $this->race=$row["race"];
- $this->sex=$row["sex"];
- $this->image=$row["image_path"];
- $this->image2=$row["image_path1"];
- $this->age=$row["age"];
- $this->location=$row["location"];
- //define attribute vars
- $this->strength = $row["strength"];
- $this->strengthbase = $row["strength"];
- $this->dexterity = $row["dexterity"];
- $this->dexteritybase = $row["dexterity"];
- $this->wisdom = $row["wisdom"];
- $this->wisdombase = $row["wisdom"];
- $this->constitution = $row["constitution"];
- $this->constitutionbase = $row["constitution"];
- //define changeable vars
- $this->hit_points = $row["hit_points"];
- $this->stamina_points=$row["stamina"];
- if($row['level'] == 0 OR $row['level'] == "") {
- $this->level = 1;
- } else {
- $this->level = (int)$row['level'];
- }
- $this->xp = (int)$row["xp"];
- $this->gold = $row["gold"];
- $this->stat_points = $row["stat_points"];
- //define equipment vars
- $this->weapon = $row["weapon"];
- $this->neck = $row["neck"];
- $this->ring = $row["ring"];
- $this->armor = $row["armor"];
- $this->boots = $row["boots"];
- $this->shield = $row["shield"];
- $this->gloves = $row["gloves"];
- $this->helm = $row["helm"];
- $this->helmet = $row["helm"];
Add Comment
Please, Sign In to add comment