Advertisement
shottah

RBOT | Gathering Unstable Essences (Legend)

Jan 8th, 2019
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.67 KB | None | 0 0
  1. using RBot;
  2. /**
  3.     Gathering Unstable Essences (Legend) by imbasu
  4.     Request by Csicskafaszgeci
  5.    
  6.     Requirements:
  7.      - Evil Rank 10
  8.  
  9.     Rewards:
  10.  
  11.      - 10,000 Gold
  12.      - 10,000 Exp
  13.      
  14.      You will receive one of the following items:
  15.    
  16.      - Void Aura
  17.      - Void Aura x2
  18.      - Void Aura x5
  19.      - Void Aura x10
  20. */
  21. public class Script {
  22.    
  23.     // ----- DECLARE AND INITIALIZE GLOBAL QUEST DATA ----- //
  24.     public static readonly string [] materials = {"Mirror Essence", "Twisted Essence", "Transposed Essence"};
  25.    
  26.     public static readonly string [] ENEMIES = {
  27.         "Fire Leech|Grim Widow|RedDeath Moglin|Swamp Wraith",
  28.         "Angry Snackistopheles|Furious Fishizzle|Raging Spid-Squider",
  29.         "Zombie King Alteon"
  30.     };
  31.    
  32.     public static readonly string [] LOCATIONS = {"reddeath", "neverworldb", "doomwar"};
  33.    
  34.     public static readonly int QUESTID = 4438;
  35.    
  36.     public static readonly string [] COMPONENTS = {"Mirror Essence", "Twisted Essence", "Transposed Essence"};
  37.    
  38.     public static readonly int [] QUANTITIES = {175, 25, 1};
  39.    
  40.     public static readonly string REWARD = "Void Aura";
  41.    
  42.     public static readonly int REWARD_MAX = 7500;
  43.     // --------------------------------------------------- //
  44.    
  45.     public void ScriptMain(ScriptInterface bot){
  46.    
  47.         bot.Skills.StartTimer();
  48.        
  49.         bot.Options.SafeTimings = true;
  50.         bot.Options.RestPackets = true;
  51.         bot.Options.DisableFX = true;
  52.         bot.Options.InfiniteRange = true;
  53.         bot.Options.PrivateRooms = true;
  54.         bot.Options.LagKiller = false;
  55.         bot.Options.Magnetise = true;
  56.         bot.Options.HuntDelay = 1650;
  57.        
  58.         bot.Drops.Add(Script.REWARD);
  59.         bot.Drops.Start();
  60.        
  61.         bot.Player.LoadBank();
  62.         // Pull Components from Bank
  63.         foreach (string s in Script.COMPONENTS) {
  64.             if (!bot.Inventory.Contains(s))
  65.                 bot.Bank.ToInventory(s);
  66.         }
  67.        
  68.         // Pull Reward from Bank
  69.         if (!bot.Inventory.Contains(Script.REWARD) && bot.Bank.Contains(Script.REWARD))
  70.             bot.Bank.ToInventory(Script.REWARD);
  71.            
  72.         // Do quest until max number of reward item is achieved.
  73.         while (!bot.Inventory.Contains(Script.REWARD, Script.REWARD_MAX)) {
  74.             bot.Quests.EnsureAccept(Script.QUESTID);
  75.             for (int i = 0; i < Script.COMPONENTS.Length; i++) {
  76.                 execute(bot, Script.LOCATIONS[i], Script.ENEMIES[i], Script.COMPONENTS[i], 1);
  77.             }
  78.             bot.Quests.EnsureComplete(Script.QUESTID);
  79.             bot.Sleep(1000);
  80.         }
  81.        
  82.         bot.Drops.Stop();
  83.     }
  84.    
  85.     public void execute (ScriptInterface bot, string location, string enemies, string item, int quantity) {
  86.         if (bot.Map.Name != location) bot.Player.Join(location, "Enter", "Spawn");
  87.         bot.Sleep(2000);
  88.         while (bot.Inventory.GetQuantity(item) < quantity) {
  89.             bot.Player.Hunt(enemies);
  90.             if (bot.Player.DropExists(item)) bot.Player.Pickup(item);
  91.         }
  92.     }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement