Players[CurrentPlayer].Level[x] is an array of all the players Levels. x indicates which level so 8 is hitpoints. It's up to you to populate this array and most scripts don't populate it as it is unecessary and time consuming when most of these values wouldn't be used.
FindFight looks for the hitpoint flashes to find if there is a fight in the area. If it finds a fight it then starts checking your hitpoints and if they go below 100% it returns true. The function was changed slightly because the players hitpoints are now always visible and so switching gametabs all the time was not necessary. In order to do this, maximum hitpoints always has to be known and this is where the error comes in.
The function checks to see if Players[CurrentPlayer].Level[8] is populated and if it isn't, it populates it. The bug is that the tiny routine uses min value instead of max value and therefore always populates Players[CurrentPlayer].Level[8] with 1 instead of the users real hitpoint value. This of course doesn't happen if it already has the correct value in it.
I hope my explanation makes some sense to you, it probably could have been less wordy.
Remember Findfight does not run away, all it does is return true or false. It's up to you to run if the value is true.
As I said this now works perfectly in my script as of V1.11..
SCAR Code:##################################################################
Simple Yew Cutter & Banker (Edgeville) V1.11s beta
Ran for: 4 Hours, 07 Minutes and 9 Seconds
Loads Banked: 27
Yew Logs Banked: 751
Birds Nests (Seeds) Banked: 3
Random Event Items Banked: 2
You Started at Level 93 you are still at Level 93
You earned 131,425xp This session with 70,258xp to the next Level
Script Ended: Not Logged in During Procedure: FindBothYews.
##################################################################








Reply With Quote
h):
you keep asking for features that it already supports!




