<action uniqueid="2000" script="switchdemon.lua" /><action uniqueid="2001" script="demon.lua" />
<action uniqueid="2002" script="demon.lua" />
<action uniqueid="2003" script="demon.lua" />
Em switchdemon.lua add:
function onUse(cid, item, frompos, item2, topos)piece1pos = {x=337, y=215, z=14, stackpos=1}
rockpos = {x=337, y=215, z=14, stackpos=1}
getpiece1 = getThingfromPos(piece1pos)
if item.uid == 2000 and item.itemid == 2711 and getpiece1.itemid == 1772 then
doRemoveItem(getpiece1.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 2000 and item.itemid == 2712 then
doCreateItem(1772,1,rockpos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
return 1
end
Agora em demon.lua
function onUse(cid, item, frompos, item2, topos)if item.uid == 2001 then
queststatus = getPlayerStorageValue(cid,2001)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a demon shield.")
doPlayerAddItem(cid,3358,1)
setPlayerStorageValue(cid,2001,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2002 then
queststatus = getPlayerStorageValue(cid,2002)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a demon helmet.")
doPlayerAddItem(cid,3325,1)
setPlayerStorageValue(cid,2002,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2003 then
queststatus = getPlayerStorageValue(cid,2003)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a steel boots.")
doPlayerAddItem(cid,3492,1)
setPlayerStorageValue(cid,2003,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return 1
end
end
Estou usando ele no Yur ots 7.5! Creditos a axeey do otfans