PDA

View Full Version : bumcheekcity's Hardcore Checklist



bumcheekcity
06-27-2009, 10:45 PM
bumcheekcity's Hardcore Checklist 1.0

What does this do?
This script checks for items and things you need to do to complete a Hardcore Ascension. It will NOT adventure in the slightest. It is purely an informational script.
The script will check for familiars in a BM run (i.e. the ones you need for the NS Tower + the starfish), and will use them if you have them. It won't do this in a Black Cat run.

What does this not do?
Your mum. Unlike me. Also as I said, it won't adventure. It can't find out whether you've used the cleaning items in the f'c'le, but I think that limitation lies with the game, not mafia nor this script.
It will not check your telescope if you have one to see if you definately need the items. Yet.

Can this be used for Softcore?
Yes, it will still tell you what you need to do, but you'll end up ignoring most of it. I'm planning on having it detect softcore, and assume you're going to pull the tower items and such.

How do I use it?
Make sure you have Zlib (http://kolmafia.us/showthread.php?t=2072).
That's it. Just run it. It'll print out some stuff, and that's it.

What does it look like?
http://i30.tinypic.com/nv8riq.jpg

Changelog
v1.0 - Moved main() into a different function so that this can be included into breakfast scripts. Lowercase N checked correctly. Definitely spelt right. Fixed HitS and F'c'le checks.
v0.9 - Fixed Boss Bat bug whereby it was always reporting it as undone. Sped things up, and now there's intelligent caching. Should be cleaner and faster.
v0.8 - First version I deemed not-crap enough to release. Probably still a bit crap, to be honest.

Bale
06-28-2009, 10:55 PM
Make sure you have Zlib (http://kolmafia.us/showthread.php?t=2072).

Whoa. zlib is catching on! I'll check out the script when I'm done slime tubing. :D

bumcheekcity
06-29-2009, 05:03 PM
I'm using Zlib for the updates, and then I got it working, and then it broke again :(

Camber
07-15-2009, 06:05 PM
Very good and complete list of NS tasks and items! It lets me know just what i need to get during the post-island grind to 13.

Codewise, i really like your debug() function. It'll make my debugging life easier without commenting and uncommenting lines as i go.

Correction: I changed your url check on line 706 for the level 12 from quests.php to questlog.php

A suggestion: Have it also check your closet for items. I often drop NS items there that I don't want to lose. I just made the following changes to hasItem() and hasHowManyOf(), and it works great!



boolean hasItem(string itemname, int amount)
{
//if (item_amount(to_item(itemname)) >= amount )
if (item_amount(to_item(itemname)) >= amount || closet_amount(to_item(itemname)) >= amount )
{
//Then we have the required quantites of items. YAY!
return true;
} else {
if (amount == 1)
{
print("You need " + amount + " " + itemname + ".");
} else {
print("You need " + amount + " " + itemname + ". You have " + (item_amount(to_item(itemname)) + closet_amount(to_item(itemname))) + ", needing " + (amount - (item_amount(to_item(itemname)) + closet_amount(to_item(itemname)))));
//print("You need " + amount + " " + itemname + ". You have " + item_amount(to_item(itemname)) + ", needing " + (amount - item_amount(to_item(itemname))));
}
return false;
}
}

//Prints the total quantity of the items. Useful for stuff in the same Zap group.
int hasHowManyOf(string [string] itemlist)
{
int amount;
foreach var in itemlist
{
amount = amount + item_amount(to_item(var)) + closet_amount(to_item(var));
//amount = amount + item_amount(to_item(var)) ;
}
return amount;
}

bumcheekcity
07-15-2009, 10:38 PM
Thanks for the advice, Camber. I'll be adding that to version 0.9 along with a few more things.

halfvoid
07-20-2009, 06:30 PM
so, is version 0.9 posted yet or is that still 0.8 at the top?

bumcheekcity
07-20-2009, 09:59 PM
Still v0.8. I should be getting 0.9 out in two to three days. It's much faster, thanks to the caching and my genius.

Spiny
07-20-2009, 11:33 PM
I just peeked at the code for this and I didn't notice anything about DoD bang potions.

-Spiny

bumcheekcity
07-21-2009, 08:50 PM
That's because there isn't any. It's in the pipeline though. Probably won't make 0.9, but should be in 1.0 :D

Currently debugging 0.9. The outfit check isn't behaving, but other than that, it's good to go.

Edit: Fixed and updated. The first post has v0.9 :D

Spiny
07-24-2009, 12:29 AM
Probably a known issue, but the script isn't recognizing "jabaņero-flavored chewing gum" because of the n.

-Spiny

demon llama
07-24-2009, 01:38 PM
Love the script! Any idea when you plan to look through the telescope and use that information to filter results?

bumcheekcity
07-24-2009, 03:30 PM
I've got my first telescope piece on bumcheekcity 2 yesterday. Telescope support is coming in v1.0, probably in a few days (ish).

demon llama
07-24-2009, 05:01 PM
Another one - Even though I have the wand it still complains that i need a metallic A.

bumcheekcity
07-28-2009, 08:42 PM
Might be being annoying because you have a WA. Either way, it should not tell you if you have a metallic a if you have either the wand or a WA (same with the ruby W).

Likewise, it will only tell you you need one lowercase N and original D if you have either the wand OR the WA, you'll need two each if you have neither, and you'll need zero if you have both. It doesn't correctly interact with the telescope and the ND though.

Version 1.0 (with telescope checking) to come in a few days. Want to test it thoroughly first.

spinrabbit
07-29-2009, 09:48 PM
Might be being annoying because you have a WA. Either way, it should not tell you if you have a metallic a if you have either the wand or a WA (same with the ruby W).

Likewise, it will only tell you you need one lowercase N and original D if you have either the wand OR the WA, you'll need two each if you have neither, and you'll need zero if you have both. It doesn't correctly interact with the telescope and the ND though.

Version 1.0 (with telescope checking) to come in a few days. Want to test it thoroughly first.

The tower item is an NG, not an ND...

bumcheekcity
07-29-2009, 10:24 PM
Bugger.

tgetgel
08-08-2009, 08:44 PM
Now if I could just figure out how to get the output from hccheck to be an input to something that would actually adventure and get those things listed, ...

Nice. :cool:

Camber
08-10-2009, 04:26 PM
tgetgel - zarqon has a script that might be what you want. It is very similar to this one, but also has the option to adventure and get the items. I myself use hccheck to keep me on track.

You can find Hardcore Checklist 1.2.4 here: http://kolmafia.us/showthread.php?t=1045

tgetgel
08-12-2009, 05:43 PM
tgetgel - zarqon has a script that might be what you want. It is very similar to this one, but also has the option to adventure and get the items.

Thanks!

bumcheekcity
09-15-2009, 09:37 PM
Updated to version 1.0 with some changes of medium importance.

hallehoopma
11-26-2011, 11:45 AM
Hey BCC - Thanks for this! We have some new players in clan & I was looking for exactly this sort of thing for them (and idiotic forgetters like myself ;) just the other day. Turns out all I have to do is look & it's here!

FortyCakes
02-25-2012, 07:13 PM
This is really useful - but if you've got a Gnomad-camp sign, it still tells me I need all of the South of the Border items. Would it be possible to suppress that? Thanks

Theraze
02-25-2012, 09:34 PM
If you look, this hasn't been updated in over 2 years, well longer than when the signs changed... change the moxie_sign to gnomads_available and that will probably fix it.

wrldwzrd89
03-17-2012, 10:46 PM
This needs a few fixes.

WARNING: Missing return values in boolean functions will soon become an error (hccheck.ash, line 108)
WARNING: Missing return values in boolean functions will soon become an error (hccheck.ash, line 130)
WARNING: Missing return values in boolean functions will soon become an error (hccheck.ash, line 151)

Theraze
03-17-2012, 11:23 PM
Just turn bufferoutput (both of them) and checkFamiliar into voids. Since it doesn't actually check on the value, no reason to have it as a boolean. But... y'know, almost 3 year old script. :D

bumcheekcity
03-18-2012, 11:35 AM
This script is not supported now, except as a part of bUMRATS.