function onStepIn(cid, item, position, fromPosition)
local toPos = {x=123, y=345, z=7} -- Aqui a posição para onde o jogador será transportado
local itemid,count = 5956,1
if item.actionid == 29529 then
if getPlayerItemCount(cid, itemid) < count then
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa de "..count.." "..getItemNameById(itemid).." para passar aqui.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doPlayerRemoveItem(cid, itemid, count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sua Jornada Pokemon esta prestes a começar!")
doTeleportThing(cid, toPos)
end
end
return true
end






info
Grupo: Campones
Registrado: 21/06/12
Posts: 33
Reputação: +1
É o seguinte, o tile já ta todo certinho e talz, mas não to conseguindo por a função pra ele teleportar também. Bom, ta ae a Script:[sP
function onStepIn(cid, item, position, fromPosition)
local itemid,count = 5956,1
if item.actionid == 29529 and getPlayerItemCount(cid, itemid) < count then
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa de "..count.." "..getItemNameById(itemid).." para passar aqui.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return true
end
doPlayerRemoveItem(cid, 5956, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sua Jornada Pokemon esta prestes a começar!")
return true
end