View Single Post
  #11  
Old 09-02-2014, 05:27 PM
pennywse's Avatar
pennywse
Fire Beetle
 
Join Date: Sep 2012
Posts: 9
Default

Quote:
Originally Posted by Akkadius View Post
Yes but you need to actually apply the loot to NPC's are you doing that via the global_npc.pl ?
Yes I am

global_npc.pl

Code:
sub EVENT_SPAWN{
    #::: START: Akka's Diablo Loot Handler :::#
    $NTYPE = 0; #::: TRASH
    if(substr($npc->GetName(), 0, 1) eq "#" && substr($npc->GetName(), 1, 2) ne "#"){  $NTYPE = 1; } #::: NAMED
    if(substr($npc->GetName(), 0, 2) eq "##" && substr($npc->GetName(), 2, 3) ne "#"){ $NTYPE = 2; } #::: RAID
    $LID = (200000 + ($NTYPE * 1000) + $npc->GetLevel());
    if($npc->GetLoottableID() != $LID){
        $npc->ModifyNPCStat("loottable_id", (200000 + ($NTYPE * 1000) + $npc->GetLevel())); $npc->AddLootTable();
        $npc->ModifyNPCStat("loottable_id", (210000 + ($NTYPE * 1000) + $npc->GetLevel())); $npc->AddLootTable(); 
    }
    #::: END: Akka's Diablo Loot Handler :::#
}

sub EVENT_SPAWN{
	if($npc->GetEntityVariable("Scaled") != 1){ #:::  If not flagged as scaled, then scale the NPC
		quest::signalwith(50, 21, 0);
		quest::signalwith(50, $npc->GetNPCTypeID(), 0);
	}
}
global_player.pl

Code:
sub EVENT_ENTERZONE { #message only appears in Cities / Pok and wherever the Wayfarer Camps (LDON) is in.  This message won't appear in the player's home city.
  if($ulevel >= 15 && !defined($qglobals{Wayfarer})) {
    if($client->GetStartZone()!=$zoneid && ($zoneid == 1 || $zoneid == 2 || $zoneid == 3 || $zoneid == 8 || $zoneid == 9 || $zoneid == 10 || $zoneid == 19 || $zoneid == 22 || $zoneid == 23 || $zoneid == 24 || $zoneid == 29 || $zoneid == 30 || $zoneid == 34 || $zoneid == 35 || $zoneid == 40 || $zoneid == 41 || $zoneid == 42 || $zoneid == 45 || $zoneid == 49 || $zoneid == 52 || $zoneid == 54 || $zoneid == 55 || $zoneid == 60 || $zoneid == 61 || $zoneid == 62 || $zoneid == 67 || $zoneid == 68 || $zoneid == 75 || $zoneid == 82 || $zoneid == 106 || $zoneid == 155 || $zoneid == 202 || $zoneid == 382 || $zoneid == 383 || $zoneid == 392 || $zoneid == 393 || $zoneid == 408)) {
	  $client->Message(15,"A mysterious voice whispers to you, 'If you can feel me in your thoughts, know this -- something is changing in the world and I reckon you should be a part of it. I do not know much, but I do know that in every home city and the wilds there are agents of an organization called the Wayfarers Brotherhood. They are looking for recruits . . . If you can hear this message, you are one of the chosen. Rush to your home city, or search the West Karanas and Rathe Mountains for a contact if you have been exiled from your home for your deeds, and find out more. Adventure awaits you, my friend.'");
	}
  }
}

sub EVENT_COMBINE_SUCCESS
{
    if ($recipe_id =~ /^1090[4-7]$/) {
        $client->Message(1,
            "The gem resonates with power as the shards placed within glow unlocking some of the stone's power. ".
            "You were successful in assembling most of the stone but there are four slots left to fill, ".
            "where could those four pieces be?"
        );
    }
    elsif ($recipe_id =~ /^10(903|346|334)$/) {
        my %reward = (
            melee  => {
                10903 => 67665,
                10346 => 67660,
                10334 => 67653
            },
            hybrid => {
                10903 => 67666,
                10346 => 67661,
                10334 => 67654
            },
            priest => {
                10903 => 67667,
                10346 => 67662,
                10334 => 67655
            },
            caster => {
                10903 => 67668,
                10346 => 67663,
                10334 => 67656
            }
        );
        my $type = plugin::ClassType($class);
        quest::summonitem($reward{$type}{$recipe_id});
        quest::summonitem(67704);
        $client->Message(1,"Success");
    }
}

sub EVENT_ENTERZONE{
	if(!$entity_list->GetNPCByNPCTypeID(50)){ quest::spawn2(50, 0, 0, 0, 0, 0, 0); $client->NPCSpawn($entity_list->GetNPCByNPCTypeID(50), "add", 1); } #::: Automatic Scaling
}
Reply With Quote