Search results

  1. D

    Abort: perhaps not the end of the world?

    I was surprised at the "scope" of the abort command. Given: ---die.ash--- void die() { abort();} I would expect that this: import<die.ash>; die(); print("And now I'm back. I had a snack."); would never print anything. But I was surprised to find that this: cli_execute("call die.ash")...
  2. D

    Someone trying to profit from my work

    Someone was kind enough to forward me this unpleasant email that s/he found in his kmailbox from Byrn:
  3. D

    Azazel quest gone?

    One of my scripts (ascend) started behaving oddly, and I found the problem: my main, dj_d, no longer has the "azazel, ma belle" entry in his questlog. He's level 42 and still has a liver of steel (he got it in 2004 :) ), and my multies still have their entry, but for some reason it's missing on...
  4. D

    get familiar from hatchling & vice versa

    Is there a way to pass in a hatchling and get a familiar returned and/or vice versa?
  5. D

    Spendiest items in the game - bestthings.ash

    The best things in life are free; in KOL, they're gonna cost you some meat. My latest in the "quick and dirty" script series, this prints out ALL the items in the game, sorted by mall price.
  6. D

    Null function is the biggest perf hit?

    I have a function in eatdrink.ash: void verbose2(string foo) { // print(foo); } It gets called a lot, and I uncomment the print statement when I am doing detailed debugging (e.g. it prints the results for every consumable in the game). However, even while it's commented out, it's getting...
  7. D

    New "profile" command

    a) Rocks b) Thank you JH c) What's "net" refer to? d) If you invoke the function from the command line and dawdle about entering parameters, which function (if any) is that time counted against? e) If you use user_confirm, is dawdle time counted? For those who haven't tried it yet, "profile...
  8. D

    Is there a fast way to delete every entry in a map?

    I want to nuke the whole data structure so I can rebuild it each time through a loop - is there a way other than iterating with remove?
  9. D

    Maps and sort, aka my brain hurts

    So I want to declare something like this: float [int][item]stuff;The idea is that the [int] is an index (for sorting), so it is unique. There will only be one entry per item, so the [item] field is unique too. The float is a quantity that I will be sorting by. Assume there are a bunch of...
  10. D

    Converting item names to plaintext

    What's a reliable way to convert item names to valid property names? Replacing spaces with underscores is a good start, but what about Genalen(tm) etc?
  11. D

    Dumb question - for syntax

    Does ash support "for" loops, and if so, what's the syntax? It's hard to search for it since for every instance of for being used for looping, their are for or five other uses of the word for for other purposes than the one I'm looking for. :)
  12. D

    What are you worth? networth.ash will tell you.

    Quick and dirty script: networth.ash tells you what you're worth. Enjoy! (And if you're so inclined, show off by posting the results in this thread.)
  13. D

    Mechanism to populate a list of familiars?

    Is there an ASH-native way to get a map of all familiars in the game? Right now, I'm iterating from 1 to some large arbitrary integer and using to_familiar, but that seems grossly inefficient. I could parse familiars.txt directly but that seems ugly. I think what I want is something like...
  14. D

    Repricing

    I'd like to reprice existing items in my mall store so they're more likely to sell. It looks like I might be able to get the items by iterating over every item in the database and using shop_amount(). Very inefficient but it should work. Then I can get those items out of the mall - but its an...
  15. D

    Make.meat.fast

    MAKE.MEAT.FAST (aka farm.ash) BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA So I put together something different. It's an optimal farming script. Optimal farming script. It surveys the entire kingdom and all of your possessions to figure out what will...
  16. D

    Performance

    I'm working on a script that iterates over a ton of calculations (a la eatdrink, but worse). It takes about an hour to run (fortunately with no server impact). I'm looking for some low hanging fruit to speed it up. Any tips? I'm interested in both ways to profile performance, if there are...
  17. D

    Debugging loooooong printouts

    When I'm working on a script with lots of iterations and a print in every one, it's hard to go back and see what's happened before. Two ideas for a solution: - configurable buffer length in kolmafia so I could just scroll back (very simple) - ability to print to a plain text file (better, since...
  18. D

    "notify" request

    Many people rename my scripts before running them, breaking Z's fabulous registry.ash script. May I request a version of notify that takes a second argument, a string that is used in place of the filename? That way I can do notify dj_d, "EatDrink.ash" and the kmails will all parse properly.
  19. D

    Why does print not work in session logs?

    string foo = "bar"; print(foo); print("baz"); seems to be recorded in the session log as foo baz Thata is, it prints the variable name instead of the variable contents. That seems really weird. Am I missing something? It's preventing me from debuging eatdrink from session logs; a workaround...
  20. D

    How do I know what effect use(item) will cause?

    Lots of questions today. :) I'm looking for, basically, a way to get at the effect (and ultimately the numeric_modifiers of that effect) for a consumable item. For example, something like: effect usage_effect($item[rock salt]) to return Fresh Scent.
Top