Results 1 to 5 of 5

Thread: OakChopnBank - Mouse 'n bank problem

  1. #1
    Join Date
    Aug 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default OakChopnBank - Mouse 'n bank problem

    Hello SRL,

    I was gone for a while, but im back now and i want to learn something about banking. I was reading some tutorials and i tried to build a bank procedure (for noobs).

    I replaced the DropInv; procedure with the BankInv; procedure.

    Before i replaced the procedures it worked pretty good, it cuts and drops.

    After i replaced, the mouse doesnt do anything. It even doesnt click a oak!

    Can anyone help me with my script?

    In advance thanks


    PS: here is the script

    Code:
    program OakChopnBank;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}
    
    var
      Gx, Gy, Ggx, Ggy, i, GetAnimation: integer;
    
    procedure BankInv;
    begin;
       if(FindSymbol(Ggx, Ggy, 'bank')) then
       begin
       Mouse(Ggx, Ggy, 0, 0, true);
       OpenBank('db', true, true);
       Deposit(2, 28, true);
       CloseBank;
       end;
    end;
    
    procedure FindOak;
    begin
     if not LoggedIn then
       Exit;
     while(not(FindObjCustom(Gx, Gy, ['oa','oak','ak'], [1781037, 2847590, 2179644], 7))) do
       Wait(200+random(500));
       
    end;
    
    procedure ChopOak;
    begin
     if not LoggedIn then
       Exit;
     repeat
       FindOak;
       Mouse(Gx, Gy, 0, 0, False);
       Wait(500 + Random(500));
       ChooseOption('hop');
       Wait(2000 + Random(1000));
       while(GetAnimation > 0) do
         Wait(500 + Random(500));
     until(InvFull);
     BankInv;
    end;
    
    begin
    ClearDebug;
    Writeln('Started');
    Writeln('Lol');
    MakeCompass('S');
    SetAngle(True);
    SetupSrl;
    ActivateClient;
    repeat;
      ChopOak;
    until(false);
    end.

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Well i'm not totallu sure that you can use Variables that are once called inside procedure ( In Mouse )

    Code:
    procedure FindOak;
    begin
     if not LoggedIn then
       Exit;
     while(not(FindObjCustom(Gx, Gy, ['oa','oak','ak'], [1781037, 2847590, 2179644], 7))) do
       Wait(200+random(500));
       
    end;
    
    procedure ChopOak;
    begin
     if not LoggedIn then
       Exit;
     repeat
       FindOak;
       Mouse(Gx, Gy, 0, 0, False);
       Wait(500 + Random(500));
       ChooseOption('hop');
       Wait(2000 + Random(1000));
       while(GetAnimation > 0) do
         Wait(500 + Random(500));
     until(InvFull);
     BankInv;
    end;
    What would i do is

    If Findobjcustom.... Then Mouse(Gx, Gy,2,2,True) in FindOak Procedure

    ~Home

  3. #3
    Join Date
    Aug 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The FindOak; and ChopOak; procedure worked when i had the DropInv; procedure, but when i replaced the DropInv; procedure with the BankInv; procedure it won't work anymore, so i think the BankInv; procedure is a lil' bugged..

  4. #4
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure BankInv;
    var
    Ggx, Ggy : Integers;
    begin
       if(FindSymbol(Ggx, Ggy, 'bank')) then
       begin
       Mouse(Ggx, Ggy, 0, 0, true);
       FFlag(0); // waits for your character to move to the bank
       OpenBank('db', true, true);
       Deposit(2, 28, true);
       CloseBank;
       end;
    end;

    Try that. Since Ggx and Ggy are used in only 1 procedure you should call the variables in that procedure, not at the beginning of the script. What's the difference? If you call it at the beginning of the script the variables are set throughout the entire script. If you call them in the Bank procedure then they are only used in that specific Procedure, otherwise imo it is wasting resources.

    ^^ Do the same for Gx and Gy.

  5. #5
    Join Date
    Aug 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It still doesnt work, it even doesnt move the mouse.. very strange..

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
  •