Dolphin whistle using sea farming script?

How difficult would this be to make? Bear in mind that I'm still a novice at coding (this script is the most advanced thing I've ever done in my life), so something that looks like a typo to you might be something that I actually think is right, so nothing is too obvious to point out. The vespers are included intentionally since my main is anchoring their consumption leaderboard, that would be stricken from a public release if I make it that far. Which I hope to.

First I want to get it working so that I can just plug in the location and familiars I want, then once that's stable the focus can be shifted towards making it easier to change around your diet (perhaps incorporating eatdrink.ash). It would also be cool to add support for drink the cheapest infused sake, cheapest maki, etc. Let's start small, though, and just get it to work with these specific foods. Here are the specific questions I have, and the code I've written up so far.

-I recall there being some sort of command that just alternates spleen familiars. Does it exist, and would it be easy to implement? It would be used while bountying and fighting dolphins.

-How can I get the script to check if a worthwhile item would currently be obtained by using a dolphin whistle, and then use a dolphin whistle, assuming one hasn't been used in the past 10 turns. Remember that dolphins only hold one item, so that last thing you saw one steal will be dropped by a dolphin if you summon one. If the last thing stolen was a slug of rum, the script would want to hold off on using a whistle until something worthwhile was stolen.

-How can I get the skate park buffs during the buff routine?

-How can I put all but N of the items I farmed that day into the mall? IE, sell all but one of my nurse hats, so I can keep one to use.

-I'm definitely not sure how to go about the bounty. I do want to eventually release this publicly, and I don't want people to need many other scripts in conjunction with it. Since it's likely there often won't be enough turns to do a bounty without putty, what would be the best way to automate bounties with putty?

-I'm sure there are a crap ton of syntax errors. This is only my first draft of the script, and I'm going to make an effort to knock out as many as I can during the week, but is there anything particularly egregious or sneaky that I should know? The only things I'm worried about finding on my own are the commands for eating sushi, the variables for moonlight, and variable for stinky cheese.

Code:
import bounty.ash

//Set familiar choice for main farming location, fighting dolphins, and gathering lucre
string mainFam = "grouper groupie";
string dolphinFam = "llama";
string lucreFam = "sandworm";

//Set location
string location = "";

void main()
	{
	diet();
	buffs();
	farm();
	stockStore();
	bounty();
	nightcap();
	}

void diet()
	{
	if(have_effect($effect[Ode to Booze]) > 19)
		cast ode;
	if(have_effect($effect[Ode to Booze]) > 19)
		cast ode;
	drink berry-infused sake
	drink 2 vesper
	mix 2 vesper
	drink 3 knob coffee
	shrug ode
	eat 5 magical tricky dragon roll
	use 3 not-a-pipe
	use mojo filter
	use not-a-pipe
	}

void buffs()
	{
	outfit flip?
	mood seafarm
	acquire 30 knob goblin pet-buffing spray
	use 30 knob goblin pet-buffing spray
	acquire 30 knob goblin eyedrops
	use 30 knob goblin eyedrops
	acquire 30 philter of phorce
	use 30 philter of phorce
	acquire 30 polka pops
	use 30 polka pops
	acquire 15 recordings of donho
	use 15 recordings of donho
	acquire 15 blue-frosted astral cupcakes
	use 15 blue-frosted astral cupcakes
	acquire 60 love songs of disturbing obsession
	use  60 love songs of disturbing obsession
	acquire 15 recordings of the ballad of
	use 15 recordings of the ballad of
	acquire 45 unicorn sticker
	cast 7 bricko
	cast * party
	use express card
	}

void farm()
	{
	while(have_effect($effect[fishy]) < 0)
		{
		if dolphinParameterIsTrue && dolphinCooldown=0
			{
			familiar dolphinFam
			//Since an item drop from the dolphin is guaranteed, this is a good opportunity to regenerate MP
			maximize mp regen min
			acquire dolphin whistle
			use dolphin whistle
			}
		else
					else
			{
			familiar dolphinFam
			//Note that the brightness level modifier is to account for whether it's a better day for jek belts or jrs
			if cheese level is under 100 && moons are above x light
				outfit U1
			if cheese level is above 99 && moons are above x light
				outfit U2
			if cheese level is under 100 && moons are below x light
				outfit U3
			if cheese level is above 99 && moons are below x light
				outfit U3
			adventure locationGoesHere
			}
		}
	}

void stockStore()
	{
	mallsell * itemname
	//If I wanted to mall all but one of a certain item?
	mallsell [*-1] itemname
	}

void bounty()
	{
	mood bounty
	outfit bounty
	familiar lucreFam
	cli_execute("bounty.ash *");
	How to putty monsters without relying on BBB/FTF?
	}

void nightcap()
	{
	maximize adv
	cast 2 ode
	drink vesper
	mix vesper
	}
 

Winterbay

Active member
-I recall there being some sort of command that just alternates spleen familiars. Does it exist, and would it be easy to implement? It would be used while bountying and fighting dolphins.

BBB have a function for this. That's the only one I know of.

-How can I get the script to check if a worthwhile item would currently be obtained by using a dolphin whistle, and then use a dolphin whistle, assuming one hasn't been used in the past 10 turns. Remember that dolphins only hold one item, so that last thing you saw one steal will be dropped by a dolphin if you summon one. If the last thing stolen was a slug of rum, the script would want to hold off on using a whistle until something worthwhile was stolen.

And I think that feature is in there soemwhere as well. My farmer with BBB set up seems to be using dolphin whistles from time to time automagically at least.

-How can I get the skate park buffs during the buff routine?
I'm not sure about that but there is a CLI-command for them:
Code:
> help skate

skate lutz | comet |     band shell | merry-go-round | eels - get daily Skate Park buff.

- How can I put all but N of the items I farmed that day into the mall? IE, sell all but one of my nurse hats, so I can keep one to use.

Keep track of where you have been (not too hard with a map). Then go through that map iterating over all monsters in the zone and their drops. If there are any to sell you can do so by
Code:
put_shop(price, limit, item_amount(item) - 1, item)
to sell all but one of them.

Bear in mind that I'm a relative newbie to programming in ash as well :)
 

slyz

Developer
Just a simple advice, regarding syntax errors: you can simply make Mafia check for errors by using the verify CLI command:
Code:
verify my_script.ash
There is a Wiki page you can consult if you come across errors you don't understand/don't know how to fix.

Winterbay answered a few of your specific questions, and I'm sure searching the forum and poking around scripts is the best way to learn =)
 

Raven434

Member
Thanks for the tip re: BBB.

Most of my underwater play is manual because I haven't gotten a good handle yet on which things do I not care about, if one of those butthead dolphins steals it or not.

:)
 
Top