- Joined
- Dec 26, 2013
- Messages
- 2,122
- Solutions
- 14
- Reaction score
- 1,514
- Location
- USA
- GitHub
- Codinablack
I tried making an item that would be able to be dualwielded if you were a certain vocation...
I got this error
I am using
[18/1/2014 3:54:55] The OTX Server Version: (2.51 - SE - 1549) - Codename: (Necron)
Can someone show me how to properly do this? Also if you would please, I don't want to have to do this for every item, can I have it check what item its being called to be used on? It is already defined in the movements.xml
Any and all help would be much appreciated. Thank you very much!
Code:
function onEquip(cid, item, slot)
if(getPlayerVocation(cid)) == 8 then
getItemAttribute(2410, "dualwield")
doItemSetAttribute(2410, "dualwield", 1)
end
return true
end
function onDeEquip(cid, item, slot)
if(getPlayerVocation(cid)) == 8 then
getItemAttribute(2410, "dualwield")
doItemSetAttribute(2410, "dualwield", -1)
end
return true
end
I got this error
Code:
[18/1/2014 3:56:25] [Error - MoveEvents Interface]
[18/1/2014 3:56:25] data/movements/scripts/dualwield.lua:onDeEquip
[18/1/2014 3:56:25] Description:
[18/1/2014 3:56:26] (LuaInterface::luaDoItemSetAttribute) Item not found
I am using
[18/1/2014 3:54:55] The OTX Server Version: (2.51 - SE - 1549) - Codename: (Necron)
Can someone show me how to properly do this? Also if you would please, I don't want to have to do this for every item, can I have it check what item its being called to be used on? It is already defined in the movements.xml
Code:
<movevent type="Equip" itemid="2410" slot="hand" event="script" value="dualwield.lua"/>
<movevent type="DeEquip" itemid="2410" slot="hand" event="script" value="dualwield.lua"/>
Any and all help would be much appreciated. Thank you very much!