Results 1 to 9 of 9

Thread: First Script

  1. #1
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default First Script

    Okay so I have a question on making my first script. I am making a bone burying one and when i am trying to get it to open the bank all it does is right click on the bank and really fast scrolls over it. Here is a quick rundown of the part of the script. I haven't added any anti-ban yet.

    procedure BankIt;
    begin
    OpenBankFast('fwb', True, True);
    Withdraw(1, 1, 28);
    CloseBank;
    end;

    Any help would be nice.

    Also if someone could reply on another thread I am starting?

    It is what I sould have in my script if I am applying for members. Specifically for my script though. Not a tutorial on what should be in a script.

  2. #2
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok one major thing to clear up.
    Your parameters are wrong. For my scar, you only need the location. Is your SRL up to date?

    EDIT: I think you mean OpenBank.

    Edit2: Try using,

    SCAR Code:
    procedure BankIt;
    begin
    While(Not(BankScreen)) Do OpenBankFast('fwb');
    Wait(20+Random(5))
    Withdraw(1, 1, 28);
    CloseBank;
    end;
    It worked for me. What it's doing is while the bank screen is not found it will keep doing OpenBankFast until it finds the bank screen. It can get stuck but it's a start. Does a little wait, withdraws and closes bank. And try using scar tags for posing scar code.

    [scar.]
    //Code
    [/scar.]
    (Remove the periods (.))
    Last edited by Mr. Doctor; 12-11-2009 at 04:55 AM.

  3. #3
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Like this

    [scar]
    procedure BankIt;
    begin
    While(Not(BankScreen))
    Do OpenBankFast('fwb');
    Wait(20+Random(5))
    Withdraw(1, 1, 28);
    CloseBank;
    end;
    [scar]

    Just trying out th scar coding I will try that tonight thanks.

  4. #4
    Join Date
    Oct 2009
    Location
    Connersille, Indiana
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  5. #5
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    SCAR Code:
    procedure BankIt;
    var
      FailSafe, Time: Integer;
    begin
      Time= 10*1000;   //substitute the 10 with how many max seconds you want to loop the open bank
      MarkTime(FailSafe);  //starts the counter for the loop to see be able to know how long the loop has been going for
      While(Not(BankScreen) and (TimeFromMark(FailSafe)<=Time)Do  //I added the TimeFromMark as a failsafe so you don't have to worry about an inifinite loop, try to avoid those
      begin
        wait(100+random(100));
        OpenBankFast('fwb');
      end;
      if(PinScreen) then
        InPin(Players[CurrentPlayer].pin);  //add to declare players under .nick a .pin, the pin should be wrapped in quotes, so if people have pins they can still use your script
      Wait(20+Random(5));  //forgot a semicolon on this line
      Withdraw(1, 1, 28);
      wait(40+random(25)); //added a little wait here so it doesn't go directly from withdrawing to instantly closing bank, doesn't hurt to have a little wait
      CloseBank;
    end;

    Just added some stuff to make it a bit more efficient, I commented on all the stuff I touched to let you know what I did and why, if you want me to explain anything further just ask .

    And I didn't compile this, but it looks like nothing's wrong with it to me.
    Last edited by Baked0420; 12-11-2009 at 02:26 PM.

  6. #6
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Gosh Darnit it does the same thing on everything I try. It either doesn't click after right clicking or it clicks and the character will move over and it doesn't open the bank though it clicks.

  7. #7
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay I got the banking to work now I have a problem with the Time and MarkTime I had to delete it becuase I kept getting an error.

  8. #8
    Join Date
    Sep 2008
    Location
    My House
    Posts
    519
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have spent days reading tutorials and working on this script and I am still stuck on the same dang spot. I need help with the withdraw. The WithdrawItem Ident: integer whats that, for ident type can i use this

    IntToStr(Players[CurrentPlayer].strings[1]

    and

    Players[0].Strings[1] := 'Bones';

    also for the uptex can i use the same thing as the IdentType?

    And then whats Tol: TIntegerArray can it be a number?

    there's no tutorial that i can find.

  9. #9
    Join Date
    Apr 2006
    Location
    The Netherlands
    Posts
    106
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WithdrawItem(Ident:Integer) means there has to be an integer inside the brackets.
    You're using IntToStr(strings[1]) which means you're trying to convert a string from an integer into a string. You need a StrToInt in this case.

    I don't know if the banking procedures in SRL work nowadays, since rs udpated the fonts? Your best bet would be to find and open the bank by either findcolor or tpointarray finding procedures and then using a finddtm/findbitmap to find the specified item you want to withdraw..

    UpText doesn't work, so you can't use anything for that..

    Tol:Tintegerarray is a combination of multiple numbers, e.g. : Tol:= [1,2,3,4,72,109,31];
    It can vary in length from 1 to a huge amount of integers.
    Back to scripting.

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
  •