New Content - Implemented Protonic Accelerator

Crowther

Active member
My script uses love gnats and mind bullets, because without stunning I was sometimes losing to the ghosts before they were trapped.
 

Bale

Minion
In aftercore my elemental resistance is so high that I don't die. I'm not much of a user of BALLS, but if you'd like to share yours I might want to add the feature to my own.
 

Crowther

Active member
In aftercore my elemental resistance is so high that I don't die. I'm not much of a user of BALLS, but if you'd like to share yours I might want to add the feature to my own.
Nope. Mine is pathetic. I just couldn't resist tempting you to make another final version.
 

Bale

Minion
Not going to happen unless a BALLS master decides to post an awesome ghost bustin' macro that works better than the one I'm using. Preferably it would work for any character possessing any possible set of stun skills. Since most stun skills are specific to class/path these days and a character might not have a default stun like gnats I cannot be arsed to do it myself if I don't need it.
 

Bale

Minion
Nope. Mine is pathetic. I just couldn't resist tempting you to make another final version.

I said I wouldn't do it. I was wrong. While I was testing the stunning, I found that if I was killed by ghosts it would keep futilely throwing itself at that ghost until I ran out of adventures. So I fixed that. Also, it wouldn't re-equip starting gear and familiar if it died fighting the ghost, so I fixed that.

New and improved Ghost Busting function!

Code:
void bustGhost() {
	// If last adventure was getting beaten up, then ABORT! (Last adventure might have been losing to this ghost.)
	if(run_combat().contains_text("<p>You lose.  You slink away"))
		abort("Whoa! Not doing well here! Fight this ghost manually!");
	buffer stun() {
		buffer stun;
		void addstun(skill sk) {
			if(sk != $skill[none] && have_skill(sk)) {
				stun.append("if hasskill ");
				stun.append(to_int(sk));
				stun.append("; skill ");
				stun.append(to_int(sk));
				stun.append("; endif; ");
			}
		}
		void addstun(item it) {
			if(it != $item[none] && available_amount(it) > 0) {
				stun.append("if hascombatitem ");
				stun.append(to_int(it));
				stun.append("; use ");
				stun.append(to_int(it));
				stun.append("; endif; ");
			}
		}
		foreach sk in $skills[Summon Love Gnats, mind bullet]
			addstun(sk);
		addstun(stun_skill());
		if(length(stun) == 0)
			addstun($skill[Shadow Noodles]);
		foreach it in $items[chloroform rag, gas balloon, floorboard cruft]
			if(length(stun) == 0)
				addstun(it);
		return stun.insert(0, "skill Shoot Ghost; "); // Inserting because something goes wrong when stun is first? This attack gets ignored!
	}
	
	item acc3;
	familiar fam;
	location ghostLocation = to_location(get_property("ghostLocation"));
	if(my_inebriety() <= inebriety_limit() && to_boolean(get_property("kingLiberated")) && ghostLocation != $location[none]) { # && my_location() != ghostLocation) {
		try {
			switch(ghostLocation) {
			case $location[Inside the Palindome]:
				acc3 = equipped_item($slot[acc3]);
				equip($slot[acc3], $item[Talisman o' Namsilat]);
				break;
			case $location[The Skeleton Store]:
				if(get_property("questM23Meatsmith") == "unstarted") {
					visit_url("shop.php?whichshop=meatsmith&action=talk");
					run_choice(1);
				}
				break;
			case $location[The Overgrown Lot]:
				if(get_property("questM24Doc") == "unstarted") {
					visit_url("shop.php?whichshop=doc&action=talk");
					run_choice(1);
				}
				break;
			case $location[Madness Bakery]:
				if(get_property("questM25Armorer") == "unstarted") {
					visit_url("shop.php?whichshop=armory&action=talk");
					run_choice(1);
				}
				break;
			}
			item back;
			if(!have_equipped($item[protonic accelerator pack])) {
				back = equipped_item($slot[back]);
				equip($item[protonic accelerator pack]);
			}
			if(my_familiar().combat) {
				fam = my_familiar();
				use_familiar($familiar[none]);
			}
			(!adv1(ghostLocation, -1, stun() + "while hasskill Shoot Ghost; skill Shoot Ghost; if hasskill Trap Ghost; skill Trap Ghost; endif; endwhile;"));
			// Trapped error condition in case I'm adventuring with goals
		} finally {
			if(acc3 != $item[none])
				equip($slot[acc3], acc3);
			if(fam != $familiar[none])
				use_familiar(fam);
			if(back != $item[none])
				equip(back);
		}
	}
}
 
Last edited:

Bale

Minion
Tiny bug in that last post. Now for my absolute ultimate final version:

Code:
void bustGhost() {
	buffer stun() {
		buffer stun;
		void addstun(skill sk) {
			if(sk != $skill[none] && have_skill(sk)) {
				stun.append("if hasskill ");
				stun.append(to_int(sk));
				stun.append("; skill ");
				stun.append(to_int(sk));
				stun.append("; endif; ");
			}
		}
		void addstun(item it) {
			if(it != $item[none] && available_amount(it) > 0) {
				stun.append("if hascombatitem ");
				stun.append(to_int(it));
				stun.append("; use ");
				stun.append(to_int(it));
				stun.append("; endif; ");
			}
		}
		foreach sk in $skills[Summon Love Gnats, Mind Bullets]
			addstun(sk);
		addstun(stun_skill());
		if(length(stun) == 0)
			addstun($skill[Shadow Noodles]);
		foreach it in $items[chloroform rag, gas balloon, floorboard cruft]
			if(length(stun) == 0)
				addstun(it);
		return stun.insert(0, "skill Shoot Ghost; "); // Inserting because something goes wrong when stun is first? This attack gets ignored!
	}
	
	item acc3;
	familiar fam;
	location ghostLocation = to_location(get_property("ghostLocation"));
	if(my_inebriety() <= inebriety_limit() && to_boolean(get_property("kingLiberated")) && ghostLocation != $location[none]) { # && my_location() != ghostLocation) {
		// If last adventure was getting beaten up, then ABORT! (Last adventure might have been losing to this ghost.)
		if(run_combat().contains_text("<p>You lose.  You slink away"))
			abort("Whoa! Not doing well here! Fight this ghost manually!");
		try {
			switch(ghostLocation) {
			case $location[Inside the Palindome]:
				acc3 = equipped_item($slot[acc3]);
				equip($slot[acc3], $item[Talisman o' Namsilat]);
				break;
			case $location[The Skeleton Store]:
				if(get_property("questM23Meatsmith") == "unstarted") {
					visit_url("shop.php?whichshop=meatsmith&action=talk");
					run_choice(1);
				}
				break;
			case $location[The Overgrown Lot]:
				if(get_property("questM24Doc") == "unstarted") {
					visit_url("shop.php?whichshop=doc&action=talk");
					run_choice(1);
				}
				break;
			case $location[Madness Bakery]:
				if(get_property("questM25Armorer") == "unstarted") {
					visit_url("shop.php?whichshop=armory&action=talk");
					run_choice(1);
				}
				break;
			}
			item back;
			if(!have_equipped($item[protonic accelerator pack])) {
				back = equipped_item($slot[back]);
				equip($item[protonic accelerator pack]);
			}
			if(my_familiar().combat) {
				fam = my_familiar();
				use_familiar($familiar[none]);
			}
			(!adv1(ghostLocation, -1, stun() + "while hasskill Shoot Ghost; skill Shoot Ghost; if hasskill Trap Ghost; skill Trap Ghost; endif; endwhile;"));
			// Trapped error condition in case I'm adventuring with goals
		} finally {
			if(acc3 != $item[none])
				equip($slot[acc3], acc3);
			if(fam != $familiar[none])
				use_familiar(fam);
			if(back != $item[none])
				equip(back);
		}
	}
}
 

Veracity

Developer
Staff member
I notice that we look for the "Paranormal activity detected" message only if we have the protonic accelerator pack equipped.
The Wiki says this:

If 50 adventures have passed since the last message, gives a message indicating paranormal activity in a specified location, where the next encounter will lead to a special ghost fight.

The walkie-talkie on your proton accelerator crackles to life: "Paranormal disturbance reported in <location>."

The 50 adventures do not have to be spent wearing the pack.
Is this correct? Can you get the message even if the pack is in inventory?

When you ascend, it goes into inventory. Can't imagine why you would, but you could closet it.

Can you get the message if the pack is in the closet?
 
One issue I've been having. When I'm in a combat that messages with combat messages (Deep Machine Tunnels for example), obviously, we can't detect the Paranormal Activity message. This means we can miss it when it occurs, that seems reasonable since we know we should have gotten the message and went to a obfuscated combat.

In this case, the quest log gets updated with the paranormal activity, can we check the quest log for this (I'm not sure how often we are already checking it) and update our paranormal activity if the quest log says we have the event buy mafia was unable to parse it?
 

Veracity

Developer
Staff member
I am surprised that they obfuscate the message in the DMT, since there are quite a few "special" messages that don't get turned into anapests or haiku, for example. That might be worth bug reporting to KoL, since not everybody runs with quest nudges in the charpane.

I am sure it goes in the quest log, since it goes into the charpane, but we don't currently parse the Quest Log to set "nextParanormalActivity".

Can you capture the HTML from the quest log when you have a ghost available to bust, please? If not, I'll try tomorrow (One should come in 19 turns for me), when I will also test if I get the message with the pack in inventory.
 

Crowther

Active member
I notice that we look for the "Paranormal activity detected" message only if we have the protonic accelerator pack equipped.
The Wiki says this:


Is this correct? Can you get the message even if the pack is in inventory?

When you ascend, it goes into inventory. Can't imagine why you would, but you could closet it.

Can you get the message if the pack is in the closet?
The wording on the wiki is poor. You can advance the counter without having the pack on, but you won't get the message until you wear the pack in combat.
 
I am surprised that they obfuscate the message in the DMT, since there are quite a few "special" messages that don't get turned into anapests or haiku, for example. That might be worth bug reporting to KoL, since not everybody runs with quest nudges in the charpane.

I am sure it goes in the quest log, since it goes into the charpane, but we don't currently parse the Quest Log to set "nextParanormalActivity".

Can you capture the HTML from the quest log when you have a ghost available to bust, please? If not, I'll try tomorrow (One should come in 19 turns for me), when I will also test if I get the message with the pack in inventory.

The DMT complicates a few things unfortunately.

Here is what I got, they use "protonquest" as a label, so that's nice.
Code:
<tr rel="protonquest"><td class="small" colspan="2"><div>Investigate the paranormal activity reported at <A class=nounder target=mainpane href=place.php?whichplace=town_right><b>Madness Bakery</b></a>.</div></td></tr>
 
The wording on the wiki is poor. You can advance the counter without having the pack on, but you won't get the message until you wear the pack in combat.

This. This is why my aftercore afterAdventure script keeps track of the turns played compared to nextParanormalActivity. It equips a protopack whenever a ghost is due, picks a fight with bricko ooze, and busts a ghost.
 

xKiv

Active member
The wording on the wiki is poor. You can advance the counter without having the pack on, but you won't get the message until you wear the pack in combat.

Also - is it really 50 turns since the last message, or just on a regular 50-turn period? I never paid much attention, but I thought it's regular.
Example difference:
1) turn 0, put on pack
2) get in a fight, get the message
(then bust the ghost or not)
3) take pack off
4) spend 90 turns
5) put pack on
6) get in a fight, get message
(then bust the ghost or not)
7) spend 10 turns
if it's on a regular 50-turn beat, you now get a different message
if it's 50 turn since last message, you need another 40 turns first

I should probably verify this, if I am the one in doubt ...
 

Darzil

Developer
I think 50 since last message. Certainly if say you get first message on turn 1, next would be turn 51. But if turn 51 is a noncombat, say, do you get messsgf on turn 52, following one is turn 102.
 

Donavin69

Member
I'm trying to figure out why I am now 'aborting' on the ghosts. I can't find anything that is causing it, my CCS is simply: "shoot, shoot, shoot, trap" for each of the ghosts. It was working, but now it stops.
Code:
The Overgrown Lot
Encounter: the ghost of Oily McBindle
Strategy: C:\DropBox\Don's Main kolmafia\ccs\Don.ccs [the ghost of oily mcbindle]
Round 0: donavin69 wins initiative!
You're on your own, partner.
Click here to continue in the relay browser.


> ashq run_combat()

Round 1: donavin69 executes a macro!
Round 1: donavin69 casts SHOOT GHOST!
 
Last edited:
I am having a similar issue, though in my case it's my kolnative autoattack not properly firing. This, hoewever, only happens against the ghost in the Palindome and in the spookyraven wine cellar.
 
Nope, it just broke on The ghost of Jim Unfortunato, as usual. When it does, it doesn't even seem to try firing the autoattack, and it prints the effectively the full combat frame of the first round of the combat (including pictures and all) in the gCLI.
 
Top