Getting Mafia to Sneaky Pete's Day Stupor

Trying to adv repeatedly St. Sneaky Pete's day Stupor yielded "You are to drunk to continue." Here's a quick bypass to spend all adv in the stupor. all it does is adventure, no drinking no eating. Your on your own there. Nothing but adventuring.

Edit: Mafia wont auto restore right using this method. Between adv scripts don't seem to run either. Mafia also does not detect beaten up without a status refresh.

Edit2: Oh and Mafia will display Requests complete while the script runs.

Edit3: Mafia also wont count adventures used properly.

effectively, let it run for a while, then stop it and do a status refresh if it doesn't stop on its own. See where it's at, and go from there.

Edit4: If you watch it in the GCLI, you can tell when it stops.
 

Attachments

  • sneaky.ash
    86 bytes · Views: 101

itamaram

Member
If you don't mind me adding,
due to the constant loss of life in the stupor, I've modified your program to look like so:

void main()
{
while(my_adventures() != 0)
  {use(1,$item[Doc Galaktik's Ailment Ointment]);
  cli_execute("adventure.php?adv=20");}
}

Simply make sure you have enough ointments and leave the it alone.

Running it on my character, it seems to really mess KoLMafia. Mainly counting wise. But hey, it works!

Also, I have no knowledge in mafia programming what so ever. I was jsut spectating for a while. Please don't kill me for performing an open heart surgey with sticks.

EDIT: Finished. I can now say the script doesn't stop for reasons beyond my understanding. I am guessing the boolean was not set correctly. Setting the script to run a certain number of times would be a better option than leaving it to run free. (fair well 150 spare ointments...)
 

Veracity

Developer
Staff member
Since KoL will redirect you to the SSPD stupor adventure, it'll work no matter where you go. But, it's more efficient to skip the redirect. Fewer server hits and all that.
 
[quote author=Nightmist link=topic=85.msg277#msg277 date=1145182357]
its adv 20? i would recommend you use adv 84 the proper stupor adventure.
[/quote]

I just used the mini browser to find out which adventure it was. Copy and paste on the fly ya know. I thought adventure 20 was kind of odd to, but that's what mafia kept returning in the address bar.

adventure count is not lost when watching via the relay browser.
 

bloodyvelvet

New member
hope this is cool, i have modified your script somewhat. below you will see i have changed the script with some conditions. now it closets your meat (since some adventures take your meat away, no reason to waste it), then checks your hp. if your hp is 0 it will then attempt to use a pungent unguent (the cheapest healer) assuming you have one. if not, it takes 30 meat from your closet and then buys one first. i left the looping in to just keep doing the sneaky pete stupor since that's the original point of the script. i'm sure you could tweak this some more, i just wrote the code in a few minutes. it works though.

Edit: i added prints to tell you what it's doing as it does it. i also added a 3 second countdown after a completed stupor to give you a chance to hit stop all. (really, you can hit stop all at any time since you don't fight any monsters, but this will let you complete the current adventure correctly.)

Code:
void main()
{
while(my_adventures() != 0)
 {
 while(my_meat() >= 1)
	{
	print( "closeting your meat...");
	cli_execute("closet.php?pwd&amt=&action=addmeat&addmeat=Go+%3E%3E");
	}
	while(my_hp() < 1)
		{
		print( "healing...");
			while(item_amount($item[Doc Galaktik's Pungent Unguent]) < 1)
				{
				print( "taking meat (30) from closet...");
				cli_execute("closet.php?pwd&amt=30&action=takemeat&addmeat=Go+%3E%3E");
				print( "buying Pungent Unguent(1)");
				buy(1,$item[Doc Galaktik's Pungent Unguent]);
				}
		print( "using Pungent Unguent (1)");
		use(1,$item[Doc Galaktik's Pungent Unguent]);
		}
 print( "Stupor...");
 cli_execute("adventure.php?adv=84");
 print( "Stupor complete.");
 wait (3);
 }
}
 

dusturm

New member
Thanks bloodyvelvet for that it works great for me. too bad I didn't see this sooner, i used 325 adventures on my main manually. It was very time comsuming.
 
[quote author=bloodyvelvet link=topic=85.msg294#msg294 date=1145225086]
hope this is cool, i have modified your script somewhat. below you will see i have changed the script with some conditions. now it closets your meat (since some adventures take your meat away, no reason to waste it), then checks your hp. if your hp is 0 it will then attempt to use a pungent unguent (the cheapest healer) assuming you have one. if not, it takes 30 meat from your closet and then buys one first. i left the looping in to just keep doing the sneaky pete stupor since that's the original point of the script. i'm sure you could tweak this some more, i just wrote the code in a few minutes. it works though.

Edit: i added prints to tell you what it's doing as it does it. i also added a 3 second countdown after a completed stupor to give you a chance to hit stop all. (really, you can hit stop all at any time since you don't fight any monsters, but this will let you complete the current adventure correctly.)
[/quote]

Making my scripts better is completely cool by me, and as I have said before it is the point of this repository. I welcome any and all additions, and re-writes of scripts I post here.

The original script I posted took about 30 seconds to write up, (I am a slow typist) I was simply putting the info up here so that those who didn't know how to achieve the task would be able to find out. Effectively it was just a quick write up for an example. I didn't use it long as it was myself. I added SODH usage into the loop as needed.

Thank you for posting a more complete script. I'm sure others found it very usefull  :)
 
Top