Results 1 to 5 of 5

Thread: Withdraw method doesn't work :(

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default Withdraw method doesn't work :(

    So I made this script in a couple minutes and thought it'd work.. Anyway if anyone could point out what is wrong with it:
    Simba Code:
    program Astral_Crafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}


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

      Players[0].Name:='';
      Players[0].Pass:='';
      Players[0].Nick:='';
      Players[0].Active:=True;
      Players[0].Pin:='';
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;
    Procedure Supplies;
    Var
      Small, Medium, Large, X, Y: Integer;

    begin
      Small := DTMFromString('mwQAAAHic42RgYJjCyMAwG4j7gLgHiqdBxaYC8TwgzgWqK4XiHCBOAeIEIE6HihUCsY+rFZBkxIpd7U2hbMIAuwmoGA4AQM0KtA==');
      If findDTM(Small, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Small Pouch');
        MMouse(x, y, 7, 7);
        If WaitUpText('mal',1000+randomrange(100,700)) Then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Writeln('Withdrew Small Pouch');
    begin
      Medium := DTMFromString('mAAEAAHic42FgYMhgZGAoAuICIM4E4iQgToDSqUBcCJXLBeJEIM4D6ikE4jIgroDS+UCcBcRpDBB5EDsViJOAONTXEUgykoBJA6SYjG46AL2TCx8=');
      If findDTM(Medium, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Medium Pouch');
        MMouse(x, y, 7, 7);
        If WaitUpText('edi',1000) Then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Writeln('Withdrew all');
    begin
      Large := DTMFromString('mKgEAAHic42NgYDjIyMCwC4j3AvE2KD4ExGeA+BQQHwfio0B8AogPAPFuqFg+UG8iEKcBcS4QlwFxJRCXQvlZULlkIE6AylUAsY+rFZBkJAOTB8ixCdM2ALllEY0=');
      If findDTM(Large, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Large Pouch');
        MMouse(x, y, 7, 7);
        If WaitUpText('arg',1000+randomrange(100,700)) Then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Writeln('Withdrew Large Pouch');
                    end;
                  end;
                end;
              end;
            end;
          end;
        end;
      end;
      FreeDTM(Large);
      FreeDTM(Medium);
      FreeDTM(Small);
    end;


    begin
      Smart_Signed := TRUE;
      Smart_Members := False;
      Smart_SuperDetail := FALSE;
      Smart_Server := 35;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
    end.

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    U need to improve ur standards..the begin and end are jumping everywhere.
    Which part didn't work? What did the debug say? If it doesn't say 'Found xxx Pouch' it means it couldn't recognise ur DTMs.

  3. #3
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Simba Code:
    program Astral_Crafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    Var
      Small, Medium, Large,
      X, Y: Integer;
    Procedure DeclarePlayers;
    begin;
      HowManyPlayers:=1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0;

      Players[0].Name:='';
      Players[0].Pass:='';
      Players[0].Nick:='';
      Players[0].Active:=True;
      Players[0].Pin:='';
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;
    Procedure CallThings;
    Begin
      Small := DTMFromString('mwQAAAHic42RgYJjCyMAwG4j7gLgHiqdBxaYC8TwgzgWqK4XiHCBOAeIEIE6HihUCsY+rFZBkxIpd7U2hbMIAuwmoGA4AQM0KtA==');
      Medium := DTMFromString('mAAEAAHic42FgYMhgZGAoAuICIM4E4iQgToDSqUBcCJXLBeJEIM4D6ikE4jIgroDS+UCcBcRpDBB5EDsViJOAONTXEUgykoBJA6SYjG46AL2TCx8=');
      Large := DTMFromString('mKgEAAHic42NgYDjIyMCwC4j3AvE2KD4ExGeA+BQQHwfio0B8AogPAPFuqFg+UG8iEKcBcS4QlwFxJRCXQvlZULlkIE6AylUAsY+rFZBkJAOTB8ixCdM2ALllEY0=');
    End;
    Procedure FreeThings;
    Begin
      FreeDTM(Small);
      FreeDTM(Medium);
      FreeDTM(Large);
    End;
    Procedure Supplies;
    begin
      If findDTM(Small, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Small Pouch');
        MMouse(x, y, 7, 7);
        ClickMouse2(True);
        Writeln('Withdrew Small Pouch');
      end;
      If findDTM(Medium, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Medium Pouch');
        MMouse(x, y, 7, 7);
        ClickMouse2(True);
        Writeln('Withdrew Medium Pouch');
      end;
      If findDTM(Large, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Large Pouch');
        MMouse(x, y, 7, 7);
        ClickMouse2(True);
        Writeln('Withdrew Large Pouch');
      end;
    end;


    begin
      Smart_Signed := TRUE;
      Smart_Members := False;
      Smart_SuperDetail := FALSE;
      Smart_Server := 35;
      SetUpSRL;
      Callthings;
      AddOnTerminate('FreeThings');
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;

      Repeat
        Supplies;
      Until(Not(LoggedIn))
      FreeThings;
      TerminateScript();
    end.

    There you go
    Reuploaded missed a few things
    Last edited by Google; 06-10-2012 at 03:06 AM.

  4. #4
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Now I will explain what was wrong with your script since no one else did.. I'm not going to fully edit it but I did a bit..

    One problem. You are calling "GetMousePox(X, Y)" before you move the mouse. When you do such a thing, it overrides X and Y with the current cursor position. Thus the cursor will move 0 pixels since it's already at there.

    Next you have written your program sequentially. This means that if one function fails, all of them will since they never get called.

    Example: You are looking for the small pouch first and IF that pouch is found, then it will look for the medium.. and IF that one is found then it will look for the large. What happens if the small is never found? Well it will never look for medium and in turn never look for the large.

    I have left the script sequentially as you have it but I have fixed your standards and MousePos problem. You can fix the sequences yourself.

    Your fixed sequential code:
    Simba Code:
    program Astral_Crafter;
    //{$DEFINE SMART}
    {$i srl/srl.simba}


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

      Players[0].Name:='';
      Players[0].Pass:='';
      Players[0].Nick:='';
      Players[0].Active:=True;
      Players[0].Pin:='';
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;
    Procedure Supplies;
    Var
      Small, Medium, Large, X, Y: Integer;

    begin
      Small := DTMFromString('mwQAAAHic42RgYJjCyMAwG4j7gLgHiqdBxaYC8TwgzgWqK4XiHCBOAeIEIE6HihUCsY+rFZBkxIpd7U2hbMIAuwmoGA4AQM0KtA==');
      Medium := DTMFromString('mAAEAAHic42FgYMhgZGAoAuICIM4E4iQgToDSqUBcCJXLBeJEIM4D6ikE4jIgroDS+UCcBcRpDBB5EDsViJOAONTXEUgykoBJA6SYjG46AL2TCx8=');
      Large := DTMFromString('mKgEAAHic42NgYDjIyMCwC4j3AvE2KD4ExGeA+BQQHwfio0B8AogPAPFuqFg+UG8iEKcBcS4QlwFxJRCXQvlZULlkIE6AylUAsY+rFZBkJAOTB8ixCdM2ALllEY0=');

      If findDTM(Small, X, Y, MSX1, MSY1, MSX2, MSY2) then
      begin
        Writeln('Found Small Pouch');
        MMouse(x, y, 7, 7);

        If WaitUpText('mal',1000+randomrange(100,700)) Then
        begin
          ClickMouse2(MOUSE_LEFT);
          Writeln('Withdrew Small Pouch');

          If findDTM(Medium, X, Y, MSX1, MSY1, MSX2, MSY2) then
          begin
            Writeln('Found Medium Pouch');
            MMouse(x, y, 7, 7);

            If WaitUpText('edi',1000) Then
            begin
              Mouse(x, y, 0, 0, True);
              Writeln('Withdrew all');

              If findDTM(Large, X, Y, MSX1, MSY1, MSX2, MSY2) then
              begin
                MMouse(x, y, 7, 7);

                If WaitUpText('arg',1000+randomrange(100,700)) Then
                begin
                  Mouse(x, y, 0, 0, True);
                  Writeln('Withdrew Large Pouch');
                end;
              end;
            end;
          end;
        end;
      end;
      FreeDTM(Large);
      FreeDTM(Medium);
      FreeDTM(Small);
    end;


    begin
      Smart_Signed := TRUE;
      Smart_Members := False;
      Smart_SuperDetail := FALSE;
      Smart_Server := 35;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
    end.


    My opinion:
    Simba Code:
    Procedure Supplies;
    Var
      X, Y, I: Integer;
      ArrayOfDTMs: TIntegerArray;
      Uptexts: TStringArray;
    begin
      Uptexts:= ['mal', 'ediu', 'rge'];
      SetLength(ArrayOfDTMs, 3);
      ArrayOfDTMs[0]:= DTMFromString('mwQAAAHic42RgYJjCyMAwG4j7gLgHiqdBxaYC8TwgzgWqK4XiHCBOAeIEIE6HihUCsY+rFZBkxIpd7U2hbMIAuwmoGA4AQM0KtA==');
      ArrayOfDTMs[1]:= DTMFromString('mAAEAAHic42FgYMhgZGAoAuICIM4E4iQgToDSqUBcCJXLBeJEIM4D6ikE4jIgroDS+UCcBcRpDBB5EDsViJOAONTXEUgykoBJA6SYjG46AL2TCx8=');
      ArrayOfDTMs[2]:= DTMFromString('mKgEAAHic42NgYDjIyMCwC4j3AvE2KD4ExGeA+BQQHwfio0B8AogPAPFuqFg+UG8iEKcBcS4QlwFxJRCXQvlZULlkIE6AylUAsY+rFZBkJAOTB8ixCdM2ALllEY0=');

      For I:= 0 To 2 Do
        If FindDTM(ArrayOfDTMs[I], X, Y, MSX1, MSY1, MSX2, MSY2) then
        begin
          MMouse(X, Y, 0, 0);
          If WaitUptextMulti(Uptexts, 600) then
            ClickMouse2(MOUSE_LEFT);
        end;

      FreeDTM(ArrayOfDTMs[0]);
      FreeDTM(ArrayOfDTMs[1]);
      FreeDTM(ArrayOfDTMs[2]);
    end;

    Also you may want to make these functions instead of procedures so that you can check the return value to tell if the Item was withdrawn.
    Last edited by Brandon; 06-10-2012 at 03:18 AM.
    I am Ggzz..
    Hackintosher

  5. #5
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Both not working for me I got it to work mysel ftho ty guys

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
  •