Results 1 to 3 of 3

Thread: Edit _FindAllRandoms

  1. #1
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default Edit _FindAllRandoms

    So I noticed that findallrandoms does not return true when any of these functions that are called within it return true:

    Simba Code:
    findDead();
      findMod();
      findDwarvenPopup();
      findSpinTicket();
      exitSquealOfFortune();

    The reason I think that this is a problem is that these functions can cause a players mouse to move, interrupt an action, or just mess up a script without the scripter knowing exactly what happened. I was having problems with something in my script moving my mouse to random yellow familiars in LRC and it took me ages to isolate that it was exitsquealoffortune that was causing it because it doesn't actually affect the findnormalrandoms boolean although it is called within it.

    A bigger issue is when you are waiting on an action. For example, waiting until inventory is full while you are mining or fishing. I constantly run findnormalrandoms in a loop and if it returns true, the script knows to reclick the fishing or mining spot. Unfortunately if i get a spin ticket my script won't know it because it doesn't affect findnormalrandoms and if I call that function individually, there is a chance findnormalrandoms will pick it up first.

    I hope that is a sufficient explanation. I've been trying to brainstorm with Brandon on ways to deal with this. We could just have those functions handled in a different function like say, findnormalannoyances, but I think the best option would be to just have it cause findnormalrandoms to return true. Credits to brandon for the code:

    Simba Code:
    if (Not Result) then
      Result:= findDead or findMod or findDwarvenPopup or findSpinTicket or exitSquealOfFortune
    else
        begin
            findDead();
            findMod();
            findDwarvenPopup();
            findSpinTicket();
            exitSquealOfFortune();
        end;

    What think you?

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Perhaps FindNormalRandoms should return a result set? i.e.
    Simba Code:
    function FindNormalRandoms: TBooleanArray;
    begin
      SetLength(Result, 6)
      Result[1]=findDead;
      Result[2]=findMod;
    //and so on...
    Then the scripter can deal with each result individually (rather than as a whole), as some results may require no action while others will require a specific action.

  3. #3
    Join Date
    Dec 2011
    Location
    -bash
    Posts
    515
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Good idea ash. I never thought about all those functions above as randoms. But this will be a good idea to implement into findnormalrandoms.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •