The Dink Network

Reply to Nuttree

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
July 24th 2006, 03:43 PM
milder.gif
THis is what I want. Dink can only get a nut from the nuttree when &story = 9. He only get's one. (He is needing it to cure someone.)
And when he picked up one nut the boss script is going to run script name s10-gobboss. So how can I manage that this are the scripts I use.

============================================================
First the nuttree:

void main( void )
{
int &crap;

}

void talk( void )
{
say_stop("Hey, I found the Nuttree.", 1);
wait(250);
}

void hit( void )
{
&crap = scripts_used();
if (&crap > 170)
{
//don't make any more nuts, there are 165 already on the screen..)
return;
}

//lets make the nut fall down and give it a nut script
&crap = create_sprite( 158, 226, 0, 421, 23);
sp_speed(&crap, 1);
move_stop(&crap, 2, 226, 1)
sp_script(&crap, "s1-nut");
}

=================================================================
Now the S1-nut script;

void main( void )
{
sp_touch_damage(&current_sprite, -1);

}

void touch( void )
{
int &junk = free_items();

if (&junk < 1)
{
say("I'm full! I can't pick up anything else.", 1);
return;
}

add_item("item-nut",438, 19);

if (&nuttree < 1)
{
&nuttree = 1;
}

say("I picked up a nut!",1);
sp_active(&current_sprite, 0);

}

=============================================================
And last the s10-gobboss script;

//first meeting with the gobboss

void main ( void )
{
int &gob = create_sprite(436, 148, 16, 801, 1);
sp_base_walk(&gob, 800);
sp_speed(&gob, 1);
freeze(1);
freeze(&gob);
wait(100);
move_stop(&gob, 2, 356, 1);
freeze(&gob);
wait(100);
say_stop_npc("`0Who is taking my nuts.", &gob);
wait(100);
&story = 10;
say_stop_npc("`0Oh, its you. Dinkytoy. You are gonna die.", &gob);
wait(100);

//Battle starts
sp_script(&gob, "en-gobboss");
unfreeze(1);
unfreeze(&gob);

}
}

The reason I ask this is that I have to make sure that Dink has one nut in his items pack when he meets the headwizard. Or is there another way to make sure he has the nut?

Please help I am really really stuck now. THis is the most important point of the first world in my dmod.