Results 1 to 12 of 12

Thread: withdraw

  1. #1
    Join Date
    Jun 2007
    Location
    NSW, Sydney,
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default withdraw

    why doesn't my script withdraw the hides...it quits as soon as its finished entering the bank pin...

    SCAR Code:
    program Hidecrafter;
    {.include SRL/SRL.scar}
     
    var
    Needle: Integer;
    HardLeather: Integer;
    Hidesdone: Integer;
    TotalXp: Integer;
     
    const
    HowManyLoads = 10;
    Direction = 'N'; //compass
     
    Procedure Declareplayers;
    begin
    HowManyPlayers:= 1;
    NumberOfPlayers(HowManyPlayers );
    CurrentPlayer := 0;
     
    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Loc :='';
    Players[0].Active:=True;
    Players[0].String2:=''; //bank pin if any
    end;
     
    procedure LoadBitmaps;
    begin
    Hardleather := BitmapFromString(32, 32, 'z78DAE598C10EC32008865FA940B7' +
           'ACD72DBEFF2B2D593DD86C182C08DA71F86FD6EFD3262ACB62522' +
           '0C8D12AB3D18A095EF51CCC0868238474488145D5C86BB513DD90' +
           '72AA2D3AEFCE2FE63ABFC222E7E70B462EF3F2F3CC120B0D7FEDE' +
           'FB2268FB18019F9F7C4840FD89CF83BB8B8AEBF37FF597209BF91' +
           '05C3AF230FE5372077B418825F7B5F3AD40AF4C47B9885D8E5DAF' +
           'C6506F00B5C38FE7DC66F0B9591869F490D7FB38B0BF939FE062F' +
           '17FEF2FC9A963F5B18F36B5C8AB1ADF7FF11F8F5EFAF580BDBF7A' +
           'F277F8FFEC3B4FCCD2EFAD3C1A5A3059C91863FB4AF08A27E1163' +
           '31648F171AF34FEB0D19EDE5C7');
    end;
     
    procedure Report;
    begin
    SRLRandomsReport;
    WriteLn(' Rebels Hidescrafter Report')
    WriteLn(' Running Time: ' + (TimeRunning) + '')
    WriteLn(' Hidescrafted: ' + IntToStr(Hidesdone) + '')
    WriteLn(' XP Gained: ' + IntToStr(TotalXP) + '')
    end;
     
    procedure withdrawhides;
    begin
    OpenBank;
    If(PinScreen)Then
     InPin(Players[CurrentPlayer].String2);
    If(FindBitmapToleranceIn(hardleather,x,y,MSX1,MSY1,MSX2,MSY2,30))Then
    Mouse(x,y,1,1,false)
    Wait(100 + Random(200))
    ClickOption('All', 1)
    closebank;
    end;
     
    begin
    SetUpSRL;
    DeclarePlayers;
    Loadbitmaps;
    loginplayer;
    withdrawhides;
    end.

  2. #2
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm, it is hard to say exactly without adding in some more debug statments.

    i did notice that you are missing some seimi colons, which might mess stuff up, as well as not putting in a begin/end after ure if.

    give this a try, and see where it messes up?

    also, should it be mouse(a,b,c,d,FALSE)? to right click?

    SCAR Code:
    procedure withdrawhides;
    begin
      OpenBank;
      If(PinScreen)Then
        InPin(Players[CurrentPlayer].String2);
      If(FindBitmap(hardleather,x,y,MSX1,MSY1,MSX2,MSY2))Then
      begin
        writeln('found the bitmap');
        Mouse(x,y,1,1,true);
        Wait(100 + Random(200));
        ClickOption('All', 1);
      end else
      begin
        writeln('didnt find the bitmap');
      end;
    closebank;
    end;
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  3. #3
    Join Date
    Jun 2007
    Location
    NSW, Sydney,
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 57: [Error] (14506:51): Invalid number of parameters in script

    SCAR Code:
    procedure withdrawhides;
    begin
      OpenBank;
      If(PinScreen)Then
        InPin(Players[CurrentPlayer].String2);
      If(FindBitmap(hardleather,x,y,MSX1,MSY1,MSX2,MSY2))Then
      begin
        writeln('found the bitmap');
        Mouse(x,y,1,1,true);
        Wait(100 + Random(200));
        ClickOption('All', 1);
      end else
      begin
        writeln('didnt find the bitmap');
      end;
    closebank;
    end;procedure withdrawhides;

    also...I think no write click is needed judging by a few other scripts I have looked at...

  4. #4
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh yeah, you didnt use the right find bitmap thingy, use this

    SCAR Code:
    If(FindBitmapToleranceIn(hardleather,x,y,MSX1,MSY1,MSX2,MSY2,30))Then
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  5. #5
    Join Date
    Jun 2007
    Location
    NSW, Sydney,
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    arrgrr...its not login in....it compiles and then didn't find the bitmap successfully executed pops up in the debug box...Ill try login and open the bank screen...see what happens... oh and i also added those extra semicolons that weren't there....

    EDIT: 10 seconds later... even in the bank screen it doesn't find the bitmap lol....The bitmap is half a hide...(for no numbers)...and has a black background...coz i know scar doesn't read black in bitmaps

  6. #6
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try using a bitmap mask. The procedure is:
    FindBitmapMaskTolerance.
    Below is the bitmap mask of the hide that i made, it's not tested though, i just got the picture of the hide off of runehq...
    Code:
    Hard leath := BitmapFromString2(False, 'aA216878DAED584B12C' +
           '32008BD923FD42EAB13EF7FA4FA4CA7593533B669041B170C0308' +
           '0F0D46544A69527568ED2AB5053CB9A5526F33F810A1CD4DBE80A' +
           '7E8371B6A92A45EF2759689F046D43C942637B07119F63EE84AC3' +
           '0D227F87A569DA6060EF136D36095ADFE2AEF2E72C0B9F4181FEE' +
           'D28BB8327CEDE8C46A13D275F9E517EB10BE7EFE63711C756506F' +
           '743EF5DE5BE93C4F54299825AEB3AC15DE47C513ED3B6C9CD14AC' +
           '43CC7577161BE30CF74264BFF5FF3BCD1CD7A73E680FCA87E530A' +
           'DA519DF2392F30723BE5CFB2E0D97B1EFB32F600450');
    Also, you're gonna need Scar 3.10 or higher for the BitmapFromString2 procedure..

  7. #7
    Join Date
    Jun 2007
    Location
    NSW, Sydney,
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmmm...I would like to use it...but first tell me why do I need to when I know other scripts work perfectly fine with ordinary bitmaps...

    EDIT: is the bitmap of the whole hide...sometimes the hide mumber gets in the way

  8. #8
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, if the normal bitmap isn't working now.. Why not try a bitmap mask??
    Yea, its a bmp of the whole hide..

  9. #9
    Join Date
    Jun 2007
    Location
    NSW, Sydney,
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its been three hours since i last tested my script...there are couple of problems...first is that my old script that logged in and got up to finishing the banks bin just executes itself after it compiles...second... I can't test the layer mask since the script is no longer loging in...And third...I am starting to feel that I should ditch this script...but that would just be hours blown gone away...

    Ive been trying to get this withdrawing procedure working for over a week now...I found it annoying when someone said it worked perfectly for him just with a few small edits...

  10. #10
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are you sure you set up your username and password correctly, is the player's activity set to true? If all that works, then just skip it in the main loop to test the bitmap mask(which worked for me btw) Just start logged in and see if it successfully withdraws the hides. And thirdly, dont give up.

    - “Patience, persistence and perspiration make an unbeatable combination for success” - Napoleon Hill

  11. #11
    Join Date
    Jun 2007
    Location
    NSW, Sydney,
    Posts
    105
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    never mind...after playing around with it i finally got it working...

  12. #12
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Congratz. The bitmap mask works?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what is the withdraw function, to withdraw X
    By ummmmm0k in forum OSR Help
    Replies: 3
    Last Post: 01-21-2008, 07:52 AM
  2. Withdraw Slot 1
    By yanix in forum OSR Help
    Replies: 7
    Last Post: 11-12-2007, 09:21 PM
  3. Withdraw
    By EL_TYCHO in forum OSR Help
    Replies: 12
    Last Post: 06-29-2007, 10:28 PM

Posting Permissions

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