Results 1 to 11 of 11

Thread: Summoning Taverley

  1. #1
    Join Date
    Dec 2011
    Location
    Lithuania
    Posts
    71
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Summoning Taverley

    Summoning script which runs from new Taverlay bank (South of White Wolf Mountain). Start script at bank, have charms, pouches and spirit shards in inventory, secondary item must be first item in bank.

    APROPRIATE FEEDBACK WELCOMED.
    Features:
    -Resting
    -DTM Walking
    -Pretty fast
    To Do List:
    -Failsaves on DTM walking with Radial Walking
    -Suggest?

    Attachment 13727

    Simba Code:
    program SummoningTraverly;
    var WTB1, WTB2, WTB3, WTB4, WTB5, WTO1, WTO2, WTO3, WTO4, WTO5, WTB6, x, y, SecRow, SecCol :integer;
        aFound: Extended;
    {$I SRL/SRL/Misc/Smart.simba}
    {$I SRL/SRL.simba}

    procedure DeclarePlayers;
    begin
      //Secondary item place on bank
      SecRow:=1; //Row
      SecCol:=10;//Collum
      HowManyPlayers := 4; //How many players in the script. (No Need To Touch. For Those Players What You Don't Wan't To Use Put Active := False;)
      CurrentPlayer := 0; //Current player in the Players array.
      NumberOfPlayers(HowManyPlayers); //Don't change.
      SecRow:=SecRow-1;
      SecCol:=SecCol-1;
      with Players[0] do
      begin
        Name := ''; {Player Username}
        Pass := ''; {Player Password}
        Pin := ''; {Player Bank Pin}
        Active := True; {Use This Player?}
      end;
    end;

    procedure WalkToBankDTM;
    begin
      WTB1 := DTMFromString('mbQAAAHicY2VgYMhkYWBIBeJuIN4IxOuB+C5QfDMQn2OAsGuBOCQgGI77O7vBmB8ojo4ZsWAwAACMMw0G');
      WTB2 := DTMFromString('mWAAAAHicY2FgYChmZmAwBuIDQNwJxIKMDAxHgOKXGCD0FyZ2hq7+BQwTu3sYwoJCGESAYvxQDGIzomEQAAAmyQoQ');
      //WTB3 := DTMFromString('mWAAAAHicY2FgYKhiYWDoA+KbQJwJxDOBYhuBuB+Ii4A4LCiEoat/ARyLAMX4kTAjGgYBAGB7CxY=');
      //WTB4 := DTMFromString('mbQAAAHicY2VgYIhlYWBIBeKFQLwbiPuAeDZQfAsQHwPiyUCcCsSBoX4MbZNmoWAuoDg6ZsSCwQAAqhYNxg==');
      WTB3 := DTMFromString('mbQAAAHicY2VgYAhhYWDoBuJtQOwDxO1AvBwo3gvF+UC8AYhDQ4MZPrOyM3ROXADHkkBxLiDmR8KMWDAYAABlvQzh');
      WTB4 := DTMFromString('mbQAAAHicY2VgYPBiYWBIAeKlQFwJxHuAuBcovhCIO4A4HIhLgTg0NJihc+ICOP7Mys4gAhTnR8JcQMyIBYMBAFwmDJ4=');
      WTB5 := DTMFromString('mbQAAAHicY2VgYAhlYWDIBOJNQLwHiLOBeDJQ/BAQrwXiWCCeCsRhoeoMbZNmgXFlaw9DSIAFw3+gOBcS5gdiRiwYDACODw1y');
      //WTB6 := DTMFromString('mbQAAAHicY2VgYEhlYWCIB2I7II4E4iVAPB8oPheIFwDxCSDeD8TuHioML94yMDT1z4Hj/0BxfjTMiAWDAQCjRg5L');
    end;

    procedure FreeWTBDTM;
    begin
      FreeDTM(WTB1);
      FreeDTM(WTB2);
      FreeDTM(WTB3);
      FreeDTM(WTB4);
      FreeDTM(WTB5);
      FreeDTM(WTB6);
    end;

    procedure WalkToObDTM;
    begin
      WTO1 := DTMFromString('mbQAAAHicY2VgYJBkZWDgBOLDLAwME4F4AxAvBYrvB+ITQDwNiOuAODTQh6GzdyYcdwfrM4gAxfnRMCMWDAYAZrsM4w==');
      WTO2 := DTMFromString('mbQAAAHicY2VgYPjLwsDwFIhfA3EbED8H4nVA8YNAPAmIbwDxGiC2d7RhaOqZDsfhLlIMIkBxfjTMiAWDAQAmaw6O');
      WTO3 := DTMFromString('mbQAAAHicY2VgYNjOwsBwFIjzgbgYiNcBcQ1QvAskB8R9QDwHiAMCfRg+MDMxtPTOhGMRoDg/GmbEgsEAAJbGDUI=');
      WTO4 := DTMFromString('mWAAAAHicY2FgYFjJwsBwFIhjgLgTiOuBYtuAuAOITwNxcFggQ8fkuXDMDxTjQsKMaBgEAG3rC0M=');
      WTO5 := DTMFromString('mbQAAAHicY2VgYNBkZmA4zsTAoAGkA4BYF4i9geL5QLwLiGuBOA+IP37+xtA5YQEYT+jtZggNCWb4DxTnR8OMWDAYAACRTw44');
    end;

    procedure FreeWTODTM;
    begin
      FreeDTM(WTO1);
      FreeDTM(WTO2);
      FreeDTM(WTO3);
      FreeDTM(WTO4);
      FreeDTM(WTO5);
    end;

    procedure StartUp;
    begin
      Smart_Server := 6;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      ClickNorth(SRL_ANGLE_HIGH);
      Wait(1000);
    end;

    Function WalkToBank:Boolean;
    var x, y :integer;
    begin
      If FindDTMRotated(WTB1, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTB2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTB2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y-3, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTB3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTB3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTB4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTB4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTB5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTB5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y+3, 3, 3, True);
        FFlag(1);
        Wait(RandomRange(900, 1100));
      end;
    end;

    procedure WalkToObelisk;
    var x, y :integer;
    begin
      If FindDTMRotated(WTO1, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x+5, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTO2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTO2, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x-3, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTO3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTO3, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(10);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTO4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTO4, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        repeat
          Wait(50 + Random(25));
        until (FindDTMRotated(WTO5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound));
      end;
      if FindDTMRotated(WTO5, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      Mouse(x, y, 3, 3, True);
      FFlag(1);
      Wait(RandomRange(900,1100));
    end;

    Function WaitBank :Boolean;
    begin
      if PinScreen then
      begin
        InPin(Players[CurrentPlayer].Pin);
        Result:= True;
      end;
      if BankScreen then
      Result:=True
    end;

    Function WaitObelisk:Boolean;
    var x, y:integer;
    begin
      x:=261;
      y:=38;
      If WaitFindColor(x, y, 2070783, 255, 37, 436, 48, 10, 4000) then
      Result:= True;
    end;

    Function FindObeliskDTM:Boolean;
    var x, y, ObeliskDTM :integer;
      begin
      ObeliskDTM := DTMFromString('mWAAAAHicY2FgYFjKzMBwEYgXAPFuIPZkZGBQA+JcIJYE4kmTehj+RvoxTJvWz+D5LpFBBKiHH4hFoJgRDYMAAFMzCtE=');
      WriteLn('Alternative search of Obelisk');
      If FindDTMRotated(ObeliskDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        MMouse(x, y, 3, 3);
        Wait(RandomRange(100, 150));
        If IsUpText('lisk') then
        begin
          ClickMouse2(True);
          Result:= True;
        end
        else TerminateScript;
      end;
      FreeDTM(ObeliskDTM);
      end;


    function FindObelisk:Boolean;
    var
      CTS, I, x, y: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.8, 0.8);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 9409941, MSX1, MSY1, MSX2, MSY2, 15);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);
      For I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], x, y);
        MMouse(x, y, 2, 2);
        Wait(RandomRange(100,200));
        If(IsUpText('belisk')) then
        begin
          Writeln('Found Obelisk');
          ClickMouse2(1);
          Result := True;
          Break;
        end;
      end;
    end;

    Function FindBooth:Boolean;
    var
      CTS, I, x, y: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.8, 0.8);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15727354, MSX1, MSY1, MSX2, MSY2, 15);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);
      For I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], x, y);
        MMouse(x, y, 2, 2);
        Wait(RandomRange(100,200));
        If(IsUpText('ounter')) then
        begin
          Writeln('Found bank booth');
          ClickMouse2(1);
          If WaitFunc(@WaitBank, 100, 4000) then
          begin
            Result := True;
            Break;
          end;
        end;
      end;
    end;

    Function FindBoothDTM:boolean;
    var BankerDTM, x, y :integer;
    begin
      BankerDTM := DTMFromString('mWAAAAHicY2FgYLBhhGBrKC0NxGxA/Bsopw6kf/16zxDrbwemly2bzyAJFOcHYhjNiIZBAAAnuAst');
      If  FindDTMRotated(BankerDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
      MMouse(x, y, 3, 3);
      Wait(RandomRange(100, 150));
      If IsUpText('ounter') then
      begin
        ClickMouse2(True);
        Result:=True;
      end
      else TerminateScript;
      FreeDTM(BankerDTM);
    end;

    Procedure WithdrawBank;
    begin
        WaitFunc(@WaitBank, 100, 4000);
        Deposit(5, 5, True);
        Withdraw(0, 0, 25);
    end;

    Procedure ObeliskDialog;
    begin
      MouseBox(46, 68, 86, 110, 0);
      WaitOption('Infuse-All', 600)
      Wait(RandomRange(1800, 2100));
      CloseBank;
    end;

    Procedure Resting;
    begin
      If Not RunEnergy(30) then
      RestUntil(95);
    end;

    begin
      StartUp;
      Repeat
        If FindBooth then
        WithdrawBank
        else begin
          If FindBoothDTM then
          WithdrawBank
          else TerminateScript;
        end;
        WalkToObDTM;
        WalkToObelisk;
        Wait(800);
        If FindObelisk then
        begin
          If WaitObelisk then
            ObeliskDialog
            else begin
              If FindObeliskDTM then
              begin
                If WaitObelisk then
                ObeliskDialog
              end
              else TerminateScript;
            end;
        end;
        WalkToBankDTM;
        WalkToBank;
        Resting;
      until(false);

      FreeWTBDTM;
      FreeWTODTM;
    end.
    Last edited by SantWrong; 02-06-2012 at 10:34 PM.
    Oak Larder maker
    Taverley Summoner
    SuperGlass Maker very soon! Testing
    Got Question? Just Google It!

  2. #2
    Join Date
    Nov 2011
    Posts
    194
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    The following DTMs were not freed: [2]

  3. #3
    Join Date
    Oct 2010
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is it posible to make it so it also create scrolls becouse i dont have so much charms and not realy a charm hunter but realy want 57 sum for graahk for rc so can you maby make it for scrolls? if you need help i can help maby or with testing

    sorry for my bad english im dutch:P

    greets sander70

  4. #4
    Join Date
    Dec 2011
    Location
    Lithuania
    Posts
    71
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, i can modify this make scrolls, just now I am on other script, probably on weekend, I ll check it out
    Oak Larder maker
    Taverley Summoner
    SuperGlass Maker very soon! Testing
    Got Question? Just Google It!

  5. #5
    Join Date
    Feb 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by phamxboa View Post
    The following DTMs were not freed: [2]
    gotten same error as u

  6. #6
    Join Date
    Dec 2011
    Location
    Lithuania
    Posts
    71
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    But it ran to bank to obelisk or just stood and failed? Strange cause it worked week before for me, maybe walking DTMs outdated. Probably I will map area and make SPS walking
    Oak Larder maker
    Taverley Summoner
    SuperGlass Maker very soon! Testing
    Got Question? Just Google It!

  7. #7
    Join Date
    Mar 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea I got this too.

    The following DTMs were not freed: [2]

  8. #8
    Join Date
    Mar 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm no scripter, but this script has some issues..

    I fixed the initial error (The following DTMs were not freed: [2]) by commenting out line 35, as the "WTB6" DTM is declared, but never actually used. I got the script to work up until it finds the obelisk and clicks "fuse pouches obelisk." Once the window comes up with all of the familiar choices, I get:

    The following DTMs were not freed: [2, 3, 4, 5, 6]

    Any thoughts, SantWrong?

  9. #9
    Join Date
    Nov 2011
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    same problem as above. please fix! a script like this is much needed! thanks

  10. #10
    Join Date
    Feb 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Will this make pouches that require two tertiaries?

  11. #11
    Join Date
    Nov 2011
    Location
    Perth, WA
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well done one your script man, looks great!

    Btw i would appreciate if you added scroll support whenever possible

    - Betadanyu

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
  •