The Dink Network

Reply to Re: Adding items help

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 7th 2008, 06:02 AM
anon.gif
Robj
Ghost They/Them
 
"what do u mean by the script of the pumpkin? What's that file supposed 2 contain?"
If your talking about the script in the add_item command, that is the script that is loaded and executed. Example, the script you want to run is names item-pk.c, the add_item command would be - add_item("Item-pk", seq, frame);
and your item-pk.c would be something similar to this(with whatever you want added or changed, of course):

-----------------------------------------------
//item-pk.c
void use(void)
{
//This is what happens when the player uses the item
say("I have a pumpkin.. but I wanted cake. ", 1);
}

void disarm(void)
{
kill_this_task();
}

void arm(void)
{
//Load the normal dink walk sequence
init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");
init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");
}

void pickup(void)
{
kill_this_task();
}

void drop(void)
{
draw_status();
kill_this_task();
}
---------------------------------------------

Sorry if this is unclear, I suck at explaining things.