카우킹을 만나면 무조건 치킨이되네요(자료수정확인요청)
분류
질문
조회 수
1,227
추천 수
0

// 카우봇
//--------------------------------------------------------------------------
NTConfig_Script.push(["MyCowBot.ntj", ["시작_엔티스크립트/NTConfig_OpenChest[1] = true"]]); // 주의: 마지막 사냥터로 설정한 카우봇이 종료될 때 응답 없음이 될 경우에는 종료 전에 시간을 지연하는 기능을 추가합니다.
MyConfig_CowBotClear = [[0, 0x01], [0, 0x01]]; // [스토니 필드, 트리스트럼]
MyConfig_CowBotGriswold = false; // 그리스월드 잡기
MyConfig_CowBotChicken = 120; // 헬에서 카우킹의 라이프(최대치 128)가 설정치 이하면 치킨하기
MyConfig_CowBotPortalXy = 0; // 시크리트 카우 레벨 포탈 열 위치 = 0: 큐브가 있는 곳/ 1: 3시 구석/ 2: 6시 구석/ 3: 9시 구석/ 4: 12시 구석/ 5: 무작위(1~4)
MyConfig_CowBotPortalOpen = false; // 사냥하지 않고 시크리트 카우 레벨 포탈만 열기
이렇게 되있는데 이런 화면이나타나며 치킨이 됩니다.
그리고 저의 MycowBot.ntj 파일은 이렇게 되있습니다.
function MyMain()
{
Print("ÿc5날아다녀의 '카우봇' 세계에 오신 것을 환영합니다.");
MyVi_TownManager();
_MyCu_isTelekinesisStash = false;
if (!MyCoB_MakeCowPortal())
{
_MyCu_isTelekinesisStash = true;
MyMI_ArrangeLeg();
MyCo_StopScript("NTToolsThread_CowBot.ntj");
return "MyCoB_MakeCowPortal()";
}
_MyCu_isTelekinesisStash = true;
if (MyConfig_CowBotPortalOpen)
{
MyCo_StopScript("NTToolsThread_CowBot.ntj");
return "MyMain()";
}
MyPr_Precast(true);
MyCoB_ClearRooms(_MyAt_MONSTER_TYPE_ALL, 150, NTC_UNIT_MONSTER, 773, 100);
MyCo_StopScript("NTToolsThread_CowBot.ntj");
return "MyMain()";
}
function MyCoB_ClearRooms(specType, range, unitType, unitId, distance)
{
var i;
var _count;
var _units, _preRoom;
var _addRooms = new Array();
var _removeRooms = new Array();
if (distance > 0)
{
_units = GetPresetUnits(me.areaid, unitType, unitId);
if (!_units || _units.length < 1)
return false;
}
_preRoom = GetRoom();
if (!_preRoom)
return false;
do
{
if (distance < 1 || GetDistance(_preRoom.x * 5, _preRoom.y * 5, _units[0].roomx * 5, _units[0].roomy * 5) > distance)
_addRooms.push([_preRoom.x * 5, _preRoom.y * 5]);
} while (_preRoom.GetNext());
_count = _addRooms.length;
if (_count > 0)
{
MyAt_ClearPosition(30, specType, true);
_preRoom = [me.x, me.y];
}
while (_addRooms.length > 0)
{
_addRooms.sort(function (a, b) { return (GetDistance(_preRoom[0], _preRoom[1], a[0], a[1]) - GetDistance(_preRoom[0], _preRoom[1], b[0], b[1])); });
_removeRooms.push([_addRooms[0][0], _addRooms[0][1]]);
for (i = 1; i < _addRooms.length; i++)
{
if (GetDistance(_preRoom[0], _preRoom[1], _addRooms[i][0], _addRooms[i][1]) <= GetDistance(_preRoom[0], _preRoom[1], _addRooms[0][0], _addRooms[0][1]))
_removeRooms.push([_addRooms[i][0], _addRooms[i][1]]);
else
break;
}
if (_removeRooms.length > 1)
{
_removeRooms.sort(function (a, b) { return (b[0] - a[0]); });
if (_removeRooms[0][0] <= _preRoom[0])
{
_removeRooms.sort(function (a, b) { return (b[1] - a[1]); });
if (_removeRooms[0][1] <= _preRoom[1])
{
_removeRooms.sort(function (a, b) { return (a[0] - b[0]); });
if (_removeRooms[0][0] >= _preRoom[0])
_removeRooms.sort(function (a, b) { return (a[1] - b[1]); });
}
}
}
if (!range || GetDistance(me.x, me.y, _removeRooms[0][0], _removeRooms[0][1]) <= range)
{
if (MyMo_MoveTo(me.areaid, _removeRooms[0][0], _removeRooms[0][1], 1, true, specType))
_preRoom = _removeRooms[0];
}
for (i = 0; i < _addRooms.length; i++)
{
if (_addRooms[i][0] == _removeRooms[0][0] && _addRooms[i][1] == _removeRooms[0][1])
{
_addRooms.splice(i, 1);
Say("![사냥] " + (_count - _addRooms.length) + "/" + _count);
break;
}
}
_removeRooms.length = 0;
}
Say("![사냥] 완료")
return true;
}
function MyCoB_MakeCowPortal()
{
var _cube, _leg, _portal;
var _preX, _preY;
switch (MyCoB_CheckCowPortal(true))
{
case -1: return false;
case 1: return true;
}
_cube = MyMI_GetCube();
if (!_cube)
return false;
if (!MyMI_ClearCube(false))
return false;
MyMI_PickItems(true, "", true);
MyCo_CancelMenu();
_leg = MyCoB_CheckLeg();
if (!_leg)
return (MyCoB_CheckCowPortal(false) == 1);
MyCo_CancelMenu();
if (MyConfig_AssasinBurstOfSpeed && !me.GetState(157))
NTC_CastSkill(258, NTC_HAND_RIGHT);
if (!NTTM_CheckAct(1))
return false;
_portal = MyCoB_CheckPortal();
if (!_portal)
return false;
if (MyMI_MoveItemTo(_leg, _MyMI_LOCATION_ITEM_CUBE) != 1) return false;
if (MyMI_MoveItemTo(_portal, _MyMI_LOCATION_ITEM_CUBE) != 1) return false;
if (MyConfig_CowBotPortalXy != 0)
{
switch ((MyConfig_CowBotPortalXy != 5) ? MyConfig_CowBotPortalXy : Random(1, 4))
{
case 1: if (MyMo_TownMove("akara")) MyMo_MoveTo(me.areaid, me.x + 24, me.y - 18); break;
case 2: if (MyMo_TownMove("portalspot")) MyMo_MoveTo(me.areaid, me.x + 69, me.y + 42); break;
case 3: if (MyMo_TownMove("gheed")) MyMo_MoveTo(me.areaid, me.x - 29, me.y + 20); break;
case 4: if (MyMo_TownMove("charsi")) MyMo_MoveTo(me.areaid, me.x - 25, me.y - 24); break;
}
}
if (!MyMI_Transmute(_cube))
return false;
if (MyConfig_CowBotPortalXy == 0)
{
NTC_PingDelay(500);
MyCo_CancelMenu();
}
else
{
NTC_PingDelay(1000);
MyCo_CancelMenu();
Delay(1000);
MyCo_CancelMenu();
}
if (MyConfig_CowBotPortalOpen)
return true;
_preX = me.x;
_preY = me.y;
MyVi_TownManager();
if (GetDistance(me.x, me.y, _preX, _preY) > 7)
{
if (!MyMo_MoveTo(me.areaid, _preX, _preY))
return false;
}
MyCo_Load("NTBot/tools/NTToolsThread_CowBot.ntj");
return MyTP_UsePortal({ range:15, retry:10 });
}
function MyCoB_CheckCowPortal(isSimple)
{
var _player,_portal;
var _cowPortal = null;
_player = GetPlayerUnit();
if (!_player || !_player.GetNext())
return 0;
if (!NTTM_CheckAct(1))
return -1;
if (isSimple)
{
_portal = NTC_FindUnit(NTC_UNIT_OBJECT, _MyTP_STRING_PORTAL, 1);
if (_portal)
{
do
{
if (_portal.name == _MyTP_STRING_PORTAL && (_portal.subareaid == 39 || _portal.subareaid == (39 + 256)))
{
_cowPortal = _portal;
break;
}
} while (_portal.GetNext());
}
}
else
{
var _moveList = ["stash", "akara", "portalspot", "gheed", "charsi"];
for (var i = 0; i < _moveList.length; i++)
{
if (MyMo_TownMove(_moveList[i]))
{
_portal = NTC_FindUnit(NTC_UNIT_OBJECT, _MyTP_STRING_PORTAL, 1);
if (_portal)
{
do
{
if (_portal.name == _MyTP_STRING_PORTAL && (_portal.subareaid == 39 || _portal.subareaid == (39 + 256)))
{
_cowPortal = _portal;
i = _moveList.length;
break;
}
} while (_portal.GetNext());
}
}
}
}
if (_cowPortal)
{
MyVi_TownManager();
if (!MyMo_MoveTo(_cowPortal.areaid, _cowPortal.x, _cowPortal.y))
return -1;
MyCo_Load("NTBot/tools/NTToolsThread_CowBot.ntj");
return (MyTP_UsePortal({ retry:0, portal:_cowPortal }) ? 1 : -1);
}
return 0;
}
function MyCoB_CheckLeg()
{
var _attackXy = [[25111, 5129, 25181, 5208], [25040, 5129, 25110, 5208], [25040, 5048, 25110, 5128], [25111, 5048, 25181, 5128]];
var _leg;
_leg = MyMI_GetLeg();
if (_leg)
return _leg;
if (!MyMo_TakeTownWaypoint(4))
return false;
MyPr_Precast(true);
if (!MyMo_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 61, 0, 0, MyConfig_CowBotClear[0][0], MyConfig_CowBotClear[0][1], 40))
return false;
NTC_FindUnit(NTC_UNIT_MONSTER, GetLocaleString(2872), 10);
MyAt_KillBoss(GetLocaleString(2872), [25, _MyAt_MONSTER_TYPE_MINION]);
if (!MyTP_UsePortal({ retry:10 }))
return false;
if (MyConfig_CowBotGriswold)
{
if (MyMo_MoveTo(me.areaid, 25140 + 1, 5183, 3, MyConfig_CowBotClear[1][0] == 1, MyConfig_CowBotClear[1][1]))
MyAt_KillBoss(365, null);
}
if (MyConfig_CowBotClear[1][0] == 2)
MyAt_ClearXy(_attackXy, MyConfig_CowBotClear[1][1]);
if (!MyMo_MoveTo(me.areaid, 25050, 5182, 3, MyConfig_CowBotClear[1][0] == 1, MyConfig_CowBotClear[1][1]))
return false;
if (!NTT_CheckSpace(2, 3))
{
if (!MyMo_TownManager(true, true, false))
return false;
}
if (!MyUn_OpenChest(268))
return false;
_leg = NTC_FindUnit(NTC_UNIT_ITEM, 88, 5);
if (!_leg)
return false;
return (MySI_PickUpItem(_leg, 0) && MyMo_MoveToTown() && MyMI_GetLeg());
}
function MyCoB_CheckPortal()
{
var _portal, _npc;
_portal = MyCoB_GetPortal();
if (_portal)
return _portal;
if (!MyMo_TownMove("akara"))
return null;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_AKARA, 5);
if (!_npc)
return null;
if (!MyVi_DoInteract(_npc)) return null;
if (!NTT_DoTrade(_npc)) return null;
_portal = _npc.GetItems(518);
if (!_portal || _portal.length < 1)
return null;
if (!NTT_ShopItem(_portal[0], _npc, 2))
return null;
MyCo_CancelMenu();
return MyCoB_GetPortal();
}
function MyCoB_GetPortal()
{
var _portals = me.GetItems(518);
if (_portals)
{
for (var i = 0; i < _portals.length; i++)
{
if (_portals[i].mode == _MyMI_MODE_ITEM_STORE && (_portals[i].itemloc != _MyMI_LOCATION_ITEM_INVENTORY || NTConfig_Columns[_portals[i].y][_portals[i].x] == 1))
return _portals[i];
}
}
return null;
}
혹시나 왜그런지 좀 보시고 확인부탁드립니다.
이렇게 해놧습니다. 그런데 로그를 보면 카우킹 치킨이라고 뜨는데 128/128인데도 계속 치킨이 되네요. 설정에 문제가 있나요? 혹시 아시는분은 도움 부탁드립니다 ^^