Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2011, 01:22 AM
Burningsoul
Banned
 
Join Date: Oct 2009
Posts: 312
Default

That looks awesome Kayen, so simple I can't believe I overlooked it. I fixed the typo in sub EVENT_SPAWN and changed a few bits, saved it as default.pl in tutorialb. I zone in, #repop zone just for OCD's sake, and pulled a train of 30-ish mobs. I'm not noticing it taking effect.

Is it because it uses an if, but doesn't include elseif afterwards? 123309 is near the end of the items table, so I should be seeing quite a variety of items dropping, even if they're useless placeholders or whatnot.

Also tried changing quest::addloot($Select_Itemid); to
quest::addloot($Select_Itemid, charges = 0, equipitem = true)
And all I'm seeing in zone.exe is warning that missing "'s around charges and equipitem might break later revisions.

Code:
sub EVENT_SPAWN
{
 
my $DropChance = int(rand(99)) + 1;

if ($DropChance < 99)
{
my $Select_Itemid = int(rand(123309))+1;

quest::addloot($Select_Itemid);
}
}
I set the $DropChance < 99 just to ensure I wouldn't be on the losing side of the RNG during testing.
Reply With Quote
  #2  
Old 12-24-2011, 03:08 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

I attached this script to npc id 9001 (deathfist pawn), spawned a bunch of them, and found a variety of loot on them they would not normally have with a wide variety of IDs.

I changed it to +1001 since that is the first valid item ID.

Code:
sub EVENT_SPAWN
{
	my $DropChance = int(rand(99)) + 1;
	if($DropChance < 99)
	{
		my $Select_Itemid = int(rand(100000))+1001;
		quest::addloot($Select_Itemid);
	}
}
If you only want valid items you might try looping the selection until you get one. This will tell you how to figure out if the item is valid or not: http://eqemulator.org/forums/showthread.php?t=34188
Reply With Quote
Reply

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 05:36 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