NO
script

[PDA] New Poketele

Por Noninhouh, 14 de abr. de 2014 em Tutoriais para Iniciantes

pda
poketele
6
3.1k
NoninhouhN
14 de abril de 2014 às 22:30

Bom, muitas pessoas estavam tentando colocar para o pokemon se teleportar igual ao PxG, 5 sqm's na vertical ou 7 sqm's na horizontal

Mas, o poketele q jah vem no PDA, ele so teleporta o poke com um valor unico, ou seja, se for 5 na horizontal tera de ser 5 na vertical, ou set for 7 na horizontal, 7 na vertical, e assim sucessivamente...

 

Esse poketele aki q eu so fiz uma pekenininininina modificação, faz ele teleporta o poke q nem o dah PxG

Bom, se o seu poketele jah esta funcionando, apenas substitua o script por este:

 

 

local maxx = 7 -- distancia max entre o pokemon e o player
local maxy = 5
local function doIncreaseSpeed(cid)
    if not isCreature(cid) then return true end
    doChangeSpeed(cid, -getCreatureSpeed(cid))
    doChangeSpeed(cid, 2.5*(getCreatureBaseSpeed(cid) + getSpeed(cid)))
end

function onLogin(cid)
    registerCreatureEvent(cid, "PokemonIdle")
return true
end

function onThink(cid, interval)

    if not isCreature(cid) then
    return true
    end

    if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
    return true
    end

    if #getCreatureSummons(cid) >= 1 and not isCreature(getCreatureTarget(cid)) then
        if math.abs(getThingPos(cid).x - getThingPos(getCreatureSummons(cid)[1]).x) > maxx then
            doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid), false)
            doSendMagicEffect(getThingPos(cid), 211)
        elseif math.abs(getThingPos(cid).y - getThingPos(getCreatureSummons(cid)[1]).y) > maxy then
            doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid), false)
            doSendMagicEffect(getThingPos(cid), 211)
        end
    end

return true
end

 

 

 

Caso keira trocar, so mudar em maxx ou maxy

----------------------------------------------------------

Essa tag, é apenas se o seu poketele não estiver ativo:

 

 

    <event type="think" name="PokemonIdle" event="script" value="poketele.lua"/>
    <event type="login" name="PokemonIdleLogin" event="script" value="poketele.lua"/>

 

 

 

OBS: é pra substituir os scripts acima pelos seus!!

OBS²: caso keira trocar o effect, muda nas duas partes 'doSendMagicEffect(getThingPos(cid), 211)'

Editado Abril 14 por Noninhouh

SoulvilingS
14 de abril de 2014 às 22:44

Boa, vai me ajudar!

zipter98Z
15 de abril de 2014 às 11:53

Tutorial aprovado e movido. Obrigado pelo conteúdo.

jeanflamengoJ
15 de abril de 2014 às 13:23

gtz noni smp fazendo coisa boa uheue

2 anos depois...
LoouisL
18 de maio de 2016 às 21:59

Brigadaaaaaaaaaaaaaaa Rep+

Funciona na base cyan s2

SamueLGuedesS
19 de maio de 2016 às 15:04

Bem legal o script, mas poderia dar uma formatação melhor para ficar mais claro o tutorial.