Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function NTMain()
- {
- Include("libs/common/NTCommon.ntl");
- NTC_IncludeLibs();
- NTC_IncludeConfig("NTBot/char_configs");
- NT_LoadConfig();
- NTSI_LoadNIPFiles("NTBot/item_configs");
- NTA_Initialize();
- if(!NTTM_CheckAct()){
- NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
- return;
- }
- NTTMGR_TownManager();
- if(!NTTM_TownMove("waypoint")){
- NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
- return;
- }
- if(!NTM_TakeWaypoint(74)){
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
- return;
- }
- NTP_DoPrecast(true);
- if(NTConfig_OpenSummonerChests) {
- var _object = GetPresetUnits(me.areaid);
- for(var i = 0; i < _object.length; i++) {
- if(_object[i].id == 357) {
- if(_object[i].x == 11 && _object[i].y == 11){
- // Print("Summoner is at the "+COLOR_2+"Top Right");
- NTM_MoveTo(me.areaid, 25863, 5449); //Bottom Right End No Summoner
- NTM_MakeTP();
- Delay(200);
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25445, 5869); //Bottom Left End No Summoner
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25023, 5449); //Top Left End No Summoner
- ChestifyTeam();
- NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Top Right Summoner
- NTA_KillMonster(250);
- // Delay(200); //Not sure if this would prevent crash
- ChestifyTeam();
- // if(NTConfig_ClearPosition)
- // NTA_ClearPosition();
- // NTSI_PickItems();
- }
- else if (_object[i].x == 26 && _object[i].y == 11){
- // Print("Summoner is at the "+COLOR_2+"Bottom Right");
- NTM_MoveTo(me.areaid, 25445, 5869); //Bottom Left End No Summoner
- NTM_MakeTP();
- Delay(200);
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25023, 5449); //Top Left End No Summoner
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25450, 5030); //Top Right End No Summoner
- ChestifyTeam();
- NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Bottom Right Summoner
- NTA_KillMonster(250);
- // Delay(200); //Not sure if this would prevent crash
- ChestifyTeam();
- // if(NTConfig_ClearPosition)
- // NTA_ClearPosition();
- // NTSI_PickItems();
- }
- else if (_object[i].x == 11 && _object[i].y == 21){
- // Print("Summoner is at the "+COLOR_2+"Bottom Left");
- NTM_MoveTo(me.areaid, 25023, 5449); //Top Left End No Summoner
- NTM_MakeTP();
- Delay(200);
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25450, 5030); //Top Right End No Summoner
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25863, 5449); //Bottom Right End No Summoner
- ChestifyTeam();
- NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Bottom Left Summoner
- NTA_KillMonster(250);
- // Delay(200); //Not sure if this would prevent crash
- ChestifyTeam();
- // if(NTConfig_ClearPosition)
- // NTA_ClearPosition();
- // NTSI_PickItems();
- }
- else {
- // Print("Summoner is at the "+COLOR_2+"Top Left");
- NTM_MoveTo(me.areaid, 25450, 5030); //Top Right End No Summoner
- NTM_MakeTP();
- Delay(200);
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25863, 5449); //Bottom Right End No Summoner
- ChestifyTeam();
- NTM_MoveTo(me.areaid, 25445, 5869); //Bottom Left End No Summoner
- ChestifyTeam();
- NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2); //Top Left Summoner
- NTA_KillMonster(250);
- // Delay(200); //Not sure if this would prevent crash
- ChestifyTeam();
- // if(NTConfig_ClearPosition)
- // NTA_ClearPosition();
- // NTSI_PickItems();
- }
- }
- }
- }
- if(!NTConfig_OpenSummonerChests) {
- if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2)){
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
- return;
- }
- }
- if(!NTConfig_OpenSummonerChests) {
- NTM_MakeTP();
- Delay(200);
- if(!NTA_KillMonster(250)) {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
- return;
- }
- }
- if(!NTConfig_OpenSummonerChests) {
- if(NTConfig_ClearPosition)
- NTA_ClearPosition();
- NTSI_PickItems();
- }
- if(NTConfig_ClearArcaneSanc > 0) {
- if(NTConfig_ClearArcaneSanc == 1){
- NTConfig_SkipRegularMonsters = false;
- NTP_DoPrecast();
- if(!NTA_ClearLevel()){
- NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
- }
- }
- if(NTConfig_ClearArcaneSanc == 2){
- NTConfig_SkipRegularMonsters = true;
- NTP_DoPrecast();
- if(!NTA_ClearLevel()){
- NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
- }
- }
- }
- if(NTConfig_OpenChestsInArea && NTU_DontOpenAreas()){
- OpenChestsInArea();
- }
- NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
- }
- function Chestify(){
- NTA_ClearPosition(20, true);
- NTC_OpenChestsInAreaNear(me.x, me.y, 30);
- NTSI_PickItems();
- NTC_InTown();
- NTM_MoveTo(me.areaid, 5108, 5059);
- NTTMGR_TownManager(true);
- NTM_MoveTo(me.areaid, 5069, 5066);
- if(!NTM_TakeWaypoint(74)){ Print("Waypoint Error!"); }
- if(!me.GetState(32) || !me.GetState(51)) { NTP_DoPrecast(); }
- }
- function ChestifyTeam(){
- // NTA_ClearPosition(20, true);
- NTA_ClearPosition(10, true); //20 may make the bot miss the Superchests if a lotta mobs around. This will also call NTC_OpenChestsInAreaNear() with the range = the arg here
- // NTC_OpenChestsInAreaNear(me.x, me.y, 30);
- NTC_OpenChestsInAreaNear(me.x, me.y, 40); //Increased to 40, dont think NTConfig_SnagRange would be a problem...
- NTSI_PickItems();
- // NTC_InTown();
- // NTM_MoveTo(me.areaid, 5108, 5059);
- // NTTMGR_TownManager(true);
- // NTM_MoveTo(me.areaid, 5069, 5066);
- // if(!NTM_TakeWaypoint(74)){ Print("Waypoint Error!"); }
- if(!me.GetState(32) || !me.GetState(51)) { NTP_DoPrecast(); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement