Nope. Mine is pathetic. I just couldn't resist tempting you to make another final version.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.
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);
}
}
}
Ha! I win!I said I wouldn't do it. I was wrong.
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);
}
}
}
Is this correct? Can you get the message even if the pack is in inventory?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.
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 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?
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.
<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.
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.
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!