My bad for not looking at the correct version!
I simply added this to lines 123 and 147:Code:> call hatter meat Buff selected: Dances with Tweedles You can't equip a Uncle Hobo's stocking cap
I'm using this as part of my daily farming scripting and right now am calling it with cli_execute because main() does so much I'm not sure how to run it via import. Is this possible or am I stuck with doing calling it via cli? I know it doesn't really matter it just annoys me to use cli_execute inside my ash scripts for some reason.
If you import a script it will not execute anything in main(). However, taking a look at the script you don't need to use main() if you already know what effect you want, like this...
if(get_property("_madTeaParty") == "false")
To utilize this script from within another script you can now import it and use the hatter() function:
Also, it helps that the code was just horrible, I mean, who makes functions that all return void and set global variable flags for other functions to check instead of just returning a useful value in the first place? And what was with the global hats map that went through every item in the game even if you were just using the help command?? Come on guys, if the code sucks, please let me know.
- Re-factored code.
- Eliminated global variables and maps.
- Changed functions to have more useful return values.
This is an extensive overhaul that has only been tested once so let me know if I screwed anything up.
It just feels wrong. It's like speaking English to a translator who understands Spanish but just says the same English words to the other guy cause he speaks English too. Stop looking at me like that ...Originally Posted by That FN Ninja
Not sure whether to be extremely happy that you fixed all this, or to be really angry at either myself for spending the time trying, or myself for failing to make it better before you beat me to it.
I think I'll choose the first option.
Oh, and it of course worked perfectly.
Last edited by fianor; 06-18-2011 at 12:02 AM.
The help arguments now display the hats associated with a particular buff.
They are printed in blue if you own them or if they are easily obtained. They are printed in red if you have access to them but cannot equip them. Their location is also printed. This includes hats located in your closet, display, starter hats from gum on a string, NPC hats, etc. Here's a screen shot.