Advertisement
Guest User

Summoner

a guest
Nov 22nd, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function NTMain()
  2. {
  3.     Include("libs/common/NTCommon.ntl");
  4.     NTC_IncludeLibs();
  5.     NTC_IncludeConfig("NTBot/char_configs");
  6.    
  7.     NT_LoadConfig();
  8.     NTSI_LoadNIPFiles("NTBot/item_configs");
  9.  
  10.     NTA_Initialize();
  11.  
  12.     if(NTConfig_Rushing)
  13.     {
  14.         if(!NTTM_CheckAct())
  15.         {
  16.             NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
  17.             return;
  18.         }
  19.  
  20.         NTTMGR_TownManager();
  21.        
  22.         if(!NTTM_TownMove("waypoint"))
  23.         {
  24.             NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
  25.             return;
  26.         }
  27.  
  28.         if(!NTM_TakeWaypoint(74))
  29.         {
  30.             NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  31.             return;
  32.         }
  33.         if(NTConfig_Waypoints)
  34.         {
  35.             NTM_MakeTP();
  36.             Say("Arcane Sanctuary up!");
  37.             while(!NTC_IsQuesterIn())
  38.                 NTC_TPGuard(20);               
  39.         }  
  40.         NTP_DoPrecast(true);
  41.        
  42.         var _unit = GetPresetUnits(me.areaid, 2);
  43.        
  44.         for(i=0;i < _unit.length; i++)
  45.         {
  46.             if(_unit[i].id == 357)
  47.             {
  48.                 var _journalx = _unit[i].roomx*5+_unit[i].x;
  49.                 var _journaly = _unit[i].roomy*5+_unit[i].y;
  50.             }
  51.         }
  52.  
  53.         if(_journalx < 25300)
  54.             NTM_MoveTo(me.areaid, _journalx+55, _journaly);
  55.         if(_journaly < 5300)
  56.             NTM_MoveTo(me.areaid, _journalx+15, _journaly+55);
  57.         if(_journalx > 25500)
  58.             NTM_MoveTo(me.areaid, _journalx-40, _journaly+15);
  59.         if(_journaly > 5500)
  60.             NTM_MoveTo(me.areaid, _journalx+15, _journaly-40);
  61.        
  62.         for(i=0; i<5; i++)
  63.             if(me.diff <= 1){
  64.                 NTA_ClearPosition(20);
  65.             }
  66.            
  67.         if(me.diff <= 1){
  68.             if(NTConfig_MessagingSystem)
  69.                 for(i = 10; i < 12; i++)
  70.                     if(RushMessage[i])
  71.                     {
  72.                         Say(RushMessage[i]);
  73.                         NTC_PingDelay(200);
  74.                     }
  75.         }
  76.         if(me.diff == 2){
  77.             Say("TP up for Summoner!");
  78.             Say("I dont clear TP, so just come in and die and respawn when i say so");
  79.         }
  80.  
  81.         NTM_MakeTP();
  82.         while(!NTC_IsQuesterIn())
  83.  
  84.         var _Journal
  85.         _Journal = NTC_FindUnit(NTC_UNIT_OBJECT, 357);
  86.        
  87.         NTM_MoveTo(me.areaid, _Journal)
  88.        
  89.         if(!NTA_KillMonster(250))
  90.         {
  91.             NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
  92.             return;
  93.         }
  94.        
  95.         if(!NTM_MoveToPresetUnit(me.areaid, 2, 357, +10, +10))
  96.         {
  97.             NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
  98.             return;
  99.         }
  100.        
  101.         if(me.diff == 0){
  102.             NTA_ClearPosition(50);
  103.         }
  104.        
  105.         if(NTConfig_MessagingSystem)
  106.             for(i = 12; i < 14; i++)
  107.                 if(RushMessage[i])
  108.                 {
  109.                     Say(RushMessage[i]);
  110.                     NTC_PingDelay(200);
  111.                 }
  112.         if(me.diff == 2){
  113.             Say("You can now revive yourself");
  114.         }
  115.        
  116.         if (_Journal) {
  117.             NTC_OpenChest(_Journal);
  118.             me.Cancel(0);
  119.             NTC_Delay(100);
  120.             me.Cancel(0);
  121.         }              
  122.         while(!NTM_UsePortal("Portal", 46))
  123.         {
  124.             if(me.diff == 0){
  125.                 NTA_ClearPosition(40);
  126.             }
  127.             NTM_MoveTo(me.areaid, _journalx, _journaly);
  128.             NTC_Delay(500);
  129.         }
  130.        
  131.         if(!NTM_MoveTo(me.areaid, me.x-17, me.y-21))
  132.         {
  133.             NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
  134.             return;
  135.         }
  136.        
  137.         if(!NTM_TakeWaypoint(40))
  138.         {
  139.             NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
  140.             return;
  141.         }
  142.     }
  143.    
  144.     NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");    
  145. }
  146.  
  147. function NTT_CheckPotionSafe() {
  148.     var i, items, hpCheck, mpCheck;
  149.     items = me.GetItems();
  150.     if (NTConfig_BeltColType.indexOf("hp") > -1) {
  151.         for (i = 0; i < items.length; i += 1) {
  152.             if (!hpCheck && items[i].mode === 2 && items[i].code.indexOf("hp") > -1) {
  153.                 hpCheck = true;
  154.             }
  155.         }
  156.     } else {
  157.         hpCheck = true;
  158.     }
  159.     if (NTConfig_BeltColType.indexOf("mp") > -1) {
  160.         for (i = 0; i < items.length; i += 1) {
  161.             if (!mpCheck && items[i].mode === 2 && items[i].code.indexOf("mp") > -1) {
  162.                 mpCheck = true;
  163.             }
  164.         }
  165.     } else {
  166.         mpCheck = true;
  167.     }
  168.     return !(hpCheck && mpCheck);
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement