Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2010, 01:53 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default Load2 Points

If anyone wants this for their own use, here is a script that will load load2 points for you... I have a NPC in every location that it sends this to for players and I will be manipulating this for further use later but here is a rough sketch

#race needs to be 127

Code:
sub EVENT_SPAWN {
	quest::settimer(effect,1);
    $x = $npc->GetX();
	$y = $npc->GetY();
	$z = $npc->GetZ();
	quest::set_proximity($x - 10, $x + 10, $y - 10, $y + 10, $z - 10, $z + 20);
}


sub EVENT_ENTER
{
			$client->Message(15, "Target the portal, and say [activate] to flare");
}

sub EVENT_SAY
{
my $hall = quest::saylink("Hall of Heroes", 0, "Hall of Heroes"); 
my $armory = quest::saylink("The Armory", 0, "The Armory"); 
my $redcarpet = quest::saylink("Red Carpet", 0, "Red Carpet");
my $trees = quest::saylink("Trees With Wall", 0, "Trees With Wall");
my $library1 = quest::saylink("Library One", 0, "Library One");
my $library2 = quest::saylink("Library Two", 0, "Library Two");
my $redcarpet2 = quest::saylink("Red Carpet Two", 0, "Red Carpet Two");
my $campfire = quest::saylink("Campfire", 0, "Campfire");
my $cellar = quest::saylink("Cellar", 0, "Cellar");
my $firestones = quest::saylink("Firestones", 0, "Firestones");
my $quad = quest::saylink("Quad", 0, "Quad");
my $chitown = quest::saylink("Chi-Town", 0, "Chi-Town");
my $fire = quest::saylink("Firepool", 0, "Firepool");
if($text=~/The Armory/i)
{
quest::movepc(185,1470,605,-180,0);
}
if($text=~/Hall of Heroes/i)
{
$npc->SignalClient($client, 1);
}
if($text=~/activate/i)
{
$client->Message(15, "[$hall]");
$client->Message(15, "[$armory]");
}
if($status > 120) ##GM LIST
{
if($text=~/activate/i)
{
$client->Message(14, "~~~~~GM LIST~~~~~");
$client->Message(15, "[$redcarpet]");
$client->Message(15, "[$trees]");
$client->Message(15, "[$library1]");
$client->Message(15, "[$library2]");
$client->Message(15, "[$redcarpet2]");
$client->Message(15, "[$campfire]");
$client->Message(15, "[$cellar]");
$client->Message(15, "[$firestones]");
$client->Message(15, "[$quad]");
$client->Message(15, "[$chitown]");
$client->Message(15, "[$fire]");
}
if($text=~/Red Carpet/i)
{
quest::movepc(185,-241, -846, -181,0);
}
if($text=~/Trees With Wall/i)
{
quest::movepc(185,600, 40,-986,0);
}
if($text=~/Library One/i)
{
quest::movepc(185,620, -900, 129,0);
}
if($text=~/Library Two/i)
{
quest::movepc(185,621, 645, -31,0);
}
if($text=~/Red Carpet Two/i)
{
quest::movepc(185,729, -33, 129,0);
}
if($text=~/Campfire/i)
{
quest::movepc(185,1418,-10,0,0);
}
if($text=~/Cellar/i)
{
quest::movepc(185,641,-678,-47,0);
}
if($text=~/Firestones/i)
{
quest::movepc(185,-799,-156, 509,0);
}
if($text=~/Quad/i)
{
quest::movepc(185,-1274,-840,-206,0);
}
if($text=~/Chi-Town/i)
{
quest::movepc(185,-1124,-1,385,0);
}
if($text=~/Firepool/i)
{
quest::movepc(185,-1274,-835,-332,0);
}
}
}

sub EVENT_PROXIMITY_SAY
{
if($text=~/-/i)
{
quest::movepc(185,1470,605,-180,0);
}
if($text=~/-/i)
{
$client->Message(15, "[$armory]");
}
if($status > 120) ##GM LIST
{
if($text=~/-/i)
{
$client->Message(14, "~~~~~GM LIST~~~~~");
$client->Message(15, "[$redcarpet]");
}
if($text=~/Red Carpet/i)
{
quest::movepc(185,-241, -846, -181,0);
}
}
}

sub EVENT_TIMER
{
	if($timer eq "effect"){
	
		$npc->CastToMob()->SendAppearanceEffect(79,80,0,0,0);
		quest::stoptimer("effect");
		quest::settimer(effect,1.5);

}
}
Reply With Quote
  #2  
Old 03-19-2010, 03:20 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Nice, thanks for sharing that

Here is a script I made that you might find useful for moving around a zone like that. I just put it on a pet that I can summon from a clicky on my GM. It is really nice for when you are working on a zone and want to get to certain areas of the zone without having to do /target and /goto or whatever, but it should work for what you are doing with that script as well:

Code:
#GM Utility Script

sub EVENT_SPAWN {
	$x = $npc->GetX();
	$y = $npc->GetY();
	$z = $npc->GetZ();
	quest::set_proximity($x - 100, $x + 100, $y - 100, $y + 100, $z - 50, $z + 50);
	quest::settimer("setprox", 2);
}

sub EVENT_TIMER {

	if ($timer eq "setprox") {
		my $x = $npc->GetX();
		my $y = $npc->GetY();
		my $z = $npc->GetZ();
		quest::clear_proximity();
		quest::set_proximity($x - 100, $x + 100, $y - 100, $y + 100, $z - 50, $z + 50);
	}

}

#Hash of arrays to use for setting up GM location lists to easily get around a zone quickly
# Line Number => [ "<zoneshortname#>", "<loc name>", X, Y, Z ],
%CoordNames = (
	1 => [ "lopingplains1", "Steamfont Zone In", -3514, -1275, 720 ],
	2 => [ "lopingplains2", "Undead Area", 3230, 1310, 400 ],
	3 => [ "lopingplains3", "Goblin Camp", -3115, 975, 705 ],
	4 => [ "lopingplains4", "Bloodmoon Zone In", 96, -1700, 212 ],
	5 => [ "lopingplains5", "Beach Area", -1970, -2890, 39 ],
	6 => [ "lopingplains6", "Beach Cliff Camp", -2980, -1975, 268 ],
	7 => [ "lopingplains7", "Steed Camp", -2410, 2140, 320 ],
	8 => [ "lopingplains8", "Vampire Festival", 1660, 1020, 15 ],
	9 => [ "lopingplains9", "Frost Cave", 275, 485, -35 ],
	10 => [ "lopingplains10", "Secret Treehouse", 2785, 2340, 340 ],
	11 => [ "lopingplains11", "Old Mine", 2990, 275, 335 ],
	12 => [ "lopingplains12", "Gem Mine Top", -2835, -45, 558 ],
	13 => [ "lopingplains13", "Gem Mine Middle", -2685, 145, 375 ],
	14 => [ "lopingplains14", "Gem Mine Bottom", -2690, -720, 195 ],
	15 => [ "hillsofshade1", "Base Camp", -444, 470, 54 ],
	16 => [ "hillsofshade2", "Grave Yard", -1015, 865, 59 ],
	17 => [ "hillsofshade3", "Pirate Camp", -350, 1330, 27 ],
	18 => [ "hillsofshade4", "Docks", -515, 1730, 22 ],
	19 => [ "hillsofshade5", "Pirate Ship", 85, 2770, 36 ],
	20 => [ "hillsofshade6", "Takish Camp", 930, 1385, 44 ],
	21 => [ "hillsofshade7", "Spiroc Island", 820, 2111, 14 ],
	22 => [ "hillsofshade8", "Raviak Camp", 1910, 1210, 90 ],
	23 => [ "hillsofshade9", "Undead Camp", 2000, -30, 8 ],
	24 => [ "hillsofshade10", "Outside Undead Goblins", 1135, -295, 6 ],
	25 => [ "hillsofshade11", "Undead Goblin Boss", 550, -275, -105 ],
	26 => [ "hillsofshade12", "Mushrooms", -1590, -505, -580 ],
	27 => [ "stonehive1", "Zone In", -1282, 0, 43 ],
	28 => [ "stonehive2", "Maze Left", -925, -640, 45 ],
	29 => [ "stonehive3", "Maze Right", -803, 580, 39 ],
	30 => [ "stonehive4", "Balcony", 400, 0, 58 ],
	31 => [ "stonehive5", "Hive Floor 1", -128, 0, 40 ],
	32 => [ "stonehive6", "Hive Floor 2", -77, 0, 287 ],
	33 => [ "stonehive7", "Hive Floor 3", 92, 0, 392 ],
	34 => [ "stonehive8", "Hive Basement", -23, 29, -54 ],
);

