[quote author=Bucket de Mowbray link=topic=35.msg71#msg71 date=1143717964]
Arrays.[/quote]
Revision 574 (KoLmafia 7.8 ) provides Maps, which allow you to do everything you could with an array and more.
Revision 435 (KoLmafia 7.7) provides this.
If by "circular" you mean "recursive", that is allowed, as of revision 598 (KoLmafia 7.9).
If by "circular" you mean "mutually recursive", that requires forward references for functions, which is allowed, as of revision 607 (KoLmafia 7.9).
Revision 582 (KoLmafia 7.9) provides:
Code:
int [int, int] map2;
foreach key1 in map2
foreach key2 in map2[key1]
print( "map2[" + key1 + "," + key2 + "] = " + map2[key1,key2] );
Revision 599 (KoLmafia 7.9) provides:
Code:
for x from 10 upto 20 by 2
for y from 20 downto 16
print( "x = " + x + " y = " + y );
Both kinds of loop allow "break" and "continue".
Case or Switch statements.
This is not going to happen. Since they are basically syntactic sugar for an if/else if/else chain, lack of such a construct doesn't prevent you from coding the control flow of your choice.
Anyone else have gripes that I missed?
Suggestion: change your attitude - or at least how you express it in the presence of the KoLmafia developers - such that the word "gripe" is not part of it.
[quote author=Presto Ragu link=topic=35.msg174#msg174 date=1144294715]
Ability to check total fullness and/or spleeness. (Not going to happen.)[/quote]
Right. KoL doesn't display it for us, therefore, there is no way that KoLmafia can know where you are in today's consumption. But see later...
A way to record values between scripts. Either variable values, or writing and reading to a file.
Revision 573 (KoLmafia 7.8 ) provides get_property() and set_property().
Revision 590 (KoLmafia 7.9) provides a complete set of string_to_xxx() functions, corresponding to the previously existing xxx_to_string() functions, so you can use any convenient data type as a property.
[quote author=Tirian link=topic=35.msg600#msg600 date=1146543257]
Turning the scripting language into C or Java is more than I want to ask for. I think it's powerful enough to do whatever we could want to do.[/quote]
Well, especially now that I've done the above set of syntax enhancements...
But I would like to see more library functions to give us wider knowledge of the Kingdom.
This is probably what you can realistically expect to see, going forward.
I'd like to know if I'm in hardcore
I'd like to know how many storage pulls I have left today
I'd like to know if today is a clover day
These are all the kind of things KoLmafia already knows and displays elsewhere, and thus would be easy enough to turn into little inquiry functions.
I'd like to know if a location is available for adventuring without adventuring there
A bigger project
I'd like to know my progress level in a given quest.
Is the Boss Bat dead?
What ore does the Trapper need?
None of this info is currently available.
I'd like to know how much fullness and spleeness I have taken up in this session
Not likely to happen, because KoLmafia knows nothing whatever about how much fullness, spleeniness, or drunkenness any given consumable causes. Now, I fully expect the busy people on this forum to code up this data, using the new constructs ASH provides - global variables and maps, in particular.
For example
food.ash:
Code:
int [item, int] food_data;
int food_fullness_index = 0;
int food_min_adventure_index = 1;
int food_max_adventure_index = 2;
...
food_data[ $item[Hell Ramen], food_fullness_index ] = 6;
food_data[ $item[Hell Ramen], food_min_adventure_index ] = 12;
food_data[ $item[Hell Ramen], food_max_adventure_index ] = 20;
...
food_data[ $item[Knob sausage chow mein], food_fullness_index ] = 5;
food_data[ $item[Knob sausage chow mein], food_min_adventure_index ] = 18;
food_data[ $item[Knob sausage chow mein], food_max_adventure_index ] = 25;
...
int food_fullness( item food )
{
return food_data[ food, food_fullness_index ];
}
...and so on.
I'd like to be able to do the final room of the NS lair one step at a time (so, for instance, I can face my shadow with a linoleum sword instead of a mirror shard)
Easy enough to make each of the rooms separately callable functions. But if you "for instance" is the real reason you want this, then perhaps KoLmafia should simply restore the weapon you were wielding before the energy bolt, when it wields the mirror shard.
I'd like a function like tavern() that clears the mine as cleverly as can be expected
This is more a KoLmafia suggestion rather than an ASH suggestion; this is a nice idea whether or not you are using a script.
I'd like to be able to set a parameter that says that I want to cast Saucy Salve instead of attacking when my health falls below a certain level- I'd like to be able to adapt the custom combat parameters from scripts and to write ASH-based adventures that use the CCS.
Big feature request.