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(NTConfig_Rushing)
- {
- 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;
- }
- if(NTConfig_Waypoints)
- {
- NTM_MakeTP();
- Say("Arcane Sanctuary up!");
- while(!NTC_IsQuesterIn())
- NTC_TPGuard(20);
- }
- NTP_DoPrecast(true);
- var _unit = GetPresetUnits(me.areaid, 2);
- for(i=0;i < _unit.length; i++)
- {
- if(_unit[i].id == 357)
- {
- var _journalx = _unit[i].roomx*5+_unit[i].x;
- var _journaly = _unit[i].roomy*5+_unit[i].y;
- }
- }
- if(_journalx < 25300)
- NTM_MoveTo(me.areaid, _journalx+55, _journaly);
- if(_journaly < 5300)
- NTM_MoveTo(me.areaid, _journalx+15, _journaly+55);
- if(_journalx > 25500)
- NTM_MoveTo(me.areaid, _journalx-40, _journaly+15);
- if(_journaly > 5500)
- NTM_MoveTo(me.areaid, _journalx+15, _journaly-40);
- for(i=0; i<5; i++)
- if(me.diff <= 1){
- NTA_ClearPosition(20);
- }
- if(me.diff <= 1){
- if(NTConfig_MessagingSystem)
- for(i = 10; i < 12; i++)
- if(RushMessage[i])
- {
- Say(RushMessage[i]);
- NTC_PingDelay(200);
- }
- }
- if(me.diff == 2){
- Say("TP up for Summoner!");
- Say("I dont clear TP, so just come in and die and respawn when i say so");
- }
- NTM_MakeTP();
- while(!NTC_IsQuesterIn())
- var _Journal
- _Journal = NTC_FindUnit(NTC_UNIT_OBJECT, 357);
- NTM_MoveTo(me.areaid, _Journal)
- if(!NTA_KillMonster(250))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
- return;
- }
- if(!NTM_MoveToPresetUnit(me.areaid, 2, 357, +10, +10))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
- return;
- }
- if(me.diff == 0){
- NTA_ClearPosition(50);
- }
- if(NTConfig_MessagingSystem)
- for(i = 12; i < 14; i++)
- if(RushMessage[i])
- {
- Say(RushMessage[i]);
- NTC_PingDelay(200);
- }
- if(me.diff == 2){
- Say("You can now revive yourself");
- }
- if (_Journal) {
- NTC_OpenChest(_Journal);
- me.Cancel(0);
- NTC_Delay(100);
- me.Cancel(0);
- }
- while(!NTM_UsePortal("Portal", 46))
- {
- if(me.diff == 0){
- NTA_ClearPosition(40);
- }
- NTM_MoveTo(me.areaid, _journalx, _journaly);
- NTC_Delay(500);
- }
- if(!NTM_MoveTo(me.areaid, me.x-17, me.y-21))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
- return;
- }
- if(!NTM_TakeWaypoint(40))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
- return;
- }
- }
- NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
- }
- function NTT_CheckPotionSafe() {
- var i, items, hpCheck, mpCheck;
- items = me.GetItems();
- if (NTConfig_BeltColType.indexOf("hp") > -1) {
- for (i = 0; i < items.length; i += 1) {
- if (!hpCheck && items[i].mode === 2 && items[i].code.indexOf("hp") > -1) {
- hpCheck = true;
- }
- }
- } else {
- hpCheck = true;
- }
- if (NTConfig_BeltColType.indexOf("mp") > -1) {
- for (i = 0; i < items.length; i += 1) {
- if (!mpCheck && items[i].mode === 2 && items[i].code.indexOf("mp") > -1) {
- mpCheck = true;
- }
- }
- } else {
- mpCheck = true;
- }
- return !(hpCheck && mpCheck);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement