View Single Post
  #9  
Old 02-03-2012, 08:18 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Quote:
Originally Posted by Luccian View Post
Thanks for the additional support. I didn't know how to really properly use the elseif commands, thought I felt like it was the right way to go. So I tried to use the same type of script I used for the random animations I was using.

I like the random say plugin, I definitely will use that!
The plugin is the way to go, but for your reference:

Code:
sub EVENT_SAY 
{
	if($text=~/Hail/)
	{
		quest::emote("appears to be one of Zimora's chosen elite. Light glistens off the shined plate armor.");
		# Random choice of phrases to be said
		my $randomphrase=plugin::RandomRange(1,3);
			if($randomphrase==1) {
				quest::say("Hello");
			} elsif($randomphrase==2) {
				quest::say("Hi");
			} elsif($randomphrase==3) {
				quest::say("Heya");
			}
	}
}
Reply With Quote