KI
pedido

TP SCROLL

Por kinglekke, 05 de nov. de 2013 em Scripts

resolvido
script
36
3.2k
zipter98Z
05 de novembro de 2013 às 22:45

Tenta:

 

function onUse(cid, item, topos, item2, frompos)
 
local pos = {x = xxx, y = yyy, z = zzz}   --Coordenadas para onde o player será teleportado.
local efeito = 12
 
function teleport_thing(cid, toPos, time, storage, cd)
 
    if isCreature(cid) then
        addEvent(doTeleportThing, time*1000, cid, toPos)
        addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd)
end
return true
end
 
    if getCreatureSkull(cid) >= 3 then
        return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.")
end
    if not isPremium(cid) then
        return doPlayerSendCancel(cid, "Você não é premium.")
end
    if getPlayerStorageValue(cid, 141029) > os.time () then
        return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.")
end
        local a = 10
        for i = 1, 10 do
            a = a - 1
            addEvent(doCreatureSay, i*1000, cid,  "" ..a.."", TALKTYPE_ORANGE_1)
            addEvent(doSendMagicEffect, i*1000, getThingPos(cid), efeito)
            addEvent(doPlayerSetNoMove, i*1000, cid, false)
            doPlayerSetNoMove(cid, true)
    end
        teleport_thing(cid, pos, 10, 141029, 30)
return true
end
kinglekkeK
05 de novembro de 2013 às 22:54

bom esta dando umas travada quando o player tenta andar , mais o player consegue se mover mesmo assim

zipter98Z
05 de novembro de 2013 às 23:13

Testado, funcionando perfeitamente.

 

function onUse(cid, item, topos, item2, frompos)
 
local pos = {x = 696, y = 829, z = 7}   --Coordenadas para onde o player será teleportado.
local efeito = 12
 
function teleport_thing(cid, toPos, time, storage, cd)
 
    if isCreature(cid) then
        doPlayerSetNoMove(cid, true)
        addEvent(doTeleportThing, time*1000, cid, toPos)
        addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd)
end
return true
end
 
    if getCreatureSkull(cid) >= 3 then
        return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.")
end
    if not isPremium(cid) then
        return doPlayerSendCancel(cid, "Você não é premium.")
end
    if getPlayerStorageValue(cid, 141029) > os.time () then
        return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.")
end
        local a = 10
        for i = 1, 9 do
            a = a - 1
            addEvent(doCreatureSay, i*1000, cid,  "" ..a.."", TALKTYPE_ORANGE_1)
            addEvent(doSendMagicEffect, i*1000, getThingPos(cid), efeito)
            addEvent(doPlayerSetNoMove, 10*1000, cid, false)
    end
        teleport_thing(cid, pos, 10, 141029, 30)
return true
end
kinglekkeK
06 de novembro de 2013 às 14:25

vlw , me ajudaro mtooo

OmegaO
06 de novembro de 2013 às 14:34

Tópico movido para a seção de dúvidas e pedidos resolvidos.

kinglekkeK
06 de novembro de 2013 às 20:19

tem 1 erro nesse script pq quando o cara ta pk yellow , ele ta com espadinha normal de quando atk 1 monstro assim ele pode usar tp , gostaria que nao podia estar com nada como fosse para logar