Search results

  1. M

    finding/fixing a lost tps

    How about something like this? stat [item] TPSDrinks; TPSDrinks[$item[grogtini]] = $stat[Muscle]; TPSDrinks[$item[bodyslam]] = $stat[Muscle]; TPSDrinks[$item[cherry bomb]] = $stat[Mysticality]; TPSDrinks[$item[sangria del diablo]] = $stat[Mysticality]; TPSDrinks[$item[vesper]] = $stat[Moxie]...
  2. M

    Strange behavior

    Since switching to 10.0 from 2480, I've noticed that every time a script of mine switches to my cymbal-playing monkey, it unequips the funky brass fez. Any idea why this might be?
  3. M

    Closeting RPPs... (verification needed on code snippet)

    Fair enough. Here's how it works. max() and min() are the classical functions of the type, and are so eminently useful that I'm surprised they aren't native to ASH. Respectively, they return the larger and smaller of the two arguments. ASH should never see a situation where !> is not...
  4. M

    Closeting RPPs... (verification needed on code snippet)

    Alternatively, you could do something like this: int max (int a, int b) { if( a > b ) { return a; } else { return b; } } int min (int a, int b) { if( a > b ) { return b; } else { return a; } } void closet_red_pixel_potions() { if(!have_skill($skill[Ambidextrous Funkslinging])) {...
  5. M

    Syntax Question

    Aha! I was not aware that there was additional documentation on sourceforge that had not made the jump to the wiki. This will be most useful.
  6. M

    Syntax Question

    The information about maps at wiki.kolmafia.us is spare, so I have the following question: If I wish to create a map of maps, is the syntax: type [type] [type] or type [type,type]? Example: I wish to do this: boolean disguised; if(count(Disguises[WorldState.CurrentGoal.area]) > 0) {...
  7. M

    Re: Simple Scripts: Mosquito Larva

    Re: Simple Scripts: Mosquito Larva Sorry to hear about your hard drive. What else are you in need of?
  8. M

    Fun with Equipment

    I'd looked at equipment.dat, hoping that it would provide what I was looking for, but alas, it only provides requirement data, which, as you indicated, is more than adequately handled by can_equip(). The purpose of the Equipment map I am working on is to document the side-effects of equipment...
  9. M

    Fun with Equipment

    Attached to this post is a mostly incomplete Equipment map that I've been working on as I go. I think it's fairly obvious what this map is intended to do. My question is this: Does KolMafia expose this information anywhere that ASH can get to it? Obviously, if it's available, I'd rather not...
  10. M

    More Broken Code

    Yep. Switching from $item[NG] to $item[ng] works. I wonder, though, if case-sensitivity is a positive feature, particularly in location names, where $location[Haunted Gallery] != $location[haunted Gallery].
  11. M

    More Broken Code

    After adding this snippet: TowerNeed = guardians(); if(TowerNeed != $item[none]) { print(item_to_string(TowerNeed)); print(item_to_string($item[NG])); wait(5); } I get this output: Checking prerequisites... Climbing the tower... Fighting guardian on level 4 of the tower...
  12. M

    More Broken Code

    The problem is strictly with the if() misbehaving, and while I'd rather not post the whole file (it has many of the characteristics of an ascension script), I'd be happy to email/PM it to you. You are correct. TowerMap is a location [item] map which identifies the locations in which the various...
  13. M

    More Broken Code

    Alright, I'm ironing out the last/latest kinks in a quest-related script (which quest should be obvious), but one part of the code is not working as I expect. Here's the snippet: <snip 384 lines> goal TowerItem; TowerItem.type = "IA"; item TowerNeed; <snip map definitions>...
  14. M

    Noob

    Based on certain extraordinarily kind assumptions (that is to say, if my assumptions are in any way wrong, see the above response) this snippet is what you want: council(); visit_url("mtnoob.php?action=toot"); use(item_amount($item[letter from King Ralph XI]),$item[letter from King Ralph XI])...
  15. M

    Display Case

    Interesting. I was no aware of delete, though it shouldn't be neccssary given the autosegmenting capability. I've gone ahead an reworked my own for friendliness, and we'll see in a couple days if the 'problem' items will go ino the case properly.
  16. M

    Display Case

    Ah. I can see why yours works and mine doesn't. Since I defeated Her Naughtiness again just last night, I was able to try things out, and it appears that 'no-trade' items like the badass belt, Bonerdagon necklace, anything made of Stainless Steel, etc. won't go into the case via the GUI...
  17. M

    Display Case

    For some reason, the attached script has stopped working in the last few versions of KolMafia. Is this intentional? Short explanation: In preparation for a visit to Hagnk's, this script attemps to: A: Use up the character's supply of certain items, B: Put a number of items into the display case...
  18. M

    use_skill returns true on auto-recovery failure

    Re: Is this a bug, or am I just being stupid? I actually tried that, and it didn't help. A little creative print() ing showed that use_skill() seems to always return true, even if there was not enough mp to cast the skill. I worked around the problem by checking after each cast to be sure that...
  19. M

    use_skill returns true on auto-recovery failure

    Build 2295: My self-buffing code has this snippet in it: while(have_effect(TEffect) < turns && flag) { flag = use_skill(1, TSkill); } return (have_effect(TEffect) >= turns); Unfortunately, it is not behaving as I intend. My intent is for this snippet to keep casting the skill...
Back
Top