monster hunter
New member
You should really just do cli_execute("maximize adv") instead of all of those hard-coded equip lines. The maximizer is your friend.
What would be the maximize command for meat farming?
You should really just do cli_execute("maximize adv") instead of all of those hard-coded equip lines. The maximizer is your friend.
What would be the maximize command for meat farming?
Maybe you hadn't realized that the above is the same as:Code:if (item_amount($item[paperclip pants]) == 0) buy( 25 , $item[paperclip]); use( 25 , $item[paperclip]);
if (item_amount($item[paperclip pants]) == 0)
{
buy( 25 , $item[paperclip]);
}
use( 25 , $item[paperclip]);
if (item_amount($item[paperclip pants]) == 0)
{
buy( 25 , $item[paperclip]);
use( 25 , $item[paperclip]);
}
You have to use the have_skill() function:I want to add the ability to buy/equip the Club Jacket ONLY IF the character has Torso Awaregness. How would i go about doing so?
if ( have_skill( $skill[ Torso Awaregness ] ) )
{
if ( available_amount( $item[ General Sage Lonely Diamonds Club Jacket ] ) == 0 )
{
buy( 1, $item[ General Sage Lonely Diamonds Club Jacket ] );
}
equip( $item[ General Sage Lonely Diamonds Club Jacket ] );
}
Thanks a lot, slyz. I'll be sure to add the part for the shirt. I have a question. What's the advantage of using the {} symbols if the script works?
Okay, so how would i have mafia check for the wads? Bale, you said its complex, but I'm willing to learn. I've picked up quickly, and feel ready for the challenge.
Would you mind explaining the general stigma against automating bounty-hunting? Or is that not a thing and I'm just confused by this thread:
#### FUTURE FUNCTIONALITY:
## [] Perform differently for different accounts
## [] Bounty Hunter quests
## [ X ] Castlefarm
## [] Libram management.
## [] Wait for wads to appear.
#### THANK YOU
## me259259
## Theraze
## Bale //send him stuffed hodgemen.
## roippi
## lostcalpolydude
## slyz
## & SinginSally for the amazing KoLMafia Guide for Newbs (http://kolmafia.us/showthread.php?3397-KolMafia-Guide-for-Noobs/)
## & the KoLMafia devs!!
void main ()
{
#### Obtain Ode to Booze for drinking.
## Modify by sending the right meat amount to your buffBot of choice.
if(have_effect($effect[Ode to Booze]) < 1)
{
cli_execute("csend 1 meat to Testudinata");
}
#### Wait for the buff to appear.
if(have_effect($effect[Ode to Booze]) < 1)
{
repeat {wait(5); refresh_status();}
until (have_effect($effect[Ode to Booze]) > 1);
}
#### Buy & Drink Booze.
if(item_amount($item[Shot of Peach Schnapps]) < 9)
{
buy( 9 - item_amount( $item[Shot of Peach Schnapps]) , $item[Shot of Peach Schnapps]);
}
cli_execute("drink 9 Shot of Peach Schnapps");
#### Buy & Use Milk of Magnesium
if(item_amount($item[Milk of Magnesium]) < 2)
{
buy( 2 - item_amount( $item[Milk of Magnesium]) , $item[Milk of Magnesium]);
}
cli_execute("use 2 Milk of Magnesium");
#### Buy & Eat food.
if(item_amount($item[Spooky hi Mein]) < 3)
{
buy( 3 - item_amount( $item[Spooky hi Mein]) , $item[Spooky hi Mein]);
}
cli_execute("eat 3 Spooky hi Mein");
#### Buy & Use spleen items.
if(item_amount($item[Twinkly Wad]) < 15)
{
buy( 15 - item_amount( $item[Twinkly Wad]) , $item[Twinkly Wad]);
}
cli_execute("use 15 Twinkly Wad");
#### Maximize your meat drop.
cli_execute("maximize meat drop");
## Adventure in the Giant's Castle!!
cli_execute("adventure * Giant's Castle");
#### Obtain Ode to Booze for overdrinking.
## Modify by sending the right meat amount to your buffBot of choice.
cli_execute("csend 1 meat to Testudinata");
#### Wait for the buff to appear.
if(have_effect($effect[Ode to Booze]) < 1)
{
repeat {wait(5); refresh_status();}
until (have_effect($effect[Ode to Booze]) > 1);
}
#### Drink your nightcap! (overdrinking)
## Modify by changing the drink.
if(item_amount($item[Bucket of wine]) == 0)
{
buy( 1 , $item[Bucket of wine]);
}
cli_execute("overdrink Bucket of wine");
#### Send waddable Giant's Castle items to Wadbot
## "*" means all of that item, and can be replaced with a value.
cli_execute("send * wolf mask, * giant needle to wadbot || wad");
#### Wait for wads to appear.
#if(item_amount($item[Twinkly Wad]) < 1)
# repeat {wait(5); refresh_status();}
# until (item_amount($item[Twinkly Wad]) > 1);
#### Mallsell recieved Twinkly Wads
## Modify: mallsell [#] <itemname> @ <price> limit <limit>
#cli_execute("mallsell -15 Twinkly Wad @ 350 limit 15");
#### Use Warm Subject Gift Certificates
## You'll get more money this way than if you autosell
cli_execute("use * Warm Subject gift certificate");
#### Autosell remaining Giant's Castle Items
cli_execute("autosell * heavy D, * original G, * disturbing fanfic, * furry fur, * awful poetry journal, * thin black candle, * chaos butterfly, * plot hole, * probability potion, * procrastination potion, * angry farmer candy, * Mick's IcyVapoHotness Rub, * rave whistle");
#### Check/buy/equip +adventure equipment
## This will not buy the equipment if you already have it
if (item_amount($item[sword behind inappropriate prepositions]) == 0)
{
buy( 1 ,$item[sword behind inappropriate prepositions]);
}
if ( have_skill( $skill[ Torso Awaregness ] ) )
{
if(available_amount($item[General Sage Lonely Diamonds Club Jacket])==0)
{
buy( 1, $item[ General Sage Lonely Diamonds Club Jacket ] );
}
equip( $item[ General Sage Lonely Diamonds Club Jacket ] );
}
if (item_amount($item[paperclip pants]) == 0)
{
buy( 25 , $item[paperclip]);
use( 25 , $item[paperclip]);
}
if (item_amount($item[BGE pocket calendar]) == 0)
{
buy( 1 , $item[BGE pocket calendar]);
}
if (item_amount($item[dead guy's watch]) == 0)
{
buy( 1 , $item[dead guy's watch]);
}
if (item_amount($item[tiny plastic bitchin' meatcar]) == 0)
{
buy( 1 , $item[tiny plastic bitchin' meatcar]);
}
cli_execute("maximize adv");
#### Refreshes your status completely, just in case KoLmafia got lost along the way
cli_execute("status refresh");
#### This will print the message in the ""
print("The script is done running, you know. You can go outside, or you could have gone outside when it was running. Oh well, you sat there and watched the nothing happen. Greasy paste & fiddlesticks.");
}
Well, one of the reasons is that the script was released just a little over a month after NS-13 was released, and there was a lot of NS-13 stuff that I did not want to see automated at all. As for why, it felt self-defeating if these forums encouraged skipping NS-13 content when KoLmafia was originally created with the hope of helping people stick around for NS-13. As others have noted, it's been five years, and KoLmafia's project direction shifted a lot after NS-13 hit almost five years ago, so the post you quoted is no longer relevant.Would you mind explaining the general stigma against automating bounty-hunting? Or is that not a thing and I'm just confused by this thread:
For what it is worth, not only isn't that a thing anymore, but here's a popular and well used script for hunting bounties: http://kolmafia.us/showthread.php?1023-auto-BHH-and-friends&p=73177&viewfull=1#post73177
Expected }, found null (login2.ash, line 215)
#### FUTURE FUNCTIONALITY:
## [] Perform differently for different accounts
## [ X ] Bounty Hunter Hunter quests
## [ X ] Castlefarm
## [ X ] Diet: drink to cap & leave space for cookies
## [] Semi-rare mall management
## [] Banishing monsters while castlefarming (maybe)
## [] Libram management
## [] Wait for wads to appear
## [] Melange farming (maybe... most likely not)
## [] Add the rest of the websites
#### THANK YOU
## me259259
## Theraze
## Bale //send him stuffed hodgemen.
## roippi
## lostcalpolydude
## slyz
## & SinginSally for the amazing KoLMafia Guide for Newbs (http://kolmafia.us/showthread.php?3397-KolMafia-Guide-for-Noobs/)
## & the KoLMafia devs!!
#### WEBSITES
## Bale's counterchecker.ash: http://kolmafia.us/showthread.php?2519-CounterChecker-Wormwood-Semi-rares-Dance-Cards-and-more
## KoL Mafia noobie guide: http://kolmafia.us/showthread.php?3397-KolMafia-Guide-for-Noobs/
#### Imports ZLib for some extra ASH goodness sauce.
import <zlib.ash>
void main ()
{
#### Set your counter script to CounterChecker.ash See CounterChecker.ash for wormwood instructions, or the link above.
cli_execute("set counterScript = CounterChecker.ash");
cli_execute("set wormwood = not-a-pipe");
#### Obtain Ode to Booze for drinking.
## Modify by sending the right meat amount to your buffBot of choice.
if(have_effect($effect[Ode to Booze]) < 1)
{
cli_execute("csend 1 meat to Testudinata");
}
#### Wait for the buff to appear.
if(have_effect($effect[Ode to Booze]) < 1)
{
repeat {wait(5); refresh_status();}
until (have_effect($effect[Ode to Booze]) > 1);
}
#### Buy & Drink Booze.
if(item_amount($item[Shot of Peach Schnapps]) < 9)
{
buy( 9 - item_amount( $item[Shot of Peach Schnapps]) , $item[Shot of Peach Schnapps]);
}
if(item_amount($item[Can of Swiller]) < 1)
{
buy( 1 , $item[Can of Swiller]);
cli_execute("drink 9 Shot of Peach Schnapps");
cli_execute("drink 1 Can of Swiller");
#### Buys fortune cookies. This will keep them at a steady amount of 10.
if(item_amount($item[fortune cookie]) < 10)
{
buy( 10 - item_amount( $item[fortune cookie]) , $item[fortune cookie]);
}
#### Magnesium to the MAX
if(item_amount($item[Milk of Magnesium]) < 2)
{
buy( 2 - item_amount( $item[Milk of Magnesium]) , $item[Milk of Magnesium]);
}
cli_execute("use 2 Milk of Magnesium");
#### Buy & Eat food. 3 fullness will be for fortune cookies.
if(item_amount($item[Spooky hi Mein]) < 2)
{
buy( 2 - item_amount( $item[Spooky hi Mein]) , $item[Spooky hi Mein]);
}
cli_execute("eat 2 Spooky hi Mein");
if(item_amount($item[knob ka-bob]) < 2)
{
buy( 2 - item_amount( $item[knob ka-bob]) , $item[knob ka-bob]);
}
cli_execute("eat 2 knob ka-bob");
cli_execute("eat 1 fortune cookie");
#### Buy & Use spleen items.
if(item_amount($item[Twinkly Wad]) < 15)
{
buy( 15 - item_amount( $item[Twinkly Wad]) , $item[Twinkly Wad]);
}
cli_execute("use 15 Twinkly Wad");
#### Maximize item drop for the BHH.
use_familiar(best_fam("item"));
cli_execute("maximize item");
#### Bounty hunt!
cli_execute("call bounty.ash");
#### Maximize your meat drop.
use_familiar(best_fam("meat"));
cli_execute("maximize meat drop");
## Adventure in the Giant's Castle!!
cli_execute("adventure * Giant's Castle");
#### Obtain Ode to Booze for overdrinking.
## Modify by sending the right meat amount to your buffBot of choice.
cli_execute("csend 1 meat to Testudinata");
#### Wait for the buff to appear.
if(have_effect($effect[Ode to Booze]) < 1)
{
repeat {wait(5); refresh_status();}
until (have_effect($effect[Ode to Booze]) > 1);
}
#### Drink your nightcap! (overdrinking)
## Modify by changing the drink.
if(item_amount($item[Bucket of wine]) == 0)
{
buy( 1 , $item[Bucket of wine]);
}
cli_execute("overdrink Bucket of wine");
#### Send waddable Giant's Castle items to Wadbot
## "*" means all of that item, and can be replaced with a value.
cli_execute("send * wolf mask, * giant needle to wadbot || wad");
#### Wait for wads to appear.
#if(item_amount($item[Twinkly Wad]) < 1)
# repeat {wait(5); refresh_status();}
# until (item_amount($item[Twinkly Wad]) > 1);
#### Mallsell recieved Twinkly Wads
## Modify: mallsell [#] <itemname> @ <price> limit <limit>
#cli_execute("mallsell -15 Twinkly Wad @ 350 limit 15");
#### Use Warm Subject Gift Certificates
## You'll get more money this way than if you autosell
cli_execute("use * Warm Subject gift certificate");
#### Autosell remaining Giant's Castle Items
cli_execute("autosell * heavy D, * original G, * disturbing fanfic, * furry fur, * awful poetry journal, * thin black candle, * chaos butterfly, * plot hole, * probability potion, * procrastination potion, * angry farmer candy, * Mick's IcyVapoHotness Rub, * rave whistle");
#### Check/buy/equip +adventure equipment
## This will not buy the equipment if you already have it
if (item_amount($item[sword behind inappropriate prepositions]) == 0)
{
buy( 1 ,$item[sword behind inappropriate prepositions]);
}
if ( have_skill( $skill[ Torso Awaregness ] ) )
{
if(available_amount($item[General Sage Lonely Diamonds Club Jacket])==0)
{
buy( 1, $item[ General Sage Lonely Diamonds Club Jacket ] );
}
equip( $item[ General Sage Lonely Diamonds Club Jacket ] );
}
if (item_amount($item[paperclip pants]) == 0)
{
buy( 25 , $item[paperclip]);
use( 25 , $item[paperclip]);
}
if (item_amount($item[BGE pocket calendar]) == 0)
{
buy( 1 , $item[BGE pocket calendar]);
}
if (item_amount($item[dead guy's watch]) == 0)
{
buy( 1 , $item[dead guy's watch]);
}
if (item_amount($item[tiny plastic bitchin' meatcar]) == 0)
{
buy( 1 , $item[tiny plastic bitchin' meatcar]);
}
cli_execute("maximize adv");
#### WANG yourself, right in the *******
cli_execute("buy 1 wang");
cli_execute("use 1 wang");
#### Refreshes your status completely, just in case KoLmafia got lost along the way
cli_execute("status refresh");
#### This will print the message in the ""
print("The script is done running, you know. You can go outside, or you could have gone outside when it was running. Oh well, you sat there and watched the nothing happen. Greasy paste & fiddlesticks.");
}
Guys. Getting an error I don't understand at all.
Code:Expected }, found null (login2.ash, line 215)
I don't understand. My head's about to explode. What is this "null" thing? And why is mafia finding it instead of the bracket that is right there.