Current_Hit_Stat

B

bluestars

Guest
Has the current_hit_stat() function been implimented yet? I keep getting undefined refrence when I call it. If it hasn't, is there any (reasonably short) way to find the current hit stat?
 

Tirian

Member
It has been added to the code since the most recent release of KoLmafia. So it is implemented if you are using the nightly builds, and not yet if you aren't. (If you saw the mention of the function in the Wiki manual, that's what it means that the function is in italics.)

Keep in mind that the nightly build can be very fragile and strange, since sometimes people are in the middle of adding code and not everything has been caught. So only move up if you don't mind taking on some risks.

ETA: If you want to code around the lack of a function, then you can check ranged_weapon( current_equipment( $slot[ weapon ])) to see if you are wielding a ranged weapon or not. To check for mysticality, you can see if you have the Spirit of Rigatoni skill easily enough, but then you'd have to make a map with all of the staffs in it to see if you were wielding one. So it's a bit harder there, but if you don't have Rigatoni then you don't need to code for it.
 
Top