Thread: Porters
View Single Post
  #6  
Old 04-15-2015, 05:08 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

There is, but keeping with basics. It's better to use elsif's in place of all the other if's you have after the initial if.

Code:
sub EVENT_SAY {
	if ($text=~/Hail/i) {
		plugin::Whisper("Hail! Where would you like to go? [Butcherblock] Mountains, The [Feerrott], North [Karana], [Lavastorm] Mountains, [Misty] Thicket, [South Ro], [Steamfont] Mountains, West [Commonlands] or [Toxxulia] Forest?");
	}
#	elsif ($text=~/Surefall/i) {
#		quest::selfcast(34);
#		quest::say("Off to Surefall Glade!");
#		quest::selfcast(2021);
#	}
	elsif ($text=~/Commonlands/i) {
		quest::say("Off to West Commonlands!");
		quest::selfcast(34);
		quest::selfcast(531);
	}
	elsif ($text=~/Butcherblock/i) {
		quest::say("Off to Butcherblock Mountains!");
		quest::selfcast(34);
		quest::selfcast(532);
	}
	elsif ($text=~/Feerrott/i) {
		quest::say("Off to The Feerrott!");
		quest::selfcast(34);
		quest::selfcast(536);
	}
	elsif ($text=~/Karana/i) {
		quest::say("Off to North Karana!");
		quest::selfcast(34);
		quest::selfcast(530);
	}
	elsif ($text=~/Lavastorm/i) {
		quest::say("Off to Lavastorm Mountains!");
		quest::selfcast(34);	
		quest::selfcast(534);
	}
	elsif ($text=~/Misty/i) {
		quest::say("Off to Misty Thicket!");
		quest::selfcast(34);
		quest::selfcast(538);
	}
	elsif ($text=~/South Ro/i) {
		quest::say("Off to South Ro!");
		quest::selfcast(34);
		quest::selfcast(535);
	}
	elsif ($text=~/Steamfont/i) {
		quest::say("Off to Steafont Mountains!");	
		quest::selfcast(34);
		quest::selfcast(537);
	}
	elsif ($text=~/Toxxulia/i) {
		quest::say("Off you Toxxulia Forest!");
		quest::selfcast(34);
		quest::selfcast(533);
	}
}
I've never used it on a port spell, but, if you're wanting effects and such, then perhaps:
Code:
$npc->SpellFinished(####, $client)
Or a timer with animation and aura that will do a movepc after a few seconds.
Reply With Quote