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

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-27-2018, 03:22 PM
Almusious
Fire Beetle
 
Join Date: Sep 2012
Posts: 25
Default

Not sure if you could use this and I haven't tested it beyond compiling:

Code:
sub EVENT_KILLED_MERIT 
{
	%tierhash = 
	(
		72	=>	[
			{
				npcminlevel 	=>	70,
				npcs 			=>	[72003,207001,221008,200055,76007],
				pointsfornpcs 	=>	250,
				tier 			=>	7,
			},
			{
				npcminlevel 	=>	70,
				npcs 			=>	[72004,72000,72002,72090],
				pointsfornpcs	=>	50,
				tier 			=>	7,				
			},
			{
				npcminlevel 	=>	70,
				npcs 			=>	["nonspecific"],
				pointsfornpcs	=>	1,
				tier 			=>	7,				
			},
		],
		72	=>	[
			{
				npcminlevel 	=> 70,
				npcs 			=> [72003,207001,221008,200055,76007],
				pointsfornpcs 	=> 250,
				tier 			=>	7,				
			},
			{
				npcminlevel 	=> 70,
				npcs 			=> [34238,54078,16976],
				pointsfornpcs	=> 80,
				tier 			=>	7,				
			},
		],
	);			
 
	my $pointsearned = 0;
	
	if ($client->InZone() && ($npc || !$npc->GetOwnerID() || !$npc->GetSwarmOwner()))
	{
		if (exists $tierhash{$zoneid})
		{
			
			foreach my $individualhasharray (keys ( @{$tierhash{$zoneid}} ))
			{
				if ($mlevel >= $tierhash{$zoneid}[$individualhasharray]->{npcminlevel})
				{
					
					if ($npc->GetNPCTypeID() ~~ @{$tierhash{$zoneid}[$individualhasharray]->{npcs}})
					{
						$pointsearned = $tierhash{$zoneid}[$individualhasharray]->{pointsfornpcs};
					}
					elsif ("nonspecific" ~~ @{$tierhash{$zoneid}[$individualhasharray]->{npcs}})
					{
						$pointsearned = $tierhash{$zoneid}[$individualhasharray]->{pointsfornpcs};
					}	
					if ($pointsearned)
					{					
						
						if (defined $client->GetGlobal("tier". $tierhash{$zoneid}[$individualhasharray]->{tier} ."_credit")) 
						{
							$client->SetGlobal(	"tier". $tierhash{$zoneid}[$individualhasharray]->{tier} ."_credit", 
												($client->GetGlobal("tier". $tierhash{$zoneid}[$individualhasharray]->{tier} ."_credit") + $pointsearned),
												5, "F");
							$client->Message(5, "You have gained " . 
											$pointsearned .
											" more Tier " . 
											$tierhash{$zoneid}[$individualhasharray]->{tier} .
											" Tokens!  This raises your total to " .
											$client->GetGlobal("tier". $tierhash{$zoneid}[$individualhasharray]->{tier} ."_credit") . "!");
						} else {
							$client->SetGlobal(	"tier". $tierhash{$zoneid}[$individualhasharray]->{tier} ."_credit", 
												$pointsearned,
												5, "F");
							$client->Message(5, "Congratulations, you have gained " . 
											$pointsearned .
											" initial Tier " . 
											$tierhash{$zoneid}[$individualhasharray]->{tier} .
											" Tokens!");
						}						
					}
				}
			}
		}
	}
}
Just one thing, and I only looked over it briefly like, is the "INITIALIZE_TALENTS" sub somewhere in the code?

Awesome work and thank you for sharing.
Reply With Quote
 

Tags
qglobals, spell quests, talents, ultimateeq

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 12:47 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3