StrawberryLetter23
New member
I would like to ballroom dance with Rotting Matilda, so I've written a short script to check for dance cards and use them and adventure x dance card + 4 in the Spookyraven Ballroom.
I'd like some comments from experienced ASH coders on the script. Here it is:
It does compile. I'm too drunk to see if it works. I'm hoping to use it tomorrow. Should I use a different control structure to iterate through the cards?
Thanks in advance.
SL23
I'd like some comments from experienced ASH coders on the script. Here it is:
Code:
void main()
{
int cards = item_amount( $item[dance card] );
if (cards > 0) {
if ( my_adventures() >= (cards+4)){
while (cards > 0)
{
use(1, $item[dance card]);
adventure(1, $location[Haunted Ballroom]);
cards --;
}
} else {
print ("You do not have enough adventures to use all the dance cards in your inventory.");
}
} else {
print ("You do not have any dance cards to use, silly rabbit.");
}
}
Thanks in advance.
SL23