Author: Mock the bear
This script can easly explore all the map for you in minutes (or hours).
Basically (in original configs), teleport you to pos 36,36,7 and keep teleporting you for each 4 tiles until 1024,1024,10.
Yeah, i know, you can debug the client with this, so then in configs there is a field Delay, it came with 1000ms (1 second), if you're debugging, change to 2000ms
Feel free to repost, modify etc, but at least keep the credits.
Ps: not tested in newer tfs versions.
ps2: It may take a long to start if the begin of your map there is empty
Also it work better when using Otclient
This script can easly explore all the map for you in minutes (or hours).
Basically (in original configs), teleport you to pos 36,36,7 and keep teleporting you for each 4 tiles until 1024,1024,10.
Yeah, i know, you can debug the client with this, so then in configs there is a field Delay, it came with 1000ms (1 second), if you're debugging, change to 2000ms
Feel free to repost, modify etc, but at least keep the credits.
Code:
--Autor: Mock the bear ([email protected])
--MTB
local map = {
Xmax=1024;
Ymax=1024;
Xstart=36;
YStrart=36;
Zstart=7;
--
Delay=1000;
Skip_tiles=4;
Floors_skip=1; --Can be 1 or -1
Floors_count=3; --Start form floor Zstart and stop after be teleproted to 3 floors
}
function cycle(cid,x,y,z,c)
if not isPlayer(cid) then
return 0;
end
x = x+map.Skip_tiles;
if x > map.Xmax then
x = map.Xmax;
end
if (getThingFromPos({x=x,y=y,z=z,stackpos=0},false) or {}).uid ~= 0 then
doTeleportThing(cid,{x=x,y=y,z=z})
end
if x == map.Xmax then
x = map.Xstart;
y = y+map.Skip_tiles;
end
if y > map.Ymax then
y = map.YStrart
z = z+Floors_skip;
c = c-1;
if c <= 0 then
return 0;
end
end
addEvent(cycle,map.Delay,cid,x,y,z,c)
end
function onSay(cid, words, param)
cycle(cid,map.Xstart,map.YStrart,map.Zstart,map.Floors_count)
end
--MTB
Ps: not tested in newer tfs versions.
ps2: It may take a long to start if the begin of your map there is empty
Also it work better when using Otclient
Last edited: