Trying to write a nice simple script to colour my hp on prompt line depending how many left as %.
However, replacing $world-Note with $world->Tell in follwing example crashes the client. I need to use tell to avoid colouring the rest of the line. (going to do the same to mana and move).
Anmyone spot what I've done wrong here?
I've taken out the rest as that seems to work.
prompt is
prompt : area name : hp : maxhp : mana : mv :
trigger works off ^prompt : *
However, replacing $world-Note with $world->Tell in follwing example crashes the client. I need to use tell to avoid colouring the rest of the line. (going to do the same to mana and move).
Anmyone spot what I've done wrong here?
I've taken out the rest as that seems to work.
prompt is
prompt : area name : hp : maxhp : mana : mv :
trigger works off ^prompt : *
sub ColourHP
{
@promptline=split(/:/,@_[1]);
$currentHP = @promptline[1];
$maxHP = @promptline[2];
$percentHP = $currentHP / $maxHP * 100;
foreach $pr (@promptline) {
$world->Note("$pr");
}
}