Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 04-17-2015, 12:19 AM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

Ok, working, quasi-finished product:

Code:
sub castdelay{
	$delayOver = (time + @_[0]);
	while (time < $delayOver){}
	1;
}

sub EVENT_SPAWN {
	quest::settimer("portershout",90);
}

sub EVENT_TIMER {
	if($timer eq "portershout") {
	quest::shout("Porting to all druid locations! Hail me near tunnel to Qeynos Hills!");
	$random_number = int(rand(100))+30; ## Randomizes porter shout after initial 90 second delay but no less than 30 seconds between shouts
	quest::settimer("portershout", $random_number);
	}
}

sub EVENT_SAY{
	if ($text=~/Hail/i) {
		plugin::Whisper("Hail! Where would you like to go? [Surefall] Glade, [Butcherblock] Mountains, The [Feerrott], North [Karana], [Lavastorm] Mountains, [Misty] Thicket, [South Ro], [Steamfont] Mountains, West [Commonlands] or [Toxxulia] Forest?");
	}
	elsif ($text=~/Commonlands/i) {
	quest::say("Off to West Commonlands!");
	$npc->DoAnim(43); #Cast animation
	$client->SpellEffect(43,10); #Cast spell effect
	castdelay(5); #invoke delay subroutine
	quest::selfcast(34); #selfcast superior camo
	quest::movepc(21, 1427, 479, -51, 0); #move PC to (zoneid, x, y, z, heading)
	}
	elsif ($text=~/Surefall/i) {
	quest::say("Off to Surefall Glade!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(3, -391, -209, 4.75, 0);
	}
	elsif ($text=~/butcherblock/i) {
	quest::say("Off to Butcherblock Mountains!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(68, 1984, -2135, 0);
	}
	elsif ($text=~/feerrott/i) {
	quest::say("Off to The Feerrott!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(47, -1885, 367, 13.57, 0);
	}
	elsif ($text=~/karana/i) {
	quest::say("Off to North Karana!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(13, -1494, -2706, -7.5, 0);
	}
	elsif ($text=~/lavastorm/i) {
	quest::say("Off to Lavastorm Mountains!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(27, 460, 460, -84.88, 0);
	}
	elsif ($text=~/misty/i) {
	quest::say("Off to Misty Thicket!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(33, -1896, -490, 120.34, 0);
	}
	elsif ($text=~/south ro/i) {
	quest::say("Off to South Ro!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(35, 317, -2034, -22.64, 0);
	}
	elsif ($text=~/steamfont/i) {
	quest::say("Off to Steamfont Mountains!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(56, 1668, -1779, -108.07, 0);
	}
	elsif ($text=~/toxxulia/i) {
	quest::say("Off to Toxxulia Forest!");
	$npc->DoAnim(43);
	$client->SpellEffect(43,10);
	castdelay(5);
	quest::selfcast(34);
	quest::movepc(56, -357, 1099, -57.93, 0);
	}
}
Any optimization tips are more than welcome. Functionality-wise I think I'm there.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:50 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3