The Dink Network

stupid crappy crappy thing thats crap.

September 17th 2004, 01:17 PM
pig.gif
ive got a script for some half arsed defense spell, but when you use it, your defense goes up to 200 permanently! anyway, here goes:

void use(void)
{
playsound(22,22050,0,0,0);
say("`0You feel invicable!", 1);
&defense += 30;
wait(10000);
&defense -= 30;
say("`0**defense has worn off!**", 1);
&magic_level = 0;
draw_status();
}

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

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

int &basehit;
int &mholdx;
int &mholdy;
int &junk;
int &mshadow;
int &mydir;
&magic_cost = 200;
}

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

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

cheers.
September 17th 2004, 01:25 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I dunno, maybe putting &magic_level = 0; and draw_status(); directly after the { helps.
September 17th 2004, 05:17 PM
anon.gif
Ric
Ghost They/Them
 
&defence
c! not s.
September 17th 2004, 07:36 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
Scrach that. &defense is right.
Weird that I can't edit that.
Wierd that I kan't spell.
September 17th 2004, 08:56 PM
wizardb.gif
merlin
Peasant He/Him
 
You can't edit it because you didn't log in.
September 17th 2004, 09:16 PM
anon.gif
MiloBones
Ghost They/Them
 
I'll put money that magicman is right.

Think about it: you want the mana-thing to reset instantly-- before the wait.
September 18th 2004, 02:42 AM
pig.gif
Hurrah, thanks magicman. it actualy looks quite funky with its neat shield icon thingy for a crappy crap thing thats crap. just one more question, how do you make th funky blue stars apear above his head? im also making a fury spell so i may also need to know how the red stars apear above your head. cheers.
September 18th 2004, 08:23 AM
anon.gif
MiloBones
Ghost They/Them
 
Blue stars can be done with a spawn("mag_star");

A few notes on the create_sprite command. It's like this:

&junk = create_sprite( x location, y location, brain, sequence, frame);

Five parameters. And it returns the number of the new sprite, so you could do, say, sp_dir(&junk, 2); or whatever, if you set &junk equal to the create_sprite command, like above.

And a note on brain 12: it makes things shrink or grow to sp_brain_parm, then die. An example:

sp_brain_parm(&current_sprite, 110);
sp_brain(&current_sprite, 12);

The sprite will now grow to size 110, then die.

That should help, some.
September 19th 2004, 02:38 AM
pig.gif
thanks a lot.