One-Click Wossname -- automatic level 12 quest completion

Ver. 1.2.5: Added initial framework for per-step familiars. Users simply specify their chosen familiar for each sidequest at the top of the script, in addition to the "default" familiar. The default familiar will be used on the battlefield and for each unspecified sidequest familiar. As the average user is unlikely to have the default familiars for sidequests, you are encouraged to set these values before running this script.

This is to tide you over until better optimal-familiar-selection logic is developed. My plan is to keep the initial variables but have a default "type" hardcoded for each sidequest. Then, if you don't specify a specific familiar, each sidequest will select the heaviest familiar you have of that type, rather than using the default familiar. I'm taking suggestions for "optimal familiar type" for each sidequest. Here are my initial thoughts:

Orchard: this is easy, fairy-type.
Arena: ? (assuming GMOB strategy, does it matter? maybe volley-type since you won't be taking a lot of hits)
Lighthouse: ? (your heaviest ghuol- or cocoabo-type for healing?)
Junkyard: ? (healing-type or potato-type?)
Nuns: ? (coco-type for +personal meat, or leprechaun-type if you're going for speed) (for example, if she's all alone in her hour of need)
Farm: ? (fairy-type for feathers and tape?)

This needs further discussion before implementation. Your opinions are welcome.

[quote author=Mighty Xerxes link=topic=1395.msg6885#msg6885 date=1201548017]
the script only maximizes buffs for the Sonofa Beach sidequest (+combats in that case). My CLI scripts add the +item buffs and +noncom buffs for the Store and Ducks, though only using the buffs/items likely to be available in hardcore.
[/quote]

@Xerxes: Lots of great ideas. It's time this script started thinking about these details now that the meat of it seems to be working.

Are your CLI scripts portable? If so, or even 50% so, could you send them to me (via message, kmail, this thread, whatever)? Might save me some time. Optimizing the sidequests is in the interest of all players, Wossname and otherwise, and as such is a priority for development of this script.

And what did you mean about "detecting the semirare" for the nuns?

And about flyers: I hacked izchak's junkyard script to get the current stripped-down junkyard function. One of the things I stripped out of his script was support for flyers. You may just want to download that and replace the entire contents of the junkyard_sq() function with a "call junkyard.ash" :)

@Tom: If you mean that the command should include ".txt" at the end, you should already be specifying the file extension at the top of the script when it asks for the filename of the warplan, i.e. specifying "optimal.txt" rather than "optimal". Plus, the command you posted doesn't look like it will compile...?
 
[quote author=zarqon link=topic=1395.msg6909#msg6909 date=1201636525]
@Xerxes: Lots of great ideas. It's time this script started thinking about these details now that the meat of it seems to be working.[/quote]
Then don't blame me if I post too much at you :-)

Thanks for starting the familiar framework. I'll think more and post on that specifically later.

Are your CLI scripts portable? If so, or even 50% so, could you send them to me (via message, kmail, this thread, whatever)? Might save me some time. Optimizing the sidequests is in the interest of all players, Wossname and otherwise, and as such is a priority for development of this script.

Portable? Well, they are simple, and I'll post the code right here. But they rely on moods and outfits I've set up to function and assumptions about how I adventure, and so wouldn't be fully portable to someone else without them setting up similar moods and outfits.

Hippy Store:
Code:
bigisland.php?place=orchard&action=stand&pwd;

mood adventuring;
mood execute;
if lavender candy > 0 use 1 lavender candy;
if blue snowcone > 0 use 1 blue snowcone;
cast 1 phat;
familiar pixie;

conditions clear;
conditions add 1 filthworm hatchling scent gland;
adventure * hatching chamber;
use 1 filthworm hatchling scent gland;

conditions clear;
conditions add 1 filthworm drone scent gland;
adventure * feeding chamber;
use 1 filthworm drone scent gland;

conditions clear;
conditions add 1 filthworm royal guard scent gland;
adventure * guards' chamber;
use 1 filthworm royal guard scent gland;

if pink candy > 0 use 1 pink candy;
adventure 1 queen's chamber;

bigisland.php?place=orchard&action=stand&pwd;
bigisland.php?place=orchard&action=stand&pwd;
Note: at this point in a run, my "adventuring" mood usually includes +item buffs such as Phat Loot, Leash, Empathy, and Peeled Eyeballs (I usually go for the KGE semi-rare).


Ducks:
Code:
uneffect aria;
outfit base;
if ring of conflict >= 1
   equip acc1 ring of conflict;
mood noncombat;
mood execute;

bigisland.php?place=farm&action=farmer&pwd;

conditions add 3 choiceadv;
set choiceAdventure147=3;
set choiceAdventure148=1;
set choiceAdventure149=2;
adventure * barn;
mood adventuring;
outfit base;
adventure * pond;
adventure * back 40;
adventure * other back 40;

bigisland.php?place=farm&action=farmer&pwd;
bigisland.php?place=farm&action=farmer&pwd;
Notes:
(1) I usually use the chaos butterfly soon after I get the first one, rather than waiting to use it on a generic duck, primarily because I can't CLI-script using it on the first duck.
(2) My "noncombat" mood includes Smooth and Sonata. I should probably add a few CLI lines about "use deodorant and/or rock salt if you've got access to them", but I'm hardcore focused, so I haven't bothered.
(3) My "base" outfit gets updated as I adventure through my run. I often have had a zap or two to spare by the time I get to level 12, so I might have gotten a ring of conflict. I used to have the least useful accessory in acc3, but due to some recent changes to the outfit code, I've started putting my least useful accessory in acc1. Again, if I weren't hardcore-oriented, I might want to check here for whether I have access to Yendorian Finery, and build a different non-combat outfit based on that.

And what did you mean about "detecting the semirare" for the nuns?

Just "if you have the Mick's Inhaler, use it" and/or "pull and use it" for softcore/casual. For softcore-types, the Inhaler is pretty cheap in the mall, probably because the Castle farmers run into it on a regular basis.

Thinking it through, "if you know the +meat demon name, summon it" would be of similar utility for Nun quest runners.

And about flyers: I hacked izchak's junkyard script to get the current stripped-down junkyard function. One of the things I stripped out of his script was support for flyers. You may just want to download that and replace the entire contents of the junkyard_sq() function with a "call junkyard.ash" :)
That's a good idea. It's a shame I just did it manually today. :-(
 
Thanks a bunch for making this great script, I am running it right now ;) I only had one minor problem, I use kolmafia with Linux (Ubuntu 7.10) and in Linux the file systems are separated by the forward-slash ( / ) instead of the back-slash ( \ ) so when I first ran the script it could not find the warplan to use. Also when I ran the plan maker script the warplan it made would be a file named "warplans/battleplan1.txt" instead of putting "battleplan1.txt" in the "warplans" directory. My fix was easy I just replaced the \\ in "file_to_map("warplans\\"+warplan,plan);" to "file_to_map("warplans/"+warplan,plan);" I am unable to test this on windows so I don't know if it is compatible or not.

Thanks again for this script :)

Ank
 
This is a weird one. I looked set like I was good for 999 / 999 and then I somehow killed a frat boy, but it didn't show up in the CLI. Here is the log

I had 999 frats killed going in.

8 hippiesDefeated
Current death toll: 999
You are on Frat-slaying pic 32
You are on Hippy-slaying pic 31
Step 13 completed!
Step 14: win!
Putting on War Hippy Fatigues...
Equipment changed.
Turning in 9 beer helmet...
Turning in 9 distressed denim pants...
Turning in 9 bejeweled pledge pin...
Turning in 64 PADL Phone...
Turning in 4 kick-ass kicks...
Turning in 34 perforated battle paddle...
Turning in 15 red class ring...
Turning in 4 blue class ring...
Turning in 6 white class ring...
Turning in 22 bottle opener belt buckle...
Turning in 10 keg shield...
Turning in 10 giant foam finger...
Turning in 4 war tongs...
Turning in 19 energy drink IV...
Turning in 4 beer bong...
Buying 74 fancy seashell necklace...
You acquire 74 fancy seashell necklaces
Buying 3 water pipe bomb...
You acquire 3 water pipe bombs
Checking for dimes...
You have 0 dimes.
Putting on Frat Warrior Fatigues...
Equipment changed.
Turning in 8 bullet-proof corduroys...
Turning in 7 round purple sunglasses...
Turning in 8 reinforced beaded headband...
Turning in 26 hippy protest button...
Turning in 4 Lockenstock™ sandals...
Turning in 29 didgeridooka...
Turning in 23 wicker shield...
Turning in 63 lead pipe...
Turning in 56 communications windchimes...
Turning in 3 Gaia beads...
Turning in 12 pink clay bead...
Turning in 4 purple clay bead...
Turning in 8 green clay bead...
Turning in 22 hippy medical kit...
Buying 94 commemorative war stein...
You acquire 94 commemorative war steins
Unable to buy any beer bomb
Checking for quarters...
You have 0 quarters.
Autoselling items to NPCs...
Items sold.
Autoselling items to NPCs...
Items sold.
You gained 168000 meat!

[2174] Battlefield (Frat Uniform)
Encounter: War Hippy Airborne Commander
Round 0: Joe_Momma loses initiative!
Wossname final battle expected but not found.
 
[quote author=Raven434 link=topic=1395.msg6951#msg6951 date=1201929576]
This is a weird one.  I looked set like I was good for 999 / 999 and then I somehow killed a frat boy, but it didn't show up in the CLI.  Here is the log

I had 999 frats killed going in.

8 hippiesDefeated
Current death toll: 999
You are on Frat-slaying pic 32
You are on Hippy-slaying pic 31

----------

[2174] Battlefield (Frat Uniform)
Encounter: War Hippy Airborne Commander
Round 0: Joe_Momma loses initiative!
Wossname final battle expected but not found.
[/quote]

You've gone wrong somewhere when killing the Frats. The clue to this us "You are on Frat-slaying pic 32" - should be pic 31 - which means you've killed all 1000 Frats on the battlefield, so when you adventure there again you get to kill the last hippy.

Tom
 
OK, so I could just be an idiot, but do I need to do the whole script in one mafia run? Because I got about 1/3 of the way through before I ran out of adventures, then tried to run the script again after rollover and got an error - I can't recall exactly what it was, but it refused to run.
I apologize for the lack of details here, but it happened a while ago, and I just now got bored enough to register.
 
Well, despite your eagerness to talk to us all, I suspect we will need the specific error to give us a clue. I did have a number of errors with it early on, of a similar type that have been fixed in new versions.

To answer your first question, it should allow you to keep coming back to it again and again over the course of several days until it finishes up.
 
@CyberTech: I've actually gone to a good deal of effort to make the script safe to break at any point, because you never know when someone will run out of adventures. I just got my third Wossname using this script, and I deliberately interrupted execution in the middle of every sidequest, just to see how well it could handle it. I fixed a few inconsequential things, but mostly it was fine. What error did you get?

@ankorite: I've recommended that fix previously for Linux users, nice to know it works!

[quote author=Raven434]
You are on Frat-slaying pic 32
You are on Hippy-slaying pic 31
Step 13 completed!
Step 14: win!
[/quote]

As Tom said, you killed too many Frats somehow. Not sure how. It could only have happened if your frat count got messed up early on (before completing the third frat sidequest), because otherwise there's no way OCW can go over unless Mafia messes up the count, which it pretty much can't due to the image-checking Veracity described above. Did you do any of the battlefield manually?

[size=+2]Ver. 1.3 Major Update![/size]

Recent discussion on this thread has prompted quite a lot of changes. These changes fall under three categories: 1) per-step handling for familiars, outfits, and moods, 2) using appropriate items to expedite sidequests, and 3) making the script more flexible for non-Wossname plans.

[size=+1]Per-Step Familiars, Outfits and Moods[/size]

OCW 1.3 expands the per-step familiar swapping to include support for changing outfits and moods for each sidequest. It came at the expense of 14 more global variables and at least three more server hits per step, but I think it was worth it. Also note that if is_100_run is true, OCW will not swap your familiars. Users of OCW are strongly encouraged to set all these values before running the script. As I update this script fairly regularly, you may want to save that section of the code to a separate file. :)

[size=+1]Quest Optimizing Items[/size]

Like my own playing style, OCW was not using any items to expedite the sidequests. So, with a nod to Xerxes, I have written quite a lot of item use into 1.3.

EDIT: Item optimizations chart moved to first page.

[size=+1]Towards a general IsleWar script[/size]

Xerxes exposed several weaknesses in OCW for players seeking to seriously speed through the quest which have mostly been addressed by the above. A few more changes made:
  • OCW now only gets the outfit(s) you need before starting the war. If your warplan is frat-boy only, it will only get the Frat Warrior Fatigues and not the War Hippy Fatigues.
  • If your warplan specifies completing the Arena sidequest as a fratboy, OCW gets the flyers immediately, in case you want to try a different method of completing the Arena.
  • On a related note, there was a small change to check_step which makes the script more hackable. OCW now only checks to see that a sidequest was completed, not that it was completed on the side specified in the warplan. Thus, you could easily write an outfit change into the end of a quest if you wanted to start a sidequest as one side but finish it as the other without breaking the warplan.

Other Changes

  • revamped warplan code to provide greater flexibility for possible future intelligent planhandling
  • Farm quest no longer visits the Barn unnecessarily
  • Much smarter item quantity calculation for the Nuns sidequest
  • Arena sidequest tells you how many more times you need the choiceadv when adventuring for the GMOB.
  • revamped obtain():
    -eliminated the is_quest_item() subroutine in favor of an approach which captures the return from retrieve_item()
    -more useful return value, which fixes a potential break in the filthworm quest
  • slightly better can-you-do-the-quest checking
 
Last edited:
i haven't been able to run the script all the way through yet (mostly because i play on multiple machines and/or i get impatient in HC) so this may already be in there...maybe make it stop before the final fight so you can cash in your beads and rings...
 
Huzzah for 1.3. I'm many days away from level 12, but I'll comb through the changes and try to use the script for a Frat-Only HC warplan this ascension and post here with the results.

Edit: On a first pass through, I have a small suggestion for the Orchard and Nuns. You should add Peeled Eyeballs and Wasabi Sinuses, respectively, to the items used. Even with my non-elite skillz I figured out the code.
Code:
	use_upto(2,$item[knob goblin eyedrops],true);

        use_upto(ceil((estimated_advs()-have_effect($effect[wasabi sinuses]))/10),$item[Knob Goblin nasal spray],true);

I'd suggest enclosing those inside an IF statement that doesn't try to buy them if the character is in hardcore and doesn't have the KGE outfit/lab access.
 
Okay. I'm a genius as of today. I don't normally say things like that but wait till you see what I figured out:

[size=14pt]You can now use OCW on multiple computers![/size]

EDIT: moved to first page.
 
This script won't work for me. I keep getting this:
Code:
> call scripts/wossname1.3.0 Folder/Wossname.ash

Checking for updates (running ver. 1.3.0)...
Error loading battle plan.
I am using a iBook G4 using KoLmafia v12.1. I have changed the file_to_map line as was suggested in the top post and that did not work, also I tried to put 'fastest.txt' 'optimal.txt' and 'slowest.txt' in the same folder as 'Wossname.ash' all of which is in the scripts folder in 'Application Support/KoLmafia'.
 
I kluged together orchard code, in case you have issues not getting to the queen's chamber before your scent runs out.

Code:
////////////
void get_drone_stench()
{
 repeat
 {
  if (have_effect($effect[Filthworm Larva Stench]) == 0)
  repeat {
   if (my_adventures()<1) die ("Out of adventures");
   if (obtain(1, "filthworm hatchling scent gland", $location[hatching chamber])) 
    use(1, $item[filthworm hatchling scent gland]);
  } until (have_effect($effect[Filthworm Larva Stench]) > 0);
  if (my_adventures()<1) die ("Out of adventures");
  if (obtain(1, "filthworm drone scent gland", $location[feeding chamber]))
   use(1, $item[filthworm drone scent gland]);
 }until(have_effect($effect[Filthworm Drone Stench]) > 0);
}

