KylerXX
Active Member
- Joined
- Jun 24, 2010
- Messages
- 439
- Reaction score
- 30
Well, I made this script little time ago and seen that pokemon servers are progressing a lot I decided post it.
Script work:
When your summon (pokemon) is far from you or fallen down a hole teleports to your position.
Go to globalevents/scripts/ create a LUA file called teleport.lua and add this:
Now you go to globalevents.xml and add this:
Script work:
When your summon (pokemon) is far from you or fallen down a hole teleports to your position.
Go to globalevents/scripts/ create a LUA file called teleport.lua and add this:
Lua:
function onThink(interval, lastExecution, thinkInterval)
local tabla = {}
local maxDistance = 10
for _, pid in ipairs(getPlayersOnline()) do
local summons = getCreatureSummons(pid)
if #summons > 0 then
table.insert(tabla, pid)
end
end
for _, t in ipairs(tabla) do
local summ = getCreatureSummons(t)
if getThingPos(t).z ~= getThingPos(summ[1]).z or getDistanceBetween(getThingPos(t), getThingPos(summ[1])) > maxDistance then
doTeleportThing(summ[1], getThingPos(t))
doSendMagicEffect(getThingPos(t), 12)
end
end
return true
end
Now you go to globalevents.xml and add this:
XML:
<globalevent name="teleport" interval="1" event="script" value="teleport.lua"/>