Log in

View Full Version : Can someone test first part of my script.



Mahatna
04-29-2012, 08:26 PM
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
04-29-2012, 09:08 PM
Maybe this sounds dump but you said it wont log in have you put in your account details?

shstiger2009
04-29-2012, 09:10 PM
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
05-03-2012, 03:17 PM
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.