imported>Bale |
imported>Bale |
Line 1: |
Line 1: |
− | For this lesson, we are going to complete a Bounty Hunter contract with KoLmafia.
| + | Note that you can type 'ashref' into the CLI for a COMPLETE list of all ash script commands! It is kind of cumbersome to dig through the list though. You can narrow it down by asking about a particular command. i.e. 'ashref fullness' would list all functions (like my_fullness) that match 'fullness'. |
| | | |
− | [[File:Lesson8 Hunter.png|right]]
| + | a) use_familiar(familiar); |
− | # Go to the Hunter like normal, pick a reasonable bounty that is fairly easy to do, in a zone you can access. Check your equipment, etc.
| + | This one is tricky! The function takes a 'Familiar' type, and will error when you feed it a string. Therefore you must combine the to_familiar with this one. It looks like this: |
− | #* Alternatively, you can click the 'Travel' from the main menubar, and click 'Visit the Hunter'. Then choose your bounty. That might be a bit quicker (as shown in the screenshot to the right).
| + | use_familiar(to_familiar("leprechaun")); |
− | # Go to the Mafia Frame. Make sure your custom combat script is good to go, unless you just want auto-attack or auto-spell. Change the Adventure number to 60, just to have a constraint. (A bounty takes 40 typically). Make sure you have 60 adventures left. Eat/Drink/etc to do this.
| + | Be sure to use the RACE of the familiar, not your name for it. |
− | # Look at the zone selection box. When you first select a bounty it automatically selects the appropriate zone for you.
| |
− | # Click the Checkbox under your combat script that says '''Goals:'''. It un-greys a dropdown box. If the box is greyed out, this means NO goal oriented adventuring will occur. Mafia should automatically have the right bounty items selected for you.
| |
− | # Set up your combat options. In action, set your method of killing the monster even if it is just "attack". In the special box under that, click for a list of options. If you have Transcendent Olfaction it is very useful to chose auto-olfaction there to automatically cast olfaction upon any monster that drops your goal.
| |
− | # In the dropdown box for Goals, you ought to see something like '3 triffid bark' that corresponds to your bounty goal. Make sure this is selected, un-greyed, and looks right.
| |
− | #: [[File:Lesson8 GoalAdventure.png]]
| |
− | # Clear your session with the main menubar, Tools, 'Clear All Results'. I like to do this for each session of adventures. It will help us better see what is going on for training purposes.
| |
− | # Tell it to '''Begin'''. Mafia will start adventuring and automatically update you on your goal progress. You will see the Goals box start dropping to '2 triffid bark' or whatever as you find your goal item. It will also '''automatically stop adventuring''' when its goal is done, which will likely be before the 60 turns you constrained it to. You will notice that it even turns in your bounty for you when its done! If it was unable to complete its Goal, it will inform you when it hits its constraint.
| |
− | #: [[File:Lesson8 CLI.png]]
| |
− | # Warning: Once the goals are completed, it will reset back to the '3 triffid bark' or whatever goal. Basically it looks like before you started adventuring. This is a feature Mafia does to allow multiple sets of goals. Like if you wanted to get 2 sets of your goal item. Obviously you cannot do multiple Bounty Hunts in a single day, so you will just uncheck the Goals checkbox and be done.
| |
| | | |
− | -----
| + | b) my_fullness() |
| + | my_inebriety() |
| + | These return your fullness and drunkenness as 'int's. |
| | | |
− | Bonus) The Goals-Oriented feature is really great for bounty and also questing. It is pre-loaded with several intelligent goals for various zones. For example, in the pirate quest you are tasked with acquiring 3 different items to become a pirate. Normally you have to remember which items you have gotten that are related to the quest. By using Mafia, you can simply type in that zone, then uncheck Goals, use the goals pulldown menu and select the set of those particular 3 items. When you adventure, it will go until all three items are acquired.
| + | c) my_basestat($stat[Moxie]) |
| + | Returns your Moxie stat as an 'int'. |
| + | Replace with Muscle or Mysticality as needed. |
| | | |
− | This feature is possible because KoLmafia has many built-in goals that correspond with automate-able adventure constraints. It knows that you are on the Pirate quest, at a certain part of it. Therefore, it knows that you need X,Y, and Z items to continue. Hence, it appears as a potential goal. Once you have these items or are done with the quest, this goal is not an option anymore.
| + | d) equip(item); |
| + | Another tricky function in that it only takes an "Item". Syntax is: |
| + | equip(to_item("nameOfItem")); |
| | | |
− | You can also type in your '''own''' goals! If you want say 4 Limes from the Fruit Golems, you'd go to the Menagerie 1 zone, type in 5 Lime as your goal and then go! I generally don't use this because of the possibility of error. If you misspell the item or pick the wrong zone, you could waste a bunch of turns.
| + | e) mall_price($item[bottle of Pete's Sake]); |
| + | Returns the mall price as an 'int'. |
| + | NOTE!!! Returns the FIFTH LOWEST PRICE, not the lowest. |
| + | When you buy, it uses the lowest. However, KoLmafia returns the 5th lowest for analysis to deter mallbot behavior. |
| | | |
| + | f) have_skill( $skill[ Summon Candy Heart ] ); |
| + | Return true or false if you have skill. |
| | | |
− | '''BOTTOM LINE:''' Goal-oriented adventuring is even more automated and intelligent than auto-adventuring and can be a big help!
| + | g) set_property( "customCombatScript" , "YourScriptNameHere"); |
| + | Lets you set a particular custom combat script. Great for setting up stasis-lock (where you delay combat so your familiar can act during combat). |
| | | |
| + | h) TODO: Figure out a general purpose method on how to do non-combat location visiting with the mini-browser and determining your URL. i.e.: |
| + | visit_url("monkeycastle.php?pwd&action=buyitem&whi chitem=3997&quantity=1"); |
| | | |
− | '''Continue to '''[[KoLmafia Guide: Setting Preferences|Lesson 9: Setting Preferences]]
| + | |
| + | Continue to [[KoLmafia Guide: In Closing|In Closing]] |
| | | |
| [[Category:KoLmafia Guide]][[Category:New User Help]] | | [[Category:KoLmafia Guide]][[Category:New User Help]] |
Note that you can type 'ashref' into the CLI for a COMPLETE list of all ash script commands! It is kind of cumbersome to dig through the list though. You can narrow it down by asking about a particular command. i.e. 'ashref fullness' would list all functions (like my_fullness) that match 'fullness'.
a) use_familiar(familiar);
This one is tricky! The function takes a 'Familiar' type, and will error when you feed it a string. Therefore you must combine the to_familiar with this one. It looks like this:
use_familiar(to_familiar("leprechaun"));
Be sure to use the RACE of the familiar, not your name for it.
b) my_fullness()
my_inebriety()
These return your fullness and drunkenness as 'int's.
c) my_basestat($stat[Moxie])
Returns your Moxie stat as an 'int'.
Replace with Muscle or Mysticality as needed.
d) equip(item);
Another tricky function in that it only takes an "Item". Syntax is:
equip(to_item("nameOfItem"));
e) mall_price($item[bottle of Pete's Sake]);
Returns the mall price as an 'int'.
NOTE!!! Returns the FIFTH LOWEST PRICE, not the lowest.
When you buy, it uses the lowest. However, KoLmafia returns the 5th lowest for analysis to deter mallbot behavior.
f) have_skill( $skill[ Summon Candy Heart ] );
Return true or false if you have skill.
g) set_property( "customCombatScript" , "YourScriptNameHere");
Lets you set a particular custom combat script. Great for setting up stasis-lock (where you delay combat so your familiar can act during combat).
h) TODO: Figure out a general purpose method on how to do non-combat location visiting with the mini-browser and determining your URL. i.e.:
visit_url("monkeycastle.php?pwd&action=buyitem&whi chitem=3997&quantity=1");
Continue to In Closing