# The $n below is the number currently being checked in the while loop
# $CoordNames{$n}[0]; is Coordinate name for the array and what the saylink will make you say.
# $CoordNames{$n}[1]; is whatever you want the location name to show as in the actual saylink.
# $CoordNames{$n}[2]; is the X coordinate
# $CoordNames{$n}[3]; is the Y coordinate
# $CoordNames{$n}[4]; is the Z coordinate


sub EVENT_PROXIMITY_SAY {
	
	$move = quest::saylink("move");
	
	if ($status > 20) {
	
		#Counts each row for the while
		my $count = 0;
		#Counts each element in the Array for the while
		my $n = 1;

		if($text=~/hail/i) {
			plugin::Whisper("Options: [$move]");
		}
		if($text=~/move/i) {
			#Check each line in the hash
			while ($CoordNames{$n}[0])
			{
				#If the first field of the hash array contains the zone short name
				if ($CoordNames{$n}[0] =~ lc($zonesn) && $CoordNames{$n}[0] ne lc($text))
				{
					$count++;	#Add to the counter for displaying line numbers in the whisper
					#Create the saylink
					$CoordNameLink = quest::saylink($CoordNames{$n}[0], 0, $CoordNames{$n}[1]);
					#List each of the possible options for the current zone
					plugin::Whisper("Move Option $count: $zoneln [$CoordNameLink]");
				}
				$n++;	
			}
		}
		
		if($text !~ /Hail/i && $text !~ /move/i) {
		
			#Check each line in the hash
			while ($CoordNames{$n}[0])
			{
				#If the text said is an exact match to the first field of the hash array
				if ($CoordNames{$n}[0] eq lc($text))
				{
					#Set variables for X, Y, Z and location name
					my $NewX = $CoordNames{$n}[2];
					my $NewY = $CoordNames{$n}[3];
					my $NewZ = $CoordNames{$n}[4];
					my $LocName = $CoordNames{$n}[1];
					plugin::Whisper("Moving us to $zoneln $NewX, $NewY, $NewZ - $LocName");
					#Move the Client and NPC to the new requested location
					quest::movepc($zoneid, $NewX, $NewY, $NewZ);
					$npc->GMMove($NewX, $NewY, $NewZ);
					quest::clear_proximity();
					quest::set_proximity($NewX - 100, $NewX + 100, $NewY - 100, $NewY + 100, $NewZ - 50, $NewZ + 50);
				}
				$n++;
			}
		}
	}
	
}
Most of all, it is a nice example of how to make use of a hash of arrays. They are really nice for having multiple things you want all tied together like that.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 03-19-2010, 09:10 PM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Why does race have to be 127?
Reply With Quote
  #4  
Old 03-19-2010, 10:17 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

Invisible man, so it has floating text and you can see where it is.
Reply With Quote
  #5  
Old 03-19-2010, 10:26 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

It has particle effects on the NPC itself, could name the NPC and script "_" to make it almost completely invisible via MQ map etc.
Reply With Quote
Reply


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 02:22 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