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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 05-23-2018, 03:48 PM
swansona65
Fire Beetle
 
Join Date: Oct 2013
Posts: 11
Default

Ok so i put the below in both the zone/default.pl file and i tried adding it to the quests/global folder with the file name global_npc.pl and neither are spawning npcs with loot. I must be doing something wrong. I am trying to figure out an easy way to add a list of item ID's to all the npcs in the zone with a probability of around 90-95%. Let me know if there is a more streamlined method of implementation.

sub EVENT_SPAWN{
my @drops = (50516, 50011, 50518, 50014, 50012, 50015, 50013, 50017, 50016, 50018, 50029, 50027, 50031, 50032, 50028, 50030, 50026, 50507, 50510, 50501, 50512, 50503, 50514, 50515, 50021, 50019, 50022, 50020, 50023, 50024, 50025, 50506, 50007, 50005, 50006, 50010, 50008, 50009, 50513, 50502, 50508, 50511, 50517, 50504, 50505);#define loot drops here
if(quest::ChooseRandom(1..100) >= 95){ #probability an item will be added
$item = $drops[int(rand @drops)];
$npc->AddItem($item);
}
}
Reply With Quote
 

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