I haven't tested this yet, but I am pretty sure you can simplify that down to just the following and it won't have a limit to how many messages you can send and also doesn't require you to put the count of how many messages you are using:
Code:
###Usage: plugin::RandomSay("message1","message2", etc..);
###Usage: plugin::RandomEmote("message1","message2", etc..);
sub RandomSay {
my $count = 0;
while ($_[$count])
{
$count++;
}
my $RandMessage = plugin::RandomRange(0, $count);
quest::say($_[$RandMessage]);
}
sub RandomEmote {
my $count = 0;
while ($_[$count])
{
$count++;
}
my $RandMessage = plugin::RandomRange(0, $count);
quest::emote($_[$RandMessage]);
}
return 1;
Note that it does require the RandomRange plugin I made here:
http://www.eqemulator.org/forums/showthread.php?t=30421