Metatable:Combat - RodrigoOt/forgottenserver GitHub Wiki

No description available at the moment. ###Available methods: [execute(creature, variant)](#execute{creature, variant})
setArea(area)
[setCallback(key, function)](#setCallback{key, function})
setCondition(condition)
[setFormula(type, mina, minb, maxa, maxb)](#setFormula{type, mina, minb, maxa, maxb})
setOrigin(origin)
[setParameter(key, value)](#setParameter{key, value})


###### execute(creature, variant) > **Description:** N/A > **Parameters:**
  • _creature_ - _No description_
  • _variant_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:execute(some_userdata, Variant(0)) ``` > **Added in version:** 1.0
###### setArea(area) > **Description:** N/A > **Parameters:**
  • _area_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:setArea(unknown) ``` > **Added in version:** 1.0
###### setCallback(key, function) > **Description:** N/A > **Parameters:**
  • _key_ - _No description_
  • _function_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, function_name) ``` > **Added in version:** 1.0
###### setCondition(condition) > **Description:** N/A > **Parameters:**
  • _condition_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:setCondition(some_userdata) ``` > **Added in version:** 1.0
###### setFormula(type, mina, minb, maxa, maxb) > **Description:** N/A > **Parameters:**
  • _type_ - _No description_
  • _mina_ - _No description_
  • _minb_ - _No description_
  • _maxa_ - _No description_
  • _maxb_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:setFormula(COMBAT_FORMULA_LEVELMAGIC, 0, 0, 1, 1) ``` > **Added in version:** 1.0
###### setOrigin(origin) > **Description:** N/A > **Parameters:**
  • _origin_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:setOrigin(ORIGIN_MELEE) ``` > **Added in version:** 1.0
###### setParameter(key, value) > **Description:** N/A > **Parameters:**
  • _key_ - _No description_
  • _value_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local combat = Combat(...) combat:setParameter(COMBAT_PARAM_BLOCKSHIELD, true) ``` > **Added in version:** 1.0
⚠️ **GitHub.com Fallback** ⚠️