SRL Archive - Discussions and Debates

Alternate way of handlig unsolveables!


EvilChicken!

2008-04-11 08:46:24

My thought regarding unsolveable randoms.

Simply put, my suggestion is to add a variable boolean for handling randoms.
many SRL users run scripts with one single player and theirs PCs neearby constantly watching the screen for unsolveables while they watch TV or play video games and auto simultaniously. This is where that variable global boolean comes in. My idea was to have two options for handling unsolveable randoms, controlled by that boolean. If it is set to false, it would log out like it normally would, but if it is set to true, it would run something like this instead:

procedure ScriptTerminate;
begin
PlaySound('Empty'); // Sound is not found, so it plays a 'beep' instead, I think?
end;

It plays a sound and (not included in this example) keeps player logged in for > 5 minutes so a human would come and solve that random. This alows you to do something completely different and not have to monitor RS every fifth minute or so AND STILL NOT BE GUARANTEED TO DISCOVER THAT RANDOM.

This especially applies to single-player scripts.

n3ss3s

2008-04-11 09:39:13

It would require you to be close enough to hear the bleep, and usually the most effective macroing is being done while not near the computer.

But then again, if you are home, you can set it to true…

mastaraymond

2008-04-11 10:34:38

Put in an Alarm sound and set the sound of your boxes very loud and there you go Over-Night-With-Manual-Solving :).

Markus

2008-04-11 11:04:35

Lol @ Ray :p
But good idea, shouldn't be that hard to do?

mixster

2008-04-11 11:13:50

I always thought the best way was to play legit ;)
Anyway, being able to toggle players active status would be much better, as it could beep to tell you a player is now inactive, you could check the debug box to see who, log in via the website, solve it or put them back on track, then set their status back to active. It means that 10 hour proggies with 2 or 3 people would become more and more common and people will be able to debug their scripts much better as there would be much more to input instead of just saying 'it walked to far', people would be able to say 'it walked past the bank twice and walked past Varrok completely the third time' (Varrok's east mine as an example ftw!). The sound is a good idea, though I would much prefer a shotgun sound effect or maybe the sound of Window's starting up, as that would get my attention :)

EvilChicken!

2008-04-11 11:18:03

Exactly.
What is wrong with having extra procedures?
I don't se anything wrong with it?


And, I wouldn't mind if people would vote. :p

mastaraymond

2008-04-11 12:35:07

From: mixster
I always thought the best way was to play legit ;)
Anyway, being able to toggle players active status would be much better, as it could beep to tell you a player is now inactive, you could check the debug box to see who, log in via the website, solve it or put them back on track, then set their status back to active. It means that 10 hour proggies with 2 or 3 people would become more and more common and people will be able to debug their scripts much better as there would be much more to input instead of just saying 'it walked to far', people would be able to say 'it walked past the bank twice and walked past Varrok completely the third time' (Varrok's east mine as an example ftw!). The sound is a good idea, though I would much prefer a shotgun sound effect or maybe the sound of Window's starting up, as that would get my attention :)


There are multiple systems around where you can log on a webpage and reset your army..

mixster

2008-04-11 12:37:35

Logging into a webpage is a real hassle though, while having a button that you can press or something similar that brings up a form that lets you change it isn't :)

mastaraymond

2008-04-11 12:40:56

From: mixster
Logging into a webpage is a real hassle though, while having a button that you can press or something similar that brings up a form that lets you change it isn't :)

Hmmm. Got to disagree on that :p. When I'm at the pc I'm mostly working in FF. Typing the first part of the url and pressing and and click the button is easier IMO.

PriSoner

2008-04-11 13:34:18

From: EvilChicken!
My thought regarding unsolveable randoms.

Simply put, my suggestion is to add a variable boolean for handling randoms.
many SRL users run scripts with one single player and theirs PCs neearby constantly watching the screen for unsolveables while they watch TV or play video games and auto simultaniously. This is where that variable global boolean comes in. My idea was to have two options for handling unsolveable randoms, controlled by that boolean. If it is set to false, it would log out like it normally would, but if it is set to true, it would run something like this instead:

It plays a sound and (not included in this example) keeps player logged in for > 5 minutes so a human would come and solve that random. This alows you to do something completely different and not have to monitor RS every fifth minute or so AND STILL NOT BE GUARANTEED TO DISCOVER THAT RANDOM.

This especially applies to single-player scripts.


Exactly my thoughts.. Would work a treat an could be kept so that all existing scripts still work with no changes.

Rather than a boolen I would set a Global Variable as an Integer in SetupSRL eg. UnsolvableWait := 0

I would then change each of the logouts on the unsolvable randoms to log out after X seconds as defined in UnsolvableWait and to play alarm during that period.

I think 5 mins is too long and I think it should be user definable.

By doing it this way everything stays as it was for all existing scripts and anyone defining the UnsolvableWait time in thier script will get the benefit of an alarm and time to intervene.

[-jesus-]

2008-04-11 16:03:41

Use the alarm sound they have in Nexus (or something like it), easily heard if you have SMART minimized or are away from your computer…

almost

2008-04-11 23:42:25

I voted yes.
And by the way…
if you put any string in PlaySound it will make the beep noise.

n3ss3s

2008-04-12 03:46:33

I was thinking of something like this ;)


Var
AlarmTimer: TTimer;


