Results 1 to 3 of 3

Thread: Emerald Enchanter

  1. #1
    Join Date
    Oct 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Emerald Enchanter

    I definitely learned a lot from making this small script, and I only have one main question. How do I slow down this cracked out mouse lol. It moves way faster than I want it to and I haven't been able to slow it down through searching or google (everything I find is outdated). Besides that it runs pretty well, throw in some anti ban and it could probably be used normally. Also when making this script the login screen seems broken, so I removed logging in, as well as I could not get any banks to work so this specifically will work at the GE standing next to the bankers.

    I did use some code from StickToTheScript's tutorial, which I mention in the comments before the procedure.



    Code:
    program EmeraldRingEnchanter;
    {$I SRL/OSR.simba}
    
    var
     EmeraldRingDTM := DTMFromString('mrAAAAHic42BgYKhkZGAoBOIiIC4F4hogbgDiRiCuAuJEoJpYIE4G4iwgzgHiTCBOgor/vqMAJBnxYOoAAJqKCPY=');
     RingOfDuelingDTM := DTMFromString('m6wAAAHic42ZgYMhnYmAoAuIMIE4B4nQmiFgxFJdCcTYQczAyMPwF6mEG0txALADEgkDMxwiRYwViBiBmAuLPV2UhHKIwzQEACfUIKg==');
    
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Enchant the emerald rings in the inventory manually for faster xp
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    function Enchant(): boolean;
    var
    o: int32;
    items: array of int32;
    
    begin
        items := Inventory.FindDTM(EmeraldRingDTM);
        if items = [] then
          begin
            result := False;
            exit;
          end else
        o := items[0] - 1;
          begin
            while o < 27 do
              begin
                wait(randomRange(150, 500));
                Spells.Cast(CAST_LVL2_ENCHANT);
                wait(randomRange(150, 500));
                Inventory.MouseSlot(items[o]);
                wait(randomRange(50, 300));
                Mouse.Click(mouse_Left);
                wait(randomRange(650, 1000));
                o += 1;
                Result := True;
              end else
              result := False;
              exit;
          end;
    end;
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    StickToTheScript's cabbage finder from his tutorial, repurposed to find GE bank,
    (when I made this i couldn't get the SRL banking to work
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    procedure findBanker();
    var
      TPA, Banker: TPointArray;
      ATPA: T2DPointArray;
    begin
      if not SRL.isLoggedIn() then
        TerminateScript;
    
      if (SRL.FindColors(TPA, CTS2(7105908, 5, 0.51, 0.11), MainScreen.GetBounds) > 0) then //If we find colours at all then...
      begin
        ATPA := TPA.Cluster(2);
        ATPA.FilterSize(100, 500);
        ATPA.SortByIndex(MainScreen.GetMiddle);
    
        for Banker in ATPA do
        begin
          Mouse.Move(Banker[Random(Length(Banker))]);
    
          if MainScreen.IsUpText('Bank') and ChooseOption.Open() and ChooseOption.Select('Bank Banker') then        //If the uptext is 'Cabbage', try to click it
             begin
              wait(randomRange(150, 300));
              Break;
            end;
          end;
        end;
      end;
    
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    open the bank, deposit all rings of dueling and withdraw more emerald rings,
    then close the bank
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    function doBank(): boolean;
    var
    i: int32;
    items: array of int32;
    begin
      findBanker
      if BankScreen.IsOpen(5000) then
      begin
        wait(randomRange(150, 500));
        items := Inventory.FindDTM(RingOfDuelingDTM, 1);
        if items <> [] then
          begin
            wait(randomRange(150, 500));
            BankScreen.DepositItem(items[0], TRUE);
            writeln('in here');
          end else
        wait(randomRange(150, 500));
        i := BankScreen.FindDTM(EmeraldRingDTM);
        writeln(i);
        wait(randomRange(150, 500));
        bankscreen.Withdraw(i, -1, ['Emerald ring']);
        BankScreen.Close();
        Result := True;
      end;
    end;
    
    {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Main Loop, no end condition, run at your own risk
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
    
    begin
      repeat
        enchant;
        doBank;
      until(false);
    end;

  2. #2
    Join Date
    May 2012
    Posts
    122
    Mentioned
    1 Post(s)
    Quoted
    56 Post(s)

    Default

    I usually use
    Mouse(point(x + random(-1, 1), y + random(-1, 1)), MOUSE_MOVE, MOUSE_HUMAN);
    FastClick(MOUSE_LEFT);
    to do my mouse actions, change teh 1's to suit your needs, that's how much it clicks off the x and y coordinate you've set.

  3. #3
    Join Date
    Sep 2015
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Just change the variable Mouse.Speed to desired speed. On default it's set to 16 in SRL include which you can see if you open Mouse.simba from the shared folder in the include.

    Look for "TMouse.Setup".

Thread Information

Users Browsing this Thread

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

Posting Permissions

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