A script to automatically sell starter equipment

This is the first ash script I have uploaded for mass use. It does just what it says. I find that having to constantly select and autosell these items after KoLmafia gets clovers from the hermit tedious. I thought I would share the love. If you already have a script set up to run at breakfast, you can easily automate this by adding:

Code:
cli_execute("call scripts\\AutosellStarterEquipment.ash");

as the first line within the main function of your breakfast script. Enjoy!

View attachment AutosellStarterEquipment.ash
 
Last edited:

Bale

Minion
Whoa! Why would you do that?! Are you aware that the chewing gum on a string will not produce any starter equipment if you have 1 of each type. The best way to ensure you get worthless items is to have all the starter stuff in your inventory.

You're actually costing yourself meat every time you autosell starter equipment.


Also, to critique your script, there is a command to autosell() items so you should not use cli_execute() for that. The CLI autosell command does not interact with batch_open(). Aside from that it is pretty well done for a first script.

Now for something more advanced. You might also find it interesting that you can do this:

Code:
foreach EquipItem in $items[seal-skull helmet, seal-clubbing club, helmet turtle, turtle totem, pasta spoon, ravioli hat, saucepan, hollandaise helmet, disco mask, disco ball, mariachi hat, stolen accordion]
 
Last edited:
SAY WHAT?!?!?!?!?! I had no idea! *smacks self on forehead and yells DOH*. Thanks for the help Bale. BTW, don't you ever sleep?
 

Bale

Minion
To expand upon what I said about chewing gum: Specifically it won't give you any item that you have as long as there is an item you do not have, so if you have all the starter gear and you lack a worthless item then you will get the worthless item you lack. If you have all starter gear and all three worthless items then you will get extra starter gear so make sure you don't use gum in that state. (If you've got all three worthless items, closet them before using more gum.)

That was probably more information than you really needed, but the inaccuracy in my above post was annoying me.


BTW, don't you ever sleep?

I do sleep, but I do it in a different timezone.
 

Bale

Minion
Ok, here's the revamped script to sell all starter equipment in inventory, except for 1 of each.View attachment 4948

Why didn't you use the ASH autosell() command instead of removing batch_open() and batch_close()? Using the cli command like that you are only selling 1 item at a time instead of up to 11 with a single server hit.

The cli command also has an odd issue: If you want to sell an item that has a number as the first part of its name it will throw an error. (The 1337 7r0uZ0RZ is just one of these.)
 

Bale

Minion
Better and simpler both. But you forgot to re-add the batch_open() and batch_close() like you had in your first version. Those save server hits so they are very important. Saving server hits is good for everyone who plays since it helps reduce lag.
 

Bale

Minion
Hm. I see a problem right here:

PHP:
int AutosellItem(item EquipmentName)
{
	if(item_amount(EquipmentName) > 1)
	{
		autosell((item_amount(EquipmentName) - 1), EquipmentName);
		return (item_amount(EquipmentName) - 1);
	}
	return 0;
}

This function will always return 0. You should be able to figure out why.
(Hint: both return commands always return 0!)
 
Top