whitevo
Feeling good, thats what I do.
Working Script
movements.xml:
thunder book ON.lua:
thunder book OFF.lua:
movements.xml:
Code:
<movevent event="Equip" itemid="8707" slot="shield" script="Shields/thunder book ON.lua" />
<movevent event="DeEquip" itemid="8707" slot="shield" script="Shields/thunder book OFF.lua" />
Code:
local attributes = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(attributes, CONDITION_PARAM_BUFF_SPELL, 1)
setConditionParam(attributes, CONDITION_PARAM_TICKS, 24*60*60*1000)
setConditionParam(attributes, CONDITION_PARAM_SKILL_SHIELD, 2)
setConditionParam(attributes, CONDITION_PARAM_STAT_MAGICPOINTS, 1)
setConditionParam(attributes, CONDITION_PARAM_SUBID, 10)
function onEquip(cid, item, slot)
if getPlayerSlotItem(cid, slot).itemid == item.itemid then
local player = Player(cid)
doAddCondition(cid, attributes)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "wuzu wuzu")
end
return true
end
Code:
function onDeEquip(cid, item, slot)
local player = Player(cid)
doRemoveCondition(cid, CONDITION_ATTRIBUTES, 10)
return true
end
Last edited: