Beleza mano, faz assim:
Crie um novo arquivo .lua na pasta \data\actions\scripts com o nome de vochest.lua
e cole isso nele:
function onUse(cid, item, frompos, item2, topos)
voc = getPlayerVocation(cid)
queststatus = getPlayerStorageValue(cid,11554)
if voc == 1 then ------ Sorcerer
if queststatus == -1 then
doPlayerAddItem(cid,1998,1)
doPlayerAddItem(cid,2160,1)
doPlayerAddItem(cid,2525,1)
doPlayerAddItem(cid,8819,1)
doPlayerAddItem(cid,2647,1)
doPlayerAddItem(cid,2663,1)
doPlayerAddItem(cid,2173,1)
doPlayerAddItem(cid,2190,1)
setPlayerStorageValue(cid,11554,1)
else
doPlayerSendTextMessage(cid,22,"Você já pegou o seu prêmio.")
end
elseif voc == 2 then ------ Druid
if queststatus == -1 then
doPlayerAddItem(cid,1998,1)
doPlayerAddItem(cid,2160,1)
doPlayerAddItem(cid,2525,1)
doPlayerAddItem(cid,8819,1)
doPlayerAddItem(cid,2647,1)
doPlayerAddItem(cid,2663,1)
doPlayerAddItem(cid,2173,1)
doPlayerAddItem(cid,2182,1)
setPlayerStorageValue(cid,11554,1)
else
doPlayerSendTextMessage(cid,22,"Você já pegou o seu prêmio.")
end
elseif voc == 3 then ----- Paladin
if queststatus == -1 then
doPlayerAddItem(cid,1988,1)
doPlayerAddItem(cid,2160,1)
doPlayerAddItem(cid,2455,1)
doPlayerAddItem(cid,2457,1)
doPlayerAddItem(cid,8872,1)
doPlayerAddItem(cid,2647,1)
doPlayerAddItem(cid,2173,1)
doPlayerAddItem(cid,2543,20)
setPlayerStorageValue(cid,11554,1)
else
doPlayerSendTextMessage(cid,22,"Você já pegou o seu prêmio.")
end
elseif voc == 4 then ---- Knight
if queststatus == -1 then
doPlayerAddItem(cid,1988,1)
doPlayerAddItem(cid,2457,1)
doPlayerAddItem(cid,2463,1)
doPlayerAddItem(cid,2647,1)
doPlayerAddItem(cid,7744,1)
doPlayerAddItem(cid,2525,1)
doPlayerAddItem(cid,2160,1)
doPlayerAddItem(cid,2173,1)
setPlayerStorageValue(cid,11554,1) else
doPlayerSendTextMessage(cid,22,"Você já pegou o seu prêmio.")
end
else
return 0
end
return 1
end
Depois em data\actions abra o actions.xml abaixo de <actions> copie e cole isso:
<!-- Vocation Chests -->
<action uniqueid="3540" script="vochest.lua"/>
Então crie sua alavanca pelo Map Editor e coloque-a no mapa que você deseja, depois com botão direito do mouse em cima dela, coloque o Uniqueid de "3540".
Pronto Feito seu script
Créditos não são meus, script retirado do Alissow Otserver 8.54~8.57, só fiz edita-lo para você!
Flw mano, testa ae
![]()



info
Grupo: Campones
Registrado: 14/05/09
Posts: 20
Reputação: +2
Char no Tibia: Linda Beijos
Tipo eu queria um script que o player puxa uma alavanca (ID: 1945)
ai dependendo da vocação dele vem os seguintes itens:
Uma Backpack comum(Marrom ID: 1988)
e dentro:
Knight:
Steel Helmet
Plate Armor
Plate Legs
Spike Sword
Dwarven Shield
1 Crystal Coin
Amulet Of Loss
Paladin:
Crossbow
Bolt
Steel Helmet
Belted Cape
Plate Legs
1 Crystal Coin
Amulet of Loss
Sorcerer:
Wand Of Vortex
Dwarven Shield
Magician's Robe
Plate Legs
Mystic Turban
1 Crystal Coin
Amulet of Loss
Druid:
Snakebite Rod
Dwarven Shield
Magician's Robe
Plate Legs
Mystic Turban
1 Crystal Coin
Amulet of Loss
Acho que é isso, meu server é versão 8.6!