hey all copy pasted from Shaddes post
E/ Ok, ive been workin on it more, It will now work for every map. BUT, it will go to tha edge of tha door, and sit there, for maybe 5-10 seconds, and then it will go. I cant figure out tha reason, but im workin on it right now.
This will work no matter what, but if yur lookin for a very fast, trav w/o enigma, yu'll have to wait until i figure it out.
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
var _real;
var _waypoint;
var _deltax, _deltay;
var _deltax2, _deltay2;
var _attackpos = [5797, 1514, 5795, 1490, 5787, 1491, 5797, 1514, 5781, 1514];
var _attackposs = [me.areaid, +16, +4,]
var _attackposss = [me.areaid, +12, +4]
_real = GetPresetUnits(me.areaid, 324);
NTA_Initialize();
me.maxgametime = 0;
NTTM_CheckAct();
NTTMGR_TownManager();
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(83);
NTP_DoPrecast(true);
_waypoint = NTC_GetUnit(NTC_UNIT_OBJECT, GetLocaleString(22526), 5);
_deltax = _waypoint.x - 5699;
_deltay = _waypoint.y - 1584;
_deltax2 = _attackposs;
_deltay2 = _attackposss;
for(var i = 0 ; i < _attackposs.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackposs[i-2], _attackposs[i-2]);
}
for(var i = 0 ; i < _attackposss.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackposss[i-2], _attackposss[i-3]);
}
NT_FindDurance();
NTM_MoveTo(me.areaid, 5775+_deltax, 1545+_deltay);
for(var i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i]+_deltax, _attackpos[i+1]+_deltay);
NTA_ClearPosition(25)
//NTC_PingDelay(200);
}
NTM_MakeTP();
NTM_UsePortal("BluePortal");
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
function NT_FindDurance()
{
var _unit;
_unit = GetPresetUnits(me.areaid, NTC_UNIT_TILE);
for(var i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 64)
{
_todurx = (_unit[i].roomx*5+_unit[i].x);
_todury = (_unit[i].roomy*5+_unit[i].y);
}
}
}
function NTM_MoveToObject(areaid, unittype, low, high, offsetx, offsety, clearpath)
{
var _unit;
if(arguments.length < 4)
high = low;
if(arguments.length < 5)
{
offsetx = 0;
offsety = 0;
}
if(arguments.length < 7)
clearpath = false;
_unit = GetPresetUnits(areaid, unittype);
if(!_unit)
return false;
for(var i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id >= low && _unit[i].id <= high)
return NTM_MoveTo(areaid, _unit[i].roomx*5+_unit[i].x+offsetx, _unit[i].roomy*5+_unit[i].y+offsety, 2, clearpath);
}
return false;
}
function NTC_GetUnit(unittype, classid)
{
var _unit;
for(var i = 0 ; i < 2 ; i++)
{
if(arguments.length < 2)
_unit = GetUnit(unittype);
else
_unit = GetUnit(unittype, classid);
if(_unit)
return _unit;
if(i < 1)
NTC_PingDelay(200);
}
return false;
}
Credits
~Shadde