How I can make scar repeat something until a specific time?
Like if I want to make it repeat something for 15sec and then
do something else... Thank you!
How I can make scar repeat something until a specific time?
Like if I want to make it repeat something for 15sec and then
do something else... Thank you!
i think this would work
SCAR Code:var
Count: Integer;
begin
repeat
Wait(1000);
Count := Count + 1;
until(Count > 14);
lol
SCAR Code:program New;
var T: Integer;
begin
MarkTime(T);
repeat
wait(100);
until MarkFromTime(T) = 5000;
end.
In this example, we mark a point in time using MarkTime(T); where T is the mark in time. We repeat waiting 100ms until we have waited 5000ms (5s) from the Mark in Time T. You would replace the waiting with whatever you want the script to do while it waits the desired amount of time.
I like my coffee black just like my metal.
ummm an example ould be
SCAR Code:procedure DoStuff;
begin
Dowhateveryouthescripttodo;
end;
procedure mainloop;
var
time: Integer;
begin
repeat
MarkTime(Time);
dostuff;
until TimeFromMark(time) = (15000 + Random (1000));
end;
that does the process repeatativly for 15 seconds and a random second. Hope that kinda helps
edit: Shit lol 2 ppl beat me to it![]()
“Ignorance, the root and the stem of every evil.”
awww ye forgot about marktime![]()
lol
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
This is the script. It doesn't do FindRec;Code:program DefCastle; {.include srl/srl.scar} var x,y,time: Integer; const MonsterColor = 13421772; procedure FindRec; begin if(FindColor(x,y,MonsterColor,3,254,253,360)) then begin HoldMouse(x,y,true); Wait(50); MoveMouse(375,130); Wait(50); ReleaseMouse(x,y,true); Wait(20); end; end; procedure FindKill; begin if(FindColor(x,y,MonsterColor,3,254,253,360)) then begin HoldMouse(x,y,true); Wait(50); MoveMouse(375,3); Wait(50); ReleaseMouse(x,y,true); Wait(50); end; end; begin repeat FindRec; repeat MarkTime(time); FindKill; until TimeFromMark(time) = (20000); until(FindColor(x,y,0,13,33,26,47)); end.
Script is for Defend Your Castle.Thank you for your help.HTML Code:http://www.arcade.fi/peli/defend-your-castle.html
your remarking the time
try this
SCAR Code:program DefCastle;
{.include srl/srl.scar}
var
x,y,time: Integer;
const
MonsterColor = 13421772;
procedure FindRec;
begin
if(FindColor(x,y,MonsterColor,3,254,253,360)) then
begin
HoldMouse(x,y,true);
Wait(50);
MoveMouse(375,130);
Wait(50);
ReleaseMouse(x,y,true);
Wait(20);
end;
end;
procedure FindKill;
begin
if(FindColor(x,y,MonsterColor,3,254,253,360)) then
begin
HoldMouse(x,y,true);
Wait(50);
MoveMouse(375,3);
Wait(50);
ReleaseMouse(x,y,true);
Wait(50);
end;
end;
begin
repeat
FindRec;
MarkTime(time);
repeat
FindKill;
until TimeFromMark(time) = (20000);
until(FindColor(x,y,0,13,33,26,47));
end.
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
Still not doing FindRec.
It's suposed to drop 1 enemy per 20sec inside my castle yard
and not kill it like FindKill; does.
And it doesn't stop repeating even when the color 0 is found.
When i remove MarkTime it works but does only once FindRec.
Anyone? plz... this is quite important experiment.
try this one
dunno if it will work but im now goin to bedSCAR Code:program DefCastle;
{.include srl/srl.scar}
var
x,y,time: Integer;
const
MonsterColor = 13421772;
procedure FindRec;
begin
if(FindColor(x,y,MonsterColor,3,254,253,360)) then
begin
HoldMouse(x,y,true);
Wait(50);
MoveMouse(375,130);
Wait(50);
ReleaseMouse(x,y,true);
Wait(20);
end;
end;
procedure FindKill;
begin
if(FindColor(x,y,MonsterColor,3,254,253,360)) then
begin
HoldMouse(x,y,true);
Wait(50);
MoveMouse(375,3);
Wait(50);
ReleaseMouse(x,y,true);
Wait(50);
end;
end;
begin
repeat
FindRec;
MarkTime(time);
repeat
FindKill;
until TimeFromMark(time) >= (20000);
until(FindColor(x,y,0,13,33,26,47));
end.
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
haha my bad :P i had 2 minutes b4 i went to school and i was in a rush...
thanks for catching my mistake![]()
“Ignorance, the root and the stem of every evil.”
There are currently 1 users browsing this thread. (0 members and 1 guests)