Page 72 of 117 FirstFirst ... 2262707172737482 ... LastLast
Results 1,776 to 1,800 of 2916

Thread: [AeroLib] HoodzFighter

  1. #1776
    Join Date
    Jan 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    it says its successfully paired and all, but it doesn't do anything when i run it.


    ARNING: Please fill in your nickname. with player: sango 971
    --
    WARNING: Your nickname isn' found in the players name with player: sango 971

    For more information, visit http://www.villavu.com/forum/showthread.php?t=5410
    SRL Compiled in 93 msec
    Attempting to pair to a smart client..
    Found 1 free client(s), attempting to pair to one...
    Set SMART[6460] as Simba's target
    Succesfully paired to a existing client, SMART[6460]

    please help

  2. #1777
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by nicky101 View Post
    it says its successfully paired and all, but it doesn't do anything when i run it.


    ARNING: Please fill in your nickname. with player: sango 971
    --
    WARNING: Your nickname isn' found in the players name with player: sango 971

    For more information, visit http://www.villavu.com/forum/showthread.php?t=5410
    SRL Compiled in 93 msec
    Attempting to pair to a smart client..
    Found 1 free client(s), attempting to pair to one...
    Set SMART[6460] as Simba's target
    Succesfully paired to a existing client, SMART[6460]

    please help
    set your script interpreter on pascalscript.
    script > interpreter > pascalscript

  3. #1778
    Join Date
    Feb 2014
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Great work hoodz, I'm trying to add prayer support today to the reflection beta for those pesky black demon and metal dragon tasks. Mind if I share?

    EDIT: also what randoms are now supported F_Antirandoms?
    Last edited by DangerDan; 05-07-2014 at 01:39 PM.

  4. #1779
    Join Date
    Jan 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    set your script interpreter on pascalscript.
    script > interpreter > pascalscript
    it was on pascals :L still says successfully paired and running like any normal script but on the client it doesnt do anything

  5. #1780
    Join Date
    Feb 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Work at Yaks?

  6. #1781
    Join Date
    Oct 2006
    Posts
    491
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default

    Can someone show me the an example of the correct format for multiple items in the loot setup? For example,

    procedure Loot_Setup;
    begin
    LootNameArray := ('Feather', 'Coins');
    LootArray := (314, 617);
    end;

  7. #1782
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by ry0240 View Post
    Can someone show me the an example of the correct format for multiple items in the loot setup? For example,

    procedure Loot_Setup;
    begin
    LootNameArray := ('Feather', 'Coins');
    LootArray := (314, 617);
    end;
    not sure if looting is bugged for multipe items (solar told me so..)
    correct format should be:

    Simba Code:
    procedure Loot_Setup;
    begin
      LootNameArray := (['Feather', 'Coins']);
      LootArray := ([314, 617]);
    end;

  8. #1783
    Join Date
    Apr 2014
    Posts
    323
    Mentioned
    0 Post(s)
    Quoted
    131 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    not sure if looting is bugged for multipe items (solar told me so..)
    correct format should be:

    Simba Code:
    procedure Loot_Setup;
    begin
      LootNameArray := (['Feather', 'Coins']);
      LootArray := ([314, 617]);
    end;
    how do you know what numbers to put into lootarray?


    Edit:

    I have noticed odd behavior with the reflection bot.
    It will right click somewhere near an npc then slowly trail off to the left. Sometimes it will only do this once, sometimes multiple times in a row.
    I have noticed no pattern.
    Last edited by hakishakataki; 05-08-2014 at 01:07 PM.

  9. #1784
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by hakishakataki View Post
    how do you know what numbers to put into lootarray?


    Edit:

    I have noticed odd behavior with the reflection bot.
    It will right click somewhere near an npc then slowly trail off to the left. Sometimes it will only do this once, sometimes multiple times in a row.
    I have noticed no pattern.
    Large npcs (more than 1 tile size, it should work but it has more trouble finding the npcs) first post
    But i appreciate your help

  10. #1785
    Join Date
    Apr 2014
    Posts
    323
    Mentioned
    0 Post(s)
    Quoted
    131 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    Large npcs (more than 1 tile size, it should work but it has more trouble finding the npcs) first post
    But i appreciate your help
    So that's why yaks are a bitch.

    I am sincerely dedicated to helping make this or a new script work completely with yaks. However, I have no idea where to begin.

  11. #1786
    Join Date
    May 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Hey guys,

    i need help with setting the script up. I dont really know what to change if i want to attack chickens.
    In discription i saw something like NPCNAME but i cant find it.

    Here my code:
    FOODNAME = '';
    SUPER = false;
    ATTACKPOT = false;
    STRENGTHPOT = false;
    MONSTERCOLOR1 = 3093829; {yaks}
    HUE1 = 0.21;
    SAT1 = 0.69;
    TOL1 = 16;
    MONSTERCOLOR2 = 7570816;
    HUE2 = 1.10;
    SAT2 = 0.39;
    TOL2 = 8;
    TRAININGMODE = 2;
    ANTIBANTRAININGMODE = skill_strength;
    WORLD = 2;
    RIGHTCLICKONLY = false;
    ADDWAIT = 0;
    ORION = false;

    thanks for help

  12. #1787
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by hans12344 View Post
    Hey guys,

    i need help with setting the script up. I dont really know what to change if i want to attack chickens.
    In discription i saw something like NPCNAME but i cant find it.

    Here my code:
    FOODNAME = '';
    SUPER = false;
    ATTACKPOT = false;
    STRENGTHPOT = false;
    MONSTERCOLOR1 = 3093829; {yaks}
    HUE1 = 0.21;
    SAT1 = 0.69;
    TOL1 = 16;
    MONSTERCOLOR2 = 7570816;
    HUE2 = 1.10;
    SAT2 = 0.39;
    TOL2 = 8;
    TRAININGMODE = 2;
    ANTIBANTRAININGMODE = skill_strength;
    WORLD = 2;
    RIGHTCLICKONLY = false;
    ADDWAIT = 0;
    ORION = false;

    thanks for help
    download the other version

  13. #1788
    Join Date
    Jan 2014
    Posts
    147
    Mentioned
    7 Post(s)
    Quoted
    75 Post(s)

    Default

    I'm assuming it wont work when reflection hooks are outdated? :P

  14. #1789
    Join Date
    Nov 2013
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by uhit View Post
    I'm assuming it wont work when reflection hooks are outdated? :P
    Pretty sure this script still doesn't work atm, the reflection hooks have been updated but some of the 'R_' commands still do not work

  15. #1790
    Join Date
    May 2014
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    yea got the problem ...

  16. #1791
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by S_rose94 View Post
    Pretty sure this script still doesn't work atm, the reflection hooks have been updated but some of the 'R_' commands still do not work
    Quote Originally Posted by hans12344 View Post
    yea got the problem ...
    i believe meerkat updated the hooks again, try again please

  17. #1792
    Join Date
    Jan 2014
    Posts
    147
    Mentioned
    7 Post(s)
    Quoted
    75 Post(s)

    Default

    Works lovely now

  18. #1793
    Join Date
    Apr 2014
    Posts
    46
    Mentioned
    1 Post(s)
    Quoted
    27 Post(s)

    Default

    http://puu.sh/8GoMQ.png

    i keep getting this error. i have the interpreter set as pascalscript and i've installed pretty much everything correctly? it doesen't seem to be a font problem

  19. #1794
    Join Date
    Feb 2014
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Thumbs up

    I've added in crude prayer support and right click functionality based on work from other scripts I've seen by you, hopefully this helps you hoodz. I haven't really tested them that much but it appears to work. Note I've noticed prayer is buggy because the getPrayerPercent function is not nearly as accurate as getHealthPercent. May look into trying to work on that some other time as well as making a procedure to toggle quickprayers if some one hasn't already.

    Simba Code:
    program HoodzFighter;
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.Simba}
    {$I SRL-OSR/SRL/misc/SmartGraphics.simba}
    {$I SRL-OSR/SRL/misc/Al_functions.simba}
    {$i SRL-OSR/SRL/Reflection/Reflection.simba}
    {$I F_AntiRandoms.simba}

    var
      x, y, Hp, PRAYER, AddCount, FoodDTM, TabDTM, BoneDTM, StartXp, StartXpHp, GainedHPStart, GainedCBStart, LastNPC, LootCount, RunE: Integer;
      StrengthPot1, StrengthPot2, StrengthPot3, StrengthPot4, SuperStrengthPot1, SuperStrengthPot2, SuperStrengthPot3, SuperStrengthPot4: integer;
      Attackpot1, AttackPot2, AttackPot3, AttackPot4, SuperAttackpot1, SuperAttackpot2, SuperAttackpot3, SuperAttackpot4: integer;
      Pray1, Pray2, Pray3, Pray4: Integer;
      LootArray, Pray: TIntegerArray;
      LootNameArray: array of string;
      UsePots: Boolean;
      PlayerLoc: TBox;
      CP, CCP: TPoint;

    const
      USERNAME = '';
      PASSWORD = '';
      FOODNAME = 'lobster';
      NPCNAME = 'Iron dragon'; {exact spelling with capital}
      Location = 'sos1';    {built in locations (see thread)}
      TRAININGMODE = 2;
      ANTIBANTRAININGMODE = skill_strength; {skill_range, skill_strength, skill_magic, skill_attack, skill_defence}
      WORLD = 75;
      RIGHTCLICKONLY = true;  {testing}
      LOOT = true;            {looting? true/false, see line 38 and 39 for loot information!}
      CPDISTANCE = 16;        {amount of max tiles you want to search for loot and npcs (start tile is where you start the script)}
      HPPERCENTAGE = 50;      {hp percentage you want to eat}
      USEPRAY = true;         {prayer disabled/enabled, testing}
      PRAYPERCENTAGE = 50;    {prayer percentage you want to drink, testing}
      EATFORSPACE = true;     {eat for space (looting)}
      B2P = false;            {b2p disabled, will be added @beta 2 release}
      PICKUPARROWS = false;   {need to wait for gear functions (beta 2 release?)}

    procedure Loot_Setup;
    begin
      LootNameArray := ['Iron arrow'];
      LootArray := [884];
    end;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name := USERNAME;
        Pass := PASSWORD;
        Active := True;
      end;
    end;

    procedure Setup;
    begin
      BoneDTM := DTMFromString('m6wAAAHic42ZgYChlYWAoAuJqIM4A4hIgroDShUCcB8UFQFzLyMBQD8VVQNwExBVQXAPELUBcB+VvWraMoamykmHf1q1AWxjxYlYgCcOEAH6TUDESAADRUBBD');
      StrengthPot1 := DTMFromString('mlwAAAHicY2dgYOAAYmEgZmWAAH4g5oSKiwKxBBDzQNkCUDWyQLx1sy6QZMSKWaHmYcPYdUAwFAAA8p8CiA==');
      StrengthPot2 := DTMFromString('mlwAAAHicY2dgYGAFYgEg5gFiTiBmYoAADiAWBGIJIOaDirFB1coA8bKlmkCSEStmhZqLDWPXAcFQAADZCAJJ');
      StrengthPot3 := DTMFromString('mlwAAAHicY2dgYGAHYkYgFgRiPiDmYIAALiAWAmJpIJaEyoOAMBDLArHqtNlQnZiYFUjiwth1QDAUAADcfgJO');
      StrengthPot4 := DTMFromString('mlwAAAHicY2dgYHBmYmBwBGJrILZngvA9gdgLiNkZGRjEgZgbiP8A1f4CYh4gWwSIlyzWBPIYsWJWIIkLY9cBwVAAAHvkBc4=');
      SuperStrengthPot1 := DTMFromString('mggAAAHicY2NgYGADYh4gZmGAAH4gZgViQSBmhIrxArEAEEsC8folS6AyqJgNahY6xlSJMJeBAQDO8AKf');
      SuperStrengthpot2 := DTMFromString('mbQAAAHicY2VgYGAHYh4g5maAACYonwvKB8mLAPGhnTuBJCMKZgaSrGiYEQsGAwCvBAKr');
      SuperStrengthpot3 := DTMFromString('mggAAAHicY2NgYGABYj4g5gRiHiBmYoAAEFscyuaHyksC8fkzZ4AkIwZmBZLYMKZKCIYAAPROAxQ=');
      SuperStrengthpot4 := DTMFromString('mlwAAAHicY2fidgYGAHYkYgFgRiPiDmYIAALiAWAmJpIJaEyoOAMBDLArHqtNlQnZiYFUjiwth1QDAUAADcfgJO');
      AttackPot1 := DTMFromString('mlwAAAHicY2dgYOAAYh4gZgJiQQYI4IBiMSDmBWIZKFsIKi8LxLrrtwJJRqyYlQE3wK4DgqEAAOlZAmY=');
      AttackPot2 := DTMFromString('mlwAAAHicY2dgYGAHYkYgFgRiPiDmYIAALiAWAmJpIJaEyoOAMBDLArHqtNlQnZiYFUjiwth1QDAUAADcfgJO');
      AttackPot3 := DTMFromString('mggAAAHicY2NgYGAHYk4gZgNiRiDmY4AAfiCWhbIFgFgYiKWB2PDYGahKVMzFgB1gqoRgCAAAxSACbg==');
      AttackPot4 := DTMFromString('mlwAAAHicY2dgYOBggAAQzQPEQkDMBMScULYkVJ4biMWBWACIZYE45vwVIMmIFXMx4AbYdUAwFAAADP8C0Q==');
      SuperAttackPot1 := DTMFromString('mbQAAAHicY2VgYGABYjYg5mOAABBfFMoWgYrLArGOwRYgyYiCWYEkOmbEgsEAAG5MAag=');
      SuperAttackPot2 := DTMFromString('mbQAAAHicY2VgYOAEYg4g5meAABBfEMoG0SJALAvEwsIBQJIRBbMCSXTMiAWDAQBMhwEa');
      SuperAttackPot3 := DTMFromString('mbQAAAHicY2VgYGCFYn4GCGBHYosCsRAQywKxq8clIMmIglmR9MMwIxYMBgCC6gH6');
      SuperAttackPot4 := DTMFromString('mggAAAHicY2NgYLjJDMGPgfgOEF8B4ttAzM3IwCAExMJALA3E/ED8D6j+zu3bDDeuXQOyGFEwF5AEYXTAiANDAABVfgvK');
      TabDTM := DTMFromString('m1gAAAHic42JgYOAFYmkg5gJiESBmBWJ+BgSQhmKQOh4kvjRUXgKqlw2IRYE4KykJSDISxP8ZiAOETYJgBAAAz9MDgg==');
      Pray1 := DTMFromString('mWAAAAHicY2FgYLjLxMDwFIivAfF9INZgZGBQg2IDEN7eBVTFCMdsDKiAEQ2DAACFtgWq'); {1 dose}
      Pray2 := DTMFromString('mWAAAAHicY2FgYGBjYmDgAmJ+IGYAYg1GBgYTINaCYvnKGKAEIxxzMaACRjQMAgBrxQHl');
      Pray3 := DTMFromString('mWAAAAHicY2FgYGhlYmBoB+JGIO4DYg1GBgYzRgitB8QWl+YDVTHCMTsDKmBEwyAAACq5BJc=');
      Pray4 := DTMFromString('mWAAAAHicY2FgYIhmYmCIAuIUIA4FYjVGBgYzINYFYi0gTr26BqiKEY65GFABIxoGAQACtAQp'); {4 dose}
      Pray := [Pray1, Pray2, Pray3, Pray4];
      case LowerCase(FoodName) of
        'lobster':
          begin
            FoodDTM := DTMFromString('m6wAAAHic42ZgYHBhYmDwgmJPIHYEYhsgNodiOyB2BWIfIA5gZGCIAeIoIPYD4lAoDoPyfYDYC4idgHhHshjQdEaisAaQJBYTZyIEIwEA/ycJgA==');
          end;
        'salmon':
          begin
            FoodDTM := DTMFromString('mggAAAHicY2NgYOCGYhDgA2IJIBYGYi4gFgJifiBmhMqDxA44SkBFUDErAyZgxaoSYR4DAwCTLQG6');
          end;
        'trout':
          begin
            FoodDTM := DTMFromString('mggAAAHicY2NgYOAGYmEglgBiPgYIAIlxQTEIMAIxPxALAXF5UhxUBBWzAklWBkyAqRKCIQAAnDwB2A==');
          end;
        'shark':
          begin
            FOODDTM := DTMFromString('mlwAAAHicY2dgYOACYkYgZgViESCWYoAALiiWgfKZoXK8QCwMxDnBtlCdmJidATfArgOCoQAAsEwBww==');
          end;
        'monkfish':
          begin
            FOODDTM := DTMFromString('mggAAAHicY2NgYNjGzMCwGYhPAfE6IN4ExEeAmIuRgUEAiPmgNCsQMwFxSbI/w+ryEqBORhTMDiRBGB0w4sAQAADtDAeJ');
          end;
      end;
      Loot_Setup;
      AddOnTerminate('ClearTheDTM');
    end;

    procedure H_Mouse(TP: TPoint);
    begin
      case random(4) of
        0..2: AL_BrakeMMouse(TP, Random(2), Random(2), True);
        3: AL_BrakeMMouse(TP, Random(2), Random(2), False);
      end;
    end;

    procedure TheStatus(Status: string);
    var
      GainedXp, GainedXpHp, GainedXpHour, GainedXpHourHp, GainedHP, GainedCB: Integer;
    begin
      ClearDebug;
      GainedXp := Round((R_GetSkillExp(Skill_Attack) + R_GetSkillExp(Skill_Strength) + R_GetSkillExp(Skill_Defence) + R_GetSkillExp(Skill_Magic) + R_GetSkillExp(Skill_Range)) - StartXp);
      GainedXpHp := Round(R_GetSkillExp(Skill_Hitpoints) - StartXpHp);
      GainedXpHour := Round((GainedXp) / (GetTimeRunning / 3600000.0));
      GainedXpHourHp := Round((GainedXpHp) / (GetTimeRunning / 3600000.0));
      GainedHP := Round(R_GetMaxSkillLevel(Skill_Hitpoints) - GainedHPStart);
      GainedCB := Round((R_GetMaxSkillLevel(Skill_Attack) + R_GetMaxSkillLevel(Skill_Defence) + R_GetMaxSkillLevel(Skill_Strength) + R_GetMaxSkillLevel(Skill_Magic) + R_GetMaxSkillLevel(Skill_Range)) - GainedCBStart);
      Writeln('Cb xp: ' + IntToStr(GainedXp));
      Writeln('Cb xp/hour: ' + IntToStr(GainedXpHour));
      Writeln('Hp xp: ' + IntToStr(GainedXpHp));
      Writeln('Hp xp/hour: ' + IntToStr(GainedXpHourHp));
      Writeln('Status: ' + Status);
      Writeln('Hp: ' + IntToStr(GetHealthPercent) + '%');
      Writeln('Prayer: ' + IntToStr(GetPrayerPercent) + '%');
      Writeln('Hp random eat: ' + IntToStr(HP) + '%');
      Writeln('Prayer random pot: ' + IntToStr(PRAYER) + '%');
      Writeln('Gained levels: ' + '(HP: +' + IntToStr(GainedHP) + ' CB: +' + IntToStr(GainedCB) + ')');
      if (LOOT) then
        Writeln('Times looted: ' + IntToStr(LootCount));
      Writeln('Time running: ' + MsToTime(GetTimeRunning, 3));
    end;

    procedure AntiBan;
    begin
      case Random(10000) of
        0..1:
          begin
            Al_HoverSkill(ANTIBANTRAININGMODE, False);
            Sleep(800 + Random(500));
          end;
        2..3:
          begin
            Al_HoverSkill(Skill_Hitpoints, False);
            Sleep(800 + Random(500));
          end;
        4..10:
          begin
            MakeCompass(RandomRange(0, 360));
            Sleep(800 + Random(500));
          end;
        11..26:
          begin
            AL_HumanRandomMouse;
            Sleep(800 + Random(500));
          end;
        18:
          begin
            AdjustMouseSpeed(2, 10, 20);
            Sleep(800 + Random(500));
          end;
        19:
          begin
            RandomRClick;
            Sleep(800 + Random(500));
          end;
        20:
          begin
            HoverMovingObject;
            Sleep(800 + Random(500));
          end;
        21:
          begin
            MMouseOffClient('top');
            Sleep(800 + Random(500));
          end;
        22:
          begin
            MMouseOffClient('left');
            Sleep(800 + Random(500));
          end;
        23:
          begin
            MMouseOffClient('right');
            Sleep(800 + Random(500));
          end;
        24:
          begin
            MMouseOffClient('bottom');
            Sleep(800 + Random(500));
          end;
        25..26:
          begin
            if IsRunOn(False) then
            begin
              SetRun(True);
            end
          end;
        29..31:
          begin
            RandomTab(False);
            Sleep(1000 + Random(500));
            AL_GameTab(Tab_Inv);
          end;
      end;
      Exit;
    end;

    procedure GenerateRun;
    begin
      if (not LoggedIn) then
        Exit;
      RunE := RandomRange(7, 30);
      TheStatus('Run energy generated at (' + IntToStr(RunE) + '%)');
    end;

    procedure GenerateHP;
    begin
      if (not LoggedIn) then
        Exit;
      HP := RandomRange(HPPERCENTAGE - 7, HPPERCENTAGE + 7);
      TheStatus('HP generated at (' + IntToStr(HP) + '%)');
    end;

    procedure GeneratePrayer;
    begin
      if (not LoggedIn) then
        Exit;
      PRAYER := RandomRange(PRAYPERCENTAGE - 7, PRAYPERCENTAGE + 7);
      TheStatus('PRAY generated at (' + IntToStr(PRAYER) + '%)');
    end;

    procedure Setup_Player;
    begin
      LogInPlayer;
      SetAngle(0);
      SetRun(True);
      SetFightMode(TrainingMode);
      AL_GameTab(Tab_Inv);
      GenerateHp;
      GeneratePrayer;
      GenerateRun;
    end;

    procedure BankHandler;
    begin
      if (BankScreen) then
      begin
        TheStatus('banking');
        QuickDeposit('inv');
        if (FindDTM(FoodDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
        begin
          H_Mouse(Point(x, y));
          Sleep(20 + Random(70));
          AL_FastClick(Mouse_Right);
          Sleep(20 + Random(70));
          AL_WaitOption('All', 200);
          Sleep(360 + Random(200));
          CloseBank;
        end
        else
        begin
          TheStatus('No food found, terminating script :( ');
          CloseBank;
          TerminateScript;
        end;
      end;
    end;

    procedure InteractBank;
    var
      MSLoc: TPoint;
      BankTimer, I, Q: Integer;
      BankObj: TRSObjectArray;
      BankIDs: TIntegerArray;
    begin
      if (not LoggedIn) then
        Setup_Player;
      TheStatus('Opening bank');
      BankIDs := [2100];
      BankObj := R_GetObjectsDistance(0, 15);
      for I := 0 to High(BankObj) do
      begin
        if (BankScreen) then
          BankHandler;
        for Q := 0 to High(BankIDs) do
        begin
          if (BankObj[I].ID = BankIDs[Q]) then
          begin
            MSLoc := R_TileToMS(BankObj[I].Tile);
            if (not PointInBox(MSLoc, MSBox)) then
              R_BlindWalk(BankObj[I].Tile);
            MSLoc := R_TileToMS(BankObj[I].Tile);
            H_Mouse(MSLoc);
            Sleep(400 + Random(200));
            if (R_IsUpText('Bank')) or (R_IsUpText('Open')) then
            begin
              case Random(6) of
                0..4: AL_FastClick(Mouse_Left);
                5:
                  begin
                    AL_FastClick(Mouse_Right);
                    Sleep(120 + Random(25));
                    AL_WaitOptionMulti(['Bank', 'Open'], 250);
                  end;
              end;
              Sleep(250 + Random(150));
              Flag;
              MarkTime(BankTimer);
              repeat
                if (TimeFromMark(BankTimer) > 5000) then
                  InteractBank;
                Sleep(250 + Random(100));
              until (BankScreen);
            end
            else
              InteractBank;
            Sleep(3500 + Random(200));
            BankHandler;
            Exit;
          end;
        end;
      end;
    end;

    procedure InteractSOSDoor(Tile: TPoint; HeadingDirection: string);
    var
      MSLoc: TPoint;
      Answers: array of string;
      I: Integer;
    begin
      if (not LoggedIn) then
        Setup_Player;
      TheStatus('Interacting SOS door (Tile: ' + ToStr(Tile) + '   HeadingDirection: ' + HeadingDirection);
      Answers := ['Recover', 'Virus scan my computer then', 'Game', 'Only on the', 'couple', 'tell them anything', 'No', 'no', 'give him my', 'Memorable', 'To recover my account', 'famous', 'report abuse', 'Use the recover', 'Nowhere', 'Nobody', 'To help me recover my password', 'Talk to any'];
      MSLoc := R_TileToMS(Tile);
      if (not PointInBox(MSLoc, MSBox)) then
      begin
        R_BlindWalk(Tile);
        repeat
          sleep(300 + Random(100));
        until (not R_isWalking);
      end;
      MakeCompass(HeadingDirection);
      Sleep(1200 + Random(200));
      MSLoc := R_TileToMS(Tile);
      H_Mouse(MSLoc);
      Sleep(200 + Random(100));
      if (R_IsUpText('Open')) then
      begin
        AL_FastClick(Mouse_Right);
        if (not AL_WaitOption('Open', 500)) then
          InteractSOSDoor(Tile, HeadingDirection);
      end
      else
      begin
        AL_FastClick(Mouse_Right);
        Sleep(200 + Random(200));
        if (not AL_WaitOption('Open', 500)) then
          InteractSOSDoor(Tile, HeadingDirection);
      end;
      repeat
        Sleep(20 + Random(20));
      until (not R_isWalking);
      Sleep(3400 + Random(200));
      repeat
        ClickContinue(True);
        Sleep(850 + Random(200));
      until (not ClickToContinue);
      for I := 0 to High(Answers) do
      begin
        if (FindNPCChatText(Answers[I], ClickLeft)) then
        begin
          Sleep(1400 + Random(100));
          repeat
            ClickContinue(True);
            Sleep(850 + Random(200));
          until (not ClickToContinue);
          Sleep(1300 + Random(500));
        end;
      end;
    end;

    procedure InteractDoor(Tile: TPoint; ClosedDoorId: Integer);
    var
      MSLoc: TPoint;
      Door: TRSObject;
    begin
      if (not LoggedIn) then
        Setup_Player;
      TheStatus('Interacting with door');
      MSLoc := R_TileToMS(Tile);
      Door := R_GetObjectAt(3, Tile);
      if (Door.ID = ClosedDoorId) then
      begin
        if (not PointInBox(MSLoc, MSBox)) then
        begin
          R_BlindWalk(Tile);
          repeat
            sleep(200 + Random(100));
          until (not R_isWalking);
        end;
        MSLoc := R_TileToMS(Tile);
        H_Mouse(MSLoc);
        Sleep(200 + Random(100));
        if (R_isUpText('Open')) then
        begin
          AL_FastClick(Mouse_Right);
          if (not AL_WaitOption('Open', 500)) then
            InteractDoor(Tile, ClosedDoorId);
          Sleep(1000 + Random(300));
          repeat
            Sleep(200 + Random(300));
          until (not R_isWalking) and (not R_IsAnimating);
          Sleep(1200 + Random(2000));
          Exit;
        end
        else
        begin
          MakeCompass(Rs_GetCompassAngleDegrees + 90 + RandomRange( - 10, 10));
          InteractDoor(Tile, ClosedDoorId);
        end;
      end;
    end;

    procedure InteractObject(Tile: TPoint; UpText: string);
    var
      MSLoc: TPoint;
    begin
      if (not LoggedIn) then
        Setup_Player;
      TheStatus('Interacting with object');
      MSLoc := R_TileToMS(Tile);
      if (not PointInBox(MSLoc, MSBox)) then
      begin
        R_BlindWalk(Tile);
        repeat
          sleep(200 + Random(100));
        until (R_isWalking);
      end;
      MSLoc := R_TileToMS(Tile);
      H_Mouse(MSLoc);
      Sleep(200 + Random(100));
      if (R_isUpText(UpText)) then
      begin
        AL_FastClick(Mouse_Right);
        if (not AL_WaitOption(UpText, 500)) then
          InteractObject(Tile, UpText);
        Sleep(1000 + Random(300));
        repeat
          Sleep(200 + Random(300));
        until (not R_isWalking) and (not R_IsAnimating);
        Sleep(1200 + Random(2000));
      end
      else
      begin
        MakeCompass(Rs_GetCompassAngleDegrees + 90 + RandomRange( - 10, 10));
        InteractObject(Tile, UpText);
      end;
    end;

    procedure WalkLoc(TPA: TPointArray; Reverse: Boolean);
    begin
      if (not LoggedIn) then
        Setup_Player;
      TheStatus('Walking to destination');
      if (Reverse) then
        R_WalkPathEx(TPA, True, 0);
      if (not Reverse) then
        R_WalkPath(TPA);
      repeat
        Sleep(200 + Random(100));
      until (not R_IsWalking);
    end;

    procedure MonkHandler;
    var
      MSLoc: TPoint;
      Abbot: array of TNPC;
      I, UpTextTimer: Integer;
    begin
      repeat
        TheStatus('Healing at monk (Abbot Langley)');
        Abbot := R_GetNpcs('Abbot Langley');
        for I := 0 to High(Abbot) do
        begin
          MSLoc := R_TileToMS(Abbot[I].Tile);
          if (PointInBox(MSLoc, MSBox)) then
          begin
            H_Mouse(MSLoc);
            MarkTime(UpTextTimer);
            repeat
              Sleep(5 + Random(10));
            until (R_isUpText('Abbot Langley')) or (TimeFromMark(UpTextTimer) > 2000);
            if (R_isUpText('Abbot Langley')) then
            begin
              AL_FastClick(Mouse_Left);
              UpTextTimer := 0;
              Sleep(500 + Random(200));
              MarkTime(UpTextTimer);
              repeat
                Sleep(20 + Random(25));
              until (TimeFromMark(UpTextTimer) > 1500) or (FindNPCChatText('reet', Nothing));
              ClickContinueEx(True, True);
              FindNPCChatText('heal', ClickLeft);
              Sleep(RandomRange(500, 700));
              repeat
                ClickContinue(True);
                Sleep(350 + Random(200));
              until (not ClickToContinue);
            end;
          end
          else
          begin
            R_BlindWalk(Abbot[I].Tile);
            repeat
              Sleep(20 + Random(25));
            until (not R_isWalking);
          end;
        end;
      until (getHealthPercent = 100);
    end;

    procedure Restock;
    begin
      if (NPCNAME = 'Guard') and (LOCATION = 'varrock') then
      begin
        WalkLoc([Point(3273 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3268 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3263 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3258 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3254 + RandomRange( - 1, 1), 3425 + RandomRange( - 1, 1)), Point(3253 + RandomRange( - 1, 1), 3420 + RandomRange( - 1, 1))], false);
        InteractBank;
        WalkLoc([Point(3273 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3268 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3263 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3258 + RandomRange( - 1, 1), 3428 + RandomRange( - 1, 1)), Point(3254 + RandomRange( - 1, 1), 3425 + RandomRange( - 1, 1)), Point(3253 + RandomRange( - 1, 1), 3420 + RandomRange( - 1, 1))], true);
      end;
      if (NPCNAME = 'Dwarf') then
      begin
        R_BlindWalk(Point(3018 + RandomRange( - 1, 1), 9850 + RandomRange( - 1, 1)));
        InteractObject(Point(3019, 9850), 'Climb-up');
        WalkLoc([Point(3015 + RandomRange( - 1, 1), 3452 + RandomRange( - 1, 1)), Point(3019 + RandomRange( - 1, 1), 3456 + RandomRange( - 1, 1)), Point(3022 + RandomRange( - 1, 1), 3461 + RandomRange( - 1, 1)), Point(3026 + RandomRange( - 1, 1), 3465 + RandomRange( - 1, 1)), Point(3031 + RandomRange( - 1, 1), 3468 + RandomRange( - 1, 1)), Point(3036 + RandomRange( - 1, 1), 3470 + RandomRange( - 1, 1)), Point(3041 + RandomRange( - 1, 1), 3470 + RandomRange( - 1, 1)), Point(3046 + RandomRange( - 1, 1), 3470 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3471 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3476 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3481 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3486 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3491 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3496 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3501 + RandomRange( - 1, 1)), Point(3054 + RandomRange( - 1, 1), 3505 + RandomRange( - 1, 1)), Point(3052 + RandomRange( - 1, 1), 3510 + RandomRange( - 1, 1)), Point(3056 + RandomRange( - 1, 1), 3514 + RandomRange( - 1, 1)), Point(3060 + RandomRange( - 1, 1), 3518 + RandomRange( - 1, 1)), Point(3065 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3070 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3075 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3080 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3084 + RandomRange( - 1, 1), 3517 + RandomRange( - 1, 1)), Point(3085 + RandomRange( - 1, 1), 3512 + RandomRange( - 1, 1)), Point(3086 + RandomRange( - 1, 1), 3507 + RandomRange( - 1, 1)), Point(3089 + RandomRange( - 1, 1), 3502 + RandomRange( - 1, 1)), Point(3092 + RandomRange( - 1, 1), 3498 + RandomRange( - 1, 1)), Point(3093 + RandomRange( - 1, 1), 3493 + RandomRange( - 1, 1))], False);
        InteractBank;
        WalkLoc([Point(3015 + RandomRange( - 1, 1), 3452 + RandomRange( - 1, 1)), Point(3019 + RandomRange( - 1, 1), 3456 + RandomRange( - 1, 1)), Point(3022 + RandomRange( - 1, 1), 3461 + RandomRange( - 1, 1)), Point(3026 + RandomRange( - 1, 1), 3465 + RandomRange( - 1, 1)), Point(3031 + RandomRange( - 1, 1), 3468 + RandomRange( - 1, 1)), Point(3036 + RandomRange( - 1, 1), 3470 + RandomRange( - 1, 1)), Point(3041 + RandomRange( - 1, 1), 3470 + RandomRange( - 1, 1)), Point(3046 + RandomRange( - 1, 1), 3470 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3471 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3476 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3481 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3486 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3491 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3496 + RandomRange( - 1, 1)), Point(3051 + RandomRange( - 1, 1), 3501 + RandomRange( - 1, 1)), Point(3054 + RandomRange( - 1, 1), 3505 + RandomRange( - 1, 1)), Point(3052 + RandomRange( - 1, 1), 3510 + RandomRange( - 1, 1)), Point(3056 + RandomRange( - 1, 1), 3514 + RandomRange( - 1, 1)), Point(3060 + RandomRange( - 1, 1), 3518 + RandomRange( - 1, 1)), Point(3065 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3070 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3075 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3080 + RandomRange( - 1, 1), 3520 + RandomRange( - 1, 1)), Point(3084 + RandomRange( - 1, 1), 3517 + RandomRange( - 1, 1)), Point(3085 + RandomRange( - 1, 1), 3512 + RandomRange( - 1, 1)), Point(3086 + RandomRange( - 1, 1), 3507 + RandomRange( - 1, 1)), Point(3089 + RandomRange( - 1, 1), 3502 + RandomRange( - 1, 1)), Point(3092 + RandomRange( - 1, 1), 3498 + RandomRange( - 1, 1)), Point(3093 + RandomRange( - 1, 1), 3493 + RandomRange( - 1, 1))], True);
        InteractObject(Point(3019, 3450), 'Climb-down');
      end;
      if (NPCNAME = 'Monk') then
        MonkHandler;
      if (NPCNAME = 'Man') and (LOCATION = 'edgeville') then
      begin
        InteractDoor(Point(3101, 3509), 6821);
        R_BlindWalk(Point(3094 + RandomRange( - 1, 1), 3493 + RandomRange( - 1, 1)));
        InteractBank;
        R_BlindWalk(Point(3101 + RandomRange( - 1, 1), 3509 + RandomRange( - 1, 1)));
        InteractDoor(Point(3101, 3509), 6821);
        R_BlindWalk(Point(3096 + RandomRange( - 1, 1), 3510 + RandomRange( - 1, 1)));
      end;
      if (NPCNAME = 'Minotaur') and (LOCATION = 'sos1') then
      begin
        R_BlindWalk(Point(1879 + RandomRange( - 1, 1), 5222 + RandomRange( - 1, 1)));
        InteractSOSDoor(Point(1878 + Random(1), 5223), 'n');
        InteractSOSDoor(Point(1878 + Random(1), 5226), 'n');
        InteractObject(Point(1881, 5232), 'Climb-up');
        InteractObject(Point(1859, 5244), 'Climb-up');
        WalkLoc([Point(3085 + RandomRange( - 1, 1), 3425 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3429 + RandomRange( - 1, 1)), Point(3089 + RandomRange( - 1, 1), 3434 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3439 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3444 + RandomRange( - 1, 1)), Point(3090 + RandomRange( - 1, 1), 3449 + RandomRange( - 1, 1)), Point(3090 + RandomRange( - 1, 1), 3454 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3459 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3464 + RandomRange( - 1, 1)), Point(3093 + RandomRange( - 1, 1), 3464 + RandomRange( - 1, 1)), Point(3098 + RandomRange( - 1, 1), 3464 + RandomRange( - 1, 1)), Point(3099 + RandomRange( - 1, 1), 3469 + RandomRange( - 1, 1)), Point(3099 + RandomRange( - 1, 1), 3474 + RandomRange( - 1, 1)), Point(3099 + RandomRange( - 1, 1), 3479 + RandomRange( - 1, 1)), Point(3096 + RandomRange( - 1, 1), 3483 + RandomRange( - 1, 1)), Point(3092 + RandomRange( - 1, 1), 3486 + RandomRange( - 1, 1)), Point(3094 + RandomRange( - 1, 1), 3491 + RandomRange( - 1, 1))], False);
        InteractBank;
        WalkLoc([Point(3081 + RandomRange( - 1, 1), 3421 + RandomRange( - 1, 1)), Point(3085 + RandomRange( - 1, 1), 3425 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3429 + RandomRange( - 1, 1)), Point(3089 + RandomRange( - 1, 1), 3434 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3439 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3444 + RandomRange( - 1, 1)), Point(3090 + RandomRange( - 1, 1), 3449 + RandomRange( - 1, 1)), Point(3090 + RandomRange( - 1, 1), 3454 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3459 + RandomRange( - 1, 1)), Point(3088 + RandomRange( - 1, 1), 3464 + RandomRange( - 1, 1)), Point(3093 + RandomRange( - 1, 1), 3464 + RandomRange( - 1, 1)), Point(3098 + RandomRange( - 1, 1), 3464 + RandomRange( - 1, 1)), Point(3099 + RandomRange( - 1, 1), 3469 + RandomRange( - 1, 1)), Point(3099 + RandomRange( - 1, 1), 3474 + RandomRange( - 1, 1)), Point(3099 + RandomRange( - 1, 1), 3479 + RandomRange( - 1, 1)), Point(3096 + RandomRange( - 1, 1), 3483 + RandomRange( - 1, 1)), Point(3092 + RandomRange( - 1, 1), 3486 + RandomRange( - 1, 1)), Point(3094 + RandomRange( - 1, 1), 3491 + RandomRange( - 1, 1))], True);
        InteractObject(Point(3081, 3420), 'Climb-down');
        InteractSOSDoor(Point(1858 + Random(1), 5238), 's');
        InteractSOSDoor(Point(1858 + Random(1), 5235), 's');
        R_BlindWalk(Point(1865 + RandomRange( - 2, 2), 5218 + RandomRange( - 2, 2)));
        InteractSOSDoor(Point(1867, 5217 + Random(1)), 'e');
        InteractSOSDoor(Point(1870, 5217 + Random(1)), 'e');
      end;
    end;

    function IsInCombat: Boolean;
    var
      NpcHP, NpcAnimation: Integer;
    begin
      Sleep(100 + Random(100));
      NpcHP := R_InteractingNPC.Hitpoints;
      NpcAnimation := R_InteractingNPC.Animation;
      Result := (NpcHP > 0) or (NpcAnimation > 0);
      if (Result) then
        LastNPC := R_InteractingNPC.Index;
    end;

    procedure B2PHandler;
    begin
      if (InvFull) and (FindDTM(BoneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
      begin
      end;
    end;

    procedure Eating_Food;
    var
      Q, P: Integer;
    begin
      if (not LoggedIn) then
        Setup_Player;
      AL_GameTab(Tab_Inv);
      TheStatus('eating food');
      AL_GameTab(Tab_Inv);
      Wait(120 + Random(200));
      if (AL_GameTab(Tab_Inv)) then
      begin
        if (FindDtm(FoodDTM, Q, P, MIX1, MIY1, MIX2, MIY2)) then
        begin
          H_Mouse(Point(Q, P));
          Sleep(150 + Random(100));
          AL_FastClick(Mouse_Left);
          Sleep(3000 + Random(1000));
          GenerateHP;
        end
        else if (not B2P) then
          Restock;
        if (B2P) then
          B2PHandler;
      end;
    end;

    procedure Drinking_PrayerPots;
    var
      a, b, IP: Integer;
    begin
      if (not LoggedIn) then
        Setup_Player;
      AL_GameTab(Tab_Inv);
      TheStatus('drinking prayer potions');
      AL_GameTab(Tab_Inv);
      Wait(120 + Random(200));
      if (AL_GameTab(Tab_Inv)) then
      begin
        for IP := 0 to High(Pray) do
        begin
          if (FindDTM(Pray[IP], a, b, MIX1, MIY1, MIX2, MIY2)) then
          begin
            H_Mouse(Point(a, b));
            Sleep(150 + Random(100));
            AL_FastClick(Mouse_Left);
            Sleep(3000 + Random(1000));
            GeneratePrayer;
          end
        end;
      end
    end;

    procedure DropBones;
    begin
      if (B2P) then
        Exit;
      AL_GameTab(Tab_Inv);
      repeat
        if (FindDTM(BoneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
        begin
          H_Mouse(Point(x, y));
          Sleep(60 + Random(100));
          AL_FastClick(Mouse_Right);
          Sleep(60 + Random(100));
          AL_WaitOption('Drop', 250);
          Sleep(750 + Random(200));
        end;
      until (not FindDTM(BoneDTM, x, y, MIX1, MIY1, MIX2, MIY2));
    end;

    procedure Loot_Items;
    var
      I, Q, U: Integer;
      MSLoc: TPoint;
      Items: TGroundItemArray;
    begin
      Items := R_GetGroundItemsDistance(15);
      for Q := 0 to High(Items) do
      begin
        for I := 0 to High(LootArray) do
        begin
          if (Items[Q].ID = LootArray[I]) then
          begin
            if (InvFull) and (not EATFORSPACE) then
            begin
              if (not B2P) then
              begin
                TheStatus('Inventory = full, making some space');
                DropBones;
              end
              else
              begin
                TheStatus('Inventory = full, not looting since EATFORSPACE = false');
                Exit;
              end;
            end;
            if (InvFull) then
            begin
              if (B2P) then
              begin
                TheStatus('Inventory = full, making some space');
                Eating_Food;
              end
              else
              begin
                TheStatus('Inventory = full, making some space');
                DropBones;
                if (InvFull) then
                  Eating_Food;
              end;
            end;
            if (PointInBox(Items[Q].Tile, PlayerLoc)) then
            begin
              MSLoc := R_TileToMS(Items[Q].tile);
              if (PointInBox(MSLoc, MSBox)) then
              begin
                H_Mouse(MSLoc);
                Sleep(150 + Random(20));
                for U := 0 to High(LootNameArray) do
                begin
                  if (R_isUpText('Take ' + LootNameArray[U])) then
                  begin
                    TheStatus('Looting item (' + LootNameArray[U] + ')');
                    AL_FastClick(Mouse_Left);
                    Flag;
                    Inc(LootCount);
                    Sleep(1000 + Random(300));
                  end
                  else
                  begin
                    TheStatus('Looting item (' + LootNameArray[U] + ')');
                    AL_FastClick(Mouse_Right);
                    Sleep(160 + Random(24));
                    AL_WaitOption('Take ' + LootNameArray[U], 300);
                    Inc(LootCount);
                    Flag;
                    Sleep(1000 + Random(300));
                  end;
                end;
              end
              else
              begin
                TheStatus('Loot item is not on screen, walking to it');
                R_BlindWalk(Point(Items[Q].Tile.x + RandomRange( - 1, 1), Items[Q].Tile.y + RandomRange( - 1, 1)));
                repeat
                  Sleep(25 + Random(15));
                until (not R_isWalking);
                Loot_Items;
              end;
            end;
          end;
        end;
      end;
    end;

    procedure AttackNPC;
    var
      AttackTimer, TimerUpText, I: Integer;
      TempNPCLoc: TPoint;
      TempNPC: array of TNPC;
    begin
      TempNPC := R_GetNPCS(NPCNAME);
      for I := 0 to High(TempNPC) do
      begin
        TempNPCLoc := R_TileToMs(TempNPC[I].Tile);
        if (PointInBox(TempNPC[I].Tile, PlayerLoc)) and not (LastNPC = TempNPC[I].Index) and (not TempNPC[I].InCombat) and (R_IsValidTNPC(TempNPC[I])) then
        begin
          if (PointInBox(TempNPCLoc, MSBox)) then
          begin
            H_Mouse(Point(TempNPCLoc.x + randomrange( - 3, 3), TempNPCLoc.y + randomrange( - 3, 3)));
            MarkTime(TimerUpText);
            repeat
              if (TimeFromMark(TimerUpText) > 470) then
                Break;
              Sleep(10 + Random(25));
            until (R_IsUpText('Attack ' + NPCNAME)) or (TimeFromMark(TimerUpText) > 500);
            if (R_IsUpText('Attack ' + NPCNAME)) then
            begin
              AddCount := 0;
              TheStatus('Attacking (' + NPCNAME + ')');
              if (RIGHTCLICKONLY) then
              begin
                    AL_FastClick(Mouse_Right);
                    Sleep(20 + Random(19));
                    AL_WaitOption('tta', 40 + Random(120));
              end;
              if not (RIGHTCLICKONLY) then
              case Random(10) of
                0..8: AL_FastClick(Mouse_Left);
                9:
                  begin
                    AL_FastClick(Mouse_Right);
                    Sleep(20 + Random(19));
                    AL_WaitOption('tta', 40 + Random(120));
                  end;
              end;
              repeat
                Sleep(20 + Random(20));
              until (not R_isWalking);
              MarkTime(AttackTimer);
              repeat
                Sleep(50 + Random(50));
              until (IsInCombat) or (TimeFromMark(AttackTimer) > 650 + Random(250));
              Exit;
            end
            else
            begin
              if (AddCount > 2) then
              begin
                AL_FastClick(Mouse_Right);
                Sleep(20 + Random(19));
                AL_WaitOption('tta', 40 + Random(120));
              end;
              Inc(AddCount);
              Exit;
            end;
          end;
          if (not PointInBox(TempNPCLoc, MSBox)) then
          begin
            TheStatus('Npc is not on screen, walking to it');
            R_BlindWalk(Point(TempNPC[I].Tile.x + 1, TempNPC[I].Tile.y));
            repeat
              Sleep(25 + Random(15));
            until (not R_isWalking);
          end;
        end;
      end;
    end;

    procedure StrengthPotProc;
    var
      I: Integer;
      StrengthPotArray: TIntegerArray;
    begin
      StrengthPotArray := [StrengthPot1, StrengthPot2, StrengthPot3, StrengthPot4, SuperStrengthPot1, SuperStrengthPot2, SuperStrengthPot3, SuperStrengthPot4];
      for I := 0 to High(StrengthPotArray) do
      begin
        if (FindDTM(StrengthPotArray[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
        begin
          TheStatus('Drinking pot: Strength potion(' + IntToStr(I) + ')');
          Al_MissMouse(point(x, y), RandomRange( - 5, 5), RandomRange( - 5, 5));
          Sleep(150 + Random(50));
          if (R_IsUpText('Drink')) then
            Al_FastClick(Mouse_Left);
          Exit;
        end
        else
        begin
          TheStatus('out of pots, USEPOTS := false');
          USEPOTS := false;
        end;
      end;
    end;

    procedure AttackPotProc;
    var
      I: Integer;
      AttackPotArray: TIntegerArray;
    begin
      AttackPotArray := [AttackPot1, AttackPot2, AttackPot3, AttackPot4, SuperAttackPot1, SuperAttackPot2, SuperAttackPot3, SuperAttackPot4];
      for I := 0 to High(AttackPotArray) do
      begin
        if (FindDTM(AttackPotArray[I], x, y, MIX1, MIY1, MIX2, MIY2)) then
        begin
          TheStatus('Drinking pot: Attack potion(' + IntToStr(I) + ')');
          Al_MissMouse(point(x, y), RandomRange( - 5, 5), RandomRange( - 5, 5));
          Sleep(150 + Random(50));
          if (R_IsUpText('Drink')) then
            Al_FastClick(Mouse_Left);
          Exit;
        end
        else
        begin
          TheStatus('out of pots, USEPOTS := false');
          USEPOTS := false;
        end;
      end;
    end;

    procedure ClearTheDTM;
    begin
      FreeDTM(FoodDTM);
      FreeDTM(AttackPot1);
      FreeDTM(AttackPot2);
      FreeDTM(AttackPot3);
      FreeDTM(AttackPot4);
      FreeDTM(SuperAttackPot1);
      FreeDTM(SuperAttackPot2);
      FreeDTM(SuperAttackPot3);
      FreeDTM(SuperAttackPot4);
      FreeDTM(StrengthPot1);
      FreeDTM(StrengthPot2);
      FreeDTM(StrengthPot3);
      FreeDTM(StrengthPot4);
      FreeDTM(SuperStrengthPot1);
      FreeDTM(SuperStrengthPot2);
      FreeDTM(SuperStrengthPot3);
      FreeDTM(SuperStrengthPot4);
      FreeDTM(TabDTM);
      FreeDTM(BoneDTM);
      FreeDTM(Pray1);
      FreeDTM(Pray2);
      FreeDTM(Pray3);
      FreeDTM(Pray4);
    end;

    procedure Setup_Location;
    begin
      CP := R_GetTileGlobal;
      PlayerLoc := IntToBox(CP.x - CPDistance, CP.y - CPDistance, CP.x + CPDistance, Cp.y + CPDistance);
      if (NPCNAME = 'Man') and (LOCATION = 'edgeville') then
        PlayerLoc := IntToBox(3091, 3507, 3100, 3513);
      if (NPCNAME = 'Dwarf') then
        PlayerLoc := IntToBox(3012, 9841, 3030, 9856);
    end;

    procedure SetRunOrb(Run: Boolean);
    begin
      if (Run) then
      begin
        if (not isUsingRun) then
          MouseBox(545, 135, 591, 149, Mouse_Left);
      end
      else
      begin
        if (isUsingRun) then
          MouseBox(545, 135, 591, 149, Mouse_Left);
      end;
    end;

    procedure RunCheck;
    begin
      if (not IsUsingRun) and (GetRunEnergy > RunE) then
      begin
        SetRunOrb(True);
        GenerateRun;
      end;
    end;

    begin
      DeclarePlayers;
      SMART_World := World;
      SetupSRL();
      MouseSpeed := 28;
      SetupReflection;
      Setup;
      ClearDebug;
      LogInPlayer;
      StartXp := (R_GetSkillExp(Skill_Attack) + R_GetSkillExp(Skill_Strength) + R_GetSkillExp(Skill_Defence) + R_GetSkillExp(Skill_Magic) + R_GetSkillExp(Skill_Range));
      StartXpHp := (R_GetSkillExp(Skill_Hitpoints));
      GainedHPStart := (R_GetMaxSkillLevel(Skill_Hitpoints));
      GainedCBStart := (R_GetMaxSkillLevel(Skill_Attack) + R_GetMaxSkillLevel(Skill_Defence) + R_GetMaxSkillLevel(Skill_Strength) + R_GetMaxSkillLevel(Skill_Magic) + R_GetMaxSkillLevel(Skill_Range));
      GenerateHP;
      GeneratePrayer;
      GenerateRun;
      USEPOTS := false;
      Setup_Location;
      SetRunOrb(true);
      LastNPC := - 1;
      repeat
        if (not LoggedIn) then
        begin
          LogInPlayer;
          SetAngle(0);
          SetRun(True);
          SetFightMode(TrainingMode);
          AL_GameTab(Tab_Inv);
          GenerateHp;
          GeneratePrayer;
          GenerateRun;
        end;
        if (LoggedIn) then
        begin
          F_FindNormalRandoms;
          R_FindNormalRandoms;
          CCP := R_GetTileGlobal;
          RunCheck;
          if (not PointInBox(CCP, PlayerLoc)) then
            R_BlindWalk(AL_MiddleBox(PlayerLoc));
          if (IsInCombat) then
          begin
            TheStatus('in combat');
            if (getHealthPercent > HP) then
              Antiban;
            if not (getHealthPercent > HP) then
              Eating_Food;
            if (USEPRAY) then
              if not (getPrayerPercent > PRAYER) then
              begin
                Drinking_PrayerPots;
              end;
            if (USEPOTS) then
            begin
              if (R_GetSkillLevel(Skill_Attack) < (R_GetMaxSkillLevel(Skill_Attack) + 2)) then
                AttackPotProc;
              if (R_GetSkillLevel(Skill_Strength) < (R_GetMaxSkillLevel(Skill_Strength) + 2)) then
                StrengthPotProc;
            end;
          end
          else
          begin
            if (LOOT) then
              Loot_Items;
            AttackNPC;
          end;
        end;
      until (false);
    end.
    Last edited by DangerDan; 05-10-2014 at 09:59 AM.

  20. #1795
    Join Date
    Jun 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    This script takes care of practically all combat randoms except the strange plant random event. I think either updating Frement's antirandoms or adding a pathway in the script to drink an antipoison when poison damage is detected.

    Also, it isn't detecting my strength potions in my inventory.
    Other than that this is a near perfect script. Kudos to you Hoodz.

  21. #1796
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by cjfifty View Post
    This script takes care of practically all combat randoms except the strange plant random event. I think either updating Frement's antirandoms or adding a pathway in the script to drink an antipoison when poison damage is detected.

    Also, it isn't detecting my strength potions in my inventory.
    Other than that this is a near perfect script. Kudos to you Hoodz.
    disabled pots in this version, some dtms were broken.
    ----------------------------------------------------------------------------------

    other news:

    - added a procedure that automatic converts item names to IDs (for looting)
    - added B2P (bones to peaches)
    - added safespotting
    - changed some logic, script should be faster/more flawless now
    - added some more bank options: amount to withdraw and banking if inv is full (goldfarming in 3.. 2.. 1..) + deleted bank ids and changed it to tile locations only (shouldnt break after update)
    - added pin support, totally forgot that the first version
    - added rightclick only support
    - added some more built in locations (gnome guards, cwars hill giants, cwars orges)
    - some little food changes > eats everything in your inventory (Lobster, Trout, Salmon, Shark, MonkFish, Peach)
    - logout failsafe
    - option to fight aggressive npc

    working on:
    - arrow/bolt/knife pickup support
    - making the script look like more human

  22. #1797
    Join Date
    May 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Exception in Script: Don't know which overloaded method to call with params (Extended) at line 362, column 27 in file "C:\Simba\Includes\SRL-OSR\SRL\misc\al_functions.simba" WHAT THE HECK DOES THAT MEAN???

  23. #1798
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by EKOx REACTZz View Post
    Exception in Script: Don't know which overloaded method to call with params (Extended) at line 362, column 27 in file "C:\Simba\Includes\SRL-OSR\SRL\misc\al_functions.simba" WHAT THE HECK DOES THAT MEAN???
    do you have the correct version of AL_functions? the one in my thread?

    --------------------------------------------------------------------------------------------

    other news:
    - added a procedure that automatic converts item names to IDs (for looting)
    - added B2P (bones to peaches)
    - added safespotting
    - changed some logic, script should be faster/more flawless now
    - added some more bank options: amount to withdraw and banking if inv is full (goldfarming in 3.. 2.. 1..) + deleted bank ids and changed it to tile locations only (shouldnt break after update)
    - added pin support, totally forgot that the first version
    - added rightclick only support
    - added some more built in locations (gnome guards, cwars hill giants, cwars orges)
    - some little food changes > eats everything in your inventory (Lobster, Trout, Salmon, Shark, MonkFish, Peach)
    - logout failsafe
    - option to fight aggressive npc

    - arrow/bolt/knife pickup support
    ^^ done
    - added one more built in location: ghouls, post if you want another preset location in the script.

    - making the script look like more human.
    going to do this in the very last version

    last version:
    - removing mouse trail
    - make the script more human than a human. SUPERMAN
    - sexy GUI (need help/guides!)
    - more built in preset locations
    - adding the auto updater back again
    - MAYBE some kind of srl stats, if you want to do this for me/help me PLEASE pm me <3
    - more? suggest

    script updated, download @ op

  24. #1799
    Join Date
    May 2014
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    add out of food then bank .
    add Dark wizard at south door of varrock for low levels plz

  25. #1800
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by snsgold View Post
    add out of food then bank .
    add Dark wizard at south door of varrock for low levels plz
    add out of food then bank .
    - it already does that

    add Dark wizard at south door of varrock for low levels plz
    - okay

Page 72 of 117 FirstFirst ... 2262707172737482 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •