Make a separate function to see if any random was found for people who want to check for randoms but don't want to run your solvers.
Make a separate function to see if any random was found for people who want to check for randoms but don't want to run your solvers.
Last edited by Aftermath; 11-20-2011 at 08:06 PM.
So you mean you have your own solvers?
That will call MySolver every time FindNormalRandoms is called in your script. False will exit FindNormalRandoms, true will continue with the function. You could also just call MySolver in place of FindNormalRandoms.Simba Code:begin
SRL_OnFindRandomsCall := @MySolver(false);
end.
SRL's F.A.Q. (Error fixes) | How to Convert SRL-5 Scripts to SRL-6 | Draynor Chop N' Bank (RS3)| AIO Superheater (RS3)
T - E - A - MTogether Everyone Achieves More
I assume you mean SolveSRLRandoms := False;
Judging from the implementation of SolveTeleRandom, at least, doing so will log the player out when a random is encountered. This is not what I want - I want the function to do nothing other than tell me if a random was detected.
Coh3n: I still want to use SRL's random detection (just not the solving), and that suggestion would require me to do my own detection.
Last edited by Aftermath; 11-20-2011 at 08:02 PM.
SRL's F.A.Q. (Error fixes) | How to Convert SRL-5 Scripts to SRL-6 | Draynor Chop N' Bank (RS3)| AIO Superheater (RS3)
T - E - A - MTogether Everyone Achieves More
Yes, which is what I was requesting/suggesting in the initial post - that the finding be separated from the solving.
You can easily do it on your own. Instead of calling FindNormalRandoms, make a custom function that loops through all of the inRandom functions. There is a detection function that can be used in every random as long as SRL is included.
Check the files in /core/antirandoms/
SRL's F.A.Q. (Error fixes) | How to Convert SRL-5 Scripts to SRL-6 | Draynor Chop N' Bank (RS3)| AIO Superheater (RS3)
T - E - A - MTogether Everyone Achieves More
You're saying you have your own solvers? That'd be cool to see.
Anyway,
Simba Code:{*******************************************************************************
procedure LoadTeleRandoms;
by: ZephyrsFury
Description: Loads the teleport random information for each random.
*******************************************************************************}
procedure LoadTeleRandoms;
begin
SetLength(TeleRandoms, 19);
with TeleRandoms[0] do //
begin
Name := 'leo the gravedigger';
Music := ['spooky'];
TypeID := [0, 1];
IsInRandom := @InLeoGraveyard;
Texts := ['Leo'];
TextColors := [128];
TextFonts := [CharsNPC];
TextBoxes := [IntToBox(MCX1, MCY1, MCX2, MCY2)];
SolveRandom := @SolveLeo;
RandIndex := rand_Leo;
end;
All you have to do is edit this SolveRandom := @SolveLeo; to use SRL's detection and your own solver.
-RM
There are currently 1 users browsing this thread. (0 members and 1 guests)