Loading...   

This file is live on EZ Server as of 4/12/16, located in .../quests/global/global_npc.pl (with drop chances either omitted or replaced with XXX)

sub EVENT_SPAWN
{
	my $npc_name = $npc->GetCleanName();
    my $npc_id = $npc->GetNPCTypeID();
    my @minrc = (132064); # minor rainbow crystal
	my @lesrc = (132065); # lesser rainbow crystal
	my @gsotages = (132070); # gemstone of the ages
	my @soimpatience = (135062); # stone of impatience
	my @hrstone = ();
	
	# hr = heroic resist stone	[m:l]rc = [minor:lesser] rainbow crystal
	# soi = stone of impatience	gsoa = gemstone of the ages
	my %zoneloots = (
		# zonesn => [hr item id, hr, mrc, lrc, soi, gsoa]
		# OMITTED TIER LOOT VALUES
		# OMITTED TIER LOOT VALUES
	);
	
	my %ldonloots = (
	# zonesn => [floor charm id, last floor charm id, charm drop rate, gem drop number, gem drop rate]
		"mmcd" => [99027, -1, XXX, 4, 15], 	# ldon 2, brawlers
		"takd" => [99028, 99027, XXX, 4, 10],	# ldon 3, guardian
		"ruji" => [99029, 99028, XXX, 5, 15],	# ldon 4, oracle
		"guka" => [99030, 99029, XXX, 5, 10], # ldon 5, sorcerer
		"mirh" => [-1, -1, XXX, 6, 15]		# ldon 6, roulette
	);	
	
	if(exists($zoneloots{"$zonesn"}[0]))
	{
		if($zoneloots{"$zonesn"}[0] > 0) { @hrstone = ($zoneloots{"$zonesn"}[0]); plugin::EZAddLoot(1, $zoneloots{"$zonesn"}[1], @hrstone); } # if HR stone id exists, add it
		if($zoneloots{"$zonesn"}[2] > 0) { plugin::EZAddLoot(1, $zoneloots{"$zonesn"}[2], @minrc); }	# Drop 1 Minor Rainbow Crystal, 1:? drop
		if($zoneloots{"$zonesn"}[3] > 0) { plugin::EZAddLoot(1, $zoneloots{"$zonesn"}[3], @lesrc); } 	# Drop 1 Lesser Rainbow Crystal, 1:? drop
		if($zoneloots{"$zonesn"}[4] > 0) { plugin::EZAddLoot(1, $zoneloots{"$zonesn"}[4], @soimpatience); } # Drop 1 Stone of Impatience, 1:? drop
		if($zoneloots{"$zonesn"}[5] > 0) { plugin::EZAddLoot(1, $zoneloots{"$zonesn"}[5], @gsotages); } # Drop 1 Gemstone of the Ages PH (Token of Truth), 1:? drop
	}
	elsif(exists($ldonloots{"$zonesn"}[0]))
	{
		my @money = (10025, 10028, 10029, 10030, 10031, 10012, 10032, 10033, 10034, 10035, 10036, 10037, 22503); #gems for LDONs
		my @charms = ();
		my @prev_charm = ();
		
		if($ldonloots{"$zonesn"}[0] == -1) { @charms = (99027, 99028, 99029, 99030); } # Charm Roulette (ldon 6)
		else { @charms = ($ldonloots{"$zonesn"}[0]); } # set floor appropriate charm (ldon 2 - 5)
		
		if($ldonloots{"$zonesn"}[1] > 0) { @prev_charm = $ldonloots{"$zonesn"}[1]; my $rate = $ldonloots{"$zonesn"}[2] * 2; plugin::EZAddLoot(1, $rate, @prev_charm); } # set previous floor charm, if exists, at 2x current zone's drop rate 
		if($ldonloots{"$zonesn"}[2] > 0) { plugin::EZAddLoot(1, $ldonloots{"$zonesn"}[2], @charms); } # Drop zone specific charm(s)
		if($ldonloots{"$zonesn"}[3] > 0 && $ldonloots{"$zonesn"}[4] > 0) { plugin::EZAddBatchLoot($ldonloots{"$zonesn"}[3], $ldonloots{"$zonesn"}[4], @money); } # batch drop gems
	}
}

	# REST OMITTED
	# REST OMITTED
	# REST OMITTED
	# REST OMITTED