Results 1 to 16 of 16

Thread: Withdrawing issue

  1. #1
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default Withdrawing issue

    Hello I'm working on a script that requires the withdrawal of items. Everything works fine, however once the bank opens up it does not withdraw the items as I would like it to. could someone please read-over my script and help me? Thanks

    Simba Code:
    program NebulaPastries;
    {$I SRL/SRL.scar}
    var
      a, b, count:integer;

    procedure Banking;
    begin
      wait(50+random(100));
      SetAngle(true);
      writeln('banking');
      repeat
        inc(count);
        a :=MSCX
        b :=MSCY
        FindColorSpiralTolerance(a, b, 6898000, MSX1, MSY1, MSX2, MSY2, 12);
        Mouse(a, b, 2, 2, false);
      until
      (ChooseOption('nk Ba')) or (count>8);
        if (count>8) then
        begin
          writeln('couldnt find the banker, ending');
          TerminateScript;
        end else
          if PinScreen then
            if (Players[CurrentPlayer].Pin <> '') then
               InPin(Players[CurrentPlayer].Pin)
            else
            begin
              writeln('No pin entered');
              TerminateScript;
            end;
            wait(750+random(500));
            withdraw(10, 4, 14);
            wait(400+random(300));
            withdraw(10, 5, 14);
    end;


    begin
    SetupSRL;
    ActivateClient;
    Banking;
    end.

  2. #2
    Join Date
    Dec 2011
    Location
    Ontario, Canada
    Posts
    1,735
    Mentioned
    5 Post(s)
    Quoted
    89 Post(s)

    Default

    Quote Originally Posted by Nebula View Post
    Hello I'm working on a script that requires the withdrawal of items. Everything works fine, however once the bank opens up it does not withdraw the items as I would like it to. could someone please read-over my script and help me? Thanks

    Simba Code:
    program NebulaPastries;
    {$I SRL/SRL.scar}
    var
      a, b, count:integer;

    procedure Banking;
    begin
      wait(50+random(100));
      SetAngle(true);
      writeln('banking');
      repeat
        inc(count);
        a :=MSCX
        b :=MSCY
        FindColorSpiralTolerance(a, b, 6898000, MSX1, MSY1, MSX2, MSY2, 12);
        Mouse(a, b, 2, 2, false);
      until
      (ChooseOption('nk Ba')) or (count>8);
        if (count>8) then
        begin
          writeln('couldnt find the banker, ending');
          TerminateScript;
        end else
          if PinScreen then
            if (Players[CurrentPlayer].Pin <> '') then
               InPin(Players[CurrentPlayer].Pin)
            else
            begin
              writeln('No pin entered');
              TerminateScript;
            end;
            wait(750+random(500));
            withdraw(10, 4, 14);
            wait(400+random(300));
            withdraw(10, 5, 14);
    end;


    begin
    SetupSRL;
    ActivateClient;
    Banking;
    end.
    What does it say in debug about it like why does it not withdraw?
    FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!! "WITH A NEW QUESTION COMES A NEW CHALLENGE"
    Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc

  3. #3
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    It just right clicks randomly around the bank screen. I could code it to say anything in the debug box, the debug box isn't much help me in this case.

  4. #4
    Join Date
    Dec 2011
    Location
    Ontario, Canada
    Posts
    1,735
    Mentioned
    5 Post(s)
    Quoted
    89 Post(s)

    Default

    Quote Originally Posted by Nebula View Post
    It just right clicks randomly around the bank screen. I could code it to say anything in the debug box, the debug box isn't much help me in this case.
    Ok I was just clarifying. Only thing I could think of atm is that the client cant find the banker colour to click. If its all over the colour is similar all over. My first guess probably not right though.
    FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!! "WITH A NEW QUESTION COMES A NEW CHALLENGE"
    Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc

  5. #5
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Simba Code:
    repeat
        inc(count);
        a :=MSCX
        b :=MSCY
        FindColorSpiralTolerance(a, b, 6898000, MSX1, MSY1, MSX2, MSY2, 12);
        Mouse(a, b, 2, 2, false);
      until
      (ChooseOption('nk Ba')) or (count>8);

    The problem here lies within the code. Simply put, the client doesnt react fast enough for the script to detect the bank option. So you need to put a wait procedure in between.

    Also, ChooseOption does not support SPACES BETWEEN OPTIONS. Ergo, you just type one word or partial to it. So type

    Simba Code:
    ChooseOption('Use');

    //OR if you want to pick more than one word

    ChooseOptionMulti(['Use', 'Bank']);

    your loop function needs work. Ill introduce you to the Break; procedure

    Simba Code:
    repeat
      if FindColor... then
      begin
        Mouse...
        Wait(500); //This gives the client some time to load so the script can follow.
        if ChooseOptionMulti(['Bank', 'Banker']) then
          Break; //This states that the script will break from the repeat!
      end;
     until (False); //False means it will go on FOREVER;

    Make sure your color is correct, and thats my story for you. Reply if any questions.

  6. #6
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Quote Originally Posted by kevin33 View Post
    Ok I was just clarifying. Only thing I could think of atm is that the client cant find the banker colour to click. If its all over the colour is similar all over. My first guess probably not right though.
    I already said It finds the banker and opens the bank perfectly, but has trouble withdrawing the items. Since I don't think you even slightly know how to script, I'm going to ask you not to post on this thread again. Thanks.

  7. #7
    Join Date
    Dec 2011
    Location
    Ontario, Canada
    Posts
    1,735
    Mentioned
    5 Post(s)
    Quoted
    89 Post(s)

    Default

    Quote Originally Posted by Nebula View Post
    I already said It finds the banker and opens the bank perfectly, but has trouble withdrawing the items. Since I don't think you even slightly know how to script, I'm going to ask you not to post on this thread again. Thanks.
    Im tired and Ive been up all day renewing a script I had saved on my computer that just got fixed today for Christmas. Sorry if I cant be much help. I dont appreciate being called out for just trying to help. Im quite new also and Ive never heard of this problem yet so I cant really help but I figured I might as well try.
    FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!! "WITH A NEW QUESTION COMES A NEW CHALLENGE"
    Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc

  8. #8
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    @deathscyte

    My ChooseOption procedure works fine. Everything works find besides the withdrawing of the items. Also I know about the break procedure but I decided to script it my way lol.

    Just move your character to a booth in the varrock west bank, start the script, and you'll see my issue.

  9. #9
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    FixBank;

    add this before withdrawing i guess.

  10. #10
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Didn't work.

  11. #11
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    If you are just withdrawing an item, why not try using a DTM.

    They are in my opinion extremely good at finding items in your inventory.

    then you can do:

    if FindDTM(DTMnamehere, x, y, MSX1, MSY1, MSX2, MSY2) then
    Mouse(x, y, 4, 4, True);

    it finds the item in the bank and withdraws it by left clicking on it. You just need to make a decent DTM for the item, load it and free it afterwards.
    GLH Tutorial ~ OpenGL Scripting
    http://villavu.com/forum/showthread.php?p=1292150

    GLH Scripts ~ Abyssal Scripts
    http://villavu.com/forum/showthread.php?p=1293187
    Current Projects:
    A) DemiseSlayer Pro (Released/100%).
    B) Demise Power Miner(Released/100%).
    C) Demise Pyramid Plunder(Planning Stage/0%).

  12. #12
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Because the Withdraw procedure is so much more effective. It's like 25 less lines of code.

    Withdraw(ItemColumn, ItemRow, AmountOfItem). In my case the item will be in the 10th column, 4th row, and I want to withdraw 14 of the item.

  13. #13
    Join Date
    Jan 2011
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Instead of
    Simba Code:
    until (ChooseOption('Bank')) do
    use
    Simba Code:
    until (WaitOption('Bank', 500)) do

  14. #14
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Did you count from 0?

    the first column is called 0 and the next is 1 and so forth, same rules apply for rows.

    So it would be

    Simba Code:
    Withdraw(9, 3, 14);
    Wait(600);
    ....

  15. #15
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Quote Originally Posted by Deathscytex View Post
    Did you count from 0?

    the first column is called 0 and the next is 1 and so forth, same rules apply for rows.

    So it would be

    Simba Code:
    Withdraw(9, 3, 14);
    Wait(600);
    ....
    Thank you SO MUCH!! rep++++

  16. #16
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Nebula, I'm glad your issue is fixed. However, in the future, please don't talk down on other members who are only trying to help.

    Thanks
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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
  •