POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_Player

Source Location: /classes/OTS_Player.php

Class OTS_Player

Class Overview

OTServ character abstraction.

OTServ character abstraction.

Located in /classes/OTS_Player.php [line 71]

OTS_Base_DAO
   |
   --OTS_Row_DAO
      |
      --OTS_Player
Author(s):
API Tags:
Property:  string $name: Character name.
Property:  OTS_Account $account: Account to which character belongs.
Property:  OTS_Group $group: Group of which character is member.
Property:  int $sex: Gender.
Property:  int $vocation: Vocation.
Property:  int $experience: Experience points.
Property:  int $level: Experience level.
Property:  int $magLevel: Magic level.
Property:  int $health: Hit points.
Property:  int $healthMax: Maximum hit points.
Property:  int $mana: Mana.
Property:  int $manaMax: Maximum mana.
Property:  int $manaSpent: Spent mana.
Property:  int $soul: Soul points.
Property:  int $direction: Looking direction.
Property:  int $lookBody: Body color.
Property:  int $lookFeet: Feet color.
Property:  int $lookHead: Hairs color.
Property:  int $lookLegs: Legs color.
Property:  int $lookType: Outfit type.
Property:  int $lookAddons: Addons.
Property:  int $posX: Spawn X coord.
Property:  int $posY: Spawn Y coord.
Property:  int $posZ: Spawn Z coord.
Property:  int $cap: Capacity.
Property:  int $lastLogin: Last login timestamp.
Property:  int $lastLogout: Last logout timestamp.
Property:  int $lastIP: Last login IP number.
Property:  string $conditions: Binary conditions.
Property:  int $redSkullTime: Timestamp for which red skull will last.
Property:  int $balance: Bank balance.
Property:  int $stamina: Stamina miliseconds.
Property:  bool $save: Player save flag.
Property:  bool $redSkull: Player red skull flag.
Property:  bool $banned: Player banned state.
Property-read:  int $id: Player ID.
Property-read:  bool $loaded: Loaded state.
Property-read:  string $townName: Name of town in which player residents.
Property-read:  OTS_House $house: House which player rents.
Property-read:  OTS_Players_List $vipsList: List of VIPs of player.
Property-read:  string $vocationName: String vocation representation.
Property-read:  array $spellsList: List of known spells.

Information Tags:
Tutorial:  Players
Version:  0.0.1
Version:  0.1.6

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From OTS_Base_DAO

OTS_Base_DAO::$db

Inherited From OTS_Row_DAO

OTS_Row_DAO::__construct()
Handles automatic loading for record.
OTS_Row_DAO::find()
Loads row by it's name.
OTS_Row_DAO::load()
Loads row by it's ID.

Inherited From OTS_Base_DAO

OTS_Base_DAO::__construct()
Sets database connection handler.
OTS_Base_DAO::__clone()
Creates clone of object.
OTS_Base_DAO::__set_state()
Magic PHP5 method.
OTS_Base_DAO::__sleep()
Magic PHP5 method.
OTS_Base_DAO::__wakeup()
Magic PHP5 method.

