-- Sistema de Forja by Flatronez
function onUse(cid, item, fromPosition, itemEx, toPosition)
local martelo = getThingFromPos({x= 342, y= 680, z= 7, stackpos= 2})
if martelo.itemid == 2391 then
doItemSetAttribute(martelo.uid, "aid", 9998)
setItemName(martelo.uid, "Forge Hammer")
doItemSetSpecialDescription(martelo.uid, "Can be used to forge weapons.")
doPlayerSendCancel(cid, "Now your hammer is able to forge.")
doItemSetAttribute(item.uid, "aid", 9997)
else
doPlayerSendCancel(cid, "Only a war hammer can be prepared.")
end
end
5
1.9k
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

27 de agosto de 2010 às 20:23
27 de agosto de 2010 às 20:26
agora deu esse erro :
[27/08/2010 20:25:15] [Error - Action Interface][27/08/2010 20:25:15] data/actions/scripts/other/Alavanca1.lua:onUse
[27/08/2010 20:25:15] Description:
[27/08/2010 20:25:15] data/actions/scripts/other/Alavanca1.lua:7: attempt to call global 'doItemSetSpecialDescription' (a nil value)
[27/08/2010 20:25:15] stack traceback:
[27/08/2010 20:25:15] data/actions/scripts/other/Alavanca1.lua:7: in function <data/actions/scripts/other/Alavanca1.lua:2>
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

27 de agosto de 2010 às 20:33
esse script é velho.
-- Sistema de Forja by Flatronez
function onUse(cid, item, fromPosition, itemEx, toPosition)
local martelo = getThingFromPos({x= 342, y= 680, z= 7, stackpos= 2})
if martelo.itemid == 2391 then
doItemSetAttribute(martelo.uid, "aid", 9998)
setItemName(martelo.uid, "Forge Hammer")
doSetItemSpecialDescription(martelo.uid,"Can be used to forge weapons.")
doPlayerSendCancel(cid, "Now your hammer is able to forge.")
doItemSetAttribute(item.uid, "aid", 9997)
else
doPlayerSendCancel(cid, "Only a war hammer can be prepared.")
end
end





info
Group: Campones
Joined: 20/08/10
Posts: 6
Reputation: 0
Tibia Character: leledib
Podem fechar o tópico consegui arrumar, obrigado pela ajuda Vodkart.
Edited Agosto 27 by dotatibia