The Dink Network

Small question on magic.

September 14th 2007, 08:34 PM
dragon.gif
drath
Peasant He/Him United States
Humans are crunchy and filled with Katchup. 
I need to know 2 things. First, can someone pls script out an example on how to get a mage, or just any sprite, to give dink a spell. Second I don't know any spell scripts can you put them down for me please?
September 14th 2007, 08:40 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
You need to have a coversation with a sprite, and somewhere in there put

add_magic("<put spell here>", 437, 1);

For a standard spell, let's go with fireball, put this:

add_magic("item-fb", 437, 1);

Check in the rudiments of scripting for more.
September 14th 2007, 08:46 PM
dragon.gif
drath
Peasant He/Him United States
Humans are crunchy and filled with Katchup. 
Thanx pillbug
September 14th 2007, 08:48 PM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
No prob.
September 15th 2007, 01:22 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
It's usually best to check first whether or not the player actually has space left in his inventory for this. (This is not necessary if this is the only magic in the game probably)

If you want to do it do it like this:

int &freemag = free_magic();
if (&freemag < 1)
{
say("There's no room in my inventory!",1);
}
if (&freemag > 0)
{
add_magic("<put spellscript here>",<sequence>,<frame> );
}

(sequence 437, frame 1 will give the graphic of a fireball in your inventory, but other graphics can also be used...)

<EDIT> And if you're looking for a script, try the source of the original game. You could make a spell do whatever you want, so giving one probably isn't very useful as there are enough available in the original game for a start.