Pork to the Future - Cyrus, Hyboria, Future, and Wumpus!

Razorsoup

Member
Lines 110 & 114, shouldn't the to_int() be to_float()?

Code:
	if (get_property("hpAutoRecovery").to_int() < 0.2)
		set_property("hpAutoRecovery","0.2");
	if (get_property("hpAutoRecoveryItems").to_string() == "")
		set_property("hpAutoRecoveryItems","cannelloni cocoon;scroll of drastic healing;tongue of the walrus;lasagna bandages;doc galaktik's ailment ointment");
	if (get_property("hpAutoRecoveryTarget").to_int() < 0.5)
		set_property("hpAutoRecoveryTarget","0.5");
 

Magus_Prime

Well-known member
Due to a recent change in KOL, that removed the ability of Fat Stacks of Cash to stasis, I had to edit the "fat stacking" routine at line 1373 and remove the reference. If you don't make the change the script will loop endlessly.
 
I just had the script fail to start the 'Future' quest before adventuring in the Seaside Megalopolis.

Apparently this is due to the pig iron link in the wrong side of the tracks changing:
Code:
OLD LINK
town_wrong.php?action=krakrox

NEW LINK
place.php?whichplace=town_wrong&action=townwrong_1krakrox
 

QVamp

Member
Seems awesome. Just to let you know, the script gets stuck in an infinite loop when it encounters a turtle adventure as a Turtle Tamer.
 

guyy

Member
The two things above should be fixed now. Also should do wumpus faster, apparently Mafia's interpreting waitq(0) as waitq(1)...
 

cardern

Member
The two things above should be fixed now. Also should do wumpus faster, apparently Mafia's interpreting waitq(0) as waitq(1)...

Just tried it as a Turtle Tamer with a fully updated script and it still does not function correctly. It gets stuck in a loop of trying to complete the adventure. You can get past it through the relay browser though. Thanks for the script :)
 

Crowther

Active member
What do you think waitq(0) should do? "Wait for 0 seconds". Umm.
Wait for the default time. Wait forever. Wait for me. Wait, that was a rhetorical question wasn't it. ;)

A minor argument for waitq(0) waiting zero seconds is to avoid code like this:

if (WaitTime > 0) waitq(WaitTime);

Of course negative numbers should cause the program to jump earlier in our current time line. Which could be used by scripts to redo a fight when we get beaten up. Like in the 95ers movie.

Okay, I'll stop being silly now.
 

heeheehee

Developer
Staff member
Of course negative numbers should cause the program to jump earlier in our current time line. Which could be used by scripts to redo a fight when we get beaten up. Like in the 95ers movie.

I like this idea. I'll give 100M meat to the dev who implements this.
 

guyy

Member
Just tried it as a Turtle Tamer with a fully updated script and it still does not function correctly. It gets stuck in a loop of trying to complete the adventure.

Duh, didn't even think to fix that for the first two parts of the quest. Hopefully this is actually better now.

What do you think waitq(0) should do? "Wait for 0 seconds". Umm.

Well... yes. As Crowther said, it makes the code simpler. It's common to use weird inputs to mean "default" but there isn't really an obvious choice for a default amount of time to wait (1 second? 5 seconds? 10? 60?) and if you wanted that a negative input would make more sense than 0, because it's possible to wait 0 seconds but you can't really wait -1 seconds.
 

Theraze

Active member
If you don't want it to wait, don't tell it to wait. It's that simple. Especially if you're doing a silent wait. That's just wasted processing.
 

guyy

Member
Sigh... I've probably already wasted more time by dragging out this pointless argument than all the "wasted processing" Mafia has ever done put together. (But less than the amount it wasted by waiting an entire second in each wumpus room, before I put if's on each wait...) Can we just get back to the bug reports and stuff?
 

Bale

Minion
What do you think waitq(0) should do? "Wait for 0 seconds". Umm.

Actually, I would have expected that waitq(0) would essentially do nothing. I'm gonna add that the minimum wait is 1 to the wiki.

Edit: minimum wait of 1 second added to wiki pages for wait() and waitq(). Hopefully someone will check the wiki before making that assumption in the future.
 
Last edited:

xKiv

Active member
I'm surprised that it doesn't generate an error a la random(), to be honest.

But random(0) is asking for x such that 0 <= x < 0. That doesn't work even in limit.
On the other hand, waitq(0) waiting for 0 seconds could make sense if ASH had cooperative multithreading (where it would be one of the ways to relinquish control to another thread).

However, I would still prefer waitq(0) to be an error rather than equivalent to waitq(1). If people can be surprised by what it does (some are surprised it's not an error, some are surprised it waits for different amount of time than requested), it's better when they are force to write non-surprising code instead.
 

T_E

Member
Guyy, I updated and then ran the script a few moments ago and it performed flawlessly. Thank you once again for this script. =)
 
Top