[ Top ]
Method Summary
void   addSpell()   Adds given spell to player's spell book (makes him knowing it).
void   addVIP()   Adds player to VIP list.
void   ban()  
void   delete()   Deletes player.
void   deleteSpell()   Removes given spell from player's spell book.
void   deleteVIP()   Deletes player from VIP list.
void   find()   Loads player by it's name.
OTS_Account   getAccount()   Returns account of this player.
int   getBalance()   Bank balance.
int   getCap()   Capacity.
string   getConditions()   Conditions.
string   getCustomField()   Reads custom field.
OTS_Item|null   getDepot()   Returns items tree from given depot.
int   getDirection()   Looking direction.
int   getExperience()   Experience points.
OTS_Group   getGroup()   Returns group of this player.
string   getGuildNick()   Guild nick.
int   getHealth()   Current HP.
int   getHealthMax()   Maximum HP.
OTS_House|null   getHouse()   Returns house rented by this player.
int   getId()   Player ID.
int   getLastIP()   Last login IP.
int   getLastLogin()   Last login timestamp.
int   getLastLogout()   Last logout timestamp.
int   getLevel()   Experience level.
int   getLookAddons()   Addons.
int   getLookBody()   Body color.
int   getLookFeet()   Boots color.
int   getLookHead()   Hair color.
int   getLookLegs()   Legs color.
int   getLookType()   Outfit.
int   getLossExperience()   Percentage of experience lost after dead.
int   getLossItems()   Percentage of items lost after dead.
int   getLossMana()   Percentage of used mana lost after dead.
int   getLossSkills()   Percentage of skills lost after dead.
int   getMagLevel()   Magic level.
int   getMana()   Current mana.
int   getManaMax()   Maximum mana.
int   getManaSpent()   Mana spent.
string   getName()   Player name.
int   getPosX()   X map coordinate.
int   getPosY()   Y map coordinate.
int   getPosZ()   Z map coordinate.
int   getPremiumEnd()   Player's Premium Account expiration timestamp.
OTS_GuildRank|null   getRank()   Assigned guild rank.
int   getRankId()  
int   getRedSkullTime()   Red skulled time remained.
int   getSave()  
int   getSex()   Player gender.
int   getSkill()   Returns player's skill.
int   getSkillTries()   Returns player's skill's tries for next level.
OTS_Item|null   getSlot()   Returns items tree from given slot.
int   getSoul()   Soul points.
array   getSpellsList()   Returns list of known spells.
int   getStamina()   Stamina.
int|null   getStorage()   Returns value of storage record.
int   getTownId()   Residence town's ID.
string   getTownName()   Player residence town name.
OTS_Players_List   getVIPsList()   Returns list of VIPs.
int   getVocation()   Player proffesion.
string   getVocationName()   Player proffesion name.
bool   hasRedSkull()   Checks if player has red skull.
bool   hasSpell()   Checks if player knows given spell.
bool   isBanned()  
bool   isLoaded()   Checks if object is loaded.
bool   isSaveSet()   Checks if save flag is set.
bool   isVIP()   Checks if given player is a VIP for current one.
void   load()   Loads player with given id.
void   save()   Saves player in database.
void   setAccount()   Assigns character to account.
void   setBalance()   Sets bank balance value.
void   setCap()   Sets capacity.
void   setConditions()   Sets conditions.
void   setCustomField()   Writes custom field.
void   setDepot()   Sets depot content.
void   setDirection()   Sets looking direction.
void   setExperience()   Sets experience points.
void   setGroup()   Assigns character to group.
void   setGuildNick()   Sets guild nick.
void   setHealth()   Sets current HP.
void   setHealthMax()   Sets maximum HP.
void   setLastIP()   Sets last login IP.
void   setLastLogin()   Sets last login timestamp.
void   setLastLogout()   Sets last logout timestamp.
void   setLevel()   Sets experience level.
void   setLookAddons()   Sets addons.
void   setLookBody()   Sets body color.
void   setLookFeet()   Sets boots color.
void   setLookHead()   Sets hair color.
void   setLookLegs()   Sets legs color.
void   setLookType()   Sets outfit.
void   setLossExperience()   Sets percentage of experience lost after dead.
void   setLossItems()   Sets percentage of items lost after dead.
void   setLossMana()   Sets percentage of used mana lost after dead.
void   setLossSkills()   Sets percentage of skills lost after dead.
void   setMagLevel()   Sets magic level.
void   setMana()   Sets current mana.
void   setManaMax()   Sets maximum mana.
void   setManaSpent()   Sets mana spent.
void   setName()   Sets players's name.
void   setPosX()   Sets X map coordinate.
void   setPosY()   Sets Y map coordinate.
void   setPosZ()   Sets Z map coordinate.
void   setPremiumEnd()   Sets player's Premium Account expiration timestamp.
void   setRank()   Assigns guild rank.
void   setRankId()  
void   setRedSkull()   Sets red skull flag.
void   setRedSkullTime()   Sets red skulled time remained.
void   setSave()   Sets save flag.
void   setSex()   Sets player gender.
void   setSkill()   Sets skill value.
void   setSkillTries()   Sets skill's tries for next level.
void   setSlot()   Sets slot content.
void   setSoul()   Sets soul points.
void   setStamina()   Sets stamina time left.
void   setStorage()   Sets value of storage record.
void   setTownId()   Sets residence town's ID.
void   setVocation()   Sets player proffesion.
void   unban()  
void   unsetRedSkull()   Unsets red skull flag.
void   unsetSave()   Unsets save flag.
mixed   __get()   Magic PHP5 method.
void   __set()   Magic PHP5 method.
array   __sleep()   Magic PHP5 method.
string   __toString()   Returns string representation of object.

[ Top ]
Methods
addSpell  [line 2577]

  void addSpell( OTS_Spell $spell  )

Adds given spell to player's spell book (makes him knowing it).

Adds given spell to player's spell book (makes him knowing it).

Parameters:
OTS_Spell   $spell:  Spell to be learned.

API Tags:
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.4
Throws:  PDOException On PDO operation error.

[ Top ]
addVIP  [line 2452]

  void addVIP( OTS_Player $player  )

Adds player to VIP list.

Adds player to VIP list.

Parameters:
OTS_Player   $player:  Player to be added.

API Tags:
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.3
Throws:  PDOException On PDO operation error.

[ Top ]
ban  [line 2251]

  void ban( [int $time = 0]  )

Parameters:
int   $time:  Time for time until expires (0 - forever).

API Tags:
Deprecated:  0.1.5 Use OTS_PlayerBan class.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Since:  0.0.5
Throws:  PDOException On PDO operation error.

[ Top ]
delete  [line 2317]

  void delete( )

Deletes player.

Deletes player.


API Tags:
Access:  public

Information Tags:
Version:  0.0.5
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.5
Throws:  PDOException On PDO operation error.

[ Top ]
deleteSpell  [line 2596]

  void deleteSpell( OTS_Spell $spell  )

Removes given spell from player's spell book.

Removes given spell from player's spell book.

Parameters:
OTS_Spell   $spell:  Spell to be removed.

API Tags:
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.4
Throws:  PDOException On PDO operation error.

[ Top ]
deleteVIP  [line 2491]

  void deleteVIP( OTS_Player $player  )

Deletes player from VIP list.

Deletes player from VIP list.

Parameters:
OTS_Player   $player:  Player to be deleted.

API Tags:
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.3
Throws:  PDOException On PDO operation error.

[ Top ]
find  [line 134]

  void find( string $name  )

Loads player by it's name.

Loads player by it's name.

Parameters:
string   $name:  Player's name.

API Tags:
Access:  public

Information Tags:
Version:  0.0.5
Version:  0.0.1
Throws:  PDOException On PDO operation error.
Since:  0.0.2

Redefinition of:
OTS_Row_DAO::find()
Loads row by it's name.

[ Top ]
getAccount  [line 258]

  OTS_Account getAccount( )

Returns account of this player.

Returns account of this player. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Owning account.
Access:  public

Information Tags:
Version:  0.1.0
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Throws:  PDOException On PDO operation error.

[ Top ]
getBalance  [line 1702]

  int getBalance( )

Bank balance.

Bank balance.


API Tags:
Return:  Amount of money stored in bank.
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.2

[ Top ]
getCap  [line 1105]

  int getCap( )

Capacity.

Capacity. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Capacity.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getConditions  [line 1309]

  string getConditions( )

Conditions.

Conditions. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Conditions binary string.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getCustomField  [line 1780]

  string getCustomField( string $field  )

Reads custom field.

Reads custom field. Reads field by it's name. Can read any field of given record that exists in database.

Note: You should use this method only for fields that are not provided in standard setters/getters (SVN fields). This method runs SQL query each time you call it so it highly overloads used resources.

Parameters:
string   $field:  Field name.

API Tags:
Return:  Field value.
Access:  public

Information Tags:
Version:  0.0.5
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.3
Throws:  PDOException On PDO operation error.

[ Top ]
getDepot  [line 2129]

  OTS_Item|null getDepot( int $depot  )

Returns items tree from given depot.

Returns items tree from given depot. You need global items list resources loaded in order to use this method.

Parameters:
int   $depot:  Depot ID to get items.

API Tags:
Return:  Item in given depot (items tree if in given depot there is a container). If there is no item in depot then null value will be returned.
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Throws:  E_OTS_NotAContainer If item which is not of type container contains sub items.
Throws:  E_OTS_NotLoaded If player is not loaded or there is no global items list resource loaded.
Throws:  PDOException On PDO operation error.
Since:  0.0.3

[ Top ]
getDirection  [line 755]

  int getDirection( )

Looking direction.

Looking direction. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Looking direction.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getExperience  [line 440]

  int getExperience( )

Experience points.

Experience points. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Experience points.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getGroup  [line 297]

  OTS_Group getGroup( )

Returns group of this player.

Returns group of this player. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Group of which current character is member.
Access:  public

Information Tags:
Version:  0.1.0
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Throws:  PDOException On PDO operation error.

[ Top ]
getGuildNick  [line 1424]

  string getGuildNick( )

Guild nick.

Guild nick. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Guild title.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getHealth  [line 545]

  int getHealth( )

Current HP.

Current HP. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Current HP.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getHealthMax  [line 580]

  int getHealthMax( )

Maximum HP.

Maximum HP. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Maximum HP.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getHouse  [line 2388]

  OTS_House|null getHouse( )

Returns house rented by this player.

Returns house rented by this player. You need global houses list resource loaded in order to use this method.


API Tags:
Return:  House rented by player.
Access:  public

Information Tags:
Version:  0.1.0
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded or global houses list is not loaded.
Since:  0.1.0
Throws:  PDOException On PDO operation error.

[ Top ]
getId  [line 201]

  int getId( )

Player ID.

Player ID. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Player ID.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLastIP  [line 1207]

  int getLastIP( )

Last login IP.

Last login IP. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Last login IP.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLastLogin  [line 1140]

  int getLastLogin( )

Last login timestamp.

Last login timestamp. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Last login timestamp.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLastLogout  [line 1172]

  int getLastLogout( )

Last logout timestamp.

Last logout timestamp.


API Tags:
Return:  Last logout timestamp.
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.6

[ Top ]
getLevel  [line 475]

  int getLevel( )

Experience level.

Experience level. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Experience level.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLookAddons  [line 965]

  int getLookAddons( )

Addons.

Addons. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Addons.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLookBody  [line 790]

  int getLookBody( )

Body color.

Body color. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Body color.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLookFeet  [line 825]

  int getLookFeet( )

Boots color.

Boots color. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Boots color.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLookHead  [line 860]

  int getLookHead( )

Hair color.

Hair color. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Hair color.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLookLegs  [line 895]

  int getLookLegs( )

Legs color.

Legs color. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Legs color.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLookType  [line 930]

  int getLookType( )

Outfit.

Outfit. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Outfit.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLossExperience  [line 1570]

  int getLossExperience( )

Percentage of experience lost after dead.

Percentage of experience lost after dead. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Percentage of experience lost after dead.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLossItems  [line 1672]

  int getLossItems( )

Percentage of items lost after dead.

Percentage of items lost after dead.


API Tags:
Return:  Percentage of items lost after dead.
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.4

[ Top ]
getLossMana  [line 1605]

  int getLossMana( )

Percentage of used mana lost after dead.

Percentage of used mana lost after dead. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Percentage of used mana lost after dead.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getLossSkills  [line 1640]

  int getLossSkills( )

Percentage of skills lost after dead.

Percentage of skills lost after dead. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Percentage of skills lost after dead.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getMagLevel  [line 510]

  int getMagLevel( )

Magic level.

Magic level. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Magic level.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getMana  [line 615]

  int getMana( )

Current mana.

Current mana. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Current mana.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getManaMax  [line 650]

  int getManaMax( )

Maximum mana.

Maximum mana. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Maximum mana.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getManaSpent  [line 685]

  int getManaSpent( )

Mana spent.

Mana spent. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Mana spent.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getName  [line 222]

  string getName( )

Player name.

Player name. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Player's name.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getPosX  [line 1000]

  int getPosX( )

X map coordinate.

X map coordinate. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  X map coordinate.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getPosY  [line 1035]

  int getPosY( )

Y map coordinate.

Y map coordinate. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Y map coordinate.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getPosZ  [line 1070]

  int getPosZ( )

Z map coordinate.

Z map coordinate. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Z map coordinate.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getPremiumEnd  [line 333]

  int getPremiumEnd( )

Player's Premium Account expiration timestamp.

Player's Premium Account expiration timestamp.


API Tags:
Return:  Player PACC expiration timestamp.
Deprecated:  0.1.5 Use OTS_Account->getPremiumEnd().
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Since:  0.0.3
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getRank  [line 1476]

  OTS_GuildRank|null getRank( )

Assigned guild rank.

Assigned guild rank. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Guild rank (null if not member of any).
Access:  public

Information Tags:
Version:  0.1.0
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Throws:  PDOException On PDO operation error.

[ Top ]
getRankId  [line 1454]

  int getRankId( )


API Tags:
Return:  Guild rank ID.
Deprecated:  0.0.4 Use getRank().
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getRedSkullTime  [line 1344]

  int getRedSkullTime( )

Red skulled time remained.

Red skulled time remained. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Red skulled time remained.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getSave  [line 1273]

  int getSave( )


API Tags:
Return:  Save counter.
Deprecated:  0.0.7 Save field is back as flag not a counter.
Access:  public

Information Tags:
Version:  0.0.7
Version:  0.0.1
Since:  0.0.6
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getSex  [line 370]

  int getSex( )

Player gender.

Player gender. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Player gender.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getSkill  [line 1838]

  int getSkill( int $skill  )

Returns player's skill.

Returns player's skill.

Parameters:
int   $skill:  Skill ID.

API Tags:
Return:  Skill value.
Access:  public

Information Tags:
Version:  0.0.2
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.2

[ Top ]
getSkillTries  [line 1870]

  int getSkillTries( int $skill  )

Returns player's skill's tries for next level.

Returns player's skill's tries for next level.

Parameters:
int   $skill:  Skill ID.

API Tags:
Return:  Skill tries.
Access:  public

Information Tags:
Version:  0.0.2
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.2

[ Top ]
getSlot  [line 1986]

  OTS_Item|null getSlot( int $slot  )

Returns items tree from given slot.

Returns items tree from given slot. You need global items list resources loaded in order to use this method.

Parameters:
int   $slot:  Slot to get items.

API Tags:
Return:  Item in given slot (items tree if in given slot there is a container). If there is no item in slot then null value will be returned.
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Throws:  E_OTS_NotAContainer If item which is not of type container contains sub items.
Throws:  E_OTS_NotLoaded If player is not loaded or there is no global items list resource loaded.
Throws:  PDOException On PDO operation error.
Since:  0.0.3

[ Top ]
getSoul  [line 720]

  int getSoul( )

Soul points.

Soul points. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Soul points.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getSpellsList  [line 2514]

  array getSpellsList( )

Returns list of known spells.

Returns list of known spells. You need global spells list resource loaded in order to use this method.


API Tags:
Return:  List of known spells.
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.4
Throws:  PDOException On PDO operation error.

[ Top ]
getStamina  [line 1736]

  int getStamina( )

Stamina.

Stamina.


API Tags:
Return:  Miliseconds of stamina left.
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.6

[ Top ]
getStorage  [line 1903]

  int|null getStorage( int $key  )

Returns value of storage record.

Returns value of storage record.

Parameters:
int   $key:  Storage key.

API Tags:
Return:  Stored value (null if not set).
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.2
Throws:  PDOException On PDO operation error.

[ Top ]
getTownId  [line 1535]

  int getTownId( )

Residence town's ID.

Residence town's ID. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Residence town's ID.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getTownName  [line 2365]

  string getTownName( )

Player residence town name.

Player residence town name. You need global map resource loaded in order to use this method.


API Tags:
Return:  Player town name.
Access:  public

Information Tags:
Version:  0.1.0
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded or global map is not loaded.
Since:  0.1.0

[ Top ]
getVIPsList  [line 2419]

  OTS_Players_List getVIPsList( )

Returns list of VIPs.

Returns list of VIPs. It means list of players which this player have on his/her list.


API Tags:
Return:  List of VIPs.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.3
Throws:  PDOException On PDO operation error.

[ Top ]
getVocation  [line 405]

  int getVocation( )

Player proffesion.

Player proffesion. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Player proffesion.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
getVocationName  [line 2343]

  string getVocationName( )

Player proffesion name.

Player proffesion name. You need global vocations list resource loaded in order to use this method.


API Tags:
Return:  Player proffesion name.
Access:  public

Information Tags:
Version:  0.1.0
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded or global vocations list is not loaded.
Since:  0.0.6

[ Top ]
hasRedSkull  [line 1379]

  bool hasRedSkull( )

Checks if player has red skull.

Checks if player has red skull. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  Red skull state.
Access:  public

Information Tags:
Version:  0.0.3
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
hasSpell  [line 2558]

  bool hasSpell( OTS_Spell $spell  )

Checks if player knows given spell.

Checks if player knows given spell.

Parameters:
OTS_Spell   $spell:  Spell to be checked.

API Tags:
Return:  True if player knows given spell, false otherwise.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.4
Throws:  PDOException On PDO operation error.

[ Top ]
isBanned  [line 2295]

  bool isBanned( )


API Tags:
Return:  True if player is banned, false otherwise.
Deprecated:  0.1.5 Use OTS_PlayerBan class.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Since:  0.0.5
Throws:  PDOException On PDO operation error.

[ Top ]
isLoaded  [line 151]

  bool isLoaded( )

Checks if object is loaded.

Checks if object is loaded.


API Tags:
Return:  Load state.
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
isSaveSet  [line 1242]

  bool isSaveSet( )

Checks if save flag is set.

Checks if save flag is set. Note: Since 0.0.3 version this method throws E_OTS_NotLoaded exception instead of triggering E_USER_WARNING.


API Tags:
Return:  PACC days.
Access:  public

Information Tags:
Version:  0.0.7
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.

[ Top ]
isVIP  [line 2472]

  bool isVIP( OTS_Player $player  )

Checks if given player is a VIP for current one.

Checks if given player is a VIP for current one.

Parameters:
OTS_Player   $player:  Player to check.

API Tags:
Return:  True, if given player is on VIP list.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.3
Throws:  PDOException On PDO operation error.

[ Top ]
load  [line 111]

  void load( int $id  )

Loads player with given id.

Loads player with given id.

Parameters:
int   $id:  Player's ID.

API Tags:
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Throws:  PDOException On PDO operation error.

Redefinition of:
OTS_Row_DAO::load()
Loads row by it's ID.

[ Top ]
save  [line 166]

  void save( )

Saves player in database.

Saves player in database. If player is not loaded to represent any existing group it will create new row for it.


API Tags:
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Throws:  PDOException On PDO operation error.

[ Top ]
setAccount  [line 280]

  void setAccount( OTS_Account $account  )

Assigns character to account.

Assigns character to account. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
OTS_Account   $account:  Owning account.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1
Throws:  E_OTS_NotLoaded If passed $account parameter is not loaded.

[ Top ]
setBalance  [line 1723]

  void setBalance( int $balance  )

Sets bank balance value.

Sets bank balance value. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $balance:  Amount of money to be set in bank.

API Tags:
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Since:  0.1.2

[ Top ]
setCap  [line 1124]

  void setCap( int $cap  )

Sets capacity.

Sets capacity. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $cap:  Capacity.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setConditions  [line 1328]

  void setConditions( string $conditions  )

Sets conditions.

Sets conditions. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
string   $conditions:  Condition binary string.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setCustomField  [line 1813]

  void setCustomField( string $field, mixed $value  )

Writes custom field.

Writes custom field. Write field by it's name. Can write any field of given record that exists in database.

Note: You should use this method only for fields that are not provided in standard setters/getters (SVN fields). This method runs SQL query each time you call it so it highly overloads used resources.

Note: Make sure that you pass $value argument of correct type. This method determinates whether to quote field value. It is safe - it makes you sure that no unproper queries that could lead to SQL injection will be executed, but it can make your code working wrong way. For example: $object->setCustomField('foo', '1'); will quote 1 as as string ('1') instead of passing it as a integer.

Parameters:
string   $field:  Field name.
mixed   $value:  Field value.

API Tags:
Access:  public

Information Tags:
Version:  0.0.5
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.3
Throws:  PDOException On PDO operation error.

[ Top ]
setDepot  [line 2187]

  void setDepot( int $depot, [OTS_Item $item = null], [int $pid = 0], [int $depot_id = 0]  )

Sets depot content.

Sets depot content.

Parameters:
int   $depot:  Depot ID to save items.
OTS_Item   $item:  Item (can be a container with content) for given depot. Leave this parameter blank to clear depot.
int   $pid:  Deprecated, not used anymore.
int   $depot_id:  Internal, for further use.

API Tags:
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.3
Throws:  PDOException On PDO operation error.

[ Top ]
setDirection  [line 774]

  void setDirection( int $direction  )

Sets looking direction.

Sets looking direction. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $direction:  Looking direction.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setExperience  [line 459]

  void setExperience( int $experience  )

Sets experience points.

Sets experience points. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $experience:  Experience points.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setGroup  [line 319]

  void setGroup( OTS_Group $group  )

Assigns character to group.

Assigns character to group. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
OTS_Group   $group:  Group to be a member.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1
Throws:  E_OTS_NotLoaded If passed $group parameter is not loaded.

[ Top ]
setGuildNick  [line 1443]

  void setGuildNick( string $guildnick  )

Sets guild nick.

Sets guild nick. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
string   $guildnick:  Name.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setHealth  [line 564]

  void setHealth( int $health  )

Sets current HP.

Sets current HP. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $health:  Current HP.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setHealthMax  [line 599]

  void setHealthMax( int $healthmax  )

Sets maximum HP.

Sets maximum HP. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $healthmax:  Maximum HP.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLastIP  [line 1226]

  void setLastIP( int $lastip  )

Sets last login IP.

Sets last login IP. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lastip:  Last login IP.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLastLogin  [line 1159]

  void setLastLogin( int $lastlogin  )

Sets last login timestamp.

Sets last login timestamp. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lastlogin:  Last login timestamp.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLastLogout  [line 1191]

  void setLastLogout( int $lastlogout  )

Sets last logout timestamp.

Sets last logout timestamp. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lastlogout:  Last logout timestamp.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLevel  [line 494]

  void setLevel( int $level  )

Sets experience level.

Sets experience level. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $level:  Experience level.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLookAddons  [line 984]

  void setLookAddons( int $lookaddons  )

Sets addons.

Sets addons. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lookaddons:  Addons.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLookBody  [line 809]

  void setLookBody( int $lookbody  )

