Advertisement
kolton

Untitled

Nov 3rd, 2011
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Battle Orders Support by kolton for d2bs with ntbot
  2. // uses catacombs waypoint
  3.  
  4. function NT_BattleOrders() {
  5.     var i,
  6.         leader = "kolx-d", // leader's exact ingame name. can be set to NT_Leader (without quotes) if you want to use character config specific settings
  7.         partyWait = 10, // wait for party in seconds for barbarian
  8.         boWait = 30; // wait for battle orders in seconds for sorceress
  9.    
  10.     if (!NTConfig_PublicMode) {
  11.         me.overhead("Can't party without public mode.");
  12.         throw new Error("Can't party without public mode.");
  13.     }
  14.    
  15.     switch (me.classid) {
  16.     case 1: // sorceress
  17.         print("ΓΏc3Battle Orders Support - Sorceress");
  18.        
  19.         if (!NTTM_CheckAct(1)) {
  20.             throw new Error("Faled to go to act 1.")
  21.         }
  22.        
  23.         NTTMGR_TownManager();
  24.         NTTM_TownMove("waypoint");
  25.        
  26.         if (!NTM_UsePortal("Waypoint", 35)) {
  27.             throw new Error("Take WP failed.");
  28.         }
  29.        
  30.         NTM_MoveTo(me.x + 5, me.y);
  31.         NTM_MakeTP();
  32.        
  33.         for (i = 0; i < 2 * boWait; i += 1) {
  34.             if (i % 10 === 0) {
  35.                 say("bo");
  36.             }
  37.            
  38.             if (me.getState(32)) {
  39.                 me.overhead("Got BO!");
  40.                 break;
  41.             }
  42.            
  43.             NTC_Delay(500);
  44.         }
  45.        
  46.         NTTM_CheckAct();
  47.         break;
  48.     case 4: // barbarian
  49.         print("ΓΏc3Battle Orders Support - Barbarian");
  50.         addEventListener("chatmsg",
  51.             function (nick, msg) {
  52.                 if (nick === leader && msg === "bo" && me.area === 1) {
  53.                     NTM_UsePortal("BluePortal", 35, leader);
  54.                     NTC_Delay(500);
  55.                     NTM_MoveTo(me.x + 5, me.y);
  56.                    
  57.                     for (i = 0; i < 5; i += 1) {
  58.                         NTP_DoPrecast();
  59.                        
  60.                         if (me.getState(32)) {
  61.                             NTM_UsePortal("Waypoint", 1);
  62.                             break;
  63.                         }
  64.                        
  65.                         NTC_Delay(500);
  66.                     }
  67.                 }
  68.             }
  69.         );
  70.        
  71.         if (!NTTM_CheckAct(1)) {
  72.             throw new Error("Faled to go to act 1.")
  73.         }
  74.        
  75.         NTTM_TownMove("portalspot");
  76.        
  77.         for (i = 0; i < 2 * partyWait; i += 1) {
  78.             if (NTC_InMyParty(leader)) {
  79.                 break;
  80.             }
  81.            
  82.             NTC_Delay(500);
  83.         }
  84.        
  85.         while (NTC_InMyParty(leader)) {
  86.             NTC_Delay(500);
  87.         }
  88.        
  89.         break;
  90.     }
  91.    
  92.     return true;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement