Metatable:Monster - RodrigoOt/forgottenserver GitHub Wiki

No description available at the moment. ###Available methods: addFriend(creature)
[addTarget(creature[, pushFront = false])](#addTarget{creature[, pushFront = false]})
isInSpawnRange([position])
getFriendCount()
getFriendList()
getSpawnPosition()
getTargetCount()
getTargetList()
getType()
isFriend(creature)
isIdle()
isMonster()
isOpponent(creature)
isTarget(creature)
removeFriend(creature)
removeTarget(creature)
[searchTarget([searchType = TARGETSEARCH_DEFAULT])](#searchTarget{[searchType = TARGETSEARCH_DEFAULT]})
selectTarget(creature)
setIdle(idle)


###### addFriend(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:addFriend(some_userdata) ``` > **Added in version:** 1.0
###### addTarget(creature[, pushFront = false]) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
  • _pushFront_ - _(optional, default: false)_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:addTarget(some_userdata, false) ``` > **Added in version:** 1.0
###### isInSpawnRange() > **Description:** N/A > **Parameters:**
  • _position_ - _(optional, default: monster position)_
> **Returns:** true if the position is in spawn range, otherwise false > **Example:** ```Lua local monster = Monster(...) monster:isInSpawnRange() ``` > **Added in version:** 1.1
###### getFriendCount() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:getFriendCount() ``` > **Added in version:** 1.0
###### getFriendList() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:getFriendList() ``` > **Added in version:** 1.0
###### getSpawnPosition() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:getSpawnPosition() ``` > **Added in version:** 1.0
###### getTargetCount() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:getTargetCount() ``` > **Added in version:** 1.0
###### getTargetList() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:getTargetList() ``` > **Added in version:** 1.0
###### getType() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:getType() ``` > **Added in version:** 1.0
###### isFriend(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:isFriend(some_userdata) ``` > **Added in version:** 1.0
###### isIdle() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:isIdle() ``` > **Added in version:** 1.0
###### isMonster() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:isMonster() ``` > **Added in version:** 1.0
###### isOpponent(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:isOpponent(some_userdata) ``` > **Added in version:** 1.0
###### isTarget(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:isTarget(some_userdata) ``` > **Added in version:** 1.0
###### removeFriend(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:removeFriend(some_userdata) ``` > **Added in version:** 1.0
###### removeTarget(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:removeTarget(some_userdata) ``` > **Added in version:** 1.0
###### searchTarget([searchType = TARGETSEARCH_DEFAULT]) > **Description:** N/A > **Parameters:**
  • _searchType_ - _(optional, default: TARGETSEARCH_DEFAULT)_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:searchTarget(TARGETSEARCH_DEFAULT) ``` > **Added in version:** 1.0
###### selectTarget(creature) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:selectTarget(some_userdata) ``` > **Added in version:** 1.0
###### setIdle(idle) > **Description:** N/A > **Parameters:**
  • _idle_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local monster = Monster(...) monster:setIdle(unknown) ``` > **Added in version:** 1.0
⚠️ **GitHub.com Fallback** ⚠️