Tile Que Teleporta E Da Item

brendorox
em Lixeira Pública

brendorox

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 01/05/10Posts: 6Char no Tibia: nao tenho

Ola gente to querendo um script em um tile

Que quando voce passa encima dele e teleportado para a sua town e ganha tal item

alguem pode ajudar?

Mulizeu

Programar ate cair os dedos
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 05/08/10Posts: 218Gênero: Masculino

Ta ai:

 

function onStepIn(cid, item, position, fromposition)
tile = {x=59,y=466,z=7} --posição tile
storage = 30001 -- nao mude

if isPlayer(cid) then
local status = getPlayerStorageValue(cid,storage)
if status == -1 then
doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid)))
doPlayerAddItem(cid,2160,50) -- item que sera adc
setPlayerStorageValue(cid,storage,1)
else
doPlayerSendTextMessage(cid,25,'vc ja pegou seu item')
end
end
end

 

 

 

tag:

<movevent event="StepIn" actionid="xxxx" script="nome do arquivo.lua" />