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

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

Reply
 
Thread Tools Display Modes
  #31  
Old 04-18-2015, 02:03 AM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

I think the answer is yes. Sort of. I'm running on linux but I get what you're asking.

My server install is ~/server and there's a symbolic link for plugins there that goes to ~/quests/plugins. So ~/server/plugins points to ~/quests/plugins

So they're one and the same. Or they should be. At any rate, players.pl is there.

Code:
eqadmin@eqemu:~/server/plugins$ ls
anim.pl              gm_event_say.pl                 quest_handin.pl
ArcheryAttack.pl     group_utility.pl                random_message.pl
check_handin.pl      guildmasters.pl                 random_range.pl
check_hasitem.pl     illusion_tools.pl               random_utils.pl
client_functions.pl  Instances.pl                    soulbinders.pl
client_messages.pl   kingley_krab_zonetranslator.pl  spawn_tools.pl
constants.pl         mob_utils.pl                    spawn_utils.pl
default-actions.pl   MP3.pl                          Task_Utils.pl
default.pl           Multiple_QGlobals.pl            text_formatting.pl
DiaWind.pl           MySQL.pl                        time_tools.pl
directional.pl       npc_tools.pl                    utility.pl
Doors_Manip.pl       path_tools.pl                   voicetell.pl
Expeditions.pl       players.pl                      weapon_tools.pl
formation_tools.pl   popup_window_utils.pl           zone_tools.pl
GetSpawn2IDs.pl      Quest_Credit2.pl
globals.pl           Quest_Credit.pl
eqadmin@eqemu:~/server/plugins$
Code:
eqadmin@eqemu:~/server/quests/plugins$ ls
anim.pl              gm_event_say.pl                 quest_handin.pl
ArcheryAttack.pl     group_utility.pl                random_message.pl
check_handin.pl      guildmasters.pl                 random_range.pl
check_hasitem.pl     illusion_tools.pl               random_utils.pl
client_functions.pl  Instances.pl                    soulbinders.pl
client_messages.pl   kingley_krab_zonetranslator.pl  spawn_tools.pl
constants.pl         mob_utils.pl                    spawn_utils.pl
default-actions.pl   MP3.pl                          Task_Utils.pl
default.pl           Multiple_QGlobals.pl            text_formatting.pl
DiaWind.pl           MySQL.pl                        time_tools.pl
directional.pl       npc_tools.pl                    utility.pl
Doors_Manip.pl       path_tools.pl                   voicetell.pl
Expeditions.pl       players.pl                      weapon_tools.pl
formation_tools.pl   popup_window_utils.pl           zone_tools.pl
GetSpawn2IDs.pl      Quest_Credit2.pl
globals.pl           Quest_Credit.pl
eqadmin@eqemu:~/server/quests/plugins$
Reply With Quote
  #32  
Old 04-18-2015, 01:50 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

"So the ghanja's code works, but it sends me to the zone safe spots rather than the druid ring. Would it make sense to add the x,y,z,h values into the $porthash array and call them in a quest::movenpc rather than a quest::zone command?"

You will want to use quest::movepc(zone_id,x,y,z,h) not quest::movenpc because the object you're trying to port is the player character. Just using quest::zone sends to the save coordinates of the zone. Simply run to the druid rings of your destination zone, target yourself, type #loc (NOT /loc unless you like reversing x and y), and use that location in the quest::movepc command. The zone_id portion will accept numbers for the zone IDs or pass it the zone shortname with $text. I haven't searched the plugins folder for it but someone may have made a plugin that converts zone shortname to ID#.
Reply With Quote
  #33  
Old 04-18-2015, 08:08 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

As if on cue, thanks Kingly

http://www.eqemulator.org/forums/showthread.php?t=39579
Reply With Quote
  #34  
Old 04-18-2015, 08:13 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Ah, yeah, I posted that before you posted what you said. No problem.
Reply With Quote
  #35  
Old 04-18-2015, 11:17 PM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

Quote:
Originally Posted by Asylum View Post
"So the ghanja's code works, but it sends me to the zone safe spots rather than the druid ring. Would it make sense to add the x,y,z,h values into the $porthash array and call them in a quest::movenpc rather than a quest::zone command?"

