pegei de um amigo meu espero q gostem...ta igualzinhu a do tibia só tem q configura as posiçoes de acordo com o seu mapa...flws
feito por Héliton
Comentem PlX
---Actions.xml:
// Vocation Quest
<action uniqueid="9010" script="vocationquest.lua" /> --the switch
<action uniqueid="9015" script="quests.lua" />
<action uniqueid="9016" script="quests.lua" />
---Vocationquest.lua:
function onUse(cid, item, frompos, item2, topos)
end1pos = {x=227, y=210, z=8, stackpos=255} --onde o player1 sera teleportado quando a alavanca for puxada
end2pos = {x=228, y=210, z=8, stackpos=255} --onde o player2 sera teleportado quando a alavanca for puxada
end3pos = {x=227, y=211, z=8, stackpos=255} --onde o player3 sera teleportado quando a alavanca for puxada
end4pos = {x=228, y=211, z=8, stackpos=255} --onde o player4 sera teleportado quando a alavanca for puxada
ppl1pos = {x=221, y=192, z=10, stackpos=253} --posicao do player1
ppl2pos = {x=225, y=189, z=10, stackpos=253} --posicao do player2
ppl3pos = {x=229, y=192, z=10, stackpos=253} --posicao do player3
ppl4pos = {x=225, y=195, z=10, stackpos=253} --posicao do player4
ppl1 = getThingfromPos(ppl1pos)
ppl2 = getThingfromPos(ppl2pos)
ppl3 = getThingfromPos(ppl3pos)
ppl4 = getThingfromPos(ppl4pos)
item1pos = {x=220, y=192, z=10, stackpos=255} --item1pos
item2pos = {x=225, y=188, z=10, stackpos=255} --item2pos
item3pos = {x=230, y=192, z=10, stackpos=255} --item3pos
item4pos = {x=225, y=196, z=10, stackpos=255} --item4pos
item1 = getThingfromPos(item1pos)
item2 = getThingfromPos(item2pos)
item3 = getThingfromPos(item3pos)
item4 = getThingfromPos(item4pos)
if item.uid == 9010 and item.itemid == 1945 and item1.itemid == 2674 and item2.itemid == 2455 and item3.itemid == 2175 and item4.itemid == 2376 and ppl1.itemid > 0 and ppl2.itemid > 0 and ppl3.itemid > 0 and ppl4.itemid > 0 and getPlayerVocation(ppl1.uid) == 2 and getPlayerVocation(ppl2.uid) == 3 and getPlayerVocation(ppl3.uid) == 1 and getPlayerVocation(ppl4.uid) == 4 then
doRemoveItem(item1.uid,1)
doSendMagicEffect(item1pos,13)
doRemoveItem(item2.uid,1)
doSendMagicEffect(item2pos,13)
doRemoveItem(item3.uid,1)
doSendMagicEffect(item3pos,13)
doRemoveItem(item4.uid,1)
doSendMagicEffect(item4pos,13)
doTeleportThing(ppl1.uid,end1pos)
doSendMagicEffect(ppl1pos,10)
doSendMagicEffect(end1pos,10)
doTeleportThing(ppl2.uid,end2pos)
doSendMagicEffect(ppl2pos,10)
doSendMagicEffect(end2pos,10)
doTeleportThing(ppl3.uid,end3pos)
doSendMagicEffect(ppl3pos,10)
doSendMagicEffect(end3pos,10)
doTeleportThing(ppl4.uid,end4pos)
doSendMagicEffect(ppl4pos,10)
doSendMagicEffect(end4pos,10)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 9010 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
return 0
end
return 1
end
---Quests.lua:
[code]
function onUse(cid, item, frompos, item2, topos)
--by CVS - Modified by Heliton--
if item.uid == 9015 then
queststatus = getPlayerStorageValue(cid,1001)
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid,22,"You have found a 100 platinum coins.")
doPlayerAddItem(cid,2152,100)
doSendMagicEffect(topos,12)
setPlayerStorageValue(cid,1001,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 9016 then
queststatus = getPlayerStorageValue(cid,1002)
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid,22,"You have found a ring of healing.")
doPlayerAddItem(cid,2214,1)
doSendMagicEffect(topos,12)
setPlayerStorageValue(cid,1002,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end