The Dink Network

Reply to Re: How do you make Dink do things

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:
 
 
December 3rd 2005, 12:40 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
At the exact time I am writing this, I don't know how to make Dink throw seed. But, I'm going to explain how to find out how now. Ow.

Step 1: Look in the original script.

I know that all of Dink's item scripts start with item-, so I browse the source for those files. On first glance, I don't see the script, then I realize that "item-pig" might be a likely candidate. The script says "//item pig food" at the top, so we got our guy.

Step 2: Figure out what the heck it says.

When an item is used, it calls the 'use' function. I guess you're going to want to throw seed to the left. So, I pretend as if sp_dir(1, -1) is 4, and condense the use function to:

freeze(1);
sp_seq(1, 524);
sp_frame(1, 1);
wait(250);
playsound(13, 8000,0,0,0);
int &mholdx = sp_x(1, -1);
int &mholdy = sp_y(1, -1);
&mholdy -= 37;
&mholdx -= 50;
int &junk = create_sprite(&mholdx, &mholdy, 5, 430, 1);
sp_seq(&junk, 430);
unfreeze(1);

Inserting that into any other script should cause Dink to throw seed to the left.