[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
Alliance From Hell • In-Run Odd Silver Coin Grabber
Page 1 of 1

In-Run Odd Silver Coin Grabber

Posted: Mon Oct 06, 2014 4:04 am
by wyli romesco
Hi,

Another micro-script designed to save a bit of repetitive button thumping in-run. This one quite simply grabs odd silver coins from the prince's ball for you.

You need to have at least one Grimstone Mask in your inventory and enough free turns to get the number of coins you require.

When called, the script will ask you how many coins you want, use a Mask, and then proceed to collect the required amount. No extra turns spent mucking around trying to kill Cinderella or any other such nonsense :P

Code: Select all

void main (int numberOfCoinsToGet)
{
    if (numberOfCoinsToGet > 6)
		abort("Too many coins!");
	if (my_adventures() < numberOfCoinsToGet || item_amount($item[grimstone mask]) < 1)
		abort("You shall NOT go to the ball!");
	cli_execute("set choiceAdventure829=1");
	use(1,$item[grimstone mask]);
	for coinNumber from 1 to numberOfCoinsToGet
	{
		int coinLocation = coinNumber + 373;
		int coinChoice = coinNumber + 821;
		visit_url("adventure.php?snarfblat="+coinLocation);
		visit_url("choice.php?pwd&whichchoice="+coinChoice+"&option=1");
	}
	int coinsInInventory = item_amount($item[odd silver coin]);
	print ("Odd silver coins in inventory: "+coinsInInventory);
}

Re: In-Run Odd Silver Coin Grabber

Posted: Tue Nov 25, 2014 6:26 pm
by cheesecookie
Just in case wandering monsters come about (they liked to mess me up when I was run scripting all of this.

Code: Select all


void main(int numberOfCoinsToGet)
{
	if(numberOfCoinsToGet > 6)
	{
		abort("Too many coins!");
	}
	if((my_adventures() < numberOfCoinsToGet) || (item_amount($item[grimstone mask]) < 1))
	{
		abort("You shall NOT go to the ball!");
	}

	set_property("choiceAdventure822", "1");
	set_property("choiceAdventure823", "1");
	set_property("choiceAdventure824", "1");
	set_property("choiceAdventure825", "1");
	set_property("choiceAdventure826", "1");
	set_property("choiceAdventure827", "1");
	set_property("choiceAdventure829", "1");

	use(1,$item[grimstone mask]);

	int startingCoins = item_amount($item[odd silver coin]);
	int goal = startingCoins + numberOfCoinsToGet;
	while((item_amount($item[odd silver coin]) < (startingCoins + 1)) && (item_amount($item[odd silver coin]) < goal)  && (my_adventures() > 0))
	{
		adv1($location[The Prince\'s Balcony], 1, "");
	}
	while((item_amount($item[odd silver coin]) < (startingCoins + 2)) && (item_amount($item[odd silver coin]) < goal)  && (my_adventures() > 0))
	{
		adv1($location[The Prince\'s Dance Floor], 1, "");
	}
	while((item_amount($item[odd silver coin]) < (startingCoins + 3)) && (item_amount($item[odd silver coin]) < goal)  && (my_adventures() > 0))
	{
		adv1($location[The Prince\'s Lounge], 1, "");
	}
	while((item_amount($item[odd silver coin]) < (startingCoins + 4)) && (item_amount($item[odd silver coin]) < goal)  && (my_adventures() > 0))
	{
		adv1($location[The Prince\'s Kitchen], 1, "");
	}
	while((item_amount($item[odd silver coin]) < (startingCoins + 5)) && (item_amount($item[odd silver coin]) < goal)  && (my_adventures() > 0))
	{
		adv1($location[The Prince\'s Canapes Table], 1, "");
	}
	while((item_amount($item[odd silver coin]) < (startingCoins + 6)) && (item_amount($item[odd silver coin]) < goal)  && (my_adventures() > 0))
	{
		adv1($location[The Prince\'s Restroom], 1, "");
	}

	print("Odd silver coins in inventory: " + item_amount($item[odd silver coin]));
}

Yeah, this could be cleaner with those loops, the way I use it in run for a dowsing rod or painting allows me to simplify some of it.