You will want to use quest::movepc(zone_id,x,y,z,h) not quest::movenpc because the object you're trying to port is the player character. Just using quest::zone sends to the save coordinates of the zone. Simply run to the druid rings of your destination zone, target yourself, type #loc (NOT /loc unless you like reversing x and y), and use that location in the quest::movepc command. The zone_id portion will accept numbers for the zone IDs or pass it the zone shortname with $text. I haven't searched the plugins folder for it but someone may have made a plugin that converts zone shortname to ID#.
I'm a derp. Should learn to not write code at 2am probably. I actually had the quest::movepc correct in the quasi-working script. Though trying to use those coordinates in my array has resulted in my NPC not responding (even with the movenpc->movepc fixed). Right now I'm trying to dig up an example of pulling multiple values from an array to see where my syntax went sideways. I'm suspect probably this that's breaking it:

Code:
quest::movenpc($porthash{$key}[1],[2],[3],[4],[5]);
Markusdabrave = Perlnoob
Reply With Quote
  #36  
Old 04-18-2015, 11:28 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

1) You have to access the hash elements the same way every single time.

Code:
quest::movepc($porthash{$key}[1], $porthash{$key}[2], $porthash{$key}[3], $porthash{$key}[4], $porthash{$key}[5]);
2) The API call is quest::movepc not quest::movenpc
Reply With Quote
  #37  
Old 04-20-2015, 10:08 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Not sure if you made changes yet, but for anyone following the thread:

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}) {
		plugin::Whisper("Off to ".$porthash{$text}[0]." you go!");
		quest::doanim(43);
		$client->SpellEffect(43,10);
		castdelay(5);
		quest::selfcast(34);
		quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
	}
}

sub castdelay{
	$delayOver = (time + $_[0]);
	while (time < $delayOver){}
	1;
}
Reply With Quote
  #38  
Old 04-20-2015, 10:36 PM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

I figured it out about 30 minutes ago, then saw your PM. I really appreciate the help from everyone on this. Hopefully I can pay it forward. Here's what I came up with:

Code:
sub EVENT_SAY{
my %porthash = (
				# line# => [lname, zoneid, x, y, z, heading]
				1 => ["Surefall Glade", 3, -391, -209, 4.75, 0 ],
				2 => ["Butcherblock Mountains",68, 1984, -2135, 0 ],
				3 => ["The Feerrott", 47, -1885, 367, 13.57, 0 ],
				4 => ["North Karana", 13, -1494, -2706, -7.5, 0 ],
				5 => ["Lavastorm Mountains", 27, 460, 460, -84.88, 0 ],
				6 => ["Misty Thicket", 33, -1896, -490, 120.34, 0 ],
				7 => ["South Ro", 35, 317, -2034, -22.64, 0 ],
				8 => ["Steamfont Mountains", 56, 1668, -1779, -108.07, 0 ],
				9 => ["West Commonlands", 21, 1427, 479, -51, 0 ],
				10 => ["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}) {
		quest::selfcast(34);
		quest::doanim(43);
		$client->SpellEffect(43,10);
		castdelay(9);
		quest::movepc($porthash{$text}->[1],$porthash{$text}->[2],$porthash{$text}->[3],$porthash{$text}->[4],$porthash{$text}->[5]);
		plugin::Whisper("Off to ".$porthash{$text}->[0]." you go!");
	}
}
My hash has some extra info in it but that's b/c I played with it a few times. I also stretched the cast delay so the spell effect made more sense aesthetically (at least to me it did). The good news is, I actually understand how hashes work now So it's not all Greek anymore.

The last thing I'd like to do with this is make the Superior Camo not be a self-cast (if its possible). Been looking at some other threads about group spells, but technically it's not a group spell. You just have to be in the group for it to land on you.

If there's a way to fake the NPC casting this on the player, I'm all ears:
Code:
quest::selfcast(34);
The below works, it just doesn't land on the player (presumably b/c the player is not grouped with the NPC).

Code:
$npc->CastSpell(34, $client);
I also messed around with CastGroupSpell but I'm reasonably sure that didn't work b/c this isn't a true group spell (like Group Wolf Form, Talisman of whatever, etc.).
Reply With Quote
  #39  
Old 04-21-2015, 02:09 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Crude as hell, but, hopefully you gain something from it:

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);
				$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);
			quest::selfcast(34);
			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;
}
Reply With Quote
  #40  
Old 04-23-2015, 08:37 PM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

Sorry for the time gap. Work and brain melt. Had to take a break. Tried the above code but it seems to only be performing this part of the action:

Code:
else {
			quest::doanim(43);
			$client->SpellEffect(43,10);
			castdelay(5);
			quest::selfcast(34);
			quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
		}
