View Full Version : [help] problematic procedure
mikev
11-09-2006, 03:09 PM
I can't make this procedure work....help would be greatly appreciated.
procedure nofight;
begin
if (isfight = False) then
repeat
if (isfight = False) then
begin
moving;
until
if(isfight = true)then
break;
else
if(TimeFromMark(Camark) > 126000)then
begin
logout;
wait(90000 + random(800));
loginplayer;
end;
end;
end;
i get a Line 98: [Error] (15980:1): Identifier expected in script
line 98 is "UNTIL" in the script.
thanks,
mikev
bullzeye95
11-09-2006, 08:37 PM
procedure nofight;
begin
if (isfight = False) then
repeat
if (isfight = False) then
begin
moving;
end;
until (isfight = true)
else if(TimeFromMark(Camark) > 126000)then
begin
logout;
wait(90000 + random(800));
loginplayer;
end;
end;
Are those supposed to be standards?
mikev
11-10-2006, 12:01 AM
no.
problems solved.
thanks for the help sumilion.
WT-Fakawi
11-10-2006, 12:08 PM
procedure nofight;
begin
if not isfight then
repeat
if not isfight then moving;
if(TimeFromMark(Camark) > 126000) then
begin
logout;
wait(90000 + random(800));
loginplayer;
end;
until isfight or (TimeFromMark(Camark) > 126000);
end;
Didnt use SCAR tags, since they screw up the indenting. Hope this helps
mikev
11-10-2006, 02:49 PM
thanks for the help, i will try that.
is it possible to make this procedure only run if it hasn't found a fight for 2 minutes? I'm very new to timing and the time include in SRL.
thanks for the help,
mikev
IronTeapot
11-10-2006, 03:32 PM
i think you could do something like this
have counter variables. one that marks teh start time, and one that counts up.;
then once your last fight ended, start the variable counting(something with the system time? look it up in the scar help)
if (counter increased >original time + 2 minutes then
begin
nofight;
end;
Infantry001
11-10-2006, 07:55 PM
FightProc;
MarkTime(m);
while (TimeFromMark(m) < 12000) do
noFight;
If you show me more or describe more of waht you want to do, i can help you.
mikev
11-10-2006, 09:38 PM
hows this look?
procedure nofight;
begin
marktime(m);
if (not(isfight)) then
repeat
if (not(isfight)) then moving;
wait(10*1000+random(200));
if(isfight) then
break;
until
isfight or
(TimeFromMark(m) > 126000)
or findsymbol(x,y,'minigame')
begin
logout;
wait(120000+random(600))
loginplayer;
end;
end;
sorry no standards right now.
when the procedure calls moving....its basically a function I made to randomly move, in case you need to know in order to help me.
so basically Im asking, will this procedure check if theres a fight, and if there isn't it will check for two mintues or a banksymbol, then logout and back in. if there is a fight within two mintues, its will break. Did I design this correctly?
thanks,
mikev
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.