Procedure rand_Alarm_StopScript(Sender: TObject);
Begin
If Players[CurrentPlayer].Rand := 'Unknown' Then
Begin
Writeln('*** Unsolvable random encountered ***');
If srl_UnSolvable_Terminate Then
Begin
AlarmTimer.Free;
TerminateScript;
End Else
Begin
Writeln('*** Allowing user to solve ***');
PlaySound('C:\Windows\Tada.wav');
While Not IsFKeyDown(srl_UnSolvable_FKey) Do
Wait(200);
Players[CurrentPlayer].Rand := '';
End;
End;


Procedure CreateAlarmTimer;
Begin

AlarmTimer := TTimer.Create(nil);
AlarmTimer.Interval := 100;
AlarmTimer.Enabled := True;
AlarmTimer.OnTimer := @rand_Alarm_StopScript;
AlarmTimer.Name := 'Random Reporter';

End;


Procedure SafeCreateTimer;

Var
V: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('CreateAlarmTimer', V);
End;


Whipped it quickly, might have forgotten something, note that that is not a working script :D

EvilChicken!

2008-04-12 04:28:55

Wow, 8 votes for yes, thanks people!

N3s, you're l33t. I wish I was on a normal Pc (Not a iMac G3) so I could test.
But, it looks really good. Thanks a lot!

Again, thanks people.

Edit: PriSoner, thanks a lot for your comments, I FULLY agree with you. ^_^

n3ss3s

2008-04-12 11:06:50


N3s, you're l33t. I wish I was on a normal Pc (Not a iMac G3) so I could test.
But, it looks really good. Thanks a lot!


:p

But remember, it's not 'working' yet, though I think it would if those srl variables would exist.

Bobarkinator

2008-04-12 16:17:45

You could just make them local for the purpose of testing :rolleyes:

Wizzup?

2008-04-12 17:05:31

From: n3ss3s
I was thinking of something like this ;)


Var
AlarmTimer: TTimer;


Procedure rand_Alarm_StopScript(Sender: TObject);
Begin
If Players[CurrentPlayer].Rand := 'Unknown' Then
Begin
Writeln('*** Unsolvable random encountered ***');
If srl_UnSolvable_Terminate Then
Begin
AlarmTimer.Free;
TerminateScript;
End Else
Begin
Writeln('*** Allowing user to solve ***');
PlaySound('C:\Windows\Tada.wav');
While Not IsFKeyDown(srl_UnSolvable_FKey) Do
Wait(200);
Players[CurrentPlayer].Rand := '';
End;
End;


Procedure CreateAlarmTimer;
Begin

AlarmTimer := TTimer.Create(nil);
AlarmTimer.Interval := 100;
AlarmTimer.Enabled := True;
AlarmTimer.OnTimer := @rand_Alarm_StopScript;
AlarmTimer.Name := 'Random Reporter';

End;


Procedure SafeCreateTimer;

Var
V: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('CreateAlarmTimer', V);
End;


Whipped it quickly, might have forgotten something, note that that is not a working script :D


Try putting the script on pause. :)

n3ss3s

2008-04-13 03:24:57


Procedure PauseTimers;

Begin
AlertTimer.OnTimer := nil;
AlertTimer.Enabled := False;
AlertTimer.Interval := High(1);
End;


Well that pauses the alarm timer, don't know how to pause the whole script unless every procedure was used by a timer…

EvilChicken!

2008-04-14 15:51:09

So, is this a good idea/can it be added to SRL?
Where is this heading?
Can it be done?
Ect.

mastaraymond

2008-04-14 15:55:19

From: n3ss3s

Procedure PauseTimers;

Begin
AlertTimer.OnTimer := nil;
AlertTimer.Enabled := False;
AlertTimer.Interval := High(1);
End;


Well that pauses the alarm timer, don't know how to pause the whole script unless every procedure was used by a timer…


Using a timer in this case isn't really worth it :p.

Besides you can always play an "emty" sound to stop the music :p.

n3ss3s

2008-04-15 06:50:21

Nevermind about the timers anyway, Wizzup told me that the timer system has a bug with the interval. If the script doesn't stop 'naturally' and you don't do Timer.Free, you will get an access violation pop up every time the interval is up.

EvilChicken!

2008-04-20 04:25:55

So are we getting any progress here?

.. To me it looks like we are. Is there still a chance of this getting included into SRL?

Metagen

2008-04-25 14:06:39

Yes, i've actually used this before. Whenever my script logs out i just make my computer go "TADA!!!.. TADA!!!… TADA!!!" lol. Its in my private scripts -.-

EvilChicken!

2008-04-26 07:50:03

But, whats the purpose if the script already has logged out? The information gets sent to JaGex when you log out.

And by the way, you should share your work.

king vash

2008-05-03 03:09:16

I remember reading an article about hotmail bots and they used people wanting to watch porn to enter captcha and then the bot would enter it.

Couldn't we impliment a system like with sleep codes from rs1, but for unsolvables randoms, you finish the random +1, you get a random -1, and then relie upon having 10-20 users watching it at any time

Widget

2008-05-04 22:52:46

From: king vash
Couldn't we impliment a system like with sleep codes from rs1, but for unsolvables randoms, you finish the random +1, you get a random -1, and then relie upon having 10-20 users watching it at any time


Actually, that's a very good idea but it would be very hard to implement since you couldn't log out of the person's account, so it would be more or less getting sent lots of bitmaps and it translating your clicks into SCAR clicks. Plus it would most likely have to be written in delphi with a plugin port to send data between the plugin and the application.

That and things like Molly and Pinball can't really be solved like that from the lag =\.

WhoCares357

2008-05-05 20:11:53

I like it. I just think you should make the wait time a little less. Maybe pause it and wait for a certain user input before continuing (while constantly checking the time). If the input isn't recieved after a few minutes, log out.