The Dink Network

How to make Dink to take a sword(as example) only once???

January 12th 2009, 01:36 PM
wizard.gif
Anubis
Peasant He/Him Bulgaria
 
Guys,please....it's very important to me...What's the script to make Dink to take a weapon(or other stuff) only once?I expect it's not so hard to be done..
January 12th 2009, 01:52 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Something like this should work:

//First check if there's any room in the inventory:
int &var1 = free_items();
if (&var1 > 0)
{
//Now let's see if the player already has the sword:
&var1 = count_item("sword");
if (&var1 == 0)
{
//Now add the item:
add_item("sword",438,7); }
}

EDIT: Ofcourse, sword is the name of the script, this could be different for your sword. The same applies to the seq and frame values in the add_item command...
January 12th 2009, 03:00 PM
spike.gif
Check out "sheart.c" or somesuch. Essentially you need the following lines so the item will never appear again when you enter the screen:

int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 1);
February 8th 2009, 06:35 AM
wizardb.gif
Strokend
Peasant He/Him United States
I've seen four lurkers on at the same time! 
Also, if you have a bed that if checked gives Dink a sword, but you want it to only work once (only one is hidden beneath the bed), you can put a variable onto the script to state that he either recieved it or he didn't (0 means he didn't, so he can, 1 means he did, so he can't).