One-Click Wossname -- automatic level 12 quest completion

Relim

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

*sighs*

Well, tried putting it in the same folder and changing line 123, and still doesn't work. I'm guessing something is broken with file_to_map() in the daily build, since other people don't seem to be having problems.

Edit: scratch that, I downloaded 11.9 and am still having the same problem... bleh, why does this work for everyone else but not for me? Seems like a great script...
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

[quote author=Relim link=topic=1395.msg6453#msg6453 date=1198743899]Well, tried putting it in the same folder and changing line 123, and still doesn't work. [ ... ] I downloaded 11.9 and am still having the same problem...[/quote]

That's got to be a bit fr******ing. If you want a workaround, you could replace line 123 of Wossname.ash with lines 57-70 of Plan Maker.ash. Doesn't solve the problem, but it avoids using file_to_map.

[quote author=Raven434] I downloaded the 1.1 zip file again and it has hippy's code in it for the flaregun...
// returns true if you have the item
boolean got_item(item tolookup) {
return ((item_amount(tolookup) > 0) || (have_equipped(tolookup)));
}
[/quote]

That's the fixed version, just a different number of parentheses, it should be functionally identical...

Just in case, I've changed the got_item() call to an item_amount() call when checking for the flaregun (update in first post). I won't be able to test this script for a while, because my characters are not going to be ascending for a while yet. It'll be a couple weeks before I get to level 12 with anyone but when I do, I'll definitely be testing this script again. Until then, keep posting any problems you find.

Thanks everyone for your feedback!
 

Raven434

Member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

Yep yep.

And as stated if you start the quest series on an older version of Mafia, weird stuff will definitely happen.

I have a TT who started it waaaaaay back in the Fall and he manually finished the lighthouse.

OCW has no earthly idea about this and keeps trying to send me out to get 5 barrels of gunpowder.

Basically, I yanked that line out of the localized optimal.txt I was using and it seems to be cool now.

The Island map itself did correctly mark the fact that I did the various quests as a hippy or fratboy, except for the light house.

I will just finish the battlefield by hand, realizing that my chances for 999/999 is pretty slim because I started so long ago.

And that's fine. I'll get my Wos next go 'round.

All in all I am pretty tickled with this script.

Thanks 'Z'.

And a big fat THANKS to the whole Dev team who has made that fricking junkyard quest F-U-N. Before Mafia supported it, I was saying some VERY unkind things about TPTB @ Asyemmetric.

/salute
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

[quote author=Raven434 link=topic=1395.msg6462#msg6462 date=1198792019]Basically, I yanked that line out of the localized optimal.txt I was using and it seems to be cool now.[/quote]

Possibly a better solution would be to edit your character's preferences file (when Mafia is not running). Change the value of sidequestLighthouseCompleted to "fratboy" and voilá... problem solved.
 

hippymon

Member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

I am not sure if the issue has been resolved but for the flares:

if(!got_item($item[flaregun]))
if(can_interact())
retrieve_item(1, $item[flaregun]);

else die("Go get a flaregun (from the pirates) before continuing.");


As you have this set up it the "else" statement acts for the "if(!got_item(" line....
It should be:

if(!got_item($item[flaregun])){
if(can_interact())
retrieve_item(1, $item[flaregun]);

else die("Go get a flaregun (from the pirates) before continuing.");
}


Notice the { at the end of "if(!got_item".
Also, the } at the end of it all.
 

Relim

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

Putting the lines from the planmaker into the script made it work. I have been using it and ran across a bug in the junkyard script:

Code:
		while(!contains_text(url,"You win the fight!")) {
			s = which_item(url);
			if(s != "") {                // if it has one of our items...

and...

Code:
string which_item(string url) {
	if (contains_text(url, "hammer"))
		return "hammer";
	if (contains_text(url, "wrench"))
		return "wrench";
	if (contains_text(url, "pliers"))
		return "pliers";
	if (contains_text(url, "screwdriver"))
		return "screwdriver";
	return "none";
}


So, when you don't find the item, which_item is returning "none" while the main script is looking for a "". This makes it try to throw the magnet over and over and over and over. Changing the if statement to be looking for "none" fixes this.
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

hippymon and Relim >> Thanks! Fixes made and first post updated.
 

tylersalt

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

Hey, I'm really loving the script so far, but I'm running into trouble when it's trying to go through the junkyard (step 9). I went and got the magnet manually, thinking that it might fix it, but it didn't. Does it have anything to do with the bug in the junkyard code mentioned above by Relim? I just re-downloaded the file, but it's still not working. This is what I'm getting:

Verifying Wossname progress...
...verified step 0
...verified step 1
...verified step 2
Putting on Frat Warrior Fatigues...
Equipment changed.
...verified step 3
...verified step 4
...verified step 5
...verified step 6
...verified step 7
...verified step 8
Progress determined. Current step: 9
Completing step 9 of 14...
Countdown: 5 seconds...
Countdown: 4 seconds...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Putting on War Hippy Fatigues...
Equipment changed.
Unable to complete step 9

Thanks, and great work!
 

Raven434

Member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

I had to run the junkyard manually too, a few days ago. Other than that, pretty solid run of the script.
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

Looking at your CLI output, the only thing I can think of is perhaps there is an issue with got_item(). The junkyard function appears to spit you right back out without doing anything, and the only way that would happen is if it mistakenly thinks you already have all four tools (a faulty got_item() return value). Here's the current function:

Code:
// returns true if you have the item
boolean got_item(item tolookup) {
   return ((item_amount(tolookup) > 0) || have_equipped(tolookup));
}

Doesn't look like anything's wrong, right? But I'm thinking it's not working. I'm going to restore got_item() to the version that worked for me back when I tested this script:

Code:
// returns true if you have the item
boolean got_item(item tolookup) {
   if (item_amount(tolookup) > 0) return true;
   if (have_equipped(tolookup)) return true;
   return false;
}

Appears to be functionally identical... but maybe not. Maybe there's an issue with checking have_equipped() on non-equippable items? The junkyard worked fine for me (even with the bug Relim mentioned!)

Function is rolled back in the first post.

Again... my apologies, but it will be some time before I'm able to test this script again. One of my characters recently started a HC run (i'm fairly new to HC so it's slow -- very few skills), but my main should be ascending in less than a week, so I'll definitely be running this script when I get to level 12. Hopefully then I can iron out any remaining problems.
 

Deathmax

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

I notice when at the dirty thieving bandits, if you don't have meat vortices, mafia will hang and start printing debug logs.
 

Veracity

Developer
Staff member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

[quote author=Deathmax link=topic=1395.msg6496#msg6496 date=1199100531]
I notice when at the dirty thieving bandits, if you don't have meat vortices, mafia will hang and start printing debug logs.[/quote]
I fixed this. It will now abort and let you continue the fight in the mini-browser.
That may not be what you want while running a script, but I think it's more correct than trying to second-guess a custom combat script that has (temporarily) invalid instructions in it.
 

Skrank

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

This script sounds amazing, but so far I've had two problems.

The first problem was that the war was not auto started, and I had to gather the outfits myself. The second is an error when the script enters combat with an enemy.

Request 1 of 36 (Orchard: Hatching Chamber) in progress...
Encounter: larval filthworm
Strategy: custom: default.ccs
Round 0: Skrank wins initiative!

Request 1 of 36 (Orchard: Hatching Chamber) in progress...

Request 1 of 36 (Orchard: Hatching Chamber) in progress...

Request 1 of 36 (Orchard: Hatching Chamber) in progress...

Request 1 of 36 (Orchard: Hatching Chamber) in progress...

Internal error. Please restart KoLmafia

Everything is in the right directory, and the optimal.txt plan is selected in the ash file. This error doesn't seem to be like any of the others in the thread so far either. I'm puzzled.
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

@Skrank: When I originally tested the script, I already had the outfits. OCW started the war for me just fine. So, again, I think this was a problem with got_item(). Did you use the version I posted yesterday? I'm hoping you had the problem with the older version and the new/old one works.

For your other problem: is this happening consistently, and only with this particular script? I've had mafia behave similarly even when running other scripts that normally work. No idea what causes it, but it sometimes happened for me during times when the internet connection was slow/struggling. I think changing the "allow socket timeouts" option to false and restarting mafia might solve the problem.
 

Skrank

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

@zarqon: Thanks, I didn't think the timeout was a script problem either. Where is the "allow socket timeouts" option though? Is it in mafia preferences, or in the ash script?

Edit:
Ha, I'm an idiot. The script works fine, I accidently deleted The deleted the default: attack command in custom combat. Also, I found the socket timeout option right after I posted.

Thanks for the help though.
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

Mafia: Login screen: Connection tab
 

Deathmax

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

The script is stuck on step 9.

Verifying Wossname progress...
...verified step 0
...verified step 1
...verified step 2
Putting on Frat Warrior Fatigues...
Equipment changed.
...verified step 3
...verified step 4
...verified step 5
...verified step 6
...verified step 7
...verified step 8
Progress determined. Current step: 9
Completing step 9 of 14...
Countdown: 5 seconds...
Countdown: 4 seconds...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Putting on War Hippy Fatigues...
Equipment changed.
Unable to complete step 9
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

What's the timestamp on your Wossname.ash? This is the same issue tylersalt mentioned, which is (possibly) fixed in the latest version. Hehe, maybe I should start specifying build numbers or something...
 

Deathmax

New member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

December 31st? I have been tinkering around with the files, so it might not be correct.

EDIT : found the original .zip file, timestamp is 23rd of dec.
EDIT2 : found tyler's post, downloaded the lastest file and it works.
 

zarqon

Well-known member
Re: One-Click Wossname 1.1 -- automatic level 12 quest completion

That's a relief. Thanks for the feedback. It's hard to debug scripts for something with such a limited test timeframe.
 
Top