Olha amigo vou te esplicar!
function onUse (cid,item,frompos,item2,topos)
pos = {x=1063, y=903, z=6}<< para onde ele sera teleportado
UID_DO_BAU = xxxx <<<coloca um valor exemplo 1000 que ainda n tenha em seu ot
STORAGE_VALUE = xxxx << Repita o valor acima para n ficar bagunça
ID_DO_PREMIO = xxxx << Id do item
if getPlayerLevel(cid) >= 100 then << lvl do player
if item.uid == UID_DO_BAU then
queststatus = getPlayerStorageValue(cid,STORAGE_VALUE)
if queststatus == -1 then
doTeleportThing(cid,pos)
doPlayerSendTextMessage(cid,22,"Parabens! Você achou a espada perdida!") -- Msg que ira aparecer
doPlayerAddItem(cid,ID_DO_PREMIO,1)
setPlayerStorageValue(cid,STORAGE_VALUE,1)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
else
doPlayerSendTextMessage(cid,22,"Você ja a Recompensa.")
end
end
else
doPlayerSendCancel(cid,'Somente Players com Level 100+ conseguem abrir este bau.')
end
return 1
end
Rep++