shottah

RBOT | Paragon Dreadnaught Full (20) (50)

Feb 1st, 2019
1,515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.11 KB | None | 0 0
  1. using RBot;
  2. using System.Collections.Generic;
  3.  
  4. public class Script {
  5.    
  6.     // Research Material 5740 (20)
  7.     // Suffering is Magic 5741 (50)
  8.     private readonly int Q1 = 5740;
  9.     private readonly int Q2 = 5741;
  10.     private readonly int AMOUNT = 1000;
  11.  
  12.     public void ScriptMain(ScriptInterface bot){
  13.         bot.Options.SafeTimings = true;
  14.         bot.Options.RestPackets = true;
  15.         bot.Options.PrivateRooms = true;
  16.         bot.Options.SkipCutsenes = true;
  17.         bot.Options.Magnetise = true;
  18.         bot.Options.ExitCombatBeforeQuest = true;
  19.        
  20.         string cell = "";
  21.         List<Monster> cell_enemies = null;
  22.         Dictionary<string, List<Monster>> enemies = null;
  23.        
  24.         bot.Skills.StartTimer();
  25.         bot.Player.LoadBank();
  26.         bot.Bank.ToInventory("Paragon Dreadnaught Pet");
  27.        
  28.         if (bot.Inventory.Contains("Paragon Dreadnaught Pet")) {
  29.             while (bot.Inventory.GetQuantity("Legion Token") < AMOUNT) {
  30.            
  31.                 if (!bot.Quests.IsInProgress(Q1)) bot.Quests.EnsureAccept(Q1);
  32.                 if (!bot.Quests.IsInProgress(Q2)) bot.Quests.EnsureAccept(Q2);
  33.  
  34.                 if (bot.Map.Name != "laken") bot.Player.Join("laken");
  35.                
  36.                 for (int i = 3; i <= 5; i++) {
  37.                     cell = "r"+ i;
  38.                     if (bot.Player.Alive) bot.Player.Jump(cell, "Left");
  39.                    
  40.                     bot.Log("Jumping to Room: " + cell);
  41.                    
  42.                     enemies= bot.Monsters.GetCellMonsters();
  43.                     cell_enemies = enemies[cell];
  44.                    
  45.                     foreach(Monster enemy in cell_enemies) {
  46.                    
  47.                         bot.Log("Targetting " + enemy.Name + "in Room: " + cell);
  48.                        
  49.                         if (!bot.Quests.CanComplete(Q1) && !bot.Quests.CanComplete(Q2))
  50.                             bot.Player.Kill(enemy.Name);
  51.                     }
  52.                 }
  53.                 bot.Log("Attempting to turn in one of the quests...");
  54.                 if (bot.Quests.CanComplete(Q1)) bot.Quests.EnsureComplete(Q1);
  55.                 if (bot.Quests.CanComplete(Q2)) bot.Quests.EnsureComplete(Q2);
  56.                
  57.                 bot.Wait.ForDrop("Legion Token");
  58.                
  59.                 if (bot.Player.DropExists("Legion Token")) {
  60.                     bot.Log("Quest successful.");
  61.                     bot.Player.Pickup("Legion Token");
  62.                 }
  63.             }
  64.             bot.Player.Join("yulgar");
  65.             bot.Log("Script completed, obtained Legion Token x " + AMOUNT);
  66.         }
  67.         bot.Player.Join("yulgar");
  68.         bot.Log("Script Terminated.");
  69.        
  70.     }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment