Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 3004 then
if getPlayerStorageValue(cid,3004) == -1 then
doPlayerSendTextMessage(cid,25,"You have found some useful weapons.")
doPlayerAddItem(cid,2476,1)
if getPlayerVocation == 1 and getPlayerVocation == 2 and getPlayerVocation == 5 and getPlayerVocation 6 then
doPlayerSendTextMessage(cid,20,"You are not the right vocation.")
setPlayerStorageValue(cid,3004,1)
doPlayerSendMagicEffect(cid,1)
else
doplayerSendMagicEffect(cid,2)
doPlayerSendTextMessage(cid,25,"EMPTY")
end
end
return TRUE
end
end
What exactly is wrong? Can you improve this script? Im currently trying to learn LUA.