SRL Archive - SRL Archives

[ARCHIVE] New Randoms System: Beta Release


Coh3n

2012-02-17 00:01:17

New Randoms System: Beta Release
Last updated: Mar. 5th, 2012
__________________________________________



Introduction:

[INDENT]Well, the beta release is finally here! It is somewhat rushed as I will be gone for most of this weekend and next week. I'm hoping that will give people plenty of time to test things out. This release comes with several new, useful, functions and more importantly, a brand new random event solver system. If you're interested on how some events were solved, take a look at the source code (I don't want to explain every single one).

First and foremost, thanks very much for the people who supplied me with accounts in random events. You were a huge help. I would especially like to thank bolshak25 and kevin33 as they have provided me with several accounts time and time again. A huge thanks also goes to DemiseScythe who wrote most of the original solvers (I just cleaned them up) and worked alongside me though out the process. Without her, there's no way I would have taken on a project like this.

For the status of each solver in the new system (including which are disabled), please take a look at this thread. You shouldn't experience any compiling errors with this release, but if you do, please post here and we can figure it out.

[ADMIN]I have NOT tested this a lot while running a script, so do not expect this to be flawless. After all, it's only a beta release.[/ADMIN][/INDENT]


Testing:

  1. Disable your SRL updater (SRL > Automatically > Update).
  2. Download the new SRL version from here.
  3. Extract its contents to Simba/Includes/.
  4. Rename the folder "SRL" without the quotes (delete or rename your old SRL folder).
  5. Call SRLRandomsReport in your script (to see which are being solved).
  6. Run whatever script you want.


Notable Changes:

  • A global array, SRL_Randoms, is set in SetupSRL. You can disable any random solver (will logout when found) at any time, by doing this:

  • SRL_Randoms[SRL_RAND_FROG].disabled := true;
  • You can disable ALL randoms by setting a global variable:

  • SRL_DisableRandoms := true;
  • A global variable, SRL_RandomScreenShot, has been added for the option to save a screenshot in Simba/Includes/SRL/logs/ when a random event is detected. To do so, add this to your script:

  • SRL_RandomScreenShot := true;
  • The LampSkill global variable is no longer in use (but remains to avoid compiling errors). Instead, the lamp skill is set per player. It is also set to an integer (skill constant), rather than a string. Since all integers are set to 0 by default, the default skill is SKILL_ATTACK.

  • with players[0] do
    begin
    name := '';
    pass := '';
    active := true;
    boxRewards := ['amp'];
    lampSkill := SKILL_MINING;
    end;
  • When Simba 990+ is released, each random file can be tested individually without editing the file. This will require a few changes when Simba 990 is released.
  • FindDead, FindMod, and FindDwarvenPopup have been moved to antiban.simba (the Reincarnate variable works just as it did before this update). They are still handled in FindNormalRandoms just as before, although I'm not sure if they will be in the future. It would be safest as a scripter to set SRL_Procs[SRL_OnRandomCall]. Example,

  • procedure Coh3n_OnRandomCall();
    begin
    if (findDead()) then
    deathWalk();

    if (findMod()) then
    changeWorlds();

    findDwarvenPopup();
    end;

    begin
    setupSRL();
    SRL_Procs[SRL_OnRandomCall] := @Coh3n_OnRandomCall;
    end.
    SRL_Procs[OnRandomCall] is called every time FindNormalRandoms or FindNonInventoryRandoms is called.
  • All solvers save the debug to SRL log files. The files are named by date and time, and are saved in Simba/Includes/SRL/logs/. You can disable logging at any time by setting SRL_DisableLogging in your script (I discourage this as it doesn't help us developers :p). You can also change the file save path by setting SRL_SavePath:

  • SRL_SavePath('c:/Users/Coh3n/Desktop/');
    SRL_DisableRandoms := true;
  • Not a change, but worth noting: SRL_Procs[SRL_OnFindRandom], if set, will be called when a random event is detected. It will then continue to solve the random.
  • SRL_OnFindRandomCall is no longer used as it was pointless.

Function Additions:
  • GetMusic, AreTalking, GetNPCChatName, and DoConversation added to gametab.simba.
  • TakeScreen added to SRLlog.simba.
  • Grid added to math.simba (incredible function for things like invBox, gameTab, bankBox, etc.).
  • GridBox added to math.simba.
  • WaitFindDTM, WaitTabExists, and WaitNPCTalking added to timing.simba.
  • ReturnTPAExceptColors added to color.simba.

SRL Random Tool:
[INDENT]This is a neat tool that I discovered shortly before starting this thread. The random tool is a form that is run when a random event is detected. It then gives the user the choice whether they want to solve the random themselves, or have SRL do it. Unfortunately, this tool doesn't work properly, but it is quite simple and wouldn't require a lot of editing for it to work again.

If someone would like to fix it up, the file is in Includes/SRL/srl/misc/randomtool.simba. I really don't think it needs that much editing to work properly, but some of the code is messy and may be hard to understand.
[/INDENT]


To-do Before Full Release:

  1. Updated stats code for new system.
  2. Save debug logs of random events so they can always be accessed.
  3. Finish most Mordaut puzzles, don't know exactly how many there are.
  4. Update and add Wizzup?'s Quiz solver.
  5. Add Beekeeper and Forester solvers.
  6. Fix any bug reports that come in.


Conclusion:
[INDENT]Please post any issues (along with debug text, if possible) on this thread. Any feedback is appreciated. Let's hope everything goes smoothly so this can be fully released as soon as possible. :) If you have any suggestions, please post them here.
[/INDENT]


Cheers,
Coh3n

PatDuffy

2012-02-17 00:16:25

Awesome! Installing it now, going to run it for some testing

YoHoJo

2012-02-17 00:20:06

So SRLRandomsReport now finds/solve/and reprots (debug) all randoms?
Does SRLRandomsReport repalce FindNormalRandoms?

PatDuffy

2012-02-17 00:21:58

From: YoHoJo
So SRLRandomsReport now finds/solve/and reprots (debug) all randoms?
Does SRLRandomsReport repalce FindNormalRandoms?


I was wondering the same thing, so I looked at the antirandoms.simba file and it seems it just writes the report literally :p So I think it still does the same thing.

Coh3n

2012-02-17 00:25:36

From: YoHoJo
So SRLRandomsReport now finds/solve/and reprots (debug) all randoms?
Does SRLRandomsReport repalce FindNormalRandoms?
No, it doesn't. I'll make that more clear. Also going to add a section on the functions that were added to SRL.

PatDuffy, download the latest version. Abyss and Evil Bob were giving false positives for some reason. I think tabExists(TAB_MAGIC) is throwing a false negative sometimes.

jamchiz

2012-02-17 00:26:51

what do you mean rename "SRL" folder, rename it to what?

YoHoJo

2012-02-17 00:28:51

From: jamchiz
what do you mean rename "SRL" folder, rename it to what?


Anything you want.
You can either delete it, and rely on your new downloaded SRL from his link.
Or remind your current srl folder for SRL2, or SRL Backup, or fdkjkasdfk.
And rename the new folder you downloaded from the link SRL.

PatDuffy

2012-02-17 00:34:23

Alright, gonna use the new-new version then :p

'Toxin

2012-02-17 00:39:18

Woooohoooooo awesome! Stoked for official release.

Ashaman88

2012-02-17 00:46:10

Great job! I will have to try it out! Thanks!

Joshua

2012-02-17 00:49:13

Great release, I have actually been waiting for this.
Thank you so much for all your time put into it.
I was actually saving up accounts stuck in randoms for you. D:
Seems like I am a little late.

Coh3n

2012-02-17 00:53:27

From: enjoi.
Great release, I have actually been waiting for this.
Thank you so much for all your time put into it.
I was actually saving up accounts stuck in randoms for you. D:
Seems like I am a little late.
Absolutely not. I can still use them.

LemonHaze

2012-02-17 01:43:58

awesome!

P1nky

2012-02-17 01:57:00

Lovely, Thank You Mates!

Harry

2012-02-17 03:39:36

Cool!

A screenshot is no longer saved if a random event is detected.

Why not? I very much enjoyed this feature.

Coh3n

2012-02-17 03:46:11

From: Harry
Cool!


Why not? I very much enjoyed this feature.
It wasn't really useful. I guess it could be used to update the detectors, but if the random wasn't detected, the screenshot would never be taken. Why'd you like it?

E: Be sure to download the latest version. I just uploaded some Maze fixes, including the detection. Apparently sometimes the magic tab exists in the maze, sometimes it doesn't.

Shatterhand

2012-02-17 17:13:02

Great job! So I just replace this srl folder, and my scripts work the same way?
SRLRandomsReport is just a test for you? What does it do?

kevin33

2012-02-17 17:17:50

Nice work Coh3n as always. My name is in the OP Im so proud :) Anything else you need feel free to let me know, I will be happy to help. Working on certers random right now ill pm you if I get it.

DemiseScythe

2012-02-17 18:01:10

Thank you for the credit ^.^~ and congrats on BETA =)

If you provide me with some randoms before Monday, I'll solve a few more. Still need a maze to finish the 4th path unless I did it and forgot about it. Anyways, I'll be glad to finish making the remaining solvers. I got an idea for molly which might just work, I'll be glad to try it out when I get a chance.

~ DemiseScythe

Rezozo

2012-02-17 18:03:54

Well not first, but first page! And this is so AWESOME!

Flight

2012-02-17 21:24:11

That's good news. I look forward to hearing some feedback on these new solvers, for sure.

Harry

2012-02-17 21:41:57

From: Coh3n
It wasn't really useful. I guess it could be used to update the detectors, but if the random wasn't detected, the screenshot would never be taken. Why'd you like it?

Because it's easy for me to see what accounts are in randoms and such. At least give the option (default off if you want) to take random screenshots please.

Brandon

2012-02-17 22:09:02

The pinball random has changed.. Just so you know. The pinball random now watches the player from afar.. meaning we can see ALL the pins at all times rather than having to run around as much or wait till our pin is on screen to click it.

DemiseScythe

2012-02-17 22:38:54

Pins are always visible afaik

Flight

2012-02-17 22:44:40

From: DemiseScythe
Pins are always visible afaik


It's been quite a while since I've had this particular random event, but I clearly remember at certain times the correct pillar wasn't visible with the given camera angle/pitch. I believe I even made a post on the RS forums about it and why this was.

When did you notice the change, ggzz?

Brandon

2012-02-17 23:02:34

From: Flight
It's been quite a while since I've had this particular random event, but I clearly remember at certain times the correct pillar wasn't visible with the given camera angle/pitch. I believe I even made a post on the RS forums about it and why this was.

When did you notice the change, ggzz?


After the update. I had the random like 7 times now. 8 Times if you include the one I just got in the last 1.5 hrs. It puts the camera right next to the trolls at the entrance and I had to set the camera back to the highest angle which was much much higher than usual. It's more than far enough to see all the pillars at all times.

like a way better bird's eye view =] So it actually makes solving that random a lot easier.

DemiseScythe

2012-02-17 23:05:22

Seems like we going to need to replace the original detector afterall, thanks for the info ggzz

Coh3n

2012-02-18 01:25:48

From: hunt3rx3
Great job! So I just replace this srl folder, and my scripts work the same way?
SRLRandomsReport is just a test for you? What does it do?
It's just a progress report for the solvers. :)

From: DemiseScythe
Thank you for the credit ^.^~ and congrats on BETA =)

If you provide me with some randoms before Monday, I'll solve a few more. Still need a maze to finish the 4th path unless I did it and forgot about it. Anyways, I'll be glad to finish making the remaining solvers. I got an idea for molly which might just work, I'll be glad to try it out when I get a chance.

~ DemiseScythe
I took care of the last Maze path. :)

From: Harry
Because it's easy for me to see what accounts are in randoms and such. At least give the option (default off if you want) to take random screenshots please.
Yes, I'll add the option. I'm not doing much in the next week though because my girlfriend is here, but I'll definitely do it when I can.

From: ggzz
The pinball random has changed.. Just so you know. The pinball random now watches the player from afar.. meaning we can see ALL the pins at all times rather than having to run around as much or wait till our pin is on screen to click it.
It's been like that for as long as I can remember. The solver in the Beta version works. It worked for me twice in a run yesterday. Once it failed to exit, but that was before I added debug logs so I don't know exactly what went wrong. Maybe it timed out, not sure.

____________________

I've made some updates. I fixed the Sandwich Lady pie option, added debug logging (logs are now saved to Simba/Includes/SRL/logs). So if a solver messes up, that should tell you why.

Evil Bob is also giving me false detection positives, so I'll need an account to fix that. I'll update the other thread right now.

bolshak25

2012-02-18 13:19:58

[00:00:08]: ***** Found Random: Pinball *****

It was in beekeeper. do we have a timer failsafe to logout and go false if it doesnt do anything after x time?

Coh3n

2012-02-18 15:06:10

From: bolshak25
[00:00:08]: ***** Found Random: Pinball *****

It was in beekeeper. do we have a timer failsafe to logout and go false if it doesnt do anything after x time?
Yeah, there is, but that shouldn't happen. Doesn't the Beekeeper talk to you when you get that random? The Pinball detector checks of an NPC is talking, and if there is, it exits. Unless AreTalking returned a false negative.

Did you see this happen or was that in the log files?

E: I've edited the way AreTalking works so hopefully it doesn't give false negatives.

I (or someone, since I'm away this week) need to look into a possible tabExists(TAB_MAGIC) false negative. That really messes with some detectors.

Rezozo

2012-02-18 15:54:20

From: Coh3n
Yeah, there is, but that shouldn't happen. Doesn't the Beekeeper talk to you when you get that random? The Pinball detector checks of an NPC is talking, and if there is, it exits. Unless AreTalking returned a false negative.

Did you see this happen or was that in the log files?

E: I've edited the way AreTalking works so hopefully it doesn't give false negatives.

I (or someone, since I'm away this week) need to look into a possible tabExists(TAB_MAGIC) false negative. That really messes with some detectors.

All I read was '(or someone, since I'm away this week)'…

Coh3n IS GOING TO HAWAII AND LEAVING ALL OF US TO FEND FOR OURSELVES!

bolshak25

2012-02-18 18:36:29

***** Found Random: Abyss *****
Abyss_Solve: Clicked Appendage
Abyss_Solve: Abyss solver exceeded maximum tries
***** Failed Random: Abyss *****
***** Found Random: Pillory (Cage) *****
PL_Solve: Didn't click cage lock
***** Failed Random: Pillory (Cage) *****

Clicked wrong appendage then thought it was in pillroy. watched this happen

E: i spoke too soon.

|====================================|
| ~ SRL ~ |
| Randoms Report |
|────────────────────────────────────|
| |
| |
|────────────────────────────────────|
|====================================|
=====S1NFisher BETA=====
Time Running: 1 Hours, 40 Minutes and 43 Seconds
Swordfish Caught: 151 at a rate of 89 per hour
Tuna Caught: 187 at a rate of 111 per hour
Fishing Lvl: 85
========================
We are back
Looking 1
Looking 2
Looking 3
Looking 4
Looking 5
Looking 6
Clicked Spot
Check inv1
1.5
Check inv2
Check inv1
1.5
Check inv2
Check inv1
1.5
Check inv2
Check inv1
1.5
Check inv2
Check inv1
1.5
Looking 1
Clicked Spot
Check inv1
1.5
***** Found Random: Abyss *****
Abyss_Solve: Clicked Appendage
Abyss_Solve: Abyss solver exceeded maximum tries
***** Failed Random: Abyss *****
***** Found Random: Pillory (Cage) *****
PL_Solve: Didn't click cage lock
***** Failed Random: Pillory (Cage) *****
Check inv2
Check inv1
1.5
Looking 1
***** Found Random: Abyss *****
Abyss_Solve: Abyss solver exceeded maximum tries
***** Failed Random: Abyss *****
***** Found Random: Pillory (Cage) *****
PL_Solve: Didn't click cage lock
***** Failed Random: Pillory (Cage) *****
Looking 2
***** Found Random: Abyss *****
Abyss_Solve: Abyss solver exceeded maximum tries
***** Failed Random: Abyss *****
***** Found Random: Pillory (Cage) *****
PL_Solve: Didn't click cage lock
***** Failed Random: Pillory (Cage) *****
Looking 3
***** Found Random: Abyss *****
Abyss_Solve: Clicked Appendage
Abyss_Solve: Abyss solver exceeded maximum tries
***** Failed Random: Abyss *****
***** Found Random: Pillory (Cage) *****
PL_Solve: Didn't click cage lock
***** Failed Random: Pillory (Cage) *****
Looking 4
***** Found Random: Abyss *****
Abyss_Solve: Clicked Appendage
Abyss_Solve: Clicked Appendage
***** Solved Random: Abyss *****
***** Found Random: Rewards *****
RD_SolveBox: Found reward box
RD_ClickBoxOption: Found box option oins
***** Solved Random: Rewards *****
Clicked Spot
Check inv1

E2:

|====================================|
| ~ SRL ~ |
| Randoms Report |
|────────────────────────────────────|
| |
| Evil Bob Solved ~ 1 |
| Abyss Solved ~ 1 |
| Sandwich Lady Solved ~ 1 |
| Rewards Solved ~ 3 |
| |
|────────────────────────────────────|
|====================================|

Looks good :)

illester

2012-02-19 01:23:24

Non of my randoms have ever been solved, not even one. I had about 18 while using Simba already…. is everyone having this problem? like it wont even attempt, even on the ridiculously easy ones where there an easy color.

Willing to provide my account next time i get another one.

Coh3n

2012-02-19 01:47:25

@bolshak25, that debug looks completely wrong. :confused: But you're saying it actually worked fine? Odd.

From: illester
Non of my randoms have ever been solved, not even one. I had about 18 while using Simba already…. is everyone having this problem? like it wont even attempt, even on the ridiculously easy ones where there an easy color.

Willing to provide my account next time i get another one.
Why don't you try reading the first post? This thread is for testing the new randoms system.

WT-Fakawi

2012-02-19 04:37:58

(or someone, since I'm away this week) need to look into a possible tabExists(TAB_MAGIC) false negative. That really messes with some detectors.
I am sure too there is something odd going on with the tab-checking. Looked at it, can't find it.

bolshak25

2012-02-19 09:41:01

From: Coh3n
@bolshak25, that debug looks completely wrong. :confused: But you're saying it actually worked fine? Odd.


well it detected it, but clicked the wrong one, then it thought it was pillroy, and it was weird, but it eventually got it

Coh3n

2012-02-19 19:30:53

From: bolshak25
well it detected it, but clicked the wrong one, then it thought it was pillroy, and it was weird, but it eventually got it
Well, Abyss will always click the north one until it's the right one (unless it's wrong 25 times, then it will logout, but that chances of that happening are slim to none). So you're saying it detected Abyss, then while it was solving, detected it was in Pillory?

I just found a looping error anyway that would have caused this (detectors still need to be fixed, though), so I'll fix that asap.

E: In the most updated version I fixed the frog random. Apparently there's a Frog Prince and Princess. Before it only handled the Princess, now it does both. I'm also testing a new Evil Bob detection and logging out if failed (not sure why I didn't have that before) for the next version.

E2: Also added optional screenshot taking for the next version. Will update first post when committed.

DemiseScythe

2012-02-19 22:36:30

From: Coh3n
Well, Abyss will always click the north one until it's the right one (unless it's wrong 25 times, then it will logout, but that chances of that happening are slim to none). So you're saying it detected Abyss, then while it was solving, detected it was in Pillory?

I just found a looping error anyway that would have caused this (detectors still need to be fixed, though), so I'll fix that asap.

E: In the most updated version I fixed the frog random. Apparently there's a Frog Prince and Princess. Before it only handled the Princess, now it does both. I'm also testing a new Evil Bob detection and logging out if failed (not sure why I didn't have that before) for the next version.

E2: Also added optional screenshot taking for the next version. Will update first post when committed.


I don't see how my detector with the chatbox gets messed up by prince/princess difference, it detects when the frog herald or helper thing talks to you, afaik that one is always male.

Coh3n

2012-02-22 19:28:58

From: DemiseScythe
I don't see how my detector with the chatbox gets messed up by prince/princess difference, it detects when the frog herald or helper thing talks to you, afaik that one is always male.
No that part works fine, but I also added a function (Frog_WaitChat) that will wait for the Prince or Princess to start talking, just to make sure we've clicked the right frog. If the Herald starts talking after a frog was clicked, we know the wrong one was clicked, and we have to look for the princess/prince again.

The detector works just fine. :)

E: Made a few updates. Be sure to download the latest version. Updates:
  • Added the option to take a screenshot when a random is detected (will update OP in a minute).
  • The SRL log file is now opened/closed when writing to it. Yeah, it's less efficient, but it allows users to check the file while the script is running.
  • I think I fixed the false negatives in TabExists.
  • Fixed the Pillory detector from returning true if the bank was open (or all tabs didn't exist).
Commits.

Again, all feedback is appreciated. Here's a randoms report from my last run:

|====================================|
| ~ SRL ~ |
| Randoms Report |
|────────────────────────────────────|
| |
| Sandwich Lady Solved ~ 1 |
| Cap'n Arnav Solved ~ 1 |
| Rewards Solved ~ 2 |
| |
|────────────────────────────────────|
|====================================|

kevin33

2012-02-22 19:49:50

Coh3n, I pmed you but I will still ask over the thread so other people can know too. What certers item(s) do you still need? Respond to my pm next time your on too :)

Coh3n

2012-02-22 21:47:31

From: kevin33
Coh3n, I pmed you but I will still ask over the thread so other people can know too. What certers item(s) do you still need? Respond to my pm next time your on too :)
I still need the helmet and fish items.

kevin33

2012-02-22 21:54:37

Disregard my pm then. I have the ring on my main. I will continue to try for the fish and helmet.

Coh3n

2012-02-24 16:00:08

Download the latest version. I improved Pillory detection and added helmet to the Certers solver. Any testing is appreciated. I'm running my army and "main", but I'm not getting many randoms. Only maybe every few hours if I'm lucky, so all the help is appreciated.

Harry

2012-02-26 04:57:07

Since all integers are set to 0 by default, the default skill is SKILL_ATTACK.

This might want to be changed. I can anticipate the angry pures who didn't set a lampskill, so the antirandoms ruined their account.

They are still handled in FindNormalRandoms just as before, although I'm not sure if they will be in the future.
They should remain in the randoms findings. They shouldn't add that much CPU and are useful for most people.

A global variable, SRL_RandomScreenShot, has been added for the option to save a screenshot in Simba/Includes/SRL/logs/ when a random event is detected.
Thanks for readding it :D Might want to remove the part at bottom of list saying it's removed.

Just curious why this isn't in the official branch though, and when we could expect this in the main branch. There are no infinite loops in this, and it will all logout+make active:=false if it fails to solve within a reasonable time, right? :D Also might want to merge in the recent SRL-5 public commits. But nice work, going to add this now and see how it works.

DemiseScythe

2012-02-26 05:07:18

From: Harry
This might want to be changed. I can anticipate the angry pures who didn't set a lampskill, so the antirandoms ruined their account.

They should remain in the randoms findings. They shouldn't add that much CPU and are useful for most people.

Thanks for readding it :D Might want to remove the part at bottom of list saying it's removed.

Just curious why this isn't in the official branch though, and when we could expect this in the main branch. There are no infinite loops in this, and it will all logout+make active:=false if it fails to solve within a reasonable time, right? :D Also might want to merge in the recent SRL-5 public commits. But nice work, going to add this now and see how it works.


There are those who care more about their names being in the include than about the stability of the SRL random system, so Coh3n made a new branch so they wouldnt ______ about their code getting replaced. Most likely going to have its separate Function so that everybody is happy.

Coh3n

2012-02-26 15:33:09

From: Harry
This might want to be changed. I can anticipate the angry pures who didn't set a lampskill, so the antirandoms ruined their account.
I agree, and was going to, but I couldn't think of an easy way of doing it. I could change the constants, but I don't know if there are any functions that rely on the actual number. They're supposed to be able to be changed, but I know some people use them as the integers their set to.

From: Harry

They should remain in the randoms findings. They shouldn't add that much CPU and are useful for most people.
Yeah I'll leave them their. When I wrote this thread, I thought they would have to be added as a separate random event, but I just called the functions (now in antiban.simba) at the end of the findRandoms function.

From: Harry

Thanks for readding it :D Might want to remove the part at bottom of list saying it's removed.
Will do.


From: Harry

Just curious why this isn't in the official branch though, and when we could expect this in the main branch. There are no infinite loops in this, and it will all logout+make active:=false if it fails to solve within a reasonable time, right? :D Also might want to merge in the recent SRL-5 public commits. But nice work, going to add this now and see how it works.
It's not in the master branch because I didn't test it very much while scripts were running before releasing, all I tested was individual solvers. It's a good thing I didn't merge, though, because I found a few false positives that happened quite often.

It should be ready to merge very soon, though.

E: I've updated this repo. with SRL master + added a few updates.

E2: Quiz solver is now in the latest version.

SRL Furious

2012-02-27 19:57:23

Quick question what do you mean when you say "Call SRLRandomsReport in your script (to see which are being solved)." Sorry if I sound like a idiot I just got into this color botting.

EDIT: Also, would it be possible to combine this new random solver system with the SMART restart after 6 hours method so that after it gets stuck on a random it will terminate without resetting over and over again?

For example I've been trying to use grats "Yak Killer" script with the 6 hour reset method and after it gets stuck in a random it just stays for another 6 hours without doing anything and the process continues to occur.

Thanks in advance for any help!

Coh3n

2012-02-27 21:07:46

From: SRL Furious
Quick question what do you mean when you say "Call SRLRandomsReport in your script (to see which are being solved)." Sorry if I sound like a idiot I just got into this color botting.
SRLRandomsReport is a procedure that will print a progress report of the randoms that have been solved or failed. You just have to call it before or after the progress report.

From: SRL Furious

EDIT: Also, would it be possible to combine this new random solver system with the SMART restart after 6 hours method so that after it gets stuck on a random it will terminate without resetting over and over again?

For example I've been trying to use grats "Yak Killer" script with the 6 hour reset method and after it gets stuck in a random it just stays for another 6 hours without doing anything and the process continues to occur.

Thanks in advance for any help!
I'm not sure I know what you mean. Like, it get's stuck in a random, terminates, then the crashSMART restarts it? And it repeats that over and over again? It sounds like you may have messed something up when setting up crashSMART.

SRL Furious

2012-02-27 21:29:46

From: Coh3n
SRLRandomsReport is a procedure that will print a progress report of the randoms that have been solved or failed. You just have to call it before or after the progress report.
Yea, the problem is how do I actually "call" the procedure, or how do I even compile it into my script?

I'm not sure I know what you mean. Like, it get's stuck in a random, terminates, then the crashSMART restarts it? And it repeats that over and over again? It sounds like you may have messed something up when setting up crashSMART.

Yea, the problem is how do I actually "call" the procedure, or how do I even compile it into my script?

Crashsmart doesn't exactly terminate right after the random gets stuck its actually terminates after the 6 hours as it's supposed to do and I was wondering if there is a way for when an unsolvable random occurs that crashsmart will disable and my script will log out. It's really irritating as I'm trying to max out my guy and I know that I can't run the yak killer script for more that 4-6 hours because of a random.

EDIT: If you can could you try to see if the Yak killer script even support the randoms because it never seems to solve any randoms its faced against and I recently installed the new SRL folder you have provided.

Coh3n

2012-02-27 22:46:02

From: SRL Furious
Yea, the problem is how do I actually "call" the procedure, or how do I even compile it into my script?


SRLRandomsReport();
Add that after the progress report is called.

From: SRL Furious

Crashsmart doesn't exactly terminate right after the random gets stuck its actually terminates after the 6 hours as it's supposed to do and I was wondering if there is a way for when an unsolvable random occurs that crashsmart will disable and my script will log out. It's really irritating as I'm trying to max out my guy and I know that I can't run the yak killer script for more that 4-6 hours because of a random.

EDIT: If you can could you try to see if the Yak killer script even support the randoms because it never seems to solve any randoms its faced against and I recently installed the new SRL folder you have provided.
You'll have to contact Harry for crashSMART and the author of the Yak Killer about randoms. Perhaps they're not calling FindNormalRandoms as much as they should.

E: Beekeeper solver is now up and running, please download the latest version!

i3egoHan

2012-02-29 12:34:37

Great work, Very nice way to deal with the randoms as with allowing the scripter to disable/enable certain ones.

Logouts seem quite a big thing due to the fact alot of scripters arent checking ifLoggedIn, enough, maybe it would be practical to add a login random for unexpected logouts? just a thought.

Coh3n

2012-02-29 13:37:49

From: i3egoHan
Great work, Very nice way to deal with the randoms as with allowing the scripter to disable/enable certain ones.

Logouts seem quite a big thing due to the fact alot of scripters arent checking ifLoggedIn, enough, maybe it would be practical to add a login random for unexpected logouts? just a thought.
You mean have that particular random return true if the player isn't logged in? What would it do, though? I suppose it could switch to the next player, but it's scripting 101 to check if the current player is active or not logged in.

i3egoHan

2012-02-29 13:55:11

Yeah i guess so, just seen so many people have bad fundamentals and make a complete mess of there main loops.

Probarly not needed, But what i mean is when i was working on Nexus/iBot we had a Random which if ever you got logged out, it would simply log you back in.

So yeah, basically just check ifLoggedIn in the FindRandoms procedure, Could be somewhat usefull what with the new Randoms system (being able to disable it if not needed)

Coh3n

2012-02-29 13:57:29

From: i3egoHan
Yeah i guess so, just seen so many people have bad fundamentals and make a complete mess of there main loops.

Probarly not needed, But what i mean is when i was working on Nexus/iBot we had a Random which if ever you got logged out, it would simply log you back in.

So yeah, basically just check ifLoggedIn in the FindRandoms procedure, Could be somewhat usefull what with the new Randoms system (being able to disable it if not needed)
Oh that's actually not a bad idea. I handle logouts like that in my scripts, but I would assume that most people don't account for connection losses or the like.

I think I will add something like this:

if ((not loggedIn()) and (players[currentPlayer].active)) then
begin
addToSRLLog('_FindAllRandoms: Unexpected logout, logging back in');

if (not loginPlayer()) then
exit;
end;
Seems simple enough.

Harry

2012-02-29 15:02:10

Auto relogging is defiantly not desirable. A scripter should handle logged out, not the antirandoms. It should never automatically relog without the script's consent. Unless I am misreading what you're implying, anyways.

i3egoHan

2012-02-29 17:05:10

From: Harry
Auto relogging is defiantly not desirable. A scripter should handle logged out, not the antirandoms. It should never automatically relog without the script's consent. Unless I am misreading what you're implying, anyways.


In this case its fine.

In the case that the Random solvers work on a diffrent thread (which they dont right?) then its totally desirable, Because the character SHOULD not be logged out, Logging back in is just going to help make scripts run much better.

I may be wrong, but ive worked on a fair few bots from way back, and most of the time this as been incorperated, and helped run scripts for longer.

This shouldnt interfer with any break handlers or anything.

Peace

Harry

2012-02-29 17:21:11

From: i3egoHan
In this case its fine.

In the case that the Random solvers work on a diffrent thread (which they dont right?) then its totally desirable, Because the character SHOULD not be logged out, Logging back in is just going to help make scripts run much better.

I may be wrong, but ive worked on a fair few bots from way back, and most of the time this as been incorperated, and helped run scripts for longer.

This shouldnt interfer with any break handlers or anything.

Peace

Think of it this way.

Script:
begin
WalkToBank;
WithdrawStuff;
WalkToMine; // you get a random inside walkToMine, and for some reason it switches onto your next player (your proposed change into antirandoms)
MineStuff;
end;

Now you're on a new character who hasn't done the above 3 procedures. This is bad practice. Script should detect being logged out and ONLY THE SCRIPT should handle logging back in. Antirandoms is antirandoms, not for logging back in to a new player when your current one is broken.

It has nothing to do with "break handlers", but rather the fact you're going to intentionally induce confusion into the script; a confusion that is better handled the way it is now, which is much more simple and much less prone to critical failure.

WT-Fakawi

2012-02-29 17:30:24

Definately should stay logged out. It is difficult -as Harry pointed out- to gather at what point in the script you loggedout, thus you do not know where you are and how the Player should proceed. Remember, no coords here :(

Currently, with all colors on minimap shifting (except for symbols) it is difficult enough to create solid anchors. You have to recallibrate when you come out of a random, since all colors shifted.

i3egoHan

2012-02-29 17:32:00

From: Harry
Think of it this way.

Script:
begin
WalkToBank;
WithdrawStuff;
WalkToMine; // you get a random inside walkToMine, and for some reason it switches onto your next player (your proposed change into antirandoms)
MineStuff;
end;

Now you're on a new character who hasn't done the above 3 procedures. This is bad practice. Script should detect being logged out and ONLY THE SCRIPT should handle logging back in. Antirandoms is antirandoms, not for logging back in to a new player when your current one is broken.

It has nothing to do with "break handlers", but rather the fact you're going to intentionally induce confusion into the script; a confusion that is better handled the way it is now, which is much more simple and much less prone to critical failure.


Maybe you have a point.

But if you got logged out at WalkToMine, and player was switched… the scripter should have handled that anyway? else it still would not have done the previous procedures? Maybe im missing something?

The randoms are still only checked if the FindNormalRandoms is called right?

Harry

2012-02-29 17:34:39

From: i3egoHan
But if you got logged out at WalkToMine, and player was switched… the scripter should have handled that anyway? else it still would not have done the previous procedures? Maybe im missing something?

The randoms are still only checked if the FindNormalRandoms is called right?

Yes, they should still have failsafes, but does that mean we should intentionally induce more chances for critical errors? There's no point to add logging back in unless the logout was requested via the antirandom solver and was relogging into the same exact account.

Yes.

Gu3st...

2012-02-29 17:37:47

I agree 100% with Harry. I often use Logout; as a way of doing NextPlayer(False); because I use if not LoggedIn then Exit; in *every* function that interacts with runescape and requires a player to be logged in (And that's how it should be)

i3egoHan

2012-02-29 17:50:37

I still think where both looking at it diffrently here… What effect would this have on Logout… If you specify logout.. it wont log you back in…

Ive never seen a script which as…

Logout;
FindNormalRandoms;

Adding this login to randoms doesnt mean your gona stayed logged in forever..

Forgive me if im not understanding something here… Been up for a fair amount of hours :-)

Harry

2012-02-29 17:54:03

From: i3egoHan
I still think where both looking at it diffrently here… What effect would this have on Logout… If you specify logout.. it wont log you back in…

Ive never seen a script which as…

Logout;
FindNormalRandoms;

Adding this login to randoms doesnt mean your gona stayed logged in forever..

Forgive me if im not understanding something here… Been up for a fair amount of hours :-)

You can be logged out randomly while logged into RS for many reasons such as 6 hour logout, network connection errors, random event solvers that took too long to finish, idle timeout, etc.

i3egoHan

2012-02-29 18:01:14

Okay, there doesnt seem to be much love for it so i guess leave it, unless more people side with me hah.

Just for the record, network connection errors would be one of the main reasons for this Login, random event solvers probarly have all fail safes, I guess you make a point on the 6 hour limit, (that wasnt there when i was active in the scene) but hopefully most people are using one of our smart restarters.

I guess we could leave it, as coh3n stated, it comes down to the quality of the script.

Peace.

Coh3n

2012-03-01 00:08:01

From: i3egoHan
Okay, there doesnt seem to be much love for it so i guess leave it, unless more people side with me hah.

Just for the record, network connection errors would be one of the main reasons for this Login, random event solvers probarly have all fail safes, I guess you make a point on the 6 hour limit, (that wasnt there when i was active in the scene) but hopefully most people are using one of our smart restarters.

I guess we could leave it, as coh3n stated, it comes down to the quality of the script.

Peace.
I agree with you. I'm not sure everyone else is understanding it right.

All this would do is log the player back in if they were found logged out and are still active. NextPlayer(true/false) isn't called anywhere; it should only be called in scripts. If a solver fails, the player is set to false and logged out; therefore, this "logout random" wouldn't log the player back in.

If, for any reason whatsoever, the player is logged out and set to false (presumably, something fails), the script still goes on working the way it always has.

This idea is perfect for handling connection losses.

E: Latest version has Forester working enabled.

tootallmatt

2012-03-01 01:38:35

From: Coh3n
I agree with you. I'm not sure everyone else is understanding it right.

All this would do is log the player back in if they were found logged out and are still active. NextPlayer(true/false) isn't called anywhere; it should only be called in scripts. If a solver fails, the player is set to false and logged out; therefore, this "logout random" wouldn't log the player back in.

If, for any reason whatsoever, the player is logged out and set to false (presumably, something fails), the script still goes on working the way it always has.

This idea is perfect for handling connection losses.

E: Latest version has Forester working enabled.


The connection loss logout essentially is random if you think about it.. It certainly affects me at least. Scripts may need to be enhanced to allow for this to be built in however. It sounds logical though that as long as the player is still active, there should be no problem with logging back in. Some scripts would definitely need to be "Smarter" though. If we were on a bank run and randomly logged out, then a lot of scripts wouldn't know what to do..

Coh3n

2012-03-01 01:53:43

From: tootallmatt
The connection loss logout essentially is random if you think about it.. It certainly affects me at least. Scripts may need to be enhanced to allow for this to be built in however. It sounds logical though that as long as the player is still active, there should be no problem with logging back in. Some scripts would definitely need to be "Smarter" though. If we were on a bank run and randomly logged out, then a lot of scripts wouldn't know what to do..
That's the point of this addition. Say the script is in the middle of a walking procedure and the connection is lost. IF FindNormalRandoms is called, it will detect that you're logged out (and the player is still active), then log back in and continue with the rest of the walking procedure. If this addition isn't there, the script will most likely mess up, unless the scripter has made their script so it handles connection losses (90% of scripts aren't written that way).

This, in my opinion is A LOT more effective than relying on the scripter to handle it.

Harry

2012-03-01 02:48:13

From: Coh3n
That's the point of this addition. Say the script is in the middle of a walking procedure and the connection is lost. IF FindNormalRandoms is called, it will detect that you're logged out (and the player is still active), then log back in and continue with the rest of the walking procedure. If this addition isn't there, the script will most likely mess up, unless the scripter has made their script so it handles connection losses (90% of scripts aren't written that way).

This, in my opinion is A LOT more effective than relying on the scripter to handle it.

No thanks. The current system is fine, changing it to this will add unneeded problems. I and many other people often call FindNormalRandoms without checking LoggedIn. And as Fakawi said, colours change with a client relog, so that would cause fatal errors to anyone's autocolor scripts unless they coded it to handle this "new" system which has more chances of failing. If someone wants to handle connection loss, they need to do it in their script; this is how it should be done. Autologging from include is "singleplayer javabot" mentality where you only have one player per client and colors don't matter to you.

Coh3n

2012-03-01 12:26:49

From: Harry
No thanks. The current system is fine, changing it to this will add unneeded problems. I and many other people often call FindNormalRandoms without checking LoggedIn. And as Fakawi said, colours change with a client relog, so that would cause fatal errors to anyone's autocolor scripts unless they coded it to handle this "new" system which has more chances of failing. If someone wants to handle connection loss, they need to do it in their script; this is how it should be done. Autologging from include is "singleplayer javabot" mentality where you only have one player per client and colors don't matter to you.
I still don't think you get what I'm trying to say, but okay.

I still fail to see any possibly way this would cause problems. What unneeded problems are you talking about? With this addition, you won't have to call FindNormalRandoms after calling LoggedIn, so I'm not sure where you got that idea. If your autocoloring function breaks when you log in and out, then it's not very good, and honestly, the colors don't change THAT much.

Kyle Undefined

2012-03-01 12:28:49

Colors change more when you reload the client, not as much when you log out/in, right?

I think that would be very cool feature!

i3egoHan

2012-03-01 13:04:57

Yeah, im still with coh3n on this one… Sure it may cause some scripts to mess up… only if they were going to mess up anyway.

And yeah i defently see it solving more problems then it causes… Anyway.. looks like its 50/50 something we should defently look back on.

I wouldnt mention it, but i have used it in a number of bots.. And really never was any problems.. Im not trying to get into a debate war.. like everyone here i want the best for SRL and the community.

Coh3n

2012-03-01 16:06:25

From: Harry
Think of it this way.

Script:
begin
WalkToBank;
WithdrawStuff;
WalkToMine; // you get a random inside walkToMine, and for some reason it switches onto your next player (your proposed change into antirandoms)
MineStuff;
end;

Now you're on a new character who hasn't done the above 3 procedures. This is bad practice. Script should detect being logged out and ONLY THE SCRIPT should handle logging back in. Antirandoms is antirandoms, not for logging back in to a new player when your current one is broken.
Sorry, forgot about this post.

That wouldn't happen. It doesn't log into a new player, it logs into the player that was just logged out. Even if that player was set inactive, it wouldn't login to the next player.

E: Latest version has fixed Maze detection and door finding.

Tisa

2012-03-03 03:16:39

I still don't get how to use this in a script.

Like this?

DeclarePlayers;
if not LoggedIn then LogInPlayer;
Wait(3000 + Random(200));
DoThePainting;
StartExp:= 0;
ToggleXPBar(True);
StartExp:= GetXPBarTotal;
MainLoop;
Proggy;


SRLRandomsReport();


FreeForm(frmDesign);
end.
?

Brandon

2012-03-03 03:35:46

From: Harry
No thanks. The current system is fine, changing it to this will add unneeded problems. I and many other people often call FindNormalRandoms without checking LoggedIn. And as Fakawi said, colours change with a client relog, so that would cause fatal errors to anyone's autocolor scripts unless they coded it to handle this "new" system which has more chances of failing. If someone wants to handle connection loss, they need to do it in their script; this is how it should be done. Autologging from include is "singleplayer javabot" mentality where you only have one player per client and colors don't matter to you.


Y so oblivious to change? This has nothing to do with javabots..

Simply put.. if u don't like it.. in your main procedures do something like:

If FindNormalRandom then
Exit;// Or next player then Restart Loop..

A mainloop should be made in mind so that the script can be started from anywhere within that loop.
When your next player is introduced, u should always restart the loop anyway..

Shatterhand

2012-03-03 06:11:37

My question is: is there a random where no tabs are missing?

Harry

2012-03-03 06:47:19

From: ggzz
Simply put.. if u don't like it.. in your main procedures do something like:

If FindNormalRandom then
Exit;// Or next player then Restart Loop..

A mainloop should be made in mind so that the script can be started from anywhere within that loop.
When your next player is introduced, u should always restart the loop anyway..

Why should I have to change my scripts for a change that isn't even needed? Since when is logging in the job of the include and not simply the scripter?

And yes I do restart my loops when a logout is detected. It's my scripting style. It's the most efficient and least prone to failing.

Relogging changes colors and stuff and other information you may have saved. Auto relogging is bad, just don't do it. I see no reason why the scripter shouldn't handle a logout. It's NOT the antirandom's job to handle.

i3egoHan

2012-03-03 10:09:54

Its either attempt the relog, or just stay logged out.

I get exacly where your coming from, its down to the scripter to have better fail safes, but lets be honest, theres a handfull of good scripters who actually understand the fundmentals of control flow on this forum.

Were just trying to make the less experienced scripters be able to develope better scripts.

Harry

2012-03-03 10:14:00

From: i3egoHan
Its either attempt the relog, or just stay logged out.

Stay logged out? Wat? Unless someone has an infinite loop (WHICH RS KICKING THEM OFF FOR BEING IDLE WOULD BREAK OUT OF), this will just relog back in via their script, unless their code is that bad, in which case they shouldn't be running it at all. See how much worse it makes it? It doesn't help inexperienced scripters whatsoever, and it encourages bad scripting practices. Not to mention inexperienced scripters aren't the majority of actively used scripts… This will not help at all.

The only time LoginPlayer should ever be called is from within a user's script. Period.

Coh3n

2012-03-03 19:39:36

From: hunt3rx3
My question is: is there a random where no tabs are missing?
There is, I can't remember which one.

From: Harry
Why should I have to change my scripts for a change that isn't even needed? Since when is logging in the job of the include and not simply the scripter?
If this was added, you wouldn't have to change a thing, that's the point.

From: Harry
Stay logged out? Wat? Unless someone has an infinite loop (WHICH RS KICKING THEM OFF FOR BEING IDLE WOULD BREAK OUT OF), this will just relog back in via their script, unless their code is that bad, in which case they shouldn't be running it at all. See how much worse it makes it? It doesn't help inexperienced scripters whatsoever, and it encourages bad scripting practices. Not to mention inexperienced scripters aren't the majority of actively used scripts… This will not help at all.

The only time LoginPlayer should ever be called is from within a user's script. Period.
I see it's hopeless trying to convince you otherwise, so let's agree to disagree. This debate is going nowhere.

Yago

2012-03-03 23:41:20

I actually have to agree with Harry on this one.

SweDam

2012-03-04 19:45:52

What am i supposed to write on the "FindBoxOption" ?

lolbus

2012-03-05 07:12:32

its so embarrassing im the only one who have trouble even detecting the presence of random event, it doesn't respond though i changed my entire srl folder to threadstarter's. it just stand there and execute my mainloop, do i need to add in certain functions to activate it?

<_<

Finally works after I execute
FindNormalRandom

but logout my character, only

***** STR: FOUND RANDOM: 'Drill Demon' *****
Screenshot of: Found Drill Demon random 2 Minutes and 10 Seconds
Screenshot of: Found Demon 2 Minutes and 12 Seconds
Can't find what Damien wants us to do.

Coh3n

2012-03-05 16:13:37

Please don't double post, that's what the edit button is for. And yes, with the old and new systems you have to call findNormalRandoms, otherwise the script has no idea to look for them. :p

And, from that debug, you're using the old solvers. When you replace your SRL folder with the one in the first post, you have to disable the SRL updater, otherwise it will override the folder you replaced.
____________________________________

Please download the latest version. There are a few bug fixes + the Mordaut solver is enabled.

Coh3n

2012-03-05 19:09:59

This has now been officially released here. Please continue discussion on the proper random event thread.

Thanks.