Esse code é muito rox
sonhado por muita gente e me explicou a ultima coisa q num sabia sobre weapons
Ele depois de dar um damage deixa o cara queimando
weapons/scripts
fire.lua
local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL , 0, 0, 0, 0)
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 1, 2000, -15)
addDamageCondition(condition, 1, 2000, -10)
addDamageCondition(condition, 1, 2000, -10)
addDamageCondition(condition, 1, 2000, -5)
addDamageCondition(condition, 1, 2000, -1)
setCombatCondition(combat, condition)
function onUseWeapon(cid, var)
doCombat(cid, combat, var)
end
e em weapons.xml add:
<melee id="2392" range="1" level="1" mana="0" enabled="1" exhaustion="0" script="fire.lua"><vocation id="4" />
<vocation id="8" /></melee>
obs:com isso apenas knights e elite knight poderão usar ela
tbm tem o do thunder hammer q qdo hita da um super sangramento no cara uma area de 3x3 de sangue:
th.lua
local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL , 0, 0, 0, 0)
local arr = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 3, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onUseWeapon(cid, var)
doCombat(cid, combat, var)
end
e em weapons.xml
add:
<melee id="2421" range="1" level="7" mana="0" enabled="1" exhaustion="0" script="th.lua"><vocation id="4" />
<vocation id="8" />
</melee>
para funfar para todos tirem as tags de vocation
flws