Results 1 to 6 of 6

Thread: Hobo Code Getter

  1. #1

    Question Hobo Code Getter

    OK, so I have been wanting to learn how to script in ash for awhile now but I never saw anything that really caught my attention that I also thought I could do. I found an old thread from 2009 by tebee with a glyph checker script. It was abandoned and I thought that maybe I could add some adventuring to it so it would automatically get the codes also for aftercore. This is the first time I ever made a script so I am kinda proud even though I have alot of questions about it so I can fix things.

    One of the main problems (I am not actually sure is a problem but if it is then it will ruin the entire script) is I am not sure how autoabort works in relation to a script. The wiki said that it stops the automation aspect of Mafia but does that include scripts? It also said that it wouldn't autoabort if there was a condition that is still unfulfilled, is there a way to add a specific non-adventure as the condition? I used
    That is kinda scary and I am not sure if it will work. Will the auto stop make it stop adventuring there with that line? Will it abort the entire script or actually just abort that adventure sequence and allow the script to continue executing lines after that adventure line?

    Another problem is I feel like it will lag too much (and hammer on the servers WAY too much) because I visit url's constantly throughout the script. Is there and easier/simpler/less hammery way to check the quest log for all the codes with only one function? Is there a way to check a location's availibility for regular zones like The Cyrpt? --This is a part of the script that makes me very disappointed because I know there are about a billion better ways to do this but I don't know how with my limited knowledge.

    I see some scripts that make a popup window that will let the user change values everytime the script is executed. How is the managed? I looked at the wiki but couldn't find anything about it. I would like to add one to see if they want it to spend adventures trying to get the codes or if they just want a list of codes they are missing.

    /end huge post

    (Note: I commented out all the lines about adventuring because I didn't want to waste all my adventures while debugging it)

    Thanks in advance for all the help!
    Last edited by Tipmon; 01-24-2013 at 08:44 PM.

  2. #2
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010


    1) I believe all the hobo codes are "autoaborts" and as such will exit the adventure()-function when encountered and continue on to any lines of code after that funciton. If you specifically want to hunt for such an adventure you can use "1 autostop" as the condition, or if you want to check for the correct adventure name you can adventure one turn at a time and check the result of get_property("lastEncounter") against the name of the noncombat.

    2) I guess you could import canadv.ash which can be used to check the availability of zones. You may still need to check the questlog for the glyphs already found, but it should be enough to do that once at the beginning of the script and then add any further found when found rather than recheck the questlog again.

    3) user_confirm() is the function you are looking for for the little pop-up.
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesn’t work. /Bob Fitch, Blizzard

  3. #3


    Ok, thanks. I added the popup and uncommented most of the adventures(I couldn't nail a few of the technical names for areas). I also added some checks for adventures remaining, a check for the hobo code binder, and a block to equip it for you. I uploaded the new version in the OP incase anyone else stumbles upon this.

  4. #4
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010


    Also, if you're feeling paranoid:
    					cli_execute("conditions add 1 autostop;");
    autostop IS a valid condition that you can set. If you want. I use it in TheSea for Granny's last adventure.

  5. #5
    Senior Member
    Join Date
    Feb 2009


    I would suggest you check on how maps work in a ASH script. They can make your script shorter and faster.

    As for the checking which glyphs you have. I would suggest visit_url() and a matcher to find them in the source code. A single check would be needed to parse all acquired codes. This would need a map to make it more manageable.

  6. #6
    Senior Member Pazleysox's Avatar
    Join Date
    Feb 2009


    I updated this script. It was only a few simple things that needed to be changed. I find that I needed this script for a new project, and if anyone else happens to need it, here it is.

    Attached Files
    Last edited by Pazleysox; 05-01-2019 at 01:46 PM. Reason: updated the updated version
    Scripts I have written:
    Unlock Dread A Script to save you a bunch of clicks.
    Standard Rollover Bonus A Script that shows best items to pull/equip for bonus turns.
    Standard PVP Bonus A Script that shows the best items to pull/equip for bonus PVP Fights.
    Rollover Management A Script that does all the daily deeds you might have forgotten, or might have missed.
    Chatbot A Chatbot script. Simple start for those who want/need one for their clan.
    Zap Wand A Dungeon of Doom ZAP WAND getting script.

Similar Threads

  1. 14507: Some minor code cleanup in chat code
    By RSS Bot in forum Latest SVN Changes
    Replies: 0
    Last Post: 08-28-2014, 03:50 AM
  2. Replies: 2
    Last Post: 02-25-2012, 05:25 PM
  3. Replies: 0
    Last Post: 02-20-2012, 11:10 PM
  4. Replies: 8
    Last Post: 07-29-2011, 05:42 PM
  5. Hardcore Checklist -- sequential required item getter/notifier
    By zarqon in forum Turn-Burning Scripts
    Replies: 94
    Last Post: 10-12-2009, 04:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts