Teleport Usando Item
No actions.xml adicione:
action uniqueid="1002" script="itemteleport.lua" />
Só trocar o "1002" pelo UID q vc kiser xD
Após isso crie um arquivo chamado itemteleport.lua ou outro nome de seu gosto e adicione o code:
function onUse(cid, item, frompos, item2, topos) if item.uid == 1002 and item.itemid == 1945 then player1pos = {x=69, y=104, z=7, stackpos=253} player1 = getThingfromPos(player1pos) item1pos = {x=69, y=105, z=7, stackpos=1} item1 = getThingfromPos(item1pos) if player1.itemid > 0 then queststatus1 = getPlayerStorageValue(player1.uid,1002) if queststatus1 == -1 and item1.itemid == 1990 then doRemoveItem(item1.uid,1) doSendMagicEffect(item1,2) nplayer1pos = {x=139, y=118, z=7} doSendMagicEffect(player1pos,2) doTeleportThing(player1.uid,nplayer1pos) doSendMagicEffect(nplayer1pos,10) doTransformItem(item.uid,item.itemid+1) setPlayerStorageValue(cid,1002,1) else doPlayerSendCancel(cid,"Sorry, not possible.") end else doPlayerSendCancel(cid,"Sorry, not possible.") end elseif item.uid == 1002 and item.itemid == 1946 then if getPlayerAccess(cid) < 1 then doTransformItem(item.uid,item.itemid-1) else doPlayerSendCancel(cid,"Sorry, not possible.") end else return 0 end return 1 end
Explicando:
os numero 1002, sao os UIDs, modifique para oq vc kiser
player1pos = {x=69, y=104, z=7, stackpos=253}
player1 = getThingfromPos(player1pos)
item1pos = {x=69, y=105, z=7, stackpos=1}
item1 = getThingfromPos(item1pos)
nplayer1pos = {x=139, y=118, z=7}
Player1pos: é o lugar onde o player deve ficar para funcionar a action.
Item1pos: é o lugar onde o item deve ser colocado para funcionar a action.
nplayer1pos: é o lugar onde o player vai ser teleportado.
if queststatus1 == -1 and item1.itemid == 1990 then
esse nº 1990 é o id do item q precisa ser colocado no lugar ond vc indicou ali em cima em item1pos.. qndo o item estiver lah e o player estiver no lugar certo ele vai ser teleportado para o nplayer1pos =) .
Creditos: Alokk