SRL Archive - RuneScape News and General

First Script


Death12652

2009-12-10 23:24:02

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.

Mr. Doctor

2009-12-10 23:40:40

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,


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 (.))

Death12652

2009-12-11 09:06:51

Like this


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.

Alek000

2009-12-11 09:12:07

For the scar tags but a / before the last one.

Ex.

Baked0420

2009-12-11 09:23:36


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.

Death12652

2009-12-15 20:58:52

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.

Death12652

2009-12-15 23:44:34

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.

Death12652

2009-12-18 21:22:48

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.

Dub

2009-12-19 11:08:57

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.