• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

EQ bonus from SET

MalyFanek

New Member
Joined
Oct 10, 2019
Messages
37
Reaction score
2
I have a small problem, Im using tfs 0,4 rev 3777, well i have made a script
Code:
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:

Code:
<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:
Code:
    <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
 
Last edited:
Back
Top