SRL Archive - Reflection Discussion

The newest reflection has messed with MSI


Overtime

2010-10-17 14:14:13

[1:33:25]: [ Ove ] MSI_SetupPlayer
[1:33:26]: [ Ove ] Scanning for randoms…
[1:33:26]: [Reflection] Might be in a random(missing r_InRandom function), terminating.
[1:33:37]: [ Ove ] Unable to open Port Sarim deposit box
[1:33:37]: [ Ove ] MSI_SetupPlayer: False
[1:33:37]: [ Ove ] MSI_SetupPlayer: False
[1:33:37]: [ Ove ] MSI_TimedOut: Suspicion of connection loss

All it does it is log out, and relog over and over.

The random that this character is in is Leo.

Ugh…

Naike

2010-10-17 14:59:18

I've made clear that reflection randoms is in risk of doing this.

We're going to solve it, just give us some time.
Not my fault MSI uses it after I made the statement!

SRL should make their randoms able to support custom InRandoms/SolveRandoms that way we can work them both.

Btw, it does that for the safety of your account.. didn't mess up anything really, SRL can't solve leo anyways.

NCDS

2010-10-17 16:56:58

MSI calls FindNormalRandoms, there is nothing Reflection specific.

Naike

2010-10-17 17:05:22

From: NCDS
MSI calls FindNormalRandoms, there is nothing Reflection specific.


Coh3n talked with me about MSI switching to reflection randoms though..

However, if you guys call SetupReflectionEx() then you'll find reflection randoms being used in the normal FindNormalRandoms.

Coh3n

2010-10-17 18:09:50

From: Naike
However, if you guys call SetupReflectionEx() then you'll find reflection randoms being used in the normal FindNormalRandoms.

Well then we don't have to change anything for Reflection randoms. :p I actually like how you did that. Although, does this mean that the color randoms solvers are never called?

From: Squancy

All it does it is log out, and relog over and over.

Naike: Does it not set the player to false after it logs out?

Naike

2010-10-17 18:27:54

From: Coh3n
Well then we don't have to change anything for Reflection randoms. :p I actually like how you did that. Although, does this mean that the color randoms solvers are never called?


Naike: Does it not set the player to false after it logs out?


Color randoms is still getting executed, however reflection ones are executed first.

My bad with the player @ False!

This is why we have tests! :redface:


All of the randoms needs brushing up, I suggest taking out the SetupReflectionEx for now.

Overtime

2010-10-17 18:31:42

Here is your fix Naike.

Thanks Coh3n for telling me what to do over MSN :D

function R_SolveNonTalkingRandoms: Boolean;
var
I, iTime: Integer;
Music: String;
InRand: Boolean;
begin
If Not LoggedIn then
Exit;

If Not r_RandomVarSet then
r_SetupRandoms;

Music := LowerCase(r_GetMusic);
for I := 0 to r_RandomCount-1 do
begin

If (r_RandomArr[I].Music = Music)or(r_RandomArr[I].Music = '')then
if (r_RandomArr[I].r_InRandom <> nil) then
InRand := r_RandomArr[I].r_InRandom()
else
begin
If (Not(r_RandomArr[I].r_InRandom <> nil)and(r_RandomArr[I].Music = ''))then
Continue;
Writeln('[Reflection] Might be in a random(missing r_InRandom function), terminating.');
Players[CurrentPlayer].Rand := r_RandomArr[I].RandName;
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;

Coh3n

2010-10-17 18:41:35

From: Squancy
Here is your fix Naike.

Thanks Coh3n for telling me what to do over MSN :D

function R_SolveNonTalkingRandoms: Boolean;
var
I, iTime: Integer;
Music: String;
InRand: Boolean;
begin
If Not LoggedIn then
Exit;

If Not r_RandomVarSet then
r_SetupRandoms;

Music := LowerCase(r_GetMusic);
for I := 0 to r_RandomCount-1 do
begin

If (r_RandomArr[I].Music = Music)or(r_RandomArr[I].Music = '')then
if (r_RandomArr[I].r_InRandom <> nil) then
InRand := r_RandomArr[I].r_InRandom()
else
begin
If (Not(r_RandomArr[I].r_InRandom <> nil)and(r_RandomArr[I].Music = ''))then
Continue;
Writeln('[Reflection] Might be in a random(missing r_InRandom function), terminating.');
Players[CurrentPlayer].Rand := r_RandomArr[I].RandName;
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;

You'd have to do the same with all the randoms that aren't solvable. Also for if they fail.

Also, Naike, don't we need SetupReflectionEx to use reflection?

Naike

2010-10-17 18:43:21


function R_SolveNonTalkingRandoms: Boolean;
var
I, iTime: Integer;
Music: String;
InRand: Boolean;
begin
If Not LoggedIn then
Exit;

If Not r_RandomVarSet then
r_SetupRandoms;

Music := LowerCase(r_GetMusic);
for I := 0 to r_RandomCount-1 do
begin

If (r_RandomArr[I].Music = Music)or(r_RandomArr[I].Music = '')then
if (r_RandomArr[I].r_InRandom <> nil) then
InRand := r_RandomArr[I].r_InRandom()
else
begin
If (Not(r_RandomArr[I].r_InRandom <> nil)and(r_RandomArr[I].Music = ''))then
Continue;
Writeln('[Reflection] Might be in a random(missing r_InRandom function), terminating.');
Players[CurrentPlayer].Rand := r_RandomArr[I].RandName;
Logout;
Exit;
end;

If InRand then
begin
//Players[CurrentPlayer].Rand := r_RandomArr[I].RandName;
Writeln('[Reflection] Trying to solve: ' + r_RandomArr[I].RandName);
if (r_RandomArr[I].r_SolveRandom <> nil) then
Result := r_RandomArr[I].r_SolveRandom()
else
begin
Writeln('[Reflection] No random solver for this random yet!');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end;

If not Result then
begin
Writeln('[Reflection] Random solving for ' + r_RandomArr[I].RandName + ' failed');
Logout;
Players[CurrentPlayer].Active := False;
Exit;
end else
Writeln('[Reflection] Random solved');

iTime := GetSystemTime;
While (Not IsIdle) do
begin
Wait(100+Random(100));
if (GetSystemTime-iTime > 60*1000)then
begin
Writeln('[Reflection] Took more than a minute to get out of the random');
LogOut;
Players[CurrentPlayer].Active := False;
Exit;
end;
end;

UseRewardBox;
Exit;
end;

end;
end

Coh3n, for the sake of our dear MSI users.. take away SetupReflectionEx for now!
It solves about 3 randoms, out of 17..

When I get some accounts I can turn it up a notch, and then you can re-add the line.


Edit


function SetupReflectionEx(Terminate: Boolean): boolean;
begin
SetupConstants;
Result := true;
SRL_OnFindRandomCall := @R_OnFindRandomCall;
if(SmartGetFieldInt(0, hook_static_LoginIndex) = -1) then
begin
Result := False;
if(Terminate)then
begin
Writeln('*****Hooks are outdated. Terminating script.*****');
TerminateScript;
end else
Writeln('*************HOOKS ARE OUTDATED.*************');
end;
end;

No you don't..
Not to be all offensive, but I really hate how it looks right now.
Hard not breaking scripts, when you want to change the include completely :(

Coh3n

2010-10-17 18:48:45

From: Naike

No you don't..
Not to be all offensive, but I really hate how it looks right now.
Hard not breaking scripts, when you want to change the include completely :(

Ha, I always thought you did. :o Uhm, one of the main reason we call SetupReflectionEx is to check if the hooks are outdated.

I thought you said that the reflection routines are called first? So if they failed (or they're not made yet), shouldn't the color ones be called next? Like as a failsafe type deal?

Naike

2010-10-17 18:59:11

From: Coh3n
Ha, I always thought you did. :o Uhm, one of the main reason we call SetupReflectionEx is to check if the hooks are outdated.

I thought you said that the reflection routines are called first? So if they failed (or they're not made yet), shouldn't the color ones be called next? Like as a failsafe type deal?


Well.. SRL randoms are rather stupidly made, as they need to see the random from start or it's screwed.
So if reflection moves the character around then you're pretty much screwed.

I've been asking around for someone to write a smarter way..
But none seems interested :\

Coh3n

2010-10-17 19:20:57

From: Naike
Well.. SRL randoms are rather stupidly made, as they need to see the random from start or it's screwed.
So if reflection moves the character around then you're pretty much screwed.

I've been asking around for someone to write a smarter way..
But none seems interested :\

I would be if I had more time. :(

Assuming that the reflection solvers don't fail (I can't think of a reason why they would), calling the color solvers after should work. If you think about it, right now, the reflection solvers just logout if they haven't been made. In that case, the player would be at the start of the random, so the color one should be able to begin.

If for some reason the reflection ones failed halfway through, then it could log the player out and set it to false.

So, if reflection solver doesn't exist, call the color solver. If the reflection solver does exist and it fails, logout and set to false. That would work temporarily at least. It allows both color and reflection solvers to be tested at once.

Naike

2010-10-17 19:44:48

From: Coh3n
I would be if I had more time. :(

Assuming that the reflection solvers don't fail (I can't think of a reason why they would), calling the color solvers after should work. If you think about it, right now, the reflection solvers just logout if they haven't been made. In that case, the player would be at the start of the random, so the color one should be able to begin.

If for some reason the reflection ones failed halfway through, then it could log the player out and set it to false.

So, if reflection solver doesn't exist, call the color solver. If the reflection solver does exist and it fails, logout and set to false. That would work temporarily at least. It allows both color and reflection solvers to be tested at once.


However, doing the official release of the reflection randoms will need me to have accounts.. Accounts I'll be losing if I let the color solvers get them all out of there!

I'll do something when they're getting closer to perfect, if nobody else does!

Coh3n

2010-10-17 19:47:47

From: Naike
However, doing the official release of the reflection randoms will need me to have accounts.. Accounts I'll be losing if I let the color solvers get them all out of there!

I'll do something when they're getting closer to perfect, if nobody else does!

Ah okay, that makes sense. :)