| Message |
You need three script routines, to add one, subtract five, and set to zero. If JScript they would look like this:
function OneMoreSoul (thename, theoutput, wildcardsVB)
{
var iSouls;
// get current number
iSouls = world.GetVariable ("souls");
// if no such variable, make zero
if (iSouls == null)
iSouls = 0;
iSouls++;
world.SetVariable ("souls", iSouls);
}
function FiveLessSouls (thename, theoutput, wildcardsVB)
{
var iSouls;
// get current number
iSouls = world.GetVariable ("souls");
// if no such variable, make zero
if (iSouls == null)
iSouls = 0;
iSouls -= 5;
if (iSouls < 0)
iSouls = 0;
world.SetVariable ("souls", iSouls);
}
function NoSouls (thename, theoutput, wildcardsVB)
{
world.SetVariable ("souls", 0);
}
Now you just need to set up some triggers, to call the appropriate scripts, eg.
Trigger: With a wicked grin, you absorb the soul
Label: OneMoreSoul
Script: OneMoreSoul
Trigger: You scream in triumph as the souls of your enemies are released from your body into a sphere of deathly energy around you.
Label: FiveLessSouls
Script: FiveLessSouls
Trigger: You begin chanting quietly, and your fingers glow with deathly energy.
Label: NoSouls_1
Script: NoSouls
Trigger: As the last drop of life is released from your body, a tunneling cyclone of energy erupts from your body spilling forth your captured souls.
Label: NoSouls_2
Script: NoSouls
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|