Boa Tarde Galera do XT
Por Favor me ajudem com esse script ja tentei de varias formas mas nao consigo fazer com que o player ganha a storage equipando o item e quando desequipa perde a storage
esse e o script que quero usar com o item equipado
local burnBuff = {
storageID = 23000,
interval = 1, -- intervalo entre turnos
damage = 7000, -- dano de cada turno
ticks = 5, -- quantidade de turnos
effect = CONST_ME_HITBYFIRE, -- efeito
}
-- FIRE EFFECT
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, burnBuff.effect)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, burnBuff.ticks, burnBuff.interval, -burnBuff.damage)
setCombatCondition(combat, condition)
function onAttack(cid, target)
storageStatus = getPlayerStorageValue (cid, burnBuff.storageID)
playerPos = getCreaturePosition (cid)
targetPos = getCreaturePosition (target)
if getPlayerStorageValue(cid, 23000) > 0 then return true end -- FIM - jogador sem o buff
if getDistanceBetween (playerPos, targetPos) > 8 then return true end -- FIM - jogador longe
if getPlayerStorageValue(cid, 23000) < 1 then -- Efeito Energy
doCombatAreaCondition(cid, targetPos, nil, condition, burnBuff.effect)
end
return true
end
aqui e o movment
tentei de varias formas mas nao remove a storage quando tira o item ele comtinua com a script ativada
<movevent type="DeEquip" itemid="8304" slot="ammo" event="script" value="mov.lua"/>
<movevent type="Equip" itemid="8304" slot="ammo" event="script" value="mov.lua"/>
function onEquip(cid, item, slot)
if getPlayerStorageValue(cid, 23000) < 1 then
setPlayerStorageValue(cid, 23000)
end
return true
end
function onDeEquip(cid, item, slot)
if getPlayerStorageValue(cid, 22999) > 0 then
setPlayerStorageValue(cid, 23000- 1)
end
return true
end
ajudem aeee plisss
alguem ajuda plissss