SRL Archive - OSR Help

Toad picker script help


Jhangir

2011-12-21 11:43:34

program FrogPicker;

{$i SRL/SRL.scar}
{$i SRL/SRL/Misc/stats.simba}



Const


SRLStats_Username = '';
SRLStats_Password = '';

BreakIn = 135;
BreakFor = 15;
Version = 1.0;
NumbOfPlayers = 1;
StartPlayer = 0;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Runecrafting';
Active := True;
end;
end;

Procedure StatsGuise(wat:String);
begin
Status(wat);
Disguise(wat);
end;



Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Woodcut', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Function FindFrog:Boolean;
Var
x, y: Integer;
Begin
If FindObjCustom(x, y, ['Take', 'Swamp', 'toad'], [1991226, 1991226], 5) Then
Mouse(x, y, 0, 0, True);
WriteLn('Found Frog');
repeat
Until not IsUpText('oad') or (InvFull);
End;

begin
SetupSRL;
FindFrog;
end.


My script just picks up one frog and then terminates. Also whenever I run my script simba opens up another tab called text or object and it has all these functions and shiz in em.

RISK

2011-12-21 11:46:13

Try creating a loop for the "FindFrog" function in your begin end nest at the end.

Jhangir

2011-12-21 11:57:40

From: RISK
Try creating a loop for the "FindFrog" function in your begin end nest at the end.


Uhh How do I do that?

RISK

2011-12-21 11:59:33

Something like this:
procedure MainLoop;
var
I: Integer;
begin
repeat
FindFrog;
Inc(I);
until((I = 28));
end;

begin
SetupSRL;
MainLoop;
end.

Jhangir

2011-12-21 12:03:14

From: RISK
Something like this:
procedure MainLoop;
var
I: Integer;
begin
repeat
FindFrog;
Inc(I);
until((I = 28));
end;

begin
SetupSRL;
MainLoop;
end.



Tried it it only picks it up once and then terminates also I get this Error: Exception: TMWindow.ReturnData: The parameters passed are wrong; xs,ys 7,7 width,height 400,20 at line 285
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]

RISK

2011-12-21 12:04:15

It gets stuck at this:
Function FindFrog:Boolean;
Var
x, y: Integer;
Begin
If FindObjCustom(x, y, ['Take', 'Swamp', 'toad'], [1991226, 1991226], 5) Then
Mouse(x, y, 0, 0, True);
WriteLn('Found Frog');
repeat
Until not IsUpText('oad') or (InvFull);
End;

Remove the:
repeat
Until not IsUpText('oad') or (InvFull);

Jhangir

2011-12-21 12:13:57

From: RISK
It gets stuck at this:
Function FindFrog:Boolean;
Var
x, y: Integer;
Begin
If FindObjCustom(x, y, ['Take', 'Swamp', 'toad'], [1991226, 1991226], 5) Then
Mouse(x, y, 0, 0, True);
WriteLn('Found Frog');
repeat
Until not IsUpText('oad') or (InvFull);
End;

Remove the:
repeat
Until not IsUpText('oad') or (InvFull);



Still not working.. After it picks one up, this dam "object" tab opens and highlights this if (FindColorSpiralTolerance(cx, cy, color, xs, ys, xe, ye, Tol)) then .

Exception: Range check error at line 183
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]

Hero

2011-12-21 13:01:37


procedure FindFrog;//If you aren't going to use the result just have it be a procedure.
Var
x, y: Integer;

Begin
repeat//repeat before what you want it to repeat.
If FindObjCustom(x, y, ['Take', 'Swamp', 'toad'], [1991226, 1991226], 5) Then
Mouse(x, y, 0, 0, True);
WriteLn('Found Frog');
until(InvFull);//It will stop when the inventory is full.
End;

Also throw this under SetupSRL;

ActivateClient;

Jhangir

2011-12-21 19:22:28

Im just gonna give up on this because alot of people are already making this ill work on something else

[XoL]

2011-12-21 19:52:41

Don't give up try and make it, you already got pretty far

yelliebee

2012-02-02 10:35:43

Pleasee Go one whit it you got that far and can someone make One
A Toad Picker because i cant, and really need it

Jhangir

2012-02-02 18:48:12

Dont gravedig please and the code is basically given in here. Just copy it and fix the bugs

Olly

2012-02-09 09:57:32

From: Jhangir
Dont gravedig please and the code is basically given in here. Just copy it and fix the bugs


The only code here is a basic form of finding the toads and picking them up.