Ir para conteúdo

Featured Replies

Resolvido por Unforged

Ir para solução
Postado
  • Administrador
  • Solução

Se é bem oque eu entendi coloque em data/creaturescripts

em creaturescrpts.xml coloque

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

em scripts crie um novo arquivo lua com o nome poketele.lua e adicione isso

local efeito = 1 -- coloque 0 para remover o efeito quando o pokemon teleportar
local max = 9 -- distancia max entre o pokemon e o player
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 onThink(cid, interval)

if true then --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 getDistanceBetween(getThingPos(cid), getThingPos(getCreatureSummons(cid)[1])) > max then
	doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid), false)
	doSendMagicEffect(getThingPos(cid), 21)
	end
end

return true
end

TibiaKing Team- KingTópicos
www.tibiaking.com

Postado
  • Autor

 

Se é bem oque eu entendi coloque em data/creaturescripts

em creaturescrpts.xml coloque

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

em scripts crie um novo arquivo lua com o nome poketele.lua e adicione isso

local efeito = 1 -- coloque 0 para remover o efeito quando o pokemon teleportar
local max = 9 -- distancia max entre o pokemon e o player
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 onThink(cid, interval)

if true then --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 getDistanceBetween(getThingPos(cid), getThingPos(getCreatureSummons(cid)[1])) > max then
	doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid), false)
	doSendMagicEffect(getThingPos(cid), 21)
	end
end

return true
end

valeu agora qual comando pra teleportar que eu ja tentei varios mas n teleporta

  • 1 year later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo