Small question on magic.
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?
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.
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.
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.
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.








