The Dink Network

Reply to Re: ice orb release

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:
 
 
January 14th 2006, 01:41 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
anyways... heres the item-script

void use( void )
{

&mydir = sp_dir(1, -1);

//disallow diagonal fireballs for now

if (sp_dir(1, -1) == 1)
sp_dir(1, 4);
if (sp_dir(1, -1) == 3)
sp_dir(1, 6);
if (sp_dir(1, -1) == 7)
sp_dir(1, 4);
if (sp_dir(1, -1) == 9)
sp_dir(1, 6);

&basehit = sp_dir(1, -1);
&basehit += 320;

sp_seq(1, &basehit);
sp_frame(1, 1); //reset seq to 1st frame
sp_kill_wait(1); //make sure dink will punch right away
sp_nocontrol(1, 1); //dink can't move until anim is done!
&magic_level = 0;
draw_status();
&mholdx = sp_x(1, -1);
&mholdy = sp_y(1, -1);
//freeze(1);

wait(100);

if (&mydir == 1)
{
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 854, 1);
sp_seq(&junk, 854);
sp_mx(&junk, -6);
sp_my(&junk, +2);

}

if (&mydir == 4)
{
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 854, 1);
sp_seq(&junk, 854);
sp_dir(&junk, 4);
}

if (&mydir == 6)
{
// &mholdy -= 10;
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 856, 1);
sp_seq(&junk, 856);
sp_dir(&junk, 6);
}

if (&mydir == 3)
{
&mholdx += 30;

&junk = create_sprite(&mholdx, &mholdy, 11, 856, 1);
sp_seq(&junk, 856);
sp_mx(&junk, +6);
sp_my(&junk, +2);

}

if (&mydir == 2)
{
&junk = create_sprite(&mholdx, &mholdy, 11, 852, 1);
sp_seq(&junk, 852);
sp_dir(&junk, 2);
}

if (&mydir == 7)
{
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 854, 1);
sp_seq(&junk, 854);
sp_mx(&junk, -6);
sp_my(&junk, -2);

}

if (&mydir == 8)
{
&junk = create_sprite(&mholdx, &mholdy, 11, 858, 1);
sp_seq(&junk, 858);
sp_dir(&junk, 8);
}

if (&mydir == 9)
{
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 856, 1);
sp_seq(&junk, 856);
sp_mx(&junk, +6);
sp_my(&junk, -2);

}

//create fake shadow effect
playsound(17, 8000,0,&junk,0);

sp_timing(&junk, 0);
sp_speed(&junk, 2);
sp_strength(&junk, -1);
sp_range(&junk, 10);
//this makes it easier to hit stuff
sp_flying(&junk, 1);
sp_script(&junk, "dam-iORB");
//when the projectile hits something, it will look to this script, this way
//we can burn trees when appropriate (in this case, put out fireplace fires)
&mshadow = create_sprite(&mholdx, &mholdy, 15, 432, 3);
sp_brain_parm(&mshadow, &junk);
sp_que(&mshadow, -500);
sp_brain_parm(&junk, 1);
sp_brain_parm2(&junk, &mshadow);

unfreeze(1);
}

void disarm(void)
{
init("load_sequence graphics\dink\hit\magic\ds-m2- 322 30 60 84 -15 -9 16 7");
init("load_sequence graphics\dink\hit\magic\ds-m4- 324 30 61 86 -13 -7 15 8");
init("load_sequence graphics\dink\hit\magic\ds-m6- 326 30 60 86 -11 -8 13 9");
init("load_sequence graphics\dink\hit\magic\ds-m8- 328 30 61 83 -15 -4 15 14");
&magic_cost = 0;
kill_this_task();

}

void arm(void)
{
Debug("Preloading fireball");

int &basehit;
int &mholdx;
int &mholdy;
int &junk;
int &mshadow;
int &mydir;
&magic_cost = 1000;

preload_seq(854);
preload_seq(856);
preload_seq(858);
preload_seq(322);
preload_seq(324);
preload_seq(326);
preload_seq(328);
preload_seq(322);

//change magic hit
init("load_sequence_now graphics\dink\hit\magic2\ds-m2- 322 30 60 84 -15 -9 16 7");
init("load_sequence_now graphics\dink\hit\magic2\ds-m4- 324 30 61 86 -13 -7 15 8");
init("load_sequence_now graphics\dink\hit\magic2\ds-m6- 326 30 60 86 -11 -8 13 9");
init("load_sequence_now graphics\dink\hit\magic2\ds-m8- 328 30 61 83 -15 -4 15 14");

}

void pickup(void)
{
Debug("Player now owns this item.");
kill_this_task();
}

void drop(void)
{
Debug("Item dropped.");
kill_this_task();
}