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
  #40  
Old 04-23-2015, 09:01 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Or not even cast it if they already have it, though, breaking the invis would allow for a "fresh" cast, so whichever way you prefer:

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

sub EVENT_TIMER {
	if($timer eq "portershout") {
		quest::stoptimer("portershout");
		quest::shout("Porting to all druid locations! Hail me near tunnel to Qeynos Hills!");
		quest::settimer("portershout", int(rand(100))+30);
	}
}

sub EVENT_SAY {
my %porthash = (
				"surefall" => ["Surefall Glade", 3, -391, -209, 4.75, 0],
				"butcher" => ["Butcherblock Mountains",68, 1984, -2135, 0],
				"feerrott" => ["The Feerrott",47, -1885, 367, 13.57, 0],
				"northkarana" => ["North Karana",13, -1494, -2706, -7.5, 0],
				"lavastorm" => ["Lavastorm Mountains",27, 460, 460, -84.88, 0],
				"misty" => ["Misty Thicket",33, -1896, -490, 120.34, 0],
				"sro" => ["South Ro",35, 317, -2034, -22.64, 0],
				"steamfont" => ["Steamfont Mountains",56, 1668, -1779, -108.07, 0],
				"commons" => ["West Commonlands", 21, 1427, 479, -51, 0],
				"toxxulia" => ["Toxxulia Forest", 56, -357, 1099, -57.93, 0],
				);
	if ($text=~/Hail/i) {
		plugin::Whisper("Hail! Where would you like to go? ");
		foreach my $key (keys %porthash) {
			$client->Message(315, "[".quest::saylink($key, 1, $porthash{$key}[0])."]");
		}
	}
	elsif (defined $porthash{$text}) {
		if ($client->IsGrouped()) {
			quest::doanim(43);
			foreach my $group_member (ClientCloseEnoughGroupMembers($client)) {
				$group_member->SpellEffect(43,10);
				if (!$group_member->FindBuff(34)) {
					$npc->SpellFinished(34, $group_member);
				}
			}
			castdelay(5);
			foreach my $group_member (ClientCloseEnoughGroupMembers($client)) {
				$group_member->Message (315, "".$npc->GetCleanName()." whispers, 'Off to ".$porthash{$text}[0]." you go!");
				$group_member->MovePC($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
			}
		}
		else {
			quest::doanim(43);
			$client->SpellEffect(43,10);
			castdelay(5);
			if (!$client->FindBuff(34)) {
				$npc->SpellFinished(34, $client);
			}
			quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
		}
	}
}

sub ClientCloseEnoughGroupMembers {
	my @return_group;
	my $entire_group = $entity_list->GetGroupByClient(shift);
	if ($entire_group) {
		for ($count = 0; $count < 6; $count++) {
			my $group_member = $entire_group->GetMember ($count);
			if ($group_member) {
				if ($group_member->IsClient()) {
					if ($group_member->CalculateDistance($x,$y,$z) <= 30) {
						push (@return_group, $group_member);
					}
				}
			}
		}
	return @return_group;
	}
}

sub castdelay{
	$delayOver = (time + $_[0]);
	while (time < $delayOver){}
	1;
}
Though, BreakInvis may also break invis to undead (which you may not care about in your case, but for those following along), I've never tested it against Invis vs Undead.

You can also use:

Code:
$client->BuffFadeBySpellID(43);
Code:
$group_member->BuffFadeBySpellID(43);
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 12:03 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3