New Randoms System
_____________________________
Introduction:
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). There is a short description of each solver at the top of each .simba file.
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.
NOTE: For the status of each solver, please see it's thread in the
SRL Randoms section. For all commits, go
here. For the complete diff, go
here.
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:
Simba Code:
SRL_Randoms[SRL_RAND_FROG].disabled := true;
- You can disable ALL randoms by setting a global variable:
Simba Code:
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:
Simba Code:
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.
Simba Code:
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,
Simba Code:
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 ). You can also change the file save path by setting SRL_SavePath:
Simba Code:
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:
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.
Conclusion:
Please post any issues (along with debug text, if possible) on the proper thread for that random event. All threads can be found in the
SRL Randoms section.
Cheers,
The SRL Dev Team