SRL Archive - Help

Can someone test first part of my script.


Mahatna

2012-04-29 16:26:46

hey guys, someone mind testing this for me, it should just log in, click spell book, then click humidify, but for somereason on logon it does nothing ;/

program New;
{$DEFINE SMART}
{$i srl/srl.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;


procedure MagicBookOpen;
var x, y: integer;
begin
if FindObj(x, y, 'agi', 2519723, 20) then
begin
Mouse(x, y, 5, 5, false);
ChooseOption('agi');
end;
End;

Procedure ClickSpell;
var x, y: integer;
Begin
If FindObj(X, Y, 'ast', 7754782, 20) then
Begin
Mouse(X, Y, 5, 5, false);
ChooseOption('ast');
End

End;


begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
MagicBookOpen;
ClickSpell;
end.

Thanks

Imanoobbot

2012-04-29 17:08:14

Maybe this sounds dump but you said it wont log in have you put in your account details?

shstiger2009

2012-04-29 17:10:32

From: Imanoobbot
Maybe this sounds dump but you said it wont log in have you put in your account details?


I think he meant after it logs in.

Also, you need to have a repeating loop, maybe that's the problem. Put

repeat
MagicBookOpen;
ClickSpell;
until (AllPlayersInactive);

Abu

2012-05-03 11:17:07

Try this as your MagicBookOpen procedure:

procedure MagicBookOpen;
var
x, y: integer;
begin
if FindObj(x, y, 'agi', 2519723, 20) then
begin
Mouse(x, y, 5, 5, False);
WaitOption('agi', 3000);
end else
Writeln('Couldn''t open Magic Book');
end;

If it writes in 'Couldn't open Magic Book' then you need to update your colours.