AN

Advancet Teleport Temple Scroll

Por Antiemoxlr, 11 de jan. de 2010 em Actions e Talkactions

otserv
tibia
script
9
4.4k
AntiemoxlrA
11 de janeiro de 2010 às 19:25

Vo Na pasta Da actions/tolls copie qualquer arkivo e ponha esta no Lugar

 

 

:sleep: :sleep: :sleep: :sleep: :sleep: :sleep: :sleep: :sleep: :sleep:

 

 

 

local Time1 = 0

local Use1 = 0

local timecount = 10 ---- Tiempo que tardara en teletransportarte

 

local function exhaust(cid, storevalue, exhausttime)

 

newExhaust = os.time()

oldExhaust = getPlayerStorageValue(cid, storevalue)

if (oldExhaust == nil or oldExhaust < 0) then

oldExhaust = 0

end

if (exhausttime == nil or exhausttime < 0) then

exhausttime = 1

end

diffTime = os.difftime(newExhaust, oldExhaust)

if (diffTime >= exhausttime or diffTime < 0) then

setPlayerStorageValue(cid, storevalue, newExhaust)

return 1

else

return 0

end

end

 

local function onTime1(z)

if isPlayer(z.cid) == 1 then

ppos = getPlayerPosition(z.cid)

if getCreatureCondition(z.cid, CONDITION_INFIGHT) == 1 then

stopEvent(time1)

stopEvent(Use1)

doPlayerSendTextMessage(z.cid, 21, "Teleport Canceled Because of IN-FIGHT!") ---- Lo que le saldra sino puede ser teletransportado por que esta en fight, solo puedes teletransportarte sin pz locked

else

if timecount > 0 then

Time1 = addEvent(onTime1, 1000, z)

end

timecount = timecount-1

doPlayerSendTextMessage(z.cid, 21, "Teleporting in " .. timecount .. " second.") ---- Cuenta atras para ser teletransportado

doSendMagicEffect(ppos, 53)

end

else

stopEvent(time1)

stopEvent(Use1)

end

end

local function onUse1(z)

if isPlayer(z.cid) == 1 then

if getCreatureCondition(z.cid, CONDITION_INFIGHT) == 0 then

ppos = getPlayerPosition(z.cid)

stopEvent(time1)

if z.item.itemid == 7727 then

npos = {x=160, y=50, z=6}

doTeleportThing(z.cid, npos)

doPlayerSendTextMessage(z.cid, 21, "Teleported to the Temple.") ---- Mensaje que saldra cuando sea teleportado

doSendMagicEffect(npos,40)

doSendMagicEffect(npos,10)

doSendMagicEffect(ppos,10)

stopEvent(time1)

end

else

stopEvent(time1)

doPlayerSendTextMessage(z.cid, 21, "Teleport Canceled.")

end

end

end

 

function onUse(cid, item, ppos, frompos, item2, topos)

local z = {cid = cid, item = item, ppos = ppos, item2 = item2, topos = topos}

if isPremium(cid) then

if getCreatureCondition(z.cid, CONDITION_INFIGHT) == 0 then

if (exhaust(cid, 9143, 11) > 0) then

Time1 = addEvent(onTime1, 1000, z)

Use1 = addEvent(onUse1, 11000, z)

timecount = 10

else

doPlayerSendCancel(cid, "You cannot use a teleport scroll again until you have been teleported.")

doSendMagicEffect(frompos, 2)

end

else

doPlayerSendCancel(cid, "You cannot use a teleport scroll when you are in a fight.")

doSendMagicEffect(frompos, 2)

end

else

doPlayerSendCancel(cid, "Only players with a Premium account can use teleport scroll.")

doSendMagicEffect(frompos, 2)

end

return 1

end

 

 

 

 

 

Va en action

 

<action itemid="SEU ID" script="tools/Scroll.lua"/>

Editado Janeiro 11 por Antiemoxlr

2 meses depois...
GodBzG
11 de março de 2010 às 05:45

Funcionou perfeitamente, mais vc esqueceu de mencionar que é preciso trocar o numero do id do item usado nessa parte:

if z.item.itemid == 7727 then

E passar pra o nosso idioma não seria uma má ideia não acha?

fora isso ta tudo certo, posta os creditos pra gente por gentileza...

Editado Março 11 por GodBz

AntiemoxlrA
15 de março de 2010 às 20:45

Olha Como Todo Mundo Poim em Ingles eu resolvi Colocar em espanhol pq nao sei escreve en ingles entendeu D:

DevilMoonD
15 de março de 2010 às 20:50

cara ja tem topicos como esse explicando eu ja vi ja '-'

fegulaF
18 de março de 2010 às 13:28

Como Eu Faco Pra Poder Tirar De Se Teleportar Apenas Sem Fight... Podendo Se Teleportar Sempre.

AntiemoxlrA
19 de março de 2010 às 16:20

E so Voce Tirar a if getCreatureCondition(z.cid, CONDITION_INFIGHT) ==

1 mês depois...
silveralolS
09 de abril de 2010 às 15:55

cara o script ja tem no otland, mas obrigado por trazer conteudo ao Xtibia... ele é bom pra ot's ex baixa e map global

lucasatakL
10 de abril de 2010 às 12:26

@siveralol

se já tem no otland,ponha o link aqui.

 

@Antiemoxlr

caso tenha esse topico no otland,pode ser considerado ripping pois não está com creditos do autor do script,bote os duvidos creditos,antes que alguem te reporte.

 

abraços !

Editado Abril 10 por lucasatak

1 ano depois...
AdriezA
27 de agosto de 2011 às 22:52

fmz manos ?? teria como bloquear o item pra quem tivesse 20 resets usa ele ?? flws fmz