The Dink Network

Reply to Re: New Dev File: Fire-Spin Spell

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 16th 2008, 07:07 AM
pillbug.gif
dinkinfreak
Peasant He/Him Greece
Real lurkers don't appear on the lurkers list. 
This could be used as a base script forother weapons of the sort.

For instance, one can make a script that makes Dink use his machine-fireball-gun and spin round as a desperate defence against the enemies cornering him, with little changes, like this:

item-fspn

void use(void)
{
&mydir = sp_dir(1, -1);

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();
wait(100);
sp_dir(1, &mydir);
spawn("firespon");
}

void disarm(void)
{
&magic_cost = 0;
kill_this_task();
}

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

int &basehit;
int &mholdx;
int &mholdy;
int &junk;
int &mydir;
&magic_cost = 300;
preload_seq(322);
preload_seq(324);
preload_seq(326);
preload_seq(328);
preload_seq(502);
preload_seq(504);
preload_seq(506);
preload_seq(508);

//tree burn
preload_seq(20);

//explosions
preload_seq(70);
preload_seq(167);
}

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

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

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

firespin.c

void main ()
{

freeze(1);

&save_x = 1;
int &mholdx;
int &mholdy;
int &junk;
int &mydir = sp_dir(1, -1);
int &round = 0;

loop:
wait(25);
&mholdx = sp_x(1, -1);
&mholdy = sp_y(1, -1);
&round += 1;

if (&mydir == 1)
{
&mydir = 4;
goto make;
}
if (&mydir == 4)
{
&mydir = 7;
goto make;
}
if (&mydir == 7)
{
&mydir = 8;
goto make;
}
if (&mydir == 8)
{
&mydir = 9;
goto make;
}
if (&mydir == 9)
{
&mydir = 6;
goto make;
}
if (&mydir == 6)
{
&mydir = 3;
goto make;
}
if (&mydir == 3)
{
&mydir = 2;
goto make;
}
if (&mydir == 2)
{
&mydir = 1;
goto make;
}
make:
if (&mydir == 1)
{
sp_pseq(1, 71);
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 17, 504, 1);
sp_seq(&junk, 504);
sp_mx(&junk, -6);
sp_my(&junk, +4);
}
if (&mydir == 4)
{
sp_pseq(1, 14);
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 17, 504, 1);
sp_seq(&junk, 504);
sp_dir(&junk, 4);
}
if (&mydir == 7)
{
sp_pseq(1, 77);
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 17, 504, 1);
sp_seq(&junk, 504);
sp_mx(&junk, -6);
sp_my(&junk, -4);
}
if (&mydir == 8)
{
sp_pseq(1, 18);
&junk = create_sprite(&mholdx, &mholdy, 17, 508, 1);
sp_seq(&junk, 508);
sp_dir(&junk, 8);
}
if (&mydir == 9)
{
sp_pseq(1, 79);
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 17, 506, 1);
sp_seq(&junk, 506);
sp_mx(&junk, +6);
sp_my(&junk, -4);
}
if (&mydir == 6)
{
sp_pseq(1, 16);
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 17, 506, 1);
sp_seq(&junk, 506);
sp_dir(&junk, 6);
}
if (&mydir == 3)
{
sp_pseq(1, 73);
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 17, 506, 1);
sp_seq(&junk, 506);
sp_mx(&junk, +6);
sp_my(&junk, +4);
}
if (&mydir == 2)
{
sp_pseq(1, 12);
&junk = create_sprite(&mholdx, &mholdy, 17, 502, 1);
sp_seq(&junk, 502);
sp_dir(&junk, 2);
}

playsound(17, 8000,0,&junk,0);
sp_timing(&junk, 0);
sp_speed(&junk, 6);
sp_nohit(&junk,1);
sp_strength(&junk, 10);
sp_range(&junk, 10);
sp_flying(&junk, 1);
sp_script(&junk, "dam-fire");
sp_brain_parm(&junk, 1);
sp_brain_parm2(&junk, 1);
//8 round equal 1 turn
if (&round <= 16) goto loop;

unfreeze(1);
kill_this_task();
}

There can also be a cluster bomb out of it that goes boom when it hits trees, rocks, etcetera, or after a time delay for Dink to reach a tree and avoid the shrapnels.

EDIT:I 'm making the cluster bomb right now.