Sets body color.

Sets body color. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lookbody:  Body color.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLookFeet  [line 844]

  void setLookFeet( int $lookfeet  )

Sets boots color.

Sets boots color. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lookfeet:  Boots color.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLookHead  [line 879]

  void setLookHead( int $lookhead  )

Sets hair color.

Sets hair color. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $lookhead:  Hair color.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLookLegs  [line 914]

  void setLookLegs( int $looklegs  )

Sets legs color.

Sets legs color. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $looklegs:  Legs color.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLookType  [line 949]

  void setLookType( int $looktype  )

Sets outfit.

Sets outfit. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $looktype:  Outfit.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLossExperience  [line 1589]

  void setLossExperience( int $loss_experience  )

Sets percentage of experience lost after dead.

Sets percentage of experience lost after dead. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $loss_experience:  Percentage of experience lost after dead.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLossItems  [line 1689]

  void setLossItems( int $loss_items  )

Sets percentage of items lost after dead.

Sets percentage of items lost after dead.

Parameters:
int   $loss_items:  Percentage of items lost after dead.

API Tags:
Access:  public

Information Tags:
Version:  0.1.4
Version:  0.0.1
Since:  0.1.4

[ Top ]
setLossMana  [line 1624]

  void setLossMana( int $loss_mana  )

Sets percentage of used mana lost after dead.

Sets percentage of used mana lost after dead. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $loss_mana:  Percentage of used mana lost after dead.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setLossSkills  [line 1659]

  void setLossSkills( int $loss_skills  )

Sets percentage of skills lost after dead.

Sets percentage of skills lost after dead. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $loss_skills:  Percentage of skills lost after dead.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setMagLevel  [line 529]

  void setMagLevel( int $maglevel  )

Sets magic level.

Sets magic level. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $maglevel:  Magic level.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setMana  [line 634]

  void setMana( int $mana  )

Sets current mana.

Sets current mana. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $mana:  Current mana.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setManaMax  [line 669]

  void setManaMax( int $manamax  )

Sets maximum mana.

Sets maximum mana. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $manamax:  Maximum mana.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setManaSpent  [line 704]

  void setManaSpent( int $manaspent  )

Sets mana spent.

Sets mana spent. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $manaspent:  Mana spent.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setName  [line 241]

  void setName( string $name  )

Sets players's name.

Sets players's name. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
string   $name:  Name.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setPosX  [line 1019]

  void setPosX( int $posx  )

Sets X map coordinate.

Sets X map coordinate. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $posx:  X map coordinate.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setPosY  [line 1054]

  void setPosY( int $posy  )

Sets Y map coordinate.

Sets Y map coordinate. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $posy:  Y map coordinate.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setPosZ  [line 1089]

  void setPosZ( int $posz  )

Sets Z map coordinate.

Sets Z map coordinate. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $posz:  Z map coordinate.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setPremiumEnd  [line 355]

  void setPremiumEnd( int $premend  )

Sets player's Premium Account expiration timestamp.

Sets player's Premium Account expiration timestamp. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $premend:  PACC expiration timestamp.

API Tags:
Deprecated:  0.1.5 Use OTS_Account->setPremiumEnd().
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Since:  0.0.3

[ Top ]
setRank  [line 1512]

  void setRank( [OTS_GuildRank $guildRank = null]  )

Assigns guild rank.

Assigns guild rank. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
OTS_GuildRank|null   $guildRank:  Guild rank (null to clear assign).

API Tags:
Access:  public

Information Tags:
Version:  0.0.1
Throws:  E_OTS_NotLoaded If passed $guildRank parameter is not loaded.

[ Top ]
setRankId  [line 1497]

  void setRankId( int $rank_id  )

Parameters:
int   $rank_id:  Guild rank ID.

API Tags:
Deprecated:  0.0.4 Use setRank().
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setRedSkull  [line 1408]

  void setRedSkull( )

Sets red skull flag.

Sets red skull flag. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.


API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setRedSkullTime  [line 1363]

  void setRedSkullTime( int $redskulltime  )

Sets red skulled time remained.

Sets red skulled time remained. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $redskulltime:  Red skulled time remained.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setSave  [line 1293]

  void setSave( [int $save = 1]  )

Sets save flag.

Sets save flag. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $save:  Deprecated, unused, optional.

API Tags:
Access:  public

Information Tags:
Version:  0.0.7
Version:  0.0.1

[ Top ]
setSex  [line 389]

  void setSex( int $sex  )

Sets player gender.

