Advertisement
shottah

RBOT | Arcangrove Rep Bot (Optimal)

Jun 12th, 2018
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.84 KB | None | 0 0
  1. using RBot;
  2.  
  3. public class Script {
  4.  
  5.     public readonly int [] quests = {794, 795, 797, 799, 800, 801, 802, 803, 804};
  6.    
  7.     public readonly string [] drops = {"Elders' Blood", "Sparrow's Blood", "Viper's Blood"};
  8.    
  9.    
  10.     public void ScriptMain(ScriptInterface bot){
  11.         for (int i = 1; i < 5; i++) {
  12.             bot.Skills.Add(i, 1f);
  13.         }
  14.         bot.Skills.StartTimer();
  15.        
  16.         bot.Options.InfiniteRange = true;
  17.         bot.Options.RestPackets = true;
  18.         bot.Options.SafeTimings = true;
  19.         bot.Options.ExitCombatBeforeQuest = true;
  20.         bot.Options.PrivateRooms = true;
  21.        
  22.         // Arcangrove Rep Bot
  23.        
  24.         if (bot.Map.Name != "arcangrove")
  25.             bot.Player.Join("arcangrove", "Enter", "Spawn");
  26.        
  27.         while (!bot.ShouldExit()) {
  28.             // Ensure that you've accepted each quest by id
  29.             foreach (int i in quests) {
  30.                 if (!bot.Quests.IsInProgress(i) && !bot.Quests.IsDailyComplete(i)) bot.Quests.EnsureAccept(i);
  31.             }
  32.             // Proceed to do each quest
  33.             foreach (int i in quests) {
  34.                 if (!bot.Quests.CanComplete(i) && !bot.Quests.IsDailyComplete(i)) {
  35.                     Grind(bot, i);              // Returns the id of the quest to turn in
  36.                     bot.Quests.EnsureComplete(i);       // Turn in the quest by id
  37.                 }
  38.             }
  39.         }
  40.        
  41.     }
  42.    
  43.     public void Grind (ScriptInterface bot, int id) {
  44.         // Do a prelimiary check, you may have another quest finished already
  45.         foreach (int i in quests) {
  46.             while (bot.Quests.CanComplete(i) && !bot.Quests.IsDailyComplete(i)) {
  47.                 bot.Quests.EnsureComplete(i);
  48.                 bot.Quests.EnsureAccept(i);
  49.             }
  50.         }
  51.        
  52.         if (!bot.Quests.IsInProgress(id) && !bot.Quests.IsDailyComplete(id)) bot.Quests.EnsureAccept(id);
  53.        
  54.         bot.Player.SetSpawnPoint();
  55.        
  56.         while (!bot.Quests.CanComplete(id)) {
  57.             if (id == 794 || id == 797 || id == 800 || id == 803)
  58.                 bot.Player.Hunt("Seed Spitter");
  59.             else
  60.                 bot.Player.Hunt("Gorillaphant");
  61.             bot.Player.RejectExcept(drops);
  62.         }
  63.     }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement