Tipo do script: Action
Protocolo (versão do Tibia): 7.92
Servidor utilizado: Evolutions-xml 0.7.8
Nível de experiência: médio
Adicionais/Informações: Meu sistema de teleport, permite que players consigam ultiliza-lo em houses alheias. Basta o player colocá-lo no chão, e ir marcando o local com um trilho de teleports, assim ele poderá roubar houses q estiverem abertas. Gostaria que o mesmo não fosse possível de usar em houses.
Segue abaixo meu sistema de teleport:
local function Teleport10(cid) if isPlayer(cid) == TRUE then doSendAnimatedText(getCreaturePosition(cid), "Woup!!", 213) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) xpos = getPlayerStorageValue(cid, 111) ypos = getPlayerStorageValue(cid, 222) zpos = getPlayerStorageValue(cid, 333) spos = {x=xpos, y=ypos, z=zpos} doTeleportThing(cid, spos) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Você foi teleportado com sucesso.') end return TRUE end local function Teleport9(cid) if isPlayer(cid) == TRUE then doSendAnimatedText(getCreaturePosition(cid), "Woup!!", 213) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport10, 1 * 1000, cid) end end local function Teleport8(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport9, 1 * 1000, cid) end end local function Teleport7(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport8, 1 * 1000, cid) end end local function Teleport6(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport7, 1 * 1000, cid) end end local function Teleport5(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport6, 1 * 1000, cid) end end local function Teleport4(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport5, 1 * 1000, cid) end end local function Teleport3(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport4, 1 * 1000, cid) end end local function Teleport2(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport3, 1 * 1000, cid) end end local function Teleport1(cid) if isPlayer(cid) == TRUE then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) addEvent(Teleport2, 1 * 1000, cid) end end function onUse(cid, item, frompos, item2, topos) local teleport = getPlayerStorageValue(cid, 444) if teleport == -1 or teleport == 0 then savpos = {x=getThingPos(item2.uid).x, y=getThingPos(item2.uid).y, z=getThingPos(item2.uid).z, stackpos=253} setPlayerStorageValue(cid, 111, savpos.x) setPlayerStorageValue(cid, 222, savpos.y) setPlayerStorageValue(cid, 333, savpos.z) setPlayerStorageValue(cid, 444, 1) doSendMagicEffect(topos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Você gravou suas coordenadas em seu teleport mistico.') elseif teleport == 1 then setPlayerStorageValue(cid, 444, 0) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYAREA) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'Você ativou seu teleport mistico.') doRemoveItem(item.uid,1) addEvent(Teleport1, 1 * 1000, cid) end end