AlvitrValkyrie
Member
I'm writing a script that will get keys and such for the Tower. WIP
I've got a little string param thing going. Its just the last thing to happen, even though its one of the first things being written in the script. I am looking to fix this.
Anyways. Here it is.
I've got a little string param thing going. Its just the last thing to happen, even though its one of the first things being written in the script. I am looking to fix this.
Anyways. Here it is.
Code:
#### This script will get you some of the necessary items for the tower.
void obtain(item it, int num)
{
if(item_amount(it) < num)
{
buy( num - item_amount( it ), it );
}
}
void main( string param ) {
## if "eat" this script will eat pies to obtain some of the keys
## if "adventure" this script will adventure instead
if ( param == "eat" ) {
if(item_amount($item[Milk of Magnesium]) < 2) {
obtain( $item[Milk of Magnesium], 2 );
use( 2, $item[Milk of Magnesium]); }
if(item_amount($item[Boris's key]) < 1) {
obtain( $item[Boris's key lime pie], 1 );
eat( 1, $item[Boris's key lime pie]); }
if(item_amount($item[Jarlsberg's key]) < 1) {
obtain( $item[Jarlsberg's key lime pie], 1 );
eat( 1, $item[Jarlsberg's key lime pie]); }
if(item_amount($item[Sneaky Pete's key]) < 1) {
obtain( $item[Sneaky Pete's key lime pie], 1 );
eat( 1, $item[Sneaky Pete's key lime pie]); } }
## Working on this section.
else if ( param == "adventure" ) {
if(item_amount($item[Boris's key]) < 1) {
}
if(item_amount($item[Jarlsberg's key]) < 1) {
}
if(item_amount($item[Sneaky Pete's key]) < 1) {
} } }
## Obtain the rest of the keys.
if(item_amount($item[digital key]) < 1) {
obtain( $item[White Pixel], 30 );
create(1, $item[digital key]); }
if(item_amount($item[Richard's star key]) < 1) {
obtain( $item[star chart], 1 );
obtain( $item[star], 8 );
obtain( $item[line], 7 );
create(1, $item[Richard's star key]); }
if(item_amount($item[skeleton key]) < 1) {
obtain( $item[skeleton bone], 1 );
obtain( $item[loose teeth], 1 );
create( 1, $item[skeleton key]); }
## Obtain misc. items
if(item_amount($item[Wand of Nagamar]) < 1) {
obtain( $item[ruby W], 1 );
obtain( $item[metallic A], 1 );
obtain( $item[lowercase N], 1 );
obtain( $item[heavy D], 1 );
create( 1, $item[Wand of Nagamar] ); }
if(item_amount($item[star hat]) < 1) {
obtain( $item[star chart], 1 );
obtain( $item[star], 5 );
obtain( $item[line], 3 );
create( 1, $item[star hat]); }