I figured i would share some of my perl stuff so here is a little helpful quest script that will allow you to generate a mob or mobs that will be able to say different things when you hail them. Good for rumors, to help implement tips and stuff or even boss mobs. Hopefully it will help those learning to use the random command
Code:
sub EVENT_SAY
{
if ($text=~/Hail/i)
{
$a = quest::ChooseRandom(4,8,7,1,5,10,3,9,2,6);
if ($a == 1)
{
quest::say("text here");
}
if ($a == 2)
{
quest::say("text here");
}
if ($a == 3)
{
quest::say("text here");
}
if ($a == 4)
{
quest::say("text here");
}
if ($a == 5)
{
quest::say("text here");
}
if ($a == 6)
{
quest::say("text here");
}
if ($a == 7)
{
quest::say("text here");
}
if ($a == 8)
{
quest::say("text here");
}
if ($a == 9)
{
quest::say("text here");
}
if ($a == 10)
{
quest::say("text here");
}
}
}