• 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!

Prevent placing item in arrow slot (movements)

Rhyund

New Member
Joined
May 3, 2010
Messages
23
Reaction score
0
Hello there!

I want to prevent placing an item (id 9999) in arrow slot. Is that possible by movements?

I'm using SVN 0.6.0 version (a very old one :p)

I tried to search for this script but I don't know good keywords to find it :(
 
if it is not a weapon in movements you should add onEquip and onDequip with "slot="ammo"" or item.xml add an attribute slotType.
 
XML:
<movevent type="Equip" itemid="9999" slot="ammo" function="onEquipItem" script="9999.lua"/>
   <movevent type="DeEquip" itemid="9999" slot="ammo" function="onDeEquipItem" script="9999.lua"/>
9999.lua:
Lua:
function onEquip(cid, item, slot)
       doPlayerSendTextMessage(cid, 25, "You cannot equip this item into arrow slot.")
       doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
       return false
   end
 
XML:
<movevent type="Equip" itemid="9999" slot="ammo" function="onEquipItem" script="9999.lua"/>
   <movevent type="DeEquip" itemid="9999" slot="ammo" function="onDeEquipItem" script="9999.lua"/>
9999.lua:
Lua:
function onEquip(cid, item, slot)
       doPlayerSendTextMessage(cid, 25, "You cannot equip this item into arrow slot.")
       doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
       return false
   end

Din't work :/

No erros, but is like the script doesn't exist (no msg and I can equip)


I doubt there were movements in SVN 0.6.0.

svn-png
 
Back
Top