|
本帖最后由 yfzh2012 于 2018-1-13 22:36 编辑
回归以来还没跑过古代通道 ,果然有这个问题,韩国bot 不用这个函数 用的是MyMove.ntl 文件里的,请参照此进行进行替换这个函数即可,本人用的是33版的,如果你用更新一些的35 38 版 请自己参照,如果有区别自行修改
My.Move.TakeStair = function (areaId, distance, offsetX, offsetY)
{
var _unit;
var _preArea, _moveX, _moveY;
var _unit2;
if (arguments.length < 2) distance = 4;
if (arguments.length < 3) offsetX = 1;
if (arguments.length < 4) offsetY = 1;
if (me.areaid == areaId)
return true;
switch(areaId){
case 47:
case 65:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 74); // trap door
break;
case 93:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 366); // sewer stairs
break;
case 94:
case 96:
case 98:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 195);// stair
_dist = 4;
break;
case 95:
case 97:
case 99:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 194);// stair
_dist = 4;
break;
case 100:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 386); // trav to duri
_dist = 4;
break;
case 128:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 547); // to wsk 1
break;
default:
_unit = NTM_GetStairInt(areaId);
break;
}
if (!_unit)
{
NTC_PingDelay(500);
switch(areaId){
case 47:
case 65:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 74); // trap door
break;
case 93:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 366); // sewer stairs
break;
case 94:
case 96:
case 98:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 195);// stair
_dist = 4;
break;
case 95:
case 97:
case 99:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 194);// stair
_dist = 4;
break;
case 100:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 386); // trav to duri
_dist = 4;
break;
case 128:
_unit = NTC_FindUnit(NTC_UNIT_OBJECT, 547); // to wsk 1
break;
default:
_unit = NTM_GetStairInt(areaId);
break;
}
}
if (!_unit)
return false;
_preArea = me.areaid;
for (var i = 0; i < 20; i++)
{
if ((i % 5) == 0)
{
if (i == 10)
{
_moveX = Math.round(-6 * (_unit.x - me.x) / GetDistance(me, _unit));
_moveY = Math.round(-6 * (_unit.y - me.y) / GetDistance(me, _unit));
if (_moveX == 0 && _moveY == 0)
{
_moveX = 6;
_moveY = 6;
}
My.Move.MoveTo(_preArea, me.x + _moveX, me.y + _moveY);
}
if(_unit.classid == 366 && _unit.mode != 2){
_unit2 = NTC_FindUnit(NTC_UNIT_OBJECT, 367); // sewer leaver
if(My.Move.GetCloser(_unit2, distance, offsetX, offsetY)){
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _unit2);
NTC_Delay(200);
}
}
if (My.Move.GetCloser(_unit, distance, offsetX, offsetY))
{
if (NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _unit))
Delay(200);
}
}
Delay(200);
if (me.areaid != _preArea)
{
while (me.areaid == 0)
Delay(200);
if (me.areaid != _preArea)
{
NTC_PingDelay(NTConfig_AreaDelay);
return true;
}
else
return false;
}
}
return false;
}; |
|