Spell Duration has nothing to do with the quest::selfcast as far as I am aware, you could try adjusting the duration of the spell in the spells table? Also, when you post code you may want to put it in code blocks. You know you can also use saylinks so they click a purple 'link' and it says the text before them? Your script is re-written below using them. The , 1 after the "whatever" makes it so that the text within the saylink isn't said out loud. Also, you can use plugin::Whisper, case-sensitive, to whisper the text to the player rather than say it out loud, however, if you want to send a message to a player in a 'whisper' from something other than an NPC you have to use a $client->Message or it will not work, I hope I helped. ~Harbinger Zamthos
Code:
sub EVENT_SAY
{
my $hp = quest::saylink("Hit Points", 1);
my $haste = quest::saylink("Spell Haste", 1);
my $healing = quest::saylink("Healing", 1);
my $curing = quest::saylink("Curing", 1);
if($text=~/Hail/i)
{
plugin::Whisper("Hello $name. I cast Cleric buffs. Which buff would you like? [$hp], [$haste], [$healing] or [$curing]?");
}
elsif($text=~/Hit Points/i)
{
if($ulevel >= 1 && $ulevel < 35)
{
quest::selfcast(312);
quest::selfcast(485);
quest::selfcast(1);
}
if($ulevel > 34 && $ulevel < 61)
{
$npc->CastSpell(4053, $userid);
}
if($ulevel > 60)
{
$npc->CastSpell(9811, $userid);
}
}
}