TeachFist - Learn WotSF skills automatically

Theraze

Active member
Posted that I'd done this in the Rinn scripts, but suppose I should note it outside as well. Here's a script that has functions for looking at your various fist preferences, checking if CanAdv says you can adventure there, and if so, setting the condition of the teaching and adventuring 12 times. Contains a function for each of the 11 fist zones. The Poker check also looks at your meat, but only to see if you have enough for a single adventure there, since you can still win meat in the poker room and it's possible that you spent adventures there earlier either manually or at the end of the day.

It includes a boolean function, getNumberTeachings(int) that will check if you have that least that amount of teachings.

The main function will call getNumberTeachings(11) after checking if you're in a fistcore run. If you aren't in a fistcore run, it will give a message about needing to be. If you have all 11 teachings, it will tell you so. Otherwise, it will tell you that there's still teachings left to learn.

As designed, it fulfills two functions for me... utility script for Level 8 worldpunch, and standalone script for collecting mastery for making everything else easier. :) Use whatever you like... in my testing, I haven't had any problems with it in the last week since fixing Menagerie availability in CanAdv. I'll version it if it needs it, but as a path script, I don't expect this to need much updating in the future. :)

20110908 - Turned it into a getFist function with calls for each preference/location. Changes script from 6k to 2.1k, so that's nice. Tested and it got 2 fist skills, so it appears to work.
 

Attachments

  • TeachFist.ash
    2.1 KB · Views: 77
Last edited:

bumcheekcity

Active member
You know you could have saved some lines by making the eleven fistLocation() functions into a single function with an attribute? Just for next time, it might save a fair bit of typing and copy/pasting.

Code:
boolean fistGet(location loc, string prefname)
{
	if (!get_property("fistTeachings"+prefname).to_boolean() && can_adv(loc, false) && my_adventures() > 0)
	{
		cli_execute("conditions clear");
		add_item_condition(1, $item[Teachings of the Fist]);
		adventure(12, loc);
		if (item_amount($item[Teachings of the Fist]) > 0) return use(item_amount($item[Teachings of the Fist]), $item[Teachings of the Fist]);
	}
return false;
}
 

Theraze

Active member
So true. And I considered it, but I actually made the first 5 as part of the Level 8 script, then cut it out, dumped it into a new file, added the other 6, and lastly turned them into functions. So... yes? And no. :)
 

Theraze

Active member
Got bored and implemented this. Though since I was doing it based on how I wanted to do it instead of paying attention to the thread, I reversed the order. :) But... smaller script file, should run the same.
 
Top