Trick-Or-Treating script

deusnoctum

New member
I added some code to my copy of the script to rotate between item dropping familiars while tricking. I'm too lazy to check mall prices, so they're random. Change "squamous gibberer" to whatever familiar you want after you've gotten all drops.

These are rows 229-263 in my script:

Code:
       for i from 0 to 11
			{
				housematch = create_matcher("whichhouse="+i+">[^>]*?house_d", advstring);
				if (find(housematch))
				{
					if (have_familiar( $familiar [green pixie]) && get_property("_absintheDrops") != "5")
						use_familiar( $familiar [green pixie]);
					else if (have_familiar( $familiar [Baby Sandworm]) && get_property("_aguaDrops") != "5")
						use_familiar( $familiar [Baby Sandworm]);
					else if (have_familiar( $familiar [llama lama]) && get_property("_gongDrops") != "5")
						use_familiar( $familiar [llama lama]);
					else if (have_familiar( $familiar [rogue program]) && get_property("_tokenDrops") != "5")
						use_familiar( $familiar [rogue program]);
					else if (have_familiar( $familiar [Li\'l Xenomorph]) && get_property("_transponderDrops") != "5")
						use_familiar( $familiar [Li\'l Xenomorph]);
					else if (have_familiar( $familiar [Unconscious Collective]) && get_property("_dreamJarDrops") != "5")
						use_familiar( $familiar [Unconscious Collective]);
					else if (have_familiar( $familiar [Astral Badger]) && get_property("_astralDrops") != "5")
						use_familiar( $familiar [Astral Badger]);
					else if (have_familiar( $familiar [Bloovian Groose]) && get_property("_grooseDrops") != "5")
						use_familiar( $familiar [Bloovian Groose]);
					else if (have_familiar( $familiar [Blavious kloop]) && get_property("_kloopDrops") != "5")
						use_familiar( $familiar [Blavious kloop]);
					else if (have_familiar( $familiar [grim brother]) && get_property("_grimFairyTaleDrops") != "5")
						use_familiar( $familiar [grim brother]);
					else if (have_familiar( $familiar [Grimstone Golem]) && get_property("_grimstoneMaskDrops") != "1")
						use_familiar( $familiar [Grimstone Golem]);
					else if (have_familiar( $familiar [angry jung man]) && get_property("_jungDrops") != "1")
						use_familiar( $familiar [angry jung man]);
					else use_familiar( $familiar [squamous Gibberer]);
					do_house(i);
				}
			}
			trick_exit();
			outfit("treat");
 
Last edited:

Crowther

Active member
I added some code to my copy of the script to rotate between item dropping familiars while tricking. I can't think of a good way to order them, so it's kind of random.
I used the happy medium once I ran out of stuff that dropped content items. That gave me lots of booze in run!
 

Chamou

New member
I have outfits named trick, treat, and newblock, and it switches to newblock properly to regenerate my MP, but it isn't going between trick and treat properly. I'm using the cloathing for treat and the dreadful pajamas with trick. I know it's not working because pantsgiving is in my trick outfit and pocket crumbs never fires during combat. What am I doing wrong?

EDIT: Never mind, I fixed it myself by updating mafia.
 
Last edited:

Troo

New member
OMG, this script is AWESOME (and super-easy to use for those of us who don't script)! Thank you so much!!!
 

MatrixM

New member
Is there a way to make it so as soon as the light houses (which are the only ones that give special outfit/avatar drops) are used up it'll auto-search for a new block?
 

Cool12309

Member
Is there a way to make it so as soon as the light houses (which are the only ones that give special outfit/avatar drops) are used up it'll auto-search for a new block?

There's not really much point, the monsters give free stats and drop some items, at zero adventure cost. The only downside would be if you could not beat them up, which I guess could understand but you should be either A) Ascending, so you don't want to waste adventures finding new blocks, or B) In aftercore, where you can just be in the same room as them and they'll drop dead.
 

usoppnomiko

New member
Please update the script since the location was moved and running the current version gave me a message that it is not Halloween. Thanks.
 

Bale

Minion
It was updated very shortly after rollover. You need to update to the current revision.

If you installed the script through SVN, then use the svn update command. Or right click in the script manager and choose update from the menu.

If you did not install through SVN, then go to the script manager to install it.
 

Bale

Minion
I doubt anything has happened to KoL since last Halloween that could make it not work anymore, but if Jick has changed the relevant URL (a definite possibility) we won't know until tomorrow. Anyway, back in October there was such a change (read above comments) and the script was updated within an hour.

tl;dr: Question cannot be answered until tomorrow.
 
Last edited:
"tricktreat outfits" results seem incomplete, missing some new outfits, and maybe some old ones.

edit: and the links from that output to market data don't work.

But this is just the informational feature, not the adventuring one. Have yet to run it today.
 
Last edited:

Bale

Minion
Script runs perfectly.

"tricktreat outfits" results seem incomplete, missing some new outfits, and maybe some old ones.

The script doesn't contain any outfit information, it only parses information from this page on wiki, so I'm placing fault where fault lies.

The links to the market data is definitely a bug though.
 

guyy

Member
Anyway, back in October there was such a change (read above comments) and the script was updated within an hour.

Although, I was still playing the game at the time...

The market data links are still working for me. Not sure what's going on there. Is the URL wrong or does clicking the link just not do anything? Are specific outfits not working, or all of them?
 

lostcalpolydude

Developer
Staff member
The script gives me links with timespan=1 in them (and line 38 makes it pretty clear that the links can't exist without that). Do you have an old version of the script?
 
My tricktreat.ash file was time stamped last November. I see the line, and it sure looks like &timespan=1 etc. should be in the href.

Poking at things a bit, I tried turning on Preferences - General - Extra Debugging - Verbose log... and turned debugging on.
Then ran
Code:
ash print_html("\<a href=\"p?q1=1&q2=2\">this\<\a>")
in the gcli and clicked on the link. This resulted in
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v16.8 r15441, Windows 7, Java 1.7.0_51
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Tue Feb 17 22:08:23 AKST 2015
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



> ash print_html("\<a href=\"p?q1=1&q2=2\">this\<\a>")

<a href="p?q1=1&q2=2">this<a>
Returned: void
-----From Browser-----
GET /p?q1=1 HTTP/1.1
Host: 127.0.0.1:60080
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cookie: charpwd=200; chatpwd=192
----------
-----To Browser-----
HTTP/1.1 404 Not Found
Date: Tue Feb 17 22:08:41 AKST 2015
Server: KoLmafia v16.8
Connection: close
----------

Confirmed with Fiddler that the second query string parameter (after the ampersand) is not being sent to the browser.

So, works for some, not for others - ?
 

Bale

Minion
It would be interesting to hear what versions of java each of you are using. Obviously fractalnavel is using Windows 7, Java 1.7.0_51, but what OS/Java is lost using?
 
Top