void get_guard_stench()
{
 while(have_effect($effect[Filthworm Guard Stench]) == 0)
 {
  if (have_effect($effect[Filthworm Drone Stench]) == 0)
  repeat {
   get_drone_stench();
  } until (have_effect($effect[Filthworm Drone Stench]) > 0);
  if (my_adventures()<1) die ("Out of adventures");
  if (obtain(1, "filthworm royal guard scent gland", $location[guards' chamber]))
   use(1, $item[filthworm royal guard scent gland]);
 }
}
////////////

// completes the Organic Orchard sidequest
boolean orchard_sq() {
   print("Step "+step+": Organic Orchard sidequest","blue");
   visit_url("bigisland.php?place=orchard&action=stand&pwd=");

///////////////////

	while (item_amount($item[heart of the filthworm queen])<1)
	{ 
        if (have_effect($effect[Filthworm Guard Stench]) == 0) 
	 {
	  repeat
 	  {
	   get_guard_stench();
	  }until(have_effect($effect[Filthworm Guard Stench]) > 0);
	 }
	 if (my_adventures()<1) die ("Out of adventures");
	 obtain(1, "heart of the filthworm queen", $location[queen's chamber]);
	}
///////////////////

   visit_url("bigisland.php?place=orchard&action=stand&pwd=");
   visit_url("bigisland.php?place=orchard&action=stand&pwd=");
   return check_step(step);
}
 
OK, just wanted to note two things:

1. I started using this script and it decided to adventure in the Frat house while wearing the Hippy outfit to get the Homoerotic Frat Paddle, which does not work. I had to take off the outfit to then adventure there and get the standard frat outfit manually.

2. I don't know exactly how all this works, but I ran out of adventures immediately after the script got the initial hippy adventure on the battleground. Then this followed:

Code:
+0 fratboysDefeated
Current death toll: 0
You are on Frat-slaying pic 0.
You are on Hippy-slaying pic 0.
battleAction => attack with weapon
Putting Tog the Ninja Pirate Zombie Robot back into terrarium...
Taking Big Yan the Green Pixie out of terrarium...

So, was the script about to make me use my weapon to attack the frat warriors? I have a custom combat script that casts Wave of sauce + Saucegeyser which should kill just about everything on the battlefield in 2 hits.
 
Sorry if anyone has been waiting for feedback on this script. I've been crazy busy in "real life" but I have some time now to at least address some of your comments.

@Xerxes: thanks for the suggestions. I added your item code in. I also don't think the if statements are necessary because the use_upto() function calls retrieve_item(), which buys from NPC stores if possible. I think that includes automatic outfit swapping but I could be wrong (if anyone would like to test this I would be grateful). I never go out of my way to get the Elite Guard outfit, so I don't think I've ever had it in HC. Also, I got your message (both times) -- I've just been too busy to get you a proper response yet. One will come though. I made some warplan-loading changes to the latest update that might be of great interest to you.

@feuer: You are one of the poor unfortunate souls who seems to be unable to use file_to_map(). If you tried changing the \\'s to / already, I can only offer two more suggestions:
1: try changing the line (line 330 in v1.3.1) from file_to_map("warplans\\"+whichplan,plan) to file_to_map(whichplan,plan), and move the warplan file to either the same directory or the data directory (not the scripts directory). Mafia appears to look in both places when running file_to_map().
2: replace the file_to_map line with all the code declaring the warplan in Plan Maker.ash. This has worked for everyone so far, but you are limited to the "optimal" plan unless you edit the code.

@divinewind420: Thanks for helping, but I believe the current code already handles that situation, since they were changed to while loops. The return value of obtain() (it captures the result of the adventure(*, location) call) combined with the "else break"s should make it loop back if it doesn't successfully get the appropriate gland in time.

@Qmanol: Thanks for this feedback. You have helped discover a situational error. After getting the frat outfit, you are still wearing the hippy outfit, which as you noted will not allow you to get the paddle if you don't have it yet. I've added an outfit change back to the default outfit before getting the basic frat outfit.

As for the second thing, it wasn't an error but should be handled better by the code. I don't think anyone has run out of adventures exactly there in the script before, hehe. I've changed a break to a return and now if you run out of adventures in that spot you'll get the appropriate message instead of battlefield statistics.

At the end, OCW returns most of your settings to what they were before you ran the script. Evidently, before running OCW your battleaction was "attack" and your familiar was a pixie. OCW reset those values when it exited. Don't worry -- the script will only auto-adventure using your ccs.
 
Checking for updates (running OCW ver. 1.3.1)...
Verifying Wossname progress...
...verified step 0
...verified step 1
...verified step 2
...verified step 3
...verified step 4
...verified step 5
...verified step 6
...verified step 7
...verified step 8
Current step: 9
battleAction => custom: default.ccs
battleAction => attack with weapon
You have not yet recieved this quest. Maybe after you defeat Dr. Awkward...

all i did was export my settings, switch to new version, and import...


**edit**
commented out this line and it seems to be running fine now:
if (!contains_text(url,"between the hippies and")) die("You have not yet recieved this quest. Maybe after you defeat Dr. Awkward...");
 
on another not if you run out of adventures when it is trying to get to the guy made of bees it will keep looping and changing outfits until you force it to stop. sorry don't have the logs i had just closed out of mafia before i posted this
 
I would just like to take the time to say how wonderful this script and its continued support is. Thank you for taking a huge lump of KoL tedium out of my life, Zarqon.
 
Back
Top