📧 Message Board Archive

A new spell.
Could someone help me to make a new spell. I tried to make it but no... I t should be like this.



When you use your magic Dink stops and says the magic words. After that Dink launches a hellfire ball to north, south, west, east, south-west, south-east etc. to all directions. How should I really make it?



-Skyal (making DMOD called Temple of Light) :)



PS. Your new ideas are welcome!! :)
Re: A new spell.
Don't you think that's a little bit too powerful? ;)



Anyway, I had the exact script you need. I have written a script for launching 8 fireballs in all directions for my upcoming DMOD. I don't mind sharing with you. (I even modified it so that it would indeed cast 8 hellfires. You can change the strength and range so that this magic will not be so powerful, or not. :p You can also change anything you want. You will see a lot of smiles like ;) since the message board woudl take ) and ; backwards...



----script----



// item 8 hellfire balls



void use( void )

{

// disallow diagonal cast anim



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);

// reset seq to 1st frame

sp_frame(1, 1);

// make sure Dink will punch right away

sp_kill_wait(1);

// Dink can't move until anim is done!

sp_nocontrol(1, 1);

&magic_level = 0;

draw_status();

&xdink = sp_x(1, -1);

&ydink = sp_y(1, -1);

freeze(1);

say("Da Huo Sao Shen", 1);



&xdink -= 30;

&junk = create_sprite(&xdink, &ydink, 11, 514, 1);

sp_seq(&junk, 514);

sp_dir(&junk, 4);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&ydink -= 20;

&xdink += 10;

&junk = create_sprite(&xdink, &ydink, 11, 514, 1);

sp_seq(&junk, 514);

sp_mx(&junk, -6);

sp_my(&junk, -6);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&ydink += 40;

&junk = create_sprite(&xdink, &ydink, 11, 514, 1);

sp_seq(&junk, 514);

sp_mx(&junk, -6);

sp_my(&junk, +6);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&xdink += 20;

&ydink += 10;

&junk = create_sprite(&xdink, &ydink, 11, 512, 1);

sp_seq(&junk, 512);

sp_dir(&junk, 2);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&ydink -= 60;

&junk = create_sprite(&xdink, &ydink, 11, 518, 1);

sp_seq(&junk, 518);

sp_dir(&junk, 8);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&xdink += 20;

&ydink += 10;

&junk = create_sprite(&xdink, &ydink, 11, 516, 1);

sp_seq(&junk, 516);

sp_mx(&junk, +6);

sp_my(&junk, -6);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&xdink += 10;

&ydink += 20;

&junk = create_sprite(&xdink, &ydink, 11, 516, 1);

sp_seq(&junk, 516);

sp_dir(&junk, 6);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfb");

&mshadow = create_sprite(&xdink, &ydink, 15, 432, 3);

sp_brain_parm(&mshadow, &junk);

sp_que(&mshadow, -500);

sp_brain_parm(&junk, 1);

sp_brain_parm2(&junk, &mshadow);



&xdink -= 10;

&ydink += 20;

&junk = create_sprite(&xdink, &ydink, 11, 516, 1);

sp_seq(&junk, 516);

sp_mx(&junk, +6);

sp_my(&junk, +6);

sp_timing(&junk, 0);

sp_speed(&junk, 10);

sp_strength(&junk, 40);

sp_range(&junk, 20);

sp_flying(&junk, 1);

sp_script(&junk, "dam-sfbdam-sfbshadow = create_sprite(&xdink, &ydink, 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 )

{

&magic_level = 0;

&magic_cost = 0;

kill_this_task();

}



void arm( void )

{

Debug("Preloading fireballs");



int &basehit;

int &junk;

int &mshadow;

&magic_cost = 10000;

preload_seq(322);

preload_seq(324);

preload_seq(326);

preload_seq(328);

preload_seq(512);

preload_seq(514);

preload_seq(516);

preload_seq(518);



// tree burn

preload_seq(20);



// explosion

preload_seq(70);

}



void pickup( void )

{

Debug("Player now owns this item.");

kill_this_task();

}



void drop( void )

{

Debug("Item dropped.");

kill_this_task();

}

Note for the script
I forgot to mention that in the script &xdink and &ydink are two global variables I used exclusively for Dink's x, y coordinates. I found them very handy and won't get conflict with &save_x and &save_y, which are usually used for making bonus.