Edit:
I'm ok with using the selfcast but if you self-cast and already have the spell it sends an error that the player is already invisible. Is there a way to check for a spell effect active on the player? If there is I could just throw an if statement in there to see if player is already invisible and skip the selfcast if they are. Digging through the lexicon now because I'm not quite sure what I"m searching for.

Edit2:
BreakInvis(); will do.

Code:
else {
			quest::doanim(43);
			$client->SpellEffect(43,10);
			castdelay(5);
			$client->BreakInvis();
			quest::selfcast(34);
			quest::movepc($porthash{$text}[1],$porthash{$text}[2],$porthash{$text}[3],$porthash{$text}[4],$porthash{$text}[5]);
		}
Reply With Quote
  #41  
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
  #42  
Old 04-23-2015, 09:07 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by markusdabrave View Post
Tried the above code but it seems to only be performing this part of the action:
It will if you are not grouped. If you are, then ClientCloseEnoughGroupMembers is checking to see if the other members of your group are within a certain distance (otherwise your script could be exploited).


Quote:
Originally Posted by markusdabrave View Post
Edit:
I'm ok with using the selfcast but if you self-cast and already have the spell it sends an error that the player is already invisible. Is there a way to check for a spell effect active on the player? If there is I could just throw an if statement in there to see if player is already invisible and skip the selfcast if they are. Digging through the lexicon now because I'm not quite sure what I"m searching for.
Just make a new post bud, as if I'm on I usually have the F5 key handy.

Code:
$client->FindBuff();
Is what you're after, as to finding whether or not a client has a particular buff.
Reply With Quote
  #43  
Old 04-25-2015, 12:43 AM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 69
Default

Thanks to everyone for their help on this. Admittedly, I feel that ghanja did a lot of the heavy lifting here so I'd be remiss to not give credit where credit is due. I mainly built upon his suggestions. Big thanks for all your patience.

Here's the finished product, but first - some notes:

1. This requires the NPC be either a druid or a wizard class. In my case, I added druid NPCs to druid rings and wizard NPCs to wizard spires using this method and slapped this script on them.

2. This ports to old world maps. More specifically, Vanilla EQ original maps (except Lavastorm - working on that). With minor tweaking of the zone ID# and x,y,z,h locations in the %porthash(es) or adding additional zones, it could easily be made to work with other zones. Though if you wanted to, you could add them anywhere you wanted to stick a porter.

3. It automatically casts invis on whoever is being ported (this is to allow evil races to use them with minimal risk of druids eating them).

4. It has spell effects and a small delay for aesthetics.


Code:
###########################################################
# Druid/Wizard NPC Porter Script

sub EVENT_SAY {
	# Druid Ports
	if ($npc->GetClass() == 6) {
		our %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", 38, -357, 1099, -57.93, 0],
		);
	}
	# Wizard Ports
	elsif ($npc->GetClass() == 12) {
		our %porthash = (
			"toxxulia" => ["Toxxulia Forest", 38, -916, -1510, -37, 0],
			"northkarana" => ["North Karana", 13, 1209, -3685, -8.38, 0],
			"gfaydark" => ["Greater Faydark", 54, -441, -2023, 0, 0],
			"commons" => ["West Commonlands", 21, 1840, -3.85, -15.42, 0],
			"nektulos" => ["Nektulos Forest", 25, -768, 432, 33,0],
			"nro" => ["North Ro", 34, 823, 1377, 10 ,0],
			"cazicthule" => ["Cazic-Thule", 48, -466, 253, 20, 0],
			"karana" => ["West Karana", 12, -14815, -3569, 36, 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;
}
If you want your porters to broadcast/shout they are porting, adding the below code will make them shout every 2-3 1/2 minutes. The only thing is you might want to change the Surefall glade NPC's verbiage as it's not really a druid ring (so to speak).

Code:
sub EVENT_SPAWN {
	quest::settimer("portershout", int(rand(120))+90);
}

sub EVENT_TIMER {
	if($timer eq "portershout") {
		quest::stoptimer("portershout");
		if ($npc->GetClass() == 6) {
		quest::shout("Porting to all druid locations! Hail me near druid ring!");
		}
		elsif($npc->GetClass() == 12){
		quest::shout("Porting to all wizard locations! Hail me at wizard spire!");
		}
		quest::settimer("portershout", int(rand(120))+90);
	}
}
Reply With Quote
Reply

Thread Tools
Display Modes

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:19 AM.


 

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