Search results

  1. S

    Example script: acquire_familiars

    Thanks for this info; I'm not going to bother to update this - it's a teaching script, and I just wanted to let new people know how I got there and why - this is good to understand. I might do that in some other scripts of my own. But since buy_limit is literally just the autoBuyPriceLimit...
  2. S

    Example script: acquire_familiars

    I was writing a script to obtain any mall-purchasable familiars I was missing, and realized that while it was fairly short and simple it was also using a fairly wide array of functions and would make a great example script. I noticed a couple people here lately who seem new to coding/scripting...
  3. S

    chatbotScript

    record note { string sender; string message; string channel; int date; }[int] ChatLog; File_to_Map("ChatLog.txt",ChatLog); /* int NE= count(ChatLog); while (ChatLog[NE].sender != "") NE=NE+1; */ // Get the actual upper bound int NE = 0; foreach i in ChatLog { NE = i; } ChatLog[NE].sender=...
  4. S

    Handling choices

    This sounds really nice, thanks! I think it'll also be super helpful for automating the spacegate noncoms.
  5. S

    Writing to file?

    Oh ffs, yes apparently the search adds some text for people with pvp enabled for some damn reason so the regex doesn't work in those cases. Here, fixed. record playerdata { string name; string id; string cclass; int level; string clanname; string clanid; }; playerdata[int]...
  6. S

    New Content - Implemented Spacegate access badge

    KoLmafia v17.6 r17954 Unknown item found: complex alien plant sample (9418, 754099238) -------------------- 9418 complex alien plant sample 754099238 dna.gif none d 25 # Item complex alien plant sample: Worth 10 pages of Spacegate Research --------------------
  7. S

    Writing to file?

    so, extracting player info from a search seems like a generally useful thing so I made this, not sure if you're already satisfied with what you've got but here it is anyway. I wasn't even thinking about using searchplayer.php before which is much better than using the profile page. heeheehee...
  8. S

    Writing to file?

    looking back at it it's clear the my_list[i] in the last kmail line should've been changed to temp
  9. S

    Writing to file?

    FYI, if you're going to be parsing pages for information, it would probably behoove you to pick up some regex, which is supported by mafia. I whipped up the below script which, if you save this as "showplayer.ash" in your mafia relay\ folder, will parse out the player's name, id, level, and...
  10. S

    New Content - Implemented Spacegate access badge

    The following ash code dropped in choice.ash parses and tracks the various characteristic of your current planet. Posting here to hopefully save someone time building regexes. Haven't tested with multiple environmental hazards yet, or in the response right when you first choose the planet; will...
  11. S

    Noobsorb: A relay script to help track your absorptions.

    That makes sense. My PVP experience is basically my ascension script smashing the stone and running "swagger" just before jumping the gash. I wonder if I have enough by now to afford anything...
  12. S

    Noobsorb: A relay script to help track your absorptions.

    Sorry, I had a holy hell of a headache yesterday and just kinda threw changes in there and threw it out there. As for storage; are there people that keep stuff in hagnks in aftercore? I don't even think about that, my prismbreak script just grabs everything. But yeah it should be fixed, and I...
  13. S

    Noobsorb: A relay script to help track your absorptions.

    These fixes are now implemented, thanks Theraze!
  14. S

    Vlad's Familiar Changing Frankenscript

    What Theraze posted isn't code, it's the output of the CLI "ashref" command showing you what functions you're probably looking for. You can frequently take a guess or three at what words might be in the function you need and find it this way. I don't know exactly what your logic is in choosing...
  15. S

    Noobsorb: A relay script to help track your absorptions.

    Thanks, I could've sworn the "absorb" command was auto-retrieving stuff before but when I tried it recently it wasn't. Might have to do with Mafia settings, I didn't check to verify. In any case noob.ash as well as the relay will now retrieve the necessary item if it needs to. It also will also...
  16. S

    Changes: Monitor property changes.

    The use case is in script authorship where you need to know when a particular property changes so you can react to it in your own script. Like if you're building an ascension script and need to know exactly when the questL07Cyrptic changes and what causes it and - oh look, cyrptAlcoveEvilness...
  17. S

    Changes: Monitor property changes.

    Timestamping the checkpoint is a good idea, but the default identifier is going to be a constant value because the main idea was to use it to track changes turn-by-turn, constantly comparing and updating. You can create more permanent checkpoints by just calling "Checkpoint( now_to_string() )"...
  18. S

    Veracity's Property Management Library - vprops.ash

    Okay, here's what I've done: vprops2 imports vprops, but doesn't automatically load the types map. It includes define_property2, which first takes the scriptname as the first argument, then the rest of the values same as define_property. If you use define_property2 to define your property, it...
  19. S

    Veracity's Property Management Library - vprops.ash

    One of the things zlib includes that I find immensely useful, and is a big reason why I use its vars, is the WOSSMAN relay script for easy management. I've mangled Zarqon's script to make a version that manages preferences instead. To do this I had to also make a library script (I called it...
  20. S

    Changes: Monitor property changes.

    Since I just found out Veracity added a bunch of interesting property functions, I whipped up a script to track property changes. This is probably mostly useful to script authors who like to see exactly what properties get changed and when so they know how to react to them. Suggested use is to...
Top