Como todos sabem em ankrahmun nas tumbas secretas, tem certos lugares que você bota uma scarab coin em cima de uma basin verde e vai encima dum foguinho, puxa a lavanca e pf...
eh teleportado
meu script faiz exatamente isto:
em actions.xml coloque
<action uniqueid="UID" script="scarabcointele.lua" />
--UID = unique id
scarabcointele.lua coloque
function onUse(cid, item, frompos, item2, topos)coin1pos = {x=511, y=404, z=10, stackpos=1}
telepos = {x=509, y=405, z=10, stackpos=1}
getcoin1 = getThingfromPos(coin1pos)
fogo1pos = {x=512, y=404, z=10, stackpos=1}
getfogo1 = getThingfromPos(fogo1pos)
player1pos = {x=512, y=404, z=10, stackpos=253}
getplayer1 = getThingfromPos(player1pos)
player2pos = {x=509, y=405, z=10, stackpos=253}
getplayer2 = getThingfromPos(player2pos)
rpoiozo = getPlayerName(cid)
if item.uid == 5005 and item.itemid == 1945 and getcoin1.itemid == 2159 and getcoin1.type < 2 and getplayer1.itemid > 0 then
doRemoveItem(getcoin1.uid,1)
doTeleportThing(getplayer1.uid,telepos)
doSendMagicEffect(fogo1pos,15)
doSendMagicEffect(telepos,15)
doTransformItem(item.uid,item.itemid+1)
print("JLS ::Player teleported with scarab coin teleport system:",rpoiozo)
elseif item.uid == 5005 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
elseif getcoin1.type > 2 then
doPlayerSendTextMessage(cid,22,"I'm trying to put too many scarab coins, maybe I should put only one...")
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
if item.uid == 5030 and item.itemid == 1945 and getplayer2.itemid > 0 then
doTeleportThing(getplayer2.uid,fogo1pos)
doSendMagicEffect(fogo1pos,15)
doSendMagicEffect(telepos,15)
doTransformItem(item.uid,item.itemid+1)
print("JLS ::Player teleported with scarab coin teleport go back system:",rpoiozo)
elseif item.uid == 5030 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end