I have a small problem, Im using tfs 0,4 rev 3777, well i have made a script
local IDFEET = 13499
local IDARMOR = 13497
local IDLEGS = 13498
function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You just lost bonus from set.")
end
function onEquip(cid, item, slot)
if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == IDFEET and getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == IDARMOR and getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == IDLEGS then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Bonus activated.")
end
return true
end
And it works, but there's another problem, i have registered it into movements.xml as:
Pergunta
malyfanek 0
I have a small problem, Im using tfs 0,4 rev 3777, well i have made a script
local IDFEET = 13499 local IDARMOR = 13497 local IDLEGS = 13498 function onDeEquip(cid, item, slot) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You just lost bonus from set.") end function onEquip(cid, item, slot) if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == IDFEET and getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == IDARMOR and getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == IDLEGS then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Bonus activated.") end return true end
And it works, but there's another problem, i have registered it into movements.xml as:
<movevent type="Equip" itemid="13499" slot="feet" event="script" value="bills set.lua"/>
<movevent type="DeEquip" itemid="13499" slot="feet" event="script" value="bills set.lua"/>
and the problem is the event is duplicated cuz of:
<movevent type="Equip" itemid="13499" slot="feet" event="function" value="onEquipItem"/>
<movevent type="DeEquip" itemid="13499" slot="feet" event="function" value="onDeEquipItem"/>
And because of that "THE SET BONUS" works but the boots doesnt add their bonus stats thats are made at items.xml
How can i fix that? Any idea/tips/help?
Ok i just noticed that it gives bonus when i wear boots even without full set so Im still doing something wrong
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados