SRL Archive - OSR Help

hey guys just looking for some help.


rol prodigy

2012-01-25 02:09:20

I'm planning on making a plain old air battles staff crafter it's great crafting exp.


I can't get it to start it gives me this.
Exception in Script: Unable to find file 'SRL/SRL/Misc/Stats.Simba' used from ''

if anyone could sugjest anything would be great.

Press Play

2012-01-25 02:26:43

There are lots of supported banks in SRL, and even some supported Bank chests! Go have a look in bank.simba for the supported banks :)

rol prodigy

2012-01-25 02:28:09

I actually found one hopefully it works but also I'm not sure how to make it withdraw I'm rly bad i know but trying to learn

rol prodigy

2012-01-25 15:09:48

anyone?

PatDuffy

2012-01-25 15:12:41

check out bank.simba in the SRL include folder.

Yanhua

2012-01-25 15:12:52

Once you've opened the bank, right click the item and select withdraw all :)

ChooseOption('ll') works nice.

rol prodigy

2012-01-25 15:41:20

Thanks guys. One thing I set up my whole script one problem. Don't know how to get it to use pin anyone got skype so I can show quickly.

rol prodigy

2012-01-25 16:11:04

I got some help from some1 they told me to implement this into my script not sure how or where.


Simba Code:
function CheckPin: Boolean;
begin
if(Players[CurrentPlayer].Pin = '')and(PinScreen)then
begin
Writeln('We are at the pin screen and you didn''t enter a pin');
TerminateScript;
end else
begin
if(PinScreen)then
begin
Writeln('Found Pin Screen');
InPin(Players[CurrentPlayer].Pin);
Writeln('Pin successfully entered');
Sleep(1000 + random(500));
if(BankScreen)then
begin
Result := true;
end;
end;
end;
end;

Heres my script.

//Script by rol Prodigy
//Version 1.0
program AirBattlestaffMaker;

//{.Include SRL\SRL\Misc\SMART.simba}
//remove the(//) if you want smart
{.include SRL/SRL.simba}

const
// ----------------SETUP-----------------------------
//For now you gotta be in swbank
loadcount= 1000 ; //how many cycles you need (14 to a cycle)
colb= 5 ; //Battlestaff col
rowb= 2 ; //Battlestaff Row
cola= 3 ; //AirOrb col
rowa= 2 ; //AirOrb row


bankty= 2 ;
//0 for any npc bank, 1 for specific bank, 2 for soul wars chest
specific='fwb' ; //some valed inputs are: 'veb', 'vwb' 'feb'


var
x, y: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //set username
Pass := ''; //set password
Pin := ''; //set pin
Active := True;
LampSkill := 'Crafting'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the Crafting skill
// ---------------END SETUP----------------------------------------
end;
end;


procedure AntiRandoms;
begin
ClickToContinue;
FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
end;

procedure Antiban;
begin
case Random(60) of // Random(60) generates a random integer from 0 to 59
10: RandomRClick;
20: HoverSkill('Fletching', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
end;
end;

function banksw: Boolean;

var
X, Y: Integer;
begin
FindNormalRandoms;
if (FindObjCustom(X, Y, ['Bank','nk ch','k che','chest'], [2963780,10724266,10000542,5592409], 3)) then
Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(300));
end;

Procedure MakeStaff;
begin
mousespeed:=(7+random(3));
wait(200);
if bankty=2 then
banksw;
wait(500+random(600))
depositall;
wait(800+random(300));
WithdrawEx(colb,rowb,14,[]);
wait(500+random(500));
withdraw(cola,rowa,0);
wait(500+random(1000));
closebank;
wait(1800+random(500));
invmouse((random(13)+1),1);
wait(700+random(300));
Invmouse((15+random(14)),1)
wait(1000+random(1000));
mmouse(359,408,200,200);
mmouse(259,408,30,30);
wait(100+random(200));
getmousepos(x,y);
begin
if ( WaitUpTextMulti(['Mak', 'tions'], 200) ) then
Mouse(x,y,1,1,true)else
exit;
end;
repeat
wait(1000);
Antirandoms;
until invcount=14
Antiban;
wait(random(5000));
if random(2)=1 then
begin
writeln('taking mini break');
wait(random(20000));
Antiban;
AntiRandoms;
end;
writeln('14 more staffs made');
end;

Procedure mainloop;
var
counter:integer;
begin
counter:=0;
repeat
counter:=1+counter;
findnormalrandoms;
MakeStaff;
writeln(loadcount-counter);
writeln('loads to go');
until counter=loadcount
writeln('Another set, problem free');
end;

kevin33

2012-01-25 16:12:21

You copy and paste it into the script after the opening of the bank.

Well because I cant test I can tell you what I think you can do. If the bank function opens the bank AND banks, then you will have to paste your pin function above the banking, then call it in the banking (write the name of the function and it will do in the place you write it if that makes sense).

If it doesnt actually bank, just opens it, then post it after, then add a withdraw/deposit function after so it will open ban, do pin stuff, deposit/withdraw, then move on to making the staffs

rol prodigy

2012-01-25 16:31:15

can you respost the script for me the way it should be?

kevin33

2012-01-25 16:32:02

Well I can try, does your bank function bank or just open it.

rol prodigy

2012-01-25 16:32:24

gonna try it now.

rol prodigy

2012-01-25 16:41:26

wtf?



[Hint] (63:10): Variable 'Result' never used at line 62
Compiled successfully in 437 ms.
Error: Out of Proc Range at line 385
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

that happens when I try to start it.

and it opened another tab called math.

kevin33

2012-01-25 16:42:10

Whats line 385?

rol prodigy

2012-01-25 16:43:22

384-GaussRand
385-~~~~~~~~~

like I said it opened a tab called math.

kevin33

2012-01-25 16:53:55

Okay wel try taking out that line maybe? It is useless I am quite certain. Try it and let me know.

rol prodigy

2012-01-25 16:56:22

take it out it does nothing rly.


maybe we should go back to the original and figure out why it sais [Hint] (63:10): Variable 'Result' never used at line 62

on my original script.

kevin33

2012-01-25 17:03:42

deals with boolean, there is no result on the boolean so it sas that. Taking it out should work.

rol prodigy

2012-01-25 17:05:42

omfg

line 64 identifier expected I know i'm shit bro but trying.

kevin33

2012-01-25 17:11:50

post lines like 50-70 and I will tell you the problem.

rol prodigy

2012-01-25 17:13:36

procedure Antiban;
begin
case Random(60) of // Random(60) generates a random integer from 0 to 59
10: RandomRClick;
20: HoverSkill('Fletching', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
end;
end;

function banksw:

var
X, Y: Integer;
begin
FindNormalRandoms;
if (FindObjCustom(X, Y, ['Bank','nk ch','k che','chest'], [2963780,10724266,10000542,5592409], 3)) then
Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(300));
end;

kevin33

2012-01-25 17:15:10

which one is 64?

rol prodigy

2012-01-25 17:16:16

var

kevin33

2012-01-25 17:17:37

Its the colon on the banksw. I am quite certain it needs to be a semi colon. Try that out. We may have messed up before.

rol prodigy

2012-01-25 17:20:27

this is what it originally is


function banksw: Boolean;
this sais:
[Hint] (63:10): Variable 'Result' never used at line 62

I replace the : with a ;

and I get this:
[Error] (63:16): colon (':') expected at line 62

kevin33

2012-01-25 17:21:43

Yea in the other thing you took out the boolean, and since you did that you dont need a colon. It should work even though it says Var not used.

rol prodigy

2012-01-25 17:32:35

now it say idenifier expected at line 64 which is :var

kevin33

2012-01-25 17:36:52

Leave var by itself no colon or anything

rol prodigy

2012-01-25 17:38:17

function banksw

var

X, Y: Integer;
begin
FindNormalRandoms;
if (FindObjCustom(X, Y, ['Bank','nk ch','k che','chest'], [2963780,10724266,10000542,5592409], 3)) then
Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(300));
end;


that;s what I have right now what should It look like?

kevin33

2012-01-25 17:41:36

well add a ; to banksw
If you come up with another error, post it.

You could add boolean back to it so it would be function banksw: boolean;
and it should work like that even with the variable hint thing.

rol prodigy

2012-01-25 17:43:49

I don't get an error but rather a hint

Variable 'Result' never used at line 62

and then when I try to start it it does that bs again where it opens a tab called math.

and give me errors on there.

Those errors I was talking about in the tab called "math"
Error: Out of Proc Range at line 385
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

weequ

2012-01-25 18:04:50

From: rol prodigy
I don't get an error but rather a hint

Variable 'Result' never used at line 62

and then when I try to start it it does that bs again where it opens a tab called math.

and give me errors on there.

Those errors I was talking about in the tab called "math"
Error: Out of Proc Range at line 385
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
function banksw -> procedure banksw;
To get rid of the hint.

You could debug the script a bit to see where it is stopping.
for example add WriteLn('Opening sw bank'); to your banksw procedure. Add this kind of WriteLn's to other procedures and functions too ;)

rol prodigy

2012-01-25 18:07:28

yes! got rid of the hint now my next problem is the opening of the math tab.

when I click run it opens another tab and give me this message.

Error: Out of Proc Range at line 385
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

kevin33

2012-01-25 18:10:09

erase the line, go back to the other tab and run it again. see what happens.If it works save both tabs.

rol prodigy

2012-01-25 18:11:52

Done that many a time and it just opens back up and give me another line with the same error.

Any feedback is greatly appreciated.

problem is S.M.A.R.T won't open it just opens another tab and gives me those errors.

rol prodigy

2012-01-25 18:27:20

Now it won't open math but will open text and give me this


That doesn't show up anymore but this does…

Exception in Script: Unable to find file 'SRL/SRL/Misc/Stats.Simba' used from ''