Log in

View Full Version : I've got a small problem...



Jason2gs
02-20-2007, 05:08 AM
Ok...

I decided to mark my own procedure down in the Login procedures found in the "core" file of SRL.

This is the procedure:

procedure LogMeOut;
begin
wait(500+random(200));
if(InChat('pullout'))then
begin
Logout;
end;
end;

This is the procedure in action:

program New;
{.include SRl/SRL.scar}
begin
SetupSRL;
repeat
LogMeOut;
wait(500+random(200));
until(false)
end.

What my script SHOULD do:

Scan the last chat message area every 500-700 MiliSeconds for the word "pullout." Then it will log the character out.

What my script does:

Only scans the last chat message area on startup, and won't scan again unless I stop and start the script again.

Please help me :)

Jason2gs
02-20-2007, 05:23 AM
*sees orange lettering*

Help is on the way!

EDIT: Perhaps not =/

whales
02-20-2007, 05:41 AM
I think yours should work but try this..

procedure LogMeOut;
begin
repeat
wait(500+random(200));
if(InChat('pullout'))then
begin
Logout;
end;
until(LogedOutScreen)//not the right function but you can find
end;


program New;
{.include SRl/SRL.scar}
begin
SetupSRL;
LogMeOut;
end.

Jason2gs
02-20-2007, 05:53 AM
Your's doesnt' seem to work either.

Would you mind testing mine real quick?

omgh4x0rz
02-20-2007, 11:36 AM
try this

if(InChat('ullout')) then

whales
02-20-2007, 02:09 PM
If the first letter in the message is caps then it may not work try what Omg posted..

Jason2gs
02-20-2007, 03:59 PM
Alrigh. Lemme check.

Jason2gs
02-20-2007, 04:01 PM
Not working =/

WHY WON'T IT REPEAT!!!

Hey321
02-20-2007, 04:49 PM
program New;
{.include SRl/SRL.scar}

procedure LogMeOut;
begin
wait(500+random(200));
if(InChat('pullout'))then
begin
Logout;
end;
end;

begin
SetupSRL;
repeat
LogMeOut;
WriteLn('12');
wait(500+random(200));
until(false)
end.

That works. I added the writeln to make sure it was repeating.

Jason2gs
02-20-2007, 05:05 PM
Thanks, Hey =)

Starblaster100
02-20-2007, 05:37 PM
You dont even need the extra procedure in there. This is a slightly more efficient way of doing what you wanted to do



Program New;

Begin
Repeat
If not(LoggedIn) then TerminateScript;
Wait(500);
until (InChat('ullout'))
Logout;
end.

Jason2gs
02-20-2007, 06:25 PM
program New;
{.include SRl/SRL.scar}

procedure LogMeOut;
begin
wait(500+random(200));
if(InChat('pullout'))then
begin
Logout;
end;
end;

begin
SetupSRL;
repeat
LogMeOut;
WriteLn('12');
wait(500+random(200));
until(false)
end.

That works. I added the writeln to make sure it was repeating.

*is embarrassed* :redface:

So it was working like it should have the whole time? Oops :p

Jason2gs
02-20-2007, 06:39 PM
So I'm unable to add my own procedure? It works when I put the whole procedure in the script, but not when I place the procedure in the Login file of SRL/core, and call it up in the main loop.

Is there a way I can go around doing this? I'd really like to be able to set up my own private procedures :)

Starblaster100
02-20-2007, 07:25 PM
You shouldn't place anything into the SRL files. If you create new procedures, always keep them in your own script.

Jason2gs
02-20-2007, 07:31 PM
Darn :(