Results 1 to 17 of 17

Thread: Problem for ChooseOption and WaitOption

  1. #1
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Problem for ChooseOption and WaitOption

    Simba Code:
    Procedure WithdrawEss;
    begin
      //Withdraw Essence
      if BankScreen then
      begin
        MouseBankSlot(1, mouse_move);
        writeln('Withdrawing Pure Essence');
        ClickMouse2(mouse_Right);
        WaitOption('All', 300);
      end;
    end;

    So I finally finish my cosmic runecrafter. But there's a problem on withdrawing items from bank. It sometimes just right click the essence but did not choose the withdraw all option. I've tried repeat this procedure until InvFull, but it will always withdraw 2 times, refill pouches, withdraw 2 times, refill again, and withdraw 2 times again, which is very bot-like. What can I do so that it withdraws the essence every single time?

  2. #2
    Join Date
    Oct 2011
    Location
    Australia, Vic
    Posts
    1,517
    Mentioned
    2 Post(s)
    Quoted
    120 Post(s)

    Default

    Are you sure it's All not all or ALL?

  3. #3
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Try something like
    Simba Code:
    WaitOptionMulti(['Withdraw-All', 'w-A', 'll'], 1000);

  4. #4
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Evlin View Post
    Are you sure it's All not all or ALL?
    Yes, it's All.

    Quote Originally Posted by TotalKillz View Post
    Try something like
    Simba Code:
    WaitOptionMulti(['Withdraw-All', 'w-A', 'll'], 1000);
    Thanks, I'll try that. Maybe I should just post the whole script here so that someone can tell me where I did wrong, what can be improved and such? Whenever I stop the script, there's always DTMs not freed, maybe I don't know how to free it correctly.

  5. #5
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    I wouldn't post it if you don't want people using it, but if you are not freeing DTMs you could try just loading all the DTMs in the beginning instead of putting them in procedures. So just make a procedure called GetDTMs or something then load your DTMs, and use GetDTMs before your loop of the main script.

  6. #6
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I hope people won't find scripts at help section? lol
    If I load them at the beginning, don't I need to free them after I've used them? Like for example, I went to bank to refill pouches, I load pouches DTMs and refill them, then free pouches DTMs, and repeat after every banking process.
    Sorry, still a newb. I don't even have a single function in my script because I still don't know how to use it and the difference of it from procedure.

    Oh by the way, the waitoptionmulti works better now. I thought waitoption will search for the option after the time given, making the banking process slower.
    Last edited by CephaXz; 04-26-2012 at 12:55 AM.

  7. #7
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Well this is what I do.

    Simba Code:
    procedure GetDTMs;
    begin
      BankBoothDTM := DTMFromString('mbQAAAHicY2VgYNBiZGBQAGJtINYAYgMgngcUnwPEU4F4KRAvBOL85FCGI3v2MLSUpTGkx/gzeNgaMPADxdExIxYMBgDBAgrH');
      BankDTM := DTMFromString('mlwAAAHicY2dgYAhhYmDwBOJkIHYF4gogdgfiLCCuBsrXAHEOEOcD8QwgTgDiWhB7cjdDQ00JQ2S8NENanCZDW/dkhllTexmy0uIZ+IHyuDAjHgwFAKpTD7A=');
      RingDTM := DTMFromString('mggAAAHicY2NgYNjLxMCwEYj3AfFWJgh/GxBXMDIw1ANxCxC3AXEtEFcDsfgcKYZzm+QYGvOFGa5sl2e4sVuBob9GlIEfaBY2zIgDQwAAM04PsQ==');
      GraahkDTM := DTMFromString('mggAAAHicY2NgYHgBxM+A+A0QfwTiu0D8BIjzgTgTiguBOBdKH8q3ZqjOCALjTWtnMbQ2FoPF+IFy2DAjDgwBALoXERc=');
      NatsDTM := DTMFromString('mlwAAAHicY2dgYHgExM+B+C4QPwXi10D8HiqWB8T5QFwExCVAXAzEuUCcBcSCtSJgHOTvzxAfHc1QlJvLMLW/DyzGBZTHhRnxYCgAALzIEJc=');
      EnergyPotDTM := DTMFromString('mggAAAHicY2NgYMhiZGDIBOI0IM4B4hQgzgXiQqBcFRCXQXE+EBcBcbmTF5BkYujwCWUocfBg6PINY0gwtWHgB4piw4w4MAQAAIPHCsM=');
      AltarDTM := DTMFromString('mwQAAAHic42RgYGBiZGBgBOKvQDYfkGYGYhYg/gTkizFCcDSQHcgAoWOAOBmIC4HYB4h9gTgXiHNy0hniouNRcFZWKlg8OjqcIT4+moEfqI4QZiQCwwEAYO4QRg==');
      RuinsDTM := DTMFromString('mWAAAAHicY2FgYGBnZGB4DaTFgDQfEIcB2QlA7A/ElUC8/K8fQ3p6EkNUVBhDcnIcAz9QDBkzomEQAACwiwgs');
      SpellDTM := DTMFromString('mggAAAHicY2NgYNjOxMCwHoi3AfE+IN4LxOuA+ClQ7iEQ34PSz4H4CRC/fv2Kof7QJwyMCzDiwBAAAH3uF20=');
      DarkMageDTM := DTMFromString('mlwAAAHicY2dgYNjEyMCwiBFCHwHi00B8CojnAXE/UL4ViHOBuBiIpwJxBxBPB+JDcxsZji5oZji+sIVhamUSQ3qSP0NmSgDDjJpUBn6gPC7MiAdDAQChAxP2');
      ContinueDTM := DTMFromString('mggAAAHicY2NgYPgOxCKMDAwvgDQPkFYEYkkgvgzEV4D4KhCfh/JBtEmUIINOMB+DegAvQ1KHNZif0GbJwA/Ujw0z4sAQAAAVgwwq');
      VialDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIAeJiJgg7DYiLgDgHiHkZGRh4oFgUiIWAWBCI2YE4NDQSqJsJjCMjYxkSElMZ7B2cGKKi4xj4gaK4MCMeDAUAXQII9g==');
      PathToAltarDTMs[0] := DTMFromString('mbQAAAHicY2VgYJjNxMCwGIjnAPEEIG4EYk+guA0QB0FxIBB3lWkztHfPYsi2FQBjkzgxBn6gODpmxILBAAC8KQm0');
      PathToAltarDTMs[1] := DTMFromString('mbQAAAHicY2VgYFjOxMCwAIgXAvFsIN4IxBFA8SIgLgfiXCC2A+LaNl0GxUhRhlBneYbyXC0wmx8ojo4ZsWAwAADFDwmT');
      PathToAltarDTMs[2] := DTMFromString('mbQAAAHicY2VgYFjGxMCwFojLgbgOin2A4okMENoKiB2AuKTVjmHhwvkM8lGiDJLOQgzBLvIM/EBxdMyIBYMBAKeuCWM=');
      PathToAltarDTMs[3] := DTMFromString('mggAAAHicY2NgYFjKxMBQDsSVQFwMxI1QbAKUUwFiTSCWAGIbIHYE4oYOLQbVYH6GSFtJMA1j8wPlsGFGHBgCAPntCLg=');
      PathToAltarDTMs[4] := DTMFromString('mlwAAAHicY2dgYFjAxMDQC8T9QLwCiucAcR8QWwPl3YHYF4idgdgTiN2A2ByIVYMFwTjSVhpOR2YpMUzu0WXgB8rjwox4MBQAAKkvC8I=');
      PathToAltarDTMs[5] := DTMFromString('mwQAAAHic42RgYJjMxMAwAYgnAnELEp4DxHOBuAaIi4HqMoE4D4jzgbgSiEuhuAqI24DYM12FQT5EhCHYTg5Mg7CaBC9cDIT5geoIYUYiMBwAANXdDwU=');
      PathToAltarDTMs[6] := DTMFromString('mggAAAHicY2NgYFjDxMAwC4qnAPFUIF4IxGlAuXQgzgHiYCCOAOJ8IK6u12BQDBZkCLWVRqH5gXLYMCMODAEArg8Kew==');
      PathToAltarDTMs[7] := DTMFromString('mggAAAHicY2NgYEhjYmDIBeJoII4D4nAgjgLiFKBcOhAXAnEJA4SfAcRhztIMSpGCYAxjg2h+oBw2zIgDQwAA/eII7A==');
    end;

    procedure Free;
    begin
      FreeDTM(BankBoothDTM);
      FreeDTM(RingDTM);
      FreeDTM(BankDTM);
      FreeDTM(GraahkDTM);
      FreeDTM(NatsDTM);
      FreeDTM(EnergyPotDTM);
      FreeDTM(AltarDTM);
      FreeDTM(RuinsDTM);
      FreeDTM(SpellDTM);
      FreeDTM(DarkMageDTM);
      FreeDTM(ContinueDTM);
      FreeDTM(VialDTM);
      FreeDTMs(PathToAltarDTMs);
    end;

    And then in my main loop I have
    Simba Code:
    procedure MainLoop;
    begin
      AddOnTerminate('Free');
      GetDTMs;
      //rest of my main loop after
    end;

  8. #8
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Mind explaining what AddOnTerminate do?

    EDIT: Wow! You used DTMs for your path to altar

  9. #9
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    When you stop the script/the script ends it will run the procedure that you have in it. So when I stop the script it will run Free which will release all of my DTMs.

  10. #10
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! Script is getting better now.
    I have questions again. For depositing or withdrawing from bank, the text color of the item is orange. Can WaitUptext or IsUptext detect the colored text? I can't make it work somehow.

  11. #11
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    I've found orange text to be the most troublesome for me. In multiple scripts if I check for uptext/options that are orange they work sometimes, but not always. I used to have a failsafe to log out when out of essence by checking the uptext for Pure or whatever but I took it out because it kept logging out when I still had essence.

  12. #12
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That is my purpose of having check uptext when withdrawing essence, I took it out too because the uptext checking never work for me. Thanks for letting me know.

  13. #13
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Orange works for me on Uptext.

    Just saying.

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

    Default

    Quote Originally Posted by CephaXz View Post
    Simba Code:
    Procedure WithdrawEss;
    begin
      //Withdraw Essence
      if BankScreen then
      begin
        MouseBankSlot(1, mouse_move);
        writeln('Withdrawing Pure Essence');
        ClickMouse2(mouse_Right);
        WaitOption('All', 300);
      end;
    end;

    So I finally finish my cosmic runecrafter. But there's a problem on withdrawing items from bank. It sometimes just right click the essence but did not choose the withdraw all option. I've tried repeat this procedure until InvFull, but it will always withdraw 2 times, refill pouches, withdraw 2 times, refill again, and withdraw 2 times again, which is very bot-like. What can I do so that it withdraws the essence every single time?

    Your asking it to go to the essence right click it then wait for option "all" the code should look like this

    Simba Code:
    Procedure WithdrawEss;
    Begin
      If BankScreen Then
      Begin
        MouseBankSlot(1, mouse_move);
        Wait(200 + Random(200));
        WriteLn('Withdrawing Pure Essence');
        ClickMouse2(mouse_Right);
        Wait(200 + Random(200)); // have for lag or just till it recognizes the uptext
        ChooseOption('Withdraw-All');
      end;
    end;

    There you go that should be good to go^

    - GOOGLE

  15. #15
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    Orange works for me on Uptext.

    Just saying.
    Which function you're using to make uptext work on orange? WaitUptext?

    Quote Originally Posted by GOOGLE View Post
    Your asking it to go to the essence right click it then wait for option "all" the code should look like this

    Simba Code:
    Procedure WithdrawEss;
    Begin
      If BankScreen Then
      Begin
        MouseBankSlot(1, mouse_move);
        Wait(200 + Random(200));
        WriteLn('Withdrawing Pure Essence');
        ClickMouse2(mouse_Right);
        Wait(200 + Random(200)); // have for lag or just till it recognizes the uptext
        ChooseOption('Withdraw-All');
      end;
    end;

    There you go that should be good to go^

    - GOOGLE
    Thanks, I solved that

  16. #16
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    I use WaitUpText, yeah. It works better for me, set the time in WaitUpText to like, three seconds so it has time to look. It usually works in half a second or so.

  17. #17
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TotalKillz View Post
    Well this is what I do.

    Simba Code:
    procedure GetDTMs;
    begin
      BankBoothDTM := DTMFromString('mbQAAAHicY2VgYNBiZGBQAGJtINYAYgMgngcUnwPEU4F4KRAvBOL85FCGI3v2MLSUpTGkx/gzeNgaMPADxdExIxYMBgDBAgrH');
      BankDTM := DTMFromString('mlwAAAHicY2dgYAhhYmDwBOJkIHYF4gogdgfiLCCuBsrXAHEOEOcD8QwgTgDiWhB7cjdDQ00JQ2S8NENanCZDW/dkhllTexmy0uIZ+IHyuDAjHgwFAKpTD7A=');
      RingDTM := DTMFromString('mggAAAHicY2NgYNjLxMCwEYj3AfFWJgh/GxBXMDIw1ANxCxC3AXEtEFcDsfgcKYZzm+QYGvOFGa5sl2e4sVuBob9GlIEfaBY2zIgDQwAAM04PsQ==');
      GraahkDTM := DTMFromString('mggAAAHicY2NgYHgBxM+A+A0QfwTiu0D8BIjzgTgTiguBOBdKH8q3ZqjOCALjTWtnMbQ2FoPF+IFy2DAjDgwBALoXERc=');
      NatsDTM := DTMFromString('mlwAAAHicY2dgYHgExM+B+C4QPwXi10D8HiqWB8T5QFwExCVAXAzEuUCcBcSCtSJgHOTvzxAfHc1QlJvLMLW/DyzGBZTHhRnxYCgAALzIEJc=');
      EnergyPotDTM := DTMFromString('mggAAAHicY2NgYMhiZGDIBOI0IM4B4hQgzgXiQqBcFRCXQXE+EBcBcbmTF5BkYujwCWUocfBg6PINY0gwtWHgB4piw4w4MAQAAIPHCsM=');
      AltarDTM := DTMFromString('mwQAAAHic42RgYGBiZGBgBOKvQDYfkGYGYhYg/gTkizFCcDSQHcgAoWOAOBmIC4HYB4h9gTgXiHNy0hniouNRcFZWKlg8OjqcIT4+moEfqI4QZiQCwwEAYO4QRg==');
      RuinsDTM := DTMFromString('mWAAAAHicY2FgYGBnZGB4DaTFgDQfEIcB2QlA7A/ElUC8/K8fQ3p6EkNUVBhDcnIcAz9QDBkzomEQAACwiwgs');
      SpellDTM := DTMFromString('mggAAAHicY2NgYNjOxMCwHoi3AfE+IN4LxOuA+ClQ7iEQ34PSz4H4CRC/fv2Kof7QJwyMCzDiwBAAAH3uF20=');
      DarkMageDTM := DTMFromString('mlwAAAHicY2dgYNjEyMCwiBFCHwHi00B8CojnAXE/UL4ViHOBuBiIpwJxBxBPB+JDcxsZji5oZji+sIVhamUSQ3qSP0NmSgDDjJpUBn6gPC7MiAdDAQChAxP2');
      ContinueDTM := DTMFromString('mggAAAHicY2NgYPgOxCKMDAwvgDQPkFYEYkkgvgzEV4D4KhCfh/JBtEmUIINOMB+DegAvQ1KHNZif0GbJwA/Ujw0z4sAQAAAVgwwq');
      VialDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIAeJiJgg7DYiLgDgHiHkZGRh4oFgUiIWAWBCI2YE4NDQSqJsJjCMjYxkSElMZ7B2cGKKi4xj4gaK4MCMeDAUAXQII9g==');
      PathToAltarDTMs[0] := DTMFromString('mbQAAAHicY2VgYJjNxMCwGIjnAPEEIG4EYk+guA0QB0FxIBB3lWkztHfPYsi2FQBjkzgxBn6gODpmxILBAAC8KQm0');
      PathToAltarDTMs[1] := DTMFromString('mbQAAAHicY2VgYFjOxMCwAIgXAvFsIN4IxBFA8SIgLgfiXCC2A+LaNl0GxUhRhlBneYbyXC0wmx8ojo4ZsWAwAADFDwmT');
      PathToAltarDTMs[2] := DTMFromString('mbQAAAHicY2VgYFjGxMCwFojLgbgOin2A4okMENoKiB2AuKTVjmHhwvkM8lGiDJLOQgzBLvIM/EBxdMyIBYMBAKeuCWM=');
      PathToAltarDTMs[3] := DTMFromString('mggAAAHicY2NgYFjKxMBQDsSVQFwMxI1QbAKUUwFiTSCWAGIbIHYE4oYOLQbVYH6GSFtJMA1j8wPlsGFGHBgCAPntCLg=');
      PathToAltarDTMs[4] := DTMFromString('mlwAAAHicY2dgYFjAxMDQC8T9QLwCiucAcR8QWwPl3YHYF4idgdgTiN2A2ByIVYMFwTjSVhpOR2YpMUzu0WXgB8rjwox4MBQAAKkvC8I=');
      PathToAltarDTMs[5] := DTMFromString('mwQAAAHic42RgYJjMxMAwAYgnAnELEp4DxHOBuAaIi4HqMoE4D4jzgbgSiEuhuAqI24DYM12FQT5EhCHYTg5Mg7CaBC9cDIT5geoIYUYiMBwAANXdDwU=');
      PathToAltarDTMs[6] := DTMFromString('mggAAAHicY2NgYFjDxMAwC4qnAPFUIF4IxGlAuXQgzgHiYCCOAOJ8IK6u12BQDBZkCLWVRqH5gXLYMCMODAEArg8Kew==');
      PathToAltarDTMs[7] := DTMFromString('mggAAAHicY2NgYEhjYmDIBeJoII4D4nAgjgLiFKBcOhAXAnEJA4SfAcRhztIMSpGCYAxjg2h+oBw2zIgDQwAA/eII7A==');
    end;

    procedure Free;
    begin
      FreeDTM(BankBoothDTM);
      FreeDTM(RingDTM);
      FreeDTM(BankDTM);
      FreeDTM(GraahkDTM);
      FreeDTM(NatsDTM);
      FreeDTM(EnergyPotDTM);
      FreeDTM(AltarDTM);
      FreeDTM(RuinsDTM);
      FreeDTM(SpellDTM);
      FreeDTM(DarkMageDTM);
      FreeDTM(ContinueDTM);
      FreeDTM(VialDTM);
      FreeDTMs(PathToAltarDTMs);
    end;

    And then in my main loop I have
    Simba Code:
    procedure MainLoop;
    begin
      AddOnTerminate('Free');
      GetDTMs;
      //rest of my main loop after
    end;
    Oh, I didn't know we lived in the Matrix!

    OT: instead of waituptext, use waitUpTextMultiCustom('Poops', 'Toilet', 'Flush');
    you can use more words and the more words you use the better the detection

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
  •