Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using RBot;
- using System.Collections.Generic;
- public class Script {
- // Research Material 5740 (20)
- // Suffering is Magic 5741 (50)
- private readonly int Q1 = 5740;
- private readonly int Q2 = 5741;
- private readonly int AMOUNT = 1000;
- public void ScriptMain(ScriptInterface bot){
- bot.Options.SafeTimings = true;
- bot.Options.RestPackets = true;
- bot.Options.PrivateRooms = true;
- bot.Options.SkipCutsenes = true;
- bot.Options.Magnetise = true;
- bot.Options.ExitCombatBeforeQuest = true;
- string cell = "";
- List<Monster> cell_enemies = null;
- Dictionary<string, List<Monster>> enemies = null;
- bot.Skills.StartTimer();
- bot.Player.LoadBank();
- bot.Bank.ToInventory("Paragon Dreadnaught Pet");
- if (bot.Inventory.Contains("Paragon Dreadnaught Pet")) {
- while (bot.Inventory.GetQuantity("Legion Token") < AMOUNT) {
- if (!bot.Quests.IsInProgress(Q1)) bot.Quests.EnsureAccept(Q1);
- if (!bot.Quests.IsInProgress(Q2)) bot.Quests.EnsureAccept(Q2);
- if (bot.Map.Name != "laken") bot.Player.Join("laken");
- for (int i = 3; i <= 5; i++) {
- cell = "r"+ i;
- if (bot.Player.Alive) bot.Player.Jump(cell, "Left");
- bot.Log("Jumping to Room: " + cell);
- enemies= bot.Monsters.GetCellMonsters();
- cell_enemies = enemies[cell];
- foreach(Monster enemy in cell_enemies) {
- bot.Log("Targetting " + enemy.Name + "in Room: " + cell);
- if (!bot.Quests.CanComplete(Q1) && !bot.Quests.CanComplete(Q2))
- bot.Player.Kill(enemy.Name);
- }
- }
- bot.Log("Attempting to turn in one of the quests...");
- if (bot.Quests.CanComplete(Q1)) bot.Quests.EnsureComplete(Q1);
- if (bot.Quests.CanComplete(Q2)) bot.Quests.EnsureComplete(Q2);
- bot.Wait.ForDrop("Legion Token");
- if (bot.Player.DropExists("Legion Token")) {
- bot.Log("Quest successful.");
- bot.Player.Pickup("Legion Token");
- }
- }
- bot.Player.Join("yulgar");
- bot.Log("Script completed, obtained Legion Token x " + AMOUNT);
- }
- bot.Player.Join("yulgar");
- bot.Log("Script Terminated.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment