SRL Archive - SRL Suggestions

random music checker fix


JPHamlett

2009-10-11 01:47:16

ok so i figured out why the findnormalrandoms is always checking the music box

because of capn arrav


it used to be


{*******************************************************************************
function arnav_InRandom: Boolean;
by: Nielsie95
Description: Checks if we're in the Cap'n Arnav Random.
*******************************************************************************}

function arnav_InRandom: Boolean;
begin
Result := (GetMusic = 'Sea Shanty');
end;

the inly way for it to see if it was in the random was to look at the music tab so i changed it to


{*******************************************************************************
function arnav_InRandom: Boolean;
by: Nielsie95
Description: Checks if we're in the Cap'n Arnav Random.
*******************************************************************************}

function arnav_InRandom: Boolean;
begin
Result := (not TabExists(tab_Inv) and (not TabExists(tab_Combat)));
end;




it should work it works for me and ya tell me what you think

BobboHobbo

2009-10-11 02:33:34

Really, the problem was 1 line? Lolz, fail?

Goodjob on the find!

EDIT** Might also add the location of where this code should be changed :).

YoHoJo

2009-10-11 02:57:54

Hmm im not sure if im having that problem anymore, but this is what I had posted in one of my "SRL Bugs" thread:

Result: Scripts repeatedly click the music tab very often. Very curious behavior. Not so much of a problem as 'overcheking' for randoms. Whats happening I believe is that different random checks require the Inventory and Music tabs. They are being called upon in and order that requires checking the tabs one after another instead of doing something like checking the inventory for all randoms, and then the music for all randoms.
TempFix: Go to \SRL\SRL\core\AntiRandoms Folder. Comment out the following "GetMusics" in the scripts: Sandwich Line 20, Mordaut Line 31, Frog Line 65. NOTE: Do this at your own risk, it will probably decrease the accuracy of detecting the random, but the GetMusic is just a "secondary check" meaning each of these scripts have another way to detect the random.
Fix: Devs, why not create a CheckMusic function that more universal instead of having each individual random checking script check for its own music. Something like CheckMusicForAllRandoms function would probably do the trick!


Basically, comment out all of the GetMusics in anti randoms :D

BobboHobbo

2009-10-11 03:17:33

From: YoHoJo
Hmm im not sure if im having that problem anymore, but this is what I had posted in one of my "SRL Bugs" thread:



Basically, comment out all of the GetMusics in anti randoms :D


That would be stupid if the problem has been fixed on one line above?

YoHoJo

2009-10-11 03:19:30

What do you mean?
Basically its caused by GetMusic being called a lot in the random checkers.
The Devs know about it, and some say its necessary to have some many checks, but ive been just fine with no music checks and only tab checks. So its up to you.
IMO: Comment out all of the getmsuics in every antirandom script :D

BobboHobbo

2009-10-11 03:30:14

Yesh, but dont you see J_Pizzle found what made it switch tabs alot and fixed? So whats the point of deleting all those GetMusics just makes the Antirandoms that bit weaker when there is a fix?

YoHoJo

2009-10-11 03:37:28

I dont understand. My fixes are the same as Js?
We are both getting rid of getmusic functions called in the randoms.
Also, they dont really make the random checks any weaker, just one less check is all.

BobboHobbo

2009-10-11 03:52:06

One less check is not weaker :p

JPHamlett

2009-10-11 10:39:34

From: YoHoJo

Comment out all of the getmsuics in every antirandom script :D



if you do that i can never find capn arrav cause the only checker for capn arrav is a getmusic check

YoHoJo

2009-10-11 13:45:41

From: J_Pizzle
if you do that i can never find capn arrav cause the only checker for capn arrav is a getmusic check


Ok then in this case comment out getmusic, and add the tab checks like you said. Butt I still don't get what BH is saying l ;[. You are getting rid of one more music check, which is great, but there are also other ones in the other antirandom scripts, so you need to get rid of them all.

JPHamlett

2009-10-11 14:22:35

ya i have those ones commented out but if everyone else has that done then this is the reason why it still does the check

Main

2009-10-11 14:31:20

I have a fix, its in my sig.

JPHamlett

2009-10-11 14:38:22

i tried your fix it didnt work for me

Main

2009-10-11 18:13:17

O?
It still checks music tab often?

JPHamlett

2009-10-11 18:17:29

ya lol but if u just comment out all of them in the 3 scripts in the fix on yojohos thread and use my fix for capn arrav then the problem should be fixed

Main

2009-10-11 19:15:11

With my fix, it shouldn't check music tab unless there is a npc chat poped up.

JPHamlett

2009-10-12 07:47:49

but not all randoms use an npc popout