Sets player gender. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $sex:  Player gender.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setSkill  [line 1856]

  void setSkill( int $skill, int $value  )

Sets skill value.

Sets skill value.

Parameters:
int   $skill:  Skill ID.
int   $value:  Skill value.

API Tags:
Access:  public

Information Tags:
Version:  0.0.2
Version:  0.0.1
Since:  0.0.2

[ Top ]
setSkillTries  [line 1888]

  void setSkillTries( int $skill, int $tries  )

Sets skill's tries for next level.

Sets skill's tries for next level.

Parameters:
int   $skill:  Skill ID.
int   $tries:  Skill tries.

API Tags:
Access:  public

Information Tags:
Version:  0.0.2
Version:  0.0.1
Since:  0.0.2

[ Top ]
setSlot  [line 2043]

  void setSlot( int $slot, [OTS_Item $item = null], [int $pid = 0]  )

Sets slot content.

Sets slot content.

Parameters:
int   $slot:  Slot to save items.
OTS_Item   $item:  Item (can be a container with content) for given slot. Leave this parameter blank to clear slot.
int   $pid:  Deprecated, not used anymore.

API Tags:
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.0.3
Throws:  PDOException On PDO operation error.

[ Top ]
setSoul  [line 739]

  void setSoul( int $soul  )

Sets soul points.

Sets soul points. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $soul:  Soul points.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setStamina  [line 1757]

  void setStamina( int $stamina  )

Sets stamina time left.

Sets stamina time left. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $stamina:  Miliseconds of stamina.

API Tags:
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Since:  0.1.6

[ Top ]
setStorage  [line 1930]

  void setStorage( int $key, int $value  )

Sets value of storage record.

Sets value of storage record.

Parameters:
int   $key:  Storage key.
int   $value:  Stored value.

API Tags:
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.1
Throws:  E_OTS_NotLoaded If player is not loaded.
Since:  0.1.2
Throws:  PDOException On PDO operation error.

[ Top ]
setTownId  [line 1554]

  void setTownId( int $town_id  )

Sets residence town's ID.

Sets residence town's ID. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $town_id:  Residence town's ID.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
setVocation  [line 424]

  void setVocation( int $vocation  )

Sets player proffesion.

Sets player proffesion. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.

Parameters:
int   $vocation:  Player proffesion.

API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
unban  [line 2274]

  void unban( )


API Tags:
Deprecated:  0.1.5 Use OTS_PlayerBan class.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.0.1
Since:  0.0.5
Throws:  PDOException On PDO operation error.

[ Top ]
unsetRedSkull  [line 1396]

  void unsetRedSkull( )

Unsets red skull flag.

Unsets red skull flag. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.


API Tags:
Access:  public

Information Tags:
Version:  0.0.1

[ Top ]
unsetSave  [line 1261]

  void unsetSave( )

Unsets save flag.

Unsets save flag. This method only updates object state. To save changes in database you need to use save() method to flush changed to database.


API Tags:
Access:  public

Information Tags:
Version:  0.0.7
Version:  0.0.1

[ Top ]
__get  [line 2617]

  mixed __get( string $name  )

Magic PHP5 method.

Magic PHP5 method.

Parameters:
string   $name:  Property name.

API Tags:
Return:  Property value.
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Throws:  OutOfBoundsException For non-supported properties.
Throws:  E_OTS_NotLoaded When player is not loaded.
Throws:  PDOException On PDO operation error.
Since:  0.1.0

[ Top ]
__set  [line 2783]

  void __set( string $name, mixed $value  )

Magic PHP5 method.

Magic PHP5 method.

Parameters:
string   $name:  Property name.
mixed   $value:  Property value.

API Tags:
Access:  public

Information Tags:
Version:  0.1.6
Version:  0.0.1
Throws:  E_OTS_NotLoaded When passing object value which represents not-initialised instance.
Since:  0.1.0
Throws:  OutOfBoundsException For non-supported properties.

[ Top ]
__sleep  [line 99]

  array __sleep( )

Magic PHP5 method.

Magic PHP5 method. Allows object serialisation.


API Tags:
Return:  List of properties that should be saved.
Access:  public

Information Tags:
Version:  0.0.4
Version:  0.0.1
Since:  0.0.4

Redefinition of:
OTS_Base_DAO::__sleep()
Magic PHP5 method.

[ Top ]
__toString  [line 2992]

  string __toString( )

Returns string representation of object.

Returns string representation of object. If any display driver is currently loaded then it uses it's method. Else it returns character name.


API Tags:
Return:  String representation of object.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.0.1
Since:  0.1.0

[ Top ]