Results 1 to 8 of 8

Thread: Help with Al-Kharid script

  1. #1
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with Al-Kharid script

    im getting the below error on line 98 (Until not LoggedIn at the end of the script) can someone plz tell me why im getting this error?

    [Error] (99:3): Identifier expected at line 98
    Compiling failed.

    Simba Code:
    Program Al_Kharid_Warrior_Killer;
    {$i srl\srl\misc\smart.simba}
    {$i SRL\SRL.simba}
    {$i srl\srl\skill\fighting.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Bankpin Here
      Players[0].BoxRewards := ['Xp'];
    end;

    Procedure Attackwarrior;
    Var
      x, y: Integer;
    Begin
      If FindObjCustom( x, y, ['att', 'warrior'], [1321795, 5325613, 6509099], 5) Then
      Begin
        GetMousePos (x, y);

        Case Random (0) Of
          0: Mouse (x, y, 5, 5, True);
        End;
      End;
    End;

    ///// Credit goes to Tickyy
    Procedure Bankit;
     Var
      i: Integer;
    Begin
      If (Not (LoggedIn)) Then Exit;
      For i := 1 To 4 Do
      Begin
        If OpenBank('akb', True, True) Then
        begin
          Withdraw(1, 1, 28);
          break;
        end;
      End;
      Writeln('Banking Failed - Changing Players');
      NextPlayer(False);
    End;

    Function LowHPLetsEat(What: String): Boolean;
    var
      I, x, y: Integer;
    begin
      Result := (HPPercent < 50) and (LoggedIn);
      If(not(Result)) then
        Exit;

      if Result then
      If InvEmpty then
      begin
        Bankit;
      end else
      for i := 1 to 28 do
      begin
        InvMouse(I, 3);
        Wait(RandomRange(150, 250));
        if WaitUpText(What, RandomRange(250, 300)) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Exit;
        end else
          Continue;
      end;
    end;

    begin
      MouseSpeed := 15;
      Smart_Server := 0;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;

      SetAngle(SRL_ANGLE_HIGH);
      If InvEmpty Then
      Bankit else
      Attackwarrior;
      While(Infight)do
      Wait(100);
      LowHPLetsEat('lobster');
      Until not LoggedIn;              <----------Error here
    end.

  2. #2
    Join Date
    Sep 2010
    Location
    Finland
    Posts
    299
    Mentioned
    8 Post(s)
    Quoted
    37 Post(s)

    Default

    You forgot a repeat in your mainloop.

    repeat..until loop:
    Simba Code:
    repeat
    until
    Rusting away

  3. #3
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Help again plz. I get the below error after killing 1 warrior

    Error: Exception: The given DTM Index[2] doesn't exist at line 50
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

    Simba Code:
    Program Al_Kharid_Warrior_Killer;
    {$i srl\srl\misc\smart.simba}
    {$i SRL\SRL.simba}
    {$i srl\srl\skill\fighting.simba}
    Var
      x, y: Integer;
      B: Array [0..5] of Integer;
      aFound: Extended;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Bankpin Here
      Players[0].BoxRewards := ['Xp'];
    end;

    Procedure Attackwarrior;
    Var
      x, y: Integer;
    Begin
      If FindObjCustom( x, y, ['att', 'warrior'], [4414565, 4083794, 7639448], 3) Then
      Begin
        GetMousePos (x, y);

        Case Random (0) Of
          0: Mouse (x, y, 2, 2, True)
        End;
      End;
    End;

    Procedure SetDTM;
    Begin
      B[0] := DTMFromString('mrAAAAHic42BgYChhYmAIAuJVQLwSiu2h2AmI7YBqUoA4EYiDgdgTiKOBOByI/YB4em8qQ7ghG4NBkgiDQoQAg5U1Kxw7JEkxiADV4MOMBDAMAACI9AxR');
      B[1] := DTMFromString('mlwAAAHicY2dgYDBkYmBwAmJHKHYAYj8gjgfiQKC8CxCHAXE8EOcDsTMQOwHxzJ5UBqdEKQYbK1Y4NkoUYVAKF2AQAcrjwox4MBQAAKFHCbE=');
      B[2] := DTMFromString('mlwAAAHicY2dgYIhiYmDwAOJ6NOwOxJVA+Xwg9gXiHCCuBeIJQGwJxFt70hi+/+ZmMEoUYbCxYgVjENu70IRBBCiPCzPiwVAAABJQDU0=');
      B[3] := DTMFromString('mlwAAAHicY2dgYOBgZGD4DqTFgPQfIC0IpP9B6RIgHQXEkUBcCcW5QFwIxEnBTgz21uYMtpYmDBVpgQxx/vYMt3ZOZqjJDGYQAcrjwox4MBQAAF81DpI=');
      B[4] := DTMFromString('mwQAAAHic42RgYOhnYmCYg4RnA3E4EJcAcQUQpwKxCVCdGxBHA3EGEGsCsS4QqwFxCRALAPHU7jQGS0s2BvkwQTjd15IIFvcoMGWY3pHOIAJURwgzEoHhAAAP1hCq');
      B[5] := DTMFromString('mlwAAAHicY2dgYJjAxMBQD8QNUAxirwDiHiCOAMpXAXEeEIcDsTUQWwCxJRBv6kpjMNLkYtBPEGWQDxME0zAsApTHhRnxYCgAALMIC8s=');
    end;

    procedure FrDTM;
    begin
      FreeDTM(B[0]);
      FreeDTM(B[1]);
      FreeDTM(B[2]);
      FreeDTM(B[3]);
      FreeDTM(B[4]);
      FreeDTM(B[5]);
    end;

    ///// Credit goes to Tickyy
    Procedure Bankit;
    Begin
      MakeCompass ('w')
      If (Not (LoggedIn)) Then Exit;
      If FindDTMRotated(B[4], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
          if (bankscreen) then
          Withdraw(0, 0, 28);
          CloseBank;
        end;
      end;

    Procedure ToBank;
    begin
        MakeCompass ('n')
        if FindDTMRotated(B[0], 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(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[1], 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(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
      End;
    End;

    Procedure FromBank;
    begin
        MakeCompass ('n')
        if FindDTMRotated(B[3], 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(B[4], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[4], 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(B[5], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[5], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
      End;
    End;

    Function LowHPLetsEat(What: String): Boolean;
    var
      I, x, y: Integer;
    begin
      Result := (HPPercent < 70) and (LoggedIn);
      If(not(Result)) then
        Exit;

      if Result then
      If InvEmpty then
      begin
        ToBank;
        Bankit;
        FromBank;
      end else
      for i := 1 to 28 do
      begin
        InvMouse(I, 3);
        Wait(RandomRange(150, 250));
        if WaitUpText(What, RandomRange(250, 300)) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Exit;
        end else
          Continue;
      end;
    end;

    begin
      MouseSpeed := 18;
      Smart_Server := 136;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      ClearDebug;
      SetupSRL;

      DeclarePlayers;
      LoginPlayer;
      SetDTM;
      MakeCompass ('n')
      SetAngle(SRL_ANGLE_HIGH);
      If InvEmpty Then
      TerminateScript;

      repeat
      SetAngle(SRL_ANGLE_HIGH);
      Attackwarrior;
      While(Infight)do
      Wait(300);
      LowHPLetsEat('Lobster');
      FrDTM;
      Until not LoggedIn;
    end.

  4. #4
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Simba Code:
    repeat
      SetAngle(SRL_ANGLE_HIGH);
      Attackwarrior;
      While(Infight)do
      Wait(300);
      LowHPLetsEat('Lobster');
      FrDTM;                                 // here
      Until not LoggedIn;
    end.

    You free all DTMs in first loop cycle ,so they don't exist any more.

  5. #5
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by beginner5 View Post
    Simba Code:
    repeat
      SetAngle(SRL_ANGLE_HIGH);
      Attackwarrior;
      While(Infight)do
      Wait(300);
      LowHPLetsEat('Lobster');
      FrDTM;                                 // here
      Until not LoggedIn;
    end.

    You free all DTMs in first loop cycle ,so they don't exist any more.
    were is that at im new to scripting
    Simba Code:
    Program Al_Kharid_Warrior_Killer;
    {$i srl\srl\misc\smart.simba}
    {$i SRL\SRL.simba}
    {$i srl\srl\skill\fighting.simba}
    Var
      x, y: Integer;
      B: Array [0..5] of Integer;
      aFound: Extended;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Bankpin Here
      Players[0].BoxRewards := ['Xp'];
    end;

    Procedure Attackwarrior;
    Var
      x, y: Integer;
    Begin
      If FindObjCustom( x, y, ['att', 'warrior'], [4414565, 4083794, 7639448], 3) Then
      Begin
        GetMousePos (x, y);

        Case Random (0) Of
          0: Mouse (x, y, 2, 2, True)
        End;
      End;
    End;

    Procedure SetDTM;
    Begin
      B[0] := DTMFromString('mrAAAAHic42BgYChhYmAIAuJVQLwSiu2h2AmI7YBqUoA4EYiDgdgTiKOBOByI/YB4em8qQ7ghG4NBkgiDQoQAg5U1Kxw7JEkxiADV4MOMBDAMAACI9AxR');
      B[1] := DTMFromString('mlwAAAHicY2dgYDBkYmBwAmJHKHYAYj8gjgfiQKC8CxCHAXE8EOcDsTMQOwHxzJ5UBqdEKQYbK1Y4NkoUYVAKF2AQAcrjwox4MBQAAKFHCbE=');
      B[2] := DTMFromString('mlwAAAHicY2dgYIhiYmDwAOJ6NOwOxJVA+Xwg9gXiHCCuBeIJQGwJxFt70hi+/+ZmMEoUYbCxYgVjENu70IRBBCiPCzPiwVAAABJQDU0=');
      B[3] := DTMFromString('mlwAAAHicY2dgYOBgZGD4DqTFgPQfIC0IpP9B6RIgHQXEkUBcCcW5QFwIxEnBTgz21uYMtpYmDBVpgQxx/vYMt3ZOZqjJDGYQAcrjwox4MBQAAF81DpI=');
      B[4] := DTMFromString('mwQAAAHic42RgYOhnYmCYg4RnA3E4EJcAcQUQpwKxCVCdGxBHA3EGEGsCsS4QqwFxCRALAPHU7jQGS0s2BvkwQTjd15IIFvcoMGWY3pHOIAJURwgzEoHhAAAP1hCq');
      B[5] := DTMFromString('mlwAAAHicY2dgYJjAxMBQD8QNUAxirwDiHiCOAMpXAXEeEIcDsTUQWwCxJRBv6kpjMNLkYtBPEGWQDxME0zAsApTHhRnxYCgAALMIC8s=');
    end;

    procedure FrDTM;
    begin
      FreeDTM(B[0]);
      FreeDTM(B[1]);
      FreeDTM(B[2]);
      FreeDTM(B[3]);
      FreeDTM(B[4]);
      FreeDTM(B[5]);
    end;

    ///// Credit goes to Tickyy
    Procedure Bankit;
    Begin
      MakeCompass ('w')
      repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound);

      If FindDTMRotated(B[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, False);
          ChooseOption('bank');
          if (bankscreen) then
          Withdraw(0, 0, 28);
          CloseBank;
          FreeDTM(B[3])
        end;
      end;

    Procedure ToBank;
    begin
        MakeCompass ('n')
        if FindDTMRotated(B[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[0]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[1]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[2]);
      End;
    End;

    Procedure FromBank;
    begin
        MakeCompass ('n')
        if FindDTMRotated(B[3], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[3]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[4], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[4], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[4]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[5], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[5], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[5]);
      End;
    End;

    Function LowHPLetsEat(What: String): Boolean;
    var
      I, x, y: Integer;
    begin
      Result := (HPPercent < 70) and (LoggedIn);
      If(not(Result)) then
        Exit;

      if Result then
      If InvEmpty then
      begin
        ToBank;
        Bankit;
        FromBank;
      end else
      for i := 1 to 28 do
      begin
        InvMouse(I, 3);
        Wait(RandomRange(150, 250));
        if WaitUpText(What, RandomRange(250, 300)) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Exit
        end else
          Continue;
      end;
    end;

    begin
      MouseSpeed := 18;
      Smart_Server := 136;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      ClearDebug;
      SetupSRL;

      DeclarePlayers;
      LoginPlayer;
      SetDTM;
      MakeCompass ('n')
      SetAngle(SRL_ANGLE_HIGH);
      If InvEmpty Then
      ToBank;
      Bankit;
      FromBank;

      repeat
      SetAngle(SRL_ANGLE_HIGH);
      Attackwarrior;
      While(Infight)do
      Wait(300);
      LowHPLetsEat('Lobster');
      FrDTM;
      Until not LoggedIn;
    end.

  6. #6
    Join Date
    Dec 2011
    Posts
    124
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    FreeDTM(B[3])

    When you do this, it pretty much removes the DTM from the script, so you would have to declare it again using:
    Simba Code:
    B[3] := DTMFromString('mlwAAAHicY2dgYOBgZGD4DqTFgPQfIC0IpP9B6RIgHQXEkUBcCcW5QFwIxEnBTgz21uYMtpYmDBVpgQxx/vYMt3ZOZqjJDGYQAcrjwox4MBQAAF81DpI=');

    So to make it easier, you would declare the DTM at the beginning of wherever it's needed, and then free that one at the end.

  7. #7
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TsterT View Post
    Simba Code:
    FreeDTM(B[3])

    When you do this, it pretty much removes the DTM from the script, so you would have to declare it again using:
    Simba Code:
    B[3] := DTMFromString('mlwAAAHicY2dgYOBgZGD4DqTFgPQfIC0IpP9B6RIgHQXEkUBcCcW5QFwIxEnBTgz21uYMtpYmDBVpgQxx/vYMt3ZOZqjJDGYQAcrjwox4MBQAAF81DpI=');

    So to make it easier, you would declare the DTM at the beginning of wherever it's needed, and then free that one at the end.
    oooooooo i get it ill fix it tomorrow thank you

  8. #8
    Join Date
    Jan 2012
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OMG i got it to go to bank, bank, and go back to warriors and now im getting another DTM error when it attacks the warriors i did what TsterT told me to do and im still getting the error and sorry for my sloopy standards

    Error: Exception: The given DTM Index[9] doesn't exist at line 51
    The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3, 4, 5, 6, 7]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

    Simba Code:
    Program Al_Kharid_Warrior_Killer;
    {$i srl\srl\misc\smart.simba}
    {$i SRL\SRL.simba}
    {$i srl\srl\skill\fighting.simba}
    Var
      x, y: Integer;
      B: Array [0..5] of Integer;
      aFound: Extended;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Bankpin Here
      Players[0].BoxRewards := ['Xp'];
    end;

    Procedure Attackwarrior;
    Var
      x, y: Integer;
    Begin
      If FindObjCustom( x, y, ['att', 'warrior'], [4414565, 4083794, 7639448], 3) Then
      Begin
        GetMousePos (x, y);

        Case Random (0) Of
          0: Mouse (x, y, 2, 2, True)
        End;
      End;
    End;

    Procedure SetDTM;
    Begin
      B[0] := DTMFromString('mrAAAAHic42BgYChhYmAIAuJVQLwSiu2h2AmI7YBqUoA4EYiDgdgTiKOBOByI/YB4em8qQ7ghG4NBkgiDQoQAg5U1Kxw7JEkxiADV4MOMBDAMAACI9AxR');
      B[1] := DTMFromString('mlwAAAHicY2dgYDBkYmBwAmJHKHYAYj8gjgfiQKC8CxCHAXE8EOcDsTMQOwHxzJ5UBqdEKQYbK1Y4NkoUYVAKF2AQAcrjwox4MBQAAKFHCbE=');
      B[2] := DTMFromString('mlwAAAHicY2dgYIhiYmDwAOJ6NOwOxJVA+Xwg9gXiHCCuBeIJQGwJxFt70hi+/+ZmMEoUYbCxYgVjENu70IRBBCiPCzPiwVAAABJQDU0=');
      B[3] := DTMFromString('mlwAAAHicY2dgYOBgZGD4DqTFgPQfIC0IpP9B6RIgHQXEkUBcCcW5QFwIxEnBTgz21uYMtpYmDBVpgQxx/vYMt3ZOZqjJDGYQAcrjwox4MBQAAF81DpI=');
      B[4] := DTMFromString('mwQAAAHic42RgYOhnYmCYg4RnA3E4EJcAcQUQpwKxCVCdGxBHA3EGEGsCsS4QqwFxCRALAPHU7jQGS0s2BvkwQTjd15IIFvcoMGWY3pHOIAJURwgzEoHhAAAP1hCq');
      B[5] := DTMFromString('mlwAAAHicY2dgYJjAxMBQD8QNUAxirwDiHiCOAMpXAXEeEIcDsTUQWwCxJRBv6kpjMNLkYtBPEGWQDxME0zAsApTHhRnxYCgAALMIC8s=');
    end;

    procedure FrDTM;
    begin
      FreeDTM(B[0]);
      FreeDTM(B[1]);
      FreeDTM(B[2]);
      FreeDTM(B[3]);
      FreeDTM(B[4]);
      FreeDTM(B[5]);
    end;

    ///// Credit goes to Tickyy
    Procedure Bankit;
    Begin
      B[3] := DTMFromString('mlwAAAHicY2dgYOBgZGD4DqTFgPQfIC0IpP9B6RIgHQXEkUBcCcW5QFwIxEnBTgz21uYMtpYmDBVpgQxx/vYMt3ZOZqjJDGYQAcrjwox4MBQAAF81DpI=');

      MakeCompass ('w')
      repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound);

      If FindDTMRotated(B[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
          if not (bankscreen) then
          repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound);

      If FindDTMRotated(B[3], x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
          Withdraw(0, 0, 28);
          CloseBank;
          FreeDTM(B[3])
        end;
      end;
    end;

    Procedure ToBank;
    begin
      B[0] := DTMFromString('mrAAAAHic42BgYChhYmAIAuJVQLwSiu2h2AmI7YBqUoA4EYiDgdgTiKOBOByI/YB4em8qQ7ghG4NBkgiDQoQAg5U1Kxw7JEkxiADV4MOMBDAMAACI9AxR');
      B[1] := DTMFromString('mlwAAAHicY2dgYDBkYmBwAmJHKHYAYj8gjgfiQKC8CxCHAXE8EOcDsTMQOwHxzJ5UBqdEKQYbK1Y4NkoUYVAKF2AQAcrjwox4MBQAAKFHCbE=');
      B[2] := DTMFromString('mlwAAAHicY2dgYIhiYmDwAOJ6NOwOxJVA+Xwg9gXiHCCuBeIJQGwJxFt70hi+/+ZmMEoUYbCxYgVjENu70IRBBCiPCzPiwVAAABJQDU0=');

      MakeCompass ('n')
      if FindDTMRotated(B[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[0]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[1], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[1]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[2], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[2]);
      End;
    End;

    Procedure FromBank;
    begin
      B[4] := DTMFromString('mwQAAAHic42RgYOhnYmCYg4RnA3E4EJcAcQUQpwKxCVCdGxBHA3EGEGsCsS4QqwFxCRALAPHU7jQGS0s2BvkwQTjd15IIFvcoMGWY3pHOIAJURwgzEoHhAAAP1hCq');
      B[5] := DTMFromString('mlwAAAHicY2dgYJjAxMBQD8QNUAxirwDiHiCOAMpXAXEeEIcDsTUQWwCxJRBv6kpjMNLkYtBPEGWQDxME0zAsApTHhRnxYCgAALMIC8s=');

        MakeCompass ('n')
        if FindDTMRotated(B[4], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[4]);
        repeat
          Wait(50 + Random(25));
        until FindDTMRotated(B[5], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
      end;

      if FindDTMRotated(B[5], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
      begin
        Mouse(x, y, 3, 3, True);
        FFlag(6);
        FreeDTM(B[5]);
      end;
    end;

    Function LowHPLetsEat(What: String): Boolean;
    var
      I, x, y: Integer;
    begin
      Result := (HPPercent < 70) and (LoggedIn);
      If(not(Result)) then
        Exit;

      if Result then
      If InvEmpty then
      begin
        ToBank;
        Bankit;
        FromBank;
      end else
      for i := 1 to 28 do
      begin
        InvMouse(I, 3);
        Wait(RandomRange(150, 250));
        if WaitUpText(What, RandomRange(250, 300)) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Exit
        end else
          Continue;
      end;
    end;

    begin
      MouseSpeed := 18;
      Smart_Server := 136;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      ClearDebug;
      SetupSRL;

      DeclarePlayers;
      LoginPlayer;
      SetDTM;
      MakeCompass ('n')
      SetAngle(SRL_ANGLE_HIGH);
      If InvEmpty Then
      ToBank;
      Bankit;
      FromBank;

      repeat
      SetAngle(SRL_ANGLE_HIGH);
      Attackwarrior;
      While(Infight)do
      Wait(300);
      LowHPLetsEat('Lobster');
      FrDTM;
      Until not LoggedIn;
    end.
    Last edited by asap1; 02-11-2012 at 09:51 PM.

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
  •