Metatable:Player - RodrigoOt/forgottenserver GitHub Wiki

The Player metatable contains all of the methods that handle/require players.

Creating an instance of the Player metatable (2 options):

local player = Player(uid)
local player = Player(name or wildcard)

###Available methods: addBlessing(blessing)
[addExperience(experience[, sendText = false])](#addExperience{experience[, sendText = false]})
[addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]])](#addItem{itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]]})
[addItemEx(item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]])](#addItemEx{item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]]})
[addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]])](#addItemEx{item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]]})
addManaSpent(amount)
[addMapMark(position, type, description)](#addMapMark{position, type, description})
addMoney(money)
addMount(mountId)
addOutfit(lookType)
[addOutfitAddon(lookType, addon)](#addOutfitAddon{lookType, addon})
addPremiumDays(days)
[addSkillTries(skillType, tries)](#addSkillTries{skillType, tries})
addSoul(soulChange)
canLearnSpell(spellName)
[channelSay(speaker, type, text, channelId)](#channelSay{speaker, type, text, channelId})
forgetSpell(spellName)
getAccountId()
getAccountType()
getBankBalance()
getBaseMagicLevel()
getCapacity()
getClient()
getContainerById(id)
getContainerId(container)
getContainerIndex(id)
getDeathPenalty()
[getDepotChest(depotId[, autoCreate = false])](#getDepotChest{depotId[, autoCreate = false]})
getEffectiveSkillLevel(skillType)
getExperience()
getFreeCapacity()
getGroup()
getGuid()
getGuild()
getGuildLevel()
getGuildNick()
getHouse()
getInbox()
getIp()
[getItemById(itemId, deepSearch[, subType = -1])](#getItemById{itemId, deepSearch[, subType = -1]})
[getItemCount(itemId[, subType = -1])](#getItemCount{itemId[, subType = -1]})
getLastLoginSaved()
getLastLogout()
getLevel()
getMagicLevel()
getManaSpent()
getMaxSoul()
getMoney()
getParty()
getPremiumDays()
getSex()
getSkillLevel(skillType)
getSkillPercent(skillType)
getSkillTries(skillType)
getSkullTime()
getSlotItem(slot)
getSoul()
getStamina()
getStorageValue(key)
getTown()
getVocation()
hasBlessing(blessing)
hasLearnedSpell(spellName)
hasMount(mountId)
[hasOutfit(lookType[, addon = 0])](#hasOutfit{lookType[, addon = 0]})
isPlayer()
isPzLocked()
learnSpell(spellName)
openChannel(channelId)
popupFYI(message)
removeBlessing(blessing)
[removeExperience(experience[, sendText = false])](#removeExperience{experience[, sendText = false]})
[removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])](#removeItem{itemId, count[, subType = -1[, ignoreEquipped = false]]})
removeMoney(money)
removeMount(mountId)
removeOutfit(lookType)
[removeOutfitAddon(lookType, addon)](#removeOutfitAddon{lookType, addon})
removePremiumDays(days)
save()
[sendChannelMessage(author, text, type, channelId)](#sendChannelMessage{author, text, type, channelId})
sendOutfitWindow()
[sendPrivateMessage(speaker, text[, type])](#sendPrivateMessage{speaker, text[, type]})
[sendTextMessage(type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]])](#sendTextMessage{type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]]})
sendTutorial(tutorialId)
setAccountType(accountType)
setBankBalance(bankBalance)
setCapacity(capacity)
setGhostMode(enabled)
setGroup(group)
setGuild(guild)
setGuildLevel(level)
setGuildNick(nick)
setMaxMana(maxMana)
setSex(newSex)
setSkullTime(skullTime)
setStamina(stamina)
[setStorageValue(key, value)](#setStorageValue{key, value})
setTown(town)
setVocation(vocation)
[showTextDialog(itemId[, text[, canWrite[, length]]])](#showTextDialog{itemId[, text[, canWrite[, length]]]})


###### addBlessing(blessing) > **Description:** N/A > **Parameters:**
  • _blessing_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addBlessing(1) ``` > **Added in version:** 1.0
###### addExperience(experience[, sendText = false]) > **Description:** N/A > **Parameters:**
  • _experience_ - _No description_
  • _sendText_ - _(optional, default: false)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addExperience(100, false) ``` > **Added in version:** 1.0
###### addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]]) > **Description:** This function gives the player a newly created item. > **Parameters:**
  • _itemId_ - _Type of item created._
  • _count_ - _How many items that are created. (optional, default = 1)_
  • _canDropOnMap_ - _Drops any remaining items on the map. (optional, default: true)_
  • _subType_ - _Subtype the item(s) should have. (optional, default: 1)_
  • _slot_ - _Slot the item should be assigned to. (optional, default: CONST_SLOT_WHEREEVER)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addItem(2400, 1, true, 1, CONST_SLOT_WHEREEVER) ``` > **Added in version:** 1.0
###### addItemEx(item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]]) > **Description:** N/A > **Parameters:**
  • _item_ - _No description_
  • _canDropOnMap_ - _(optional, default: false)_
  • _index_ - _(optional, default: INDEX_WHEREEVER)_
  • _flags_ - _(optional, default: 0)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addItemEx(some_userdata, false, INDEX_WHEREEVER, 0) ``` > **Added in version:** 1.0
###### addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]]) > **Description:** N/A > **Parameters:**
  • _item_ - _No description_
  • _canDropOnMap_ - _(optional, default: true)_
  • _slot_ - _(optional, default: CONST_SLOT_WHEREEVER)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addItemEx(some_userdata, true, CONST_SLOT_WHEREEVER) ``` > **Added in version:** 1.0
###### addManaSpent(amount) > **Description:** N/A > **Parameters:**
  • _amount_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addManaSpent(100) ``` > **Added in version:** 1.0
###### addMapMark(position, type, description) > **Description:** N/A > **Parameters:**
  • _position_ - _No description_
  • _type_ - _No description_
  • _description_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addMapMark(Position(), MAPMARK_LOCK, any_string) ``` > **Added in version:** 1.0
###### addMoney(money) > **Description:** N/A > **Parameters:**
  • _money_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addMoney(100) ``` > **Added in version:** 1.0
###### addMount(mountId) > **Description:** N/A > **Parameters:**
  • _mountId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addMount(unknown) ``` > **Added in version:** 1.0
###### addOutfit(lookType) > **Description:** N/A > **Parameters:**
  • _lookType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addOutfit(128) ``` > **Added in version:** 1.0
###### addOutfitAddon(lookType, addon) > **Description:** N/A > **Parameters:**
  • _lookType_ - _No description_
  • _addon_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addOutfitAddon(128, 2) ``` > **Added in version:** 1.0
###### addPremiumDays(days) > **Description:** N/A > **Parameters:**
  • _days_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addPremiumDays(1) ``` > **Added in version:** 1.0
###### addSkillTries(skillType, tries) > **Description:** N/A > **Parameters:**
  • _skillType_ - _No description_
  • _tries_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addSkillTries(SKILL_FIST, 10) ``` > **Added in version:** 1.0
###### addSoul(soulChange) > **Description:** N/A > **Parameters:**
  • _soulChange_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:addSoul(1) ``` > **Added in version:** 1.0
###### canLearnSpell(spellName) > **Description:** N/A > **Parameters:**
  • _spellName_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:canLearnSpell(unknown) ``` > **Added in version:** 1.0
###### channelSay(speaker, type, text, channelId) > **Description:** N/A > **Parameters:**
  • _speaker_ - _No description_
  • _type_ - _No description_
  • _text_ - _No description_
  • _channelId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:channelSay(some_userdata, TALKTYPE_SAY, any_string, unknown) ``` > **Added in version:** 1.0
###### forgetSpell(spellName) > **Description:** N/A > **Parameters:**
  • _spellName_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:forgetSpell(unknown) ``` > **Added in version:** 1.0
###### getAccountId() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getAccountId() ``` > **Added in version:** 1.0
###### getAccountType() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getAccountType() ``` > **Added in version:** 1.0
###### getBankBalance() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getBankBalance() ``` > **Added in version:** 1.0
###### getBaseMagicLevel() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getBaseMagicLevel() ``` > **Added in version:** 1.0
###### getCapacity() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getCapacity() ``` > **Added in version:** 1.0
###### getClient() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getClient() ``` > **Added in version:** 1.0
###### getContainerById(id) > **Description:** N/A > **Parameters:**
  • _id_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getContainerById(some_id) ``` > **Added in version:** 1.0
###### getContainerId(container) > **Description:** N/A > **Parameters:**
  • _container_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getContainerId(some_userdata) ``` > **Added in version:** 1.0
###### getContainerIndex(id) > **Description:** N/A > **Parameters:**
  • _id_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getContainerIndex(some_id) ``` > **Added in version:** 1.0
###### getDeathPenalty() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getDeathPenalty() ``` > **Added in version:** 1.0
###### getDepotChest(depotId[, autoCreate = false]) > **Description:** N/A > **Parameters:**
  • _depotId_ - _No description_
  • _autoCreate_ - _(optional, default: false)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getDepotChest(0, false) ``` > **Added in version:** 1.0
###### getEffectiveSkillLevel(skillType) > **Description:** N/A > **Parameters:**
  • _skillType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getEffectiveSkillLevel(SKILL_FIST) ``` > **Added in version:** 1.0
###### getExperience() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getExperience() ``` > **Added in version:** 1.0
###### getFreeCapacity() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getFreeCapacity() ``` > **Added in version:** 1.0
###### getGroup() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getGroup() ``` > **Added in version:** 1.0
###### getGuid() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getGuid() ``` > **Added in version:** 1.0
###### getGuild() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getGuild() ``` > **Added in version:** 1.0
###### getGuildLevel() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getGuildLevel() ``` > **Added in version:** 1.0
###### getGuildNick() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getGuildNick() ``` > **Added in version:** 1.0
###### getHouse() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getHouse() ``` > **Added in version:** 1.0
###### getInbox() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getInbox() ``` > **Added in version:** 1.0
###### getIp() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getIp() ``` > **Added in version:** 1.0
###### getItemById(itemId, deepSearch[, subType = -1]) > **Description:** N/A > **Parameters:**
  • _itemId_ - _No description_
  • _deepSearch_ - _No description_
  • _subType_ - _(optional, default: -1)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getItemById(2400, false, -1) ``` > **Added in version:** 1.0
###### getItemCount(itemId[, subType = -1]) > **Description:** N/A > **Parameters:**
  • _itemId_ - _No description_
  • _subType_ - _(optional, default: -1)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getItemCount(2400, -1) ``` > **Added in version:** 1.0
###### getLastLoginSaved() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getLastLoginSaved() ``` > **Added in version:** 1.0
###### getLastLogout() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getLastLogout() ``` > **Added in version:** 1.1
###### getLevel() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getLevel() ``` > **Added in version:** 1.0
###### getMagicLevel() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getMagicLevel() ``` > **Added in version:** 1.0
###### getManaSpent() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getManaSpent() ``` > **Added in version:** 1.0
###### getMaxSoul() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getMaxSoul() ``` > **Added in version:** 1.0
###### getMoney() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getMoney() ``` > **Added in version:** 1.0
###### getParty() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getParty() ``` > **Added in version:** 1.0
###### getPremiumDays() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getPremiumDays() ``` > **Added in version:** 1.0
###### getSex() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSex() ``` > **Added in version:** 1.0
###### getSkillLevel(skillType) > **Description:** N/A > **Parameters:**
  • _skillType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSkillLevel(SKILL_FIST) ``` > **Added in version:** 1.0
###### getSkillPercent(skillType) > **Description:** N/A > **Parameters:**
  • _skillType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSkillPercent(SKILL_FIST) ``` > **Added in version:** 1.0
###### getSkillTries(skillType) > **Description:** N/A > **Parameters:**
  • _skillType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSkillTries(SKILL_FIST) ``` > **Added in version:** 1.0
###### getSkullTime() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSkullTime() ``` > **Added in version:** 1.0
###### getSlotItem(slot) > **Description:** N/A > **Parameters:**
  • _slot_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSlotItem(CONST_SLOT_LEFT) ``` > **Added in version:** 1.0
###### getSoul() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getSoul() ``` > **Added in version:** 1.0
###### getStamina() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getStamina() ``` > **Added in version:** 1.0
###### getStorageValue(key) > **Description:** N/A > **Parameters:**
  • _key_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getStorageValue(1000) ``` > **Added in version:** 1.0
###### getTown() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getTown() ``` > **Added in version:** 1.0
###### getVocation() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:getVocation() ``` > **Added in version:** 1.0
###### hasBlessing(blessing) > **Description:** N/A > **Parameters:**
  • _blessing_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:hasBlessing(1) ``` > **Added in version:** 1.0
###### hasLearnedSpell(spellName) > **Description:** N/A > **Parameters:**
  • _spellName_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:hasLearnedSpell(unknown) ``` > **Added in version:** 1.0
###### hasMount(mountId) > **Description:** N/A > **Parameters:**
  • _mountId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:hasMount(unknown) ``` > **Added in version:** 1.0
###### hasOutfit(lookType[, addon = 0]) > **Description:** N/A > **Parameters:**
  • _lookType_ - _No description_
  • _addon_ - _(optional, default: 0)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:hasOutfit(128, 0) ``` > **Added in version:** 1.0
###### isPlayer() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:isPlayer() ``` > **Added in version:** 1.0
###### isPzLocked() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:isPzLocked() ``` > **Added in version:** 1.0
###### learnSpell(spellName) > **Description:** N/A > **Parameters:**
  • _spellName_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:learnSpell(unknown) ``` > **Added in version:** 1.0
###### openChannel(channelId) > **Description:** N/A > **Parameters:**
  • _channelId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:openChannel(unknown) ``` > **Added in version:** 1.0
###### popupFYI(message) > **Description:** N/A > **Parameters:**
  • _message_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:popupFYI(any_string) ``` > **Added in version:** 1.0
###### removeBlessing(blessing) > **Description:** N/A > **Parameters:**
  • _blessing_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeBlessing(1) ``` > **Added in version:** 1.0
###### removeExperience(experience[, sendText = false]) > **Description:** N/A > **Parameters:**
  • _experience_ - _No description_
  • _sendText_ - _(optional, default: false)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeExperience(100, false) ``` > **Added in version:** 1.0
###### removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]]) > **Description:** N/A > **Parameters:**
  • _itemId_ - _No description_
  • _count_ - _No description_
  • _subType_ - _(optional, default: -1)_
  • _ignoreEquipped_ - _(optional, default: false)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeItem(2400, 1, -1, false) ``` > **Added in version:** 1.0
###### removeMoney(money) > **Description:** N/A > **Parameters:**
  • _money_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeMoney(100) ``` > **Added in version:** 1.0
###### removeMount(mountId) > **Description:** N/A > **Parameters:**
  • _mountId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeMount(unknown) ``` > **Added in version:** 1.0
###### removeOutfit(lookType) > **Description:** N/A > **Parameters:**
  • _lookType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeOutfit(128) ``` > **Added in version:** 1.0
###### removeOutfitAddon(lookType, addon) > **Description:** N/A > **Parameters:**
  • _lookType_ - _No description_
  • _addon_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removeOutfitAddon(128, 2) ``` > **Added in version:** 1.0
###### removePremiumDays(days) > **Description:** N/A > **Parameters:**
  • _days_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:removePremiumDays(1) ``` > **Added in version:** 1.0
###### save() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:save() ``` > **Added in version:** 1.0
###### sendChannelMessage(author, text, type, channelId) > **Description:** N/A > **Parameters:**
  • _author_ - _No description_
  • _text_ - _No description_
  • _type_ - _No description_
  • _channelId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:sendChannelMessage(some_name, any_string, TALKTYPE_SAY, unknown) ``` > **Added in version:** 1.0
###### sendOutfitWindow() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:sendOutfitWindow() ``` > **Added in version:** 1.0
###### sendPrivateMessage(speaker, text[, type]) > **Description:** N/A > **Parameters:**
  • _speaker_ - _No description_
  • _text_ - _No description_
  • _type_ - _(optional)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:sendPrivateMessage(some_userdata, any_string, nil) ``` > **Added in version:** 1.0
###### sendTextMessage(type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]]) > **Description:** N/A > **Parameters:**
  • _type_ - _No description_
  • _text_ - _No description_
  • _position_ - _(optional)_
  • _primaryValue_ - _(optional, default: 0)_
  • _primaryColor_ - _(optional, default: TEXTCOLOR_NONE)_
  • _secondaryValue_ - _(optional, default: 0)_
  • _secondaryColor_ - _(optional, default: TEXTCOLOR_NONE)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:sendTextMessage(MESSAGE_STATUS_WARNING, any_string, nil, 0, TEXTCOLOR_NONE, 0, TEXTCOLOR_NONE) ``` > **Added in version:** 1.0
###### sendTutorial(tutorialId) > **Description:** N/A > **Parameters:**
  • _tutorialId_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:sendTutorial(unknown) ``` > **Added in version:** 1.0
###### setAccountType(accountType) > **Description:** N/A > **Parameters:**
  • _accountType_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setAccountType(ACCOUNT_TYPE_GOD) ``` > **Added in version:** 1.0
###### setBankBalance(bankBalance) > **Description:** N/A > **Parameters:**
  • _bankBalance_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setBankBalance(100) ``` > **Added in version:** 1.0
###### setCapacity(capacity) > **Description:** N/A > **Parameters:**
  • _capacity_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setCapacity(15000) ``` > **Added in version:** 1.0
###### setGhostMode(enabled) > **Description:** N/A > **Parameters:**
  • _enabled_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setGhostMode(true) ``` > **Added in version:** 1.0
###### setGroup(group) > **Description:** N/A > **Parameters:**
  • _group_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setGroup(some_userdata) ``` > **Added in version:** 1.0
###### setGuild(guild) > **Description:** N/A > **Parameters:**
  • _guild_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setGuild(some_userdata) ``` > **Added in version:** 1.0
###### setGuildLevel(level) > **Description:** N/A > **Parameters:**
  • _level_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setGuildLevel(1) ``` > **Added in version:** 1.0
###### setGuildNick(nick) > **Description:** N/A > **Parameters:**
  • _nick_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setGuildNick(some_name) ``` > **Added in version:** 1.0
###### setMaxMana(maxMana) > **Description:** N/A > **Parameters:**
  • _maxMana_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setMaxMana(35) ``` > **Added in version:** 1.0
###### setSex(newSex) > **Description:** N/A > **Parameters:**
  • _newSex_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setSex(PLAYERSEX_MALE) ``` > **Added in version:** 1.0
###### setSkullTime(skullTime) > **Description:** N/A > **Parameters:**
  • _skullTime_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setSkullTime(unknown) ``` > **Added in version:** 1.0
###### setStamina(stamina) > **Description:** N/A > **Parameters:**
  • _stamina_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setStamina(50) ``` > **Added in version:** 1.0
###### setStorageValue(key, value) > **Description:** N/A > **Parameters:**
  • _key_ - _No description_
  • _value_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setStorageValue(1000, any_number) ``` > **Added in version:** 1.0
###### setTown(town) > **Description:** N/A > **Parameters:**
  • _town_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setTown(Town(0)) ``` > **Added in version:** 1.0
###### setVocation(vocation) > **Description:** N/A > **Parameters:**
  • _vocation_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:setVocation(some_userdata) ``` > **Added in version:** 1.0
###### showTextDialog(itemId[, text[, canWrite[, length]]]) > **Description:** N/A > **Parameters:**
  • _itemId_ - _No description_
  • _text_ - _(optional)_
  • _canWrite_ - _(optional)_
  • _length_ - _(optional)_
> **Returns:** N/A > **Example:** ```Lua local player = Player(...) player:showTextDialog(2400, nil, nil, nil) ``` > **Added in version:** 1.0
⚠️ **GitHub.com Fallback** ⚠️