Olá...
Gostaria da ajuda de vocês...
Baixei um OTserv 0.6.4 versão 8.6 bem limpo... Estou tentando adicionar o sistema de change gold nele mas, por algum motivo, não funciona.
As alterações foram:
actions.xml
<!-- Change gold -->
<action itemid="2148" event="script" value="changegold.lua"/>
<action itemid="2152" event="script" value="changegold.lua"/>
<action itemid="2160" event="script" value="changegold.lua"/>
changegold.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2148 and item.type == 100 then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, 2152, 1)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE)
elseif item.itemid == 2152 and item.type == 100 then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, 2160, 1)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
elseif item.itemid == 2152 and item.type < 100 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, 2148, 100)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_YELLOW)
elseif item.itemid == 2160 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, 2152, 100)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE)
else
return false
end
return true
end
Já conferi o items.xml e tá tudo ok lá... já até reiniciei o server imaginando que o reload pudesse estar com problema, mas não funcionou. Estou esquecendo algo?
Valeu!!