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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2014, 07:06 AM
Trubles
Sarnak
 
Join Date: May 2014
Posts: 80
Default Random loot via PERL, non-modified loot tables.

This was made for Tomb of the forsaken, it basically adds a random item to every mob's loot table if the roll is high enough, and mobs 51+ get an extra chance at an additional item.


Code:
#sub EVENT_SPAWN {
#   $roll = int(rand(100)) + 1;
#   
#   $roll_chance = $roll - 70;
#   $roll2_chance = $roll - 85;
#   if($roll >= 88)
#   {
#        my $itemid = ( int rand 95000 ) + 1001;
#		#quest::shout("I rolled a $roll have an extra item at $roll_chance percent. Number 1 statement");
#        $npc->AddItem($itemid);
#		if($roll >= 88 && $mlevel >= 51)
#		{
#		my $itemid2 = ( int rand 95000 ) + 1001;
#		#quest::shout("I have rolled higher than 85 an extra item at $roll2_chance percent chance. Number 2 statement");
#		$npc->AddItem($itemid2);
#		}
#	}
#	
#}
Reply With Quote
  #2  
Old 05-12-2014, 11:40 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Just FYI I will be releasing my Diablo Loot generator soon. We've added new support for it in the source so it will be making its way on the Wiki here soon as another mod.
Reply With Quote
  #3  
Old 05-12-2014, 12:28 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Quote:
Originally Posted by Akkadius View Post
Just FYI I will be releasing my Diablo Loot generator soon. We've added new support for it in the source so it will be making its way on the Wiki here soon as another mod.
Excellent news!
Reply With Quote
  #4  
Old 05-12-2014, 07:28 PM
knowom's Avatar
knowom
Discordant
 
Join Date: Jun 2006
Posts: 371
Default

Quote:
Originally Posted by Akkadius View Post
Just FYI I will be releasing my Diablo Loot generator soon. We've added new support for it in the source so it will be making its way on the Wiki here soon as another mod.
Is this something to get bundled into EoC or will it be something separate from it? Sounds like a nice developer tool.
__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
Reply With Quote
  #5  
Old 05-12-2014, 07:34 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by knowom View Post
Is this something to get bundled into EoC or will it be something separate from it? Sounds like a nice developer tool.
It's just a Perl script that reads from a database table and then does insane amounts of loops based on criteria.

When I get time I will post it.
Reply With Quote
  #6  
Old 05-13-2014, 01:57 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

I spilled the beans:

http://wiki.eqemulator.org/p?Diablo_...ster_Reference

Have fun!
Reply With Quote
  #7  
Old 05-12-2014, 11:55 AM
Trubles
Sarnak
 
Join Date: May 2014
Posts: 80
Default

Adding it as a plugin?

Was never fond of modifying massive loot tables, i like to make everything simple.
Reply With Quote
  #8  
Old 05-12-2014, 12:24 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Trubles View Post
Adding it as a plugin?

Was never fond of modifying massive loot tables, i like to make everything simple.
You won't have to edit anything besides definitions. It is a lot simpler than you think. The script generates hundreds of thousands of entries on its own. It is a script you run one time before you load the server up.
Reply With Quote
  #9  
Old 05-22-2014, 04:47 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Quote:
Originally Posted by Trubles View Post
This was made for Tomb of the forsaken, it basically adds a random item to every mob's loot table if the roll is high enough, and mobs 51+ get an extra chance at an additional item.


Code:
#sub EVENT_SPAWN {
#   $roll = int(rand(100)) + 1;
#   
#   $roll_chance = $roll - 70;
#   $roll2_chance = $roll - 85;
#   if($roll >= 88)
#   {
#        my $itemid = ( int rand 95000 ) + 1001;
#		#quest::shout("I rolled a $roll have an extra item at $roll_chance percent. Number 1 statement");
#        $npc->AddItem($itemid);
#		if($roll >= 88 && $mlevel >= 51)
#		{
#		my $itemid2 = ( int rand 95000 ) + 1001;
#		#quest::shout("I have rolled higher than 85 an extra item at $roll2_chance percent chance. Number 2 statement");
#		$npc->AddItem($itemid2);
#		}
#	}
#	
#}
Does this work from global_player.pl ?
Reply With Quote
  #10  
Old 05-22-2014, 05:07 PM
Splose's Avatar
Splose
Discordant
 
Join Date: Apr 2014
Posts: 279
Default

^ global_npc

Code:
$nn = $npc->GetCleanName();
if($nn=~/bear|snake|wolf)
if($nn eq "Specific Mob") <---- case sensitive
Those will be your friends when editing globals and defaults you can make entire zones with just the zone/default.pl

Last edited by Splose; 05-22-2014 at 05:09 PM.. Reason: i
Reply With Quote
  #11  
Old 03-21-2015, 12:04 PM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

NEVER MIND GOT IT WORKING. WHILE GOING THROUGH THE FORUMS AGAIN I FOUND I WAS PUTTING IT IN THE WRONG PLACE. MOVED THE GLOBAL_NPC FILE TO C:\EQ\EQEmuServer\quests\global AND IT NOW WORKS.


love the idea of just adding a low % chance that any item can drop from any mob. so trying to get this set up but not able to get work and hoping someone can help me. i am running rof2 sever with bots, was created new a couple days ago. I have little to no understanding of what i am doing other then reading forums and copy what you great people have done. here is what i am doing to try and get this to work.

1. created a folder called templates in C:\EQ\EQEmuServer\quests

2. in the templates folder created a word doc called global_npc.pl

3. in that doc i past in the code from the first post here.

4. i delete all the # from the code.

5. for testing i change the first role from 70 to a 1 see if an item is added when i kill a mob. to me this would make it a 100% chance of getting an extra item.

6 restart sever, log in and go kill a mob...no new loot??

what did i do wrong and am i even close to how this should work lol?
thank you in advance for any advice
(even a "your so far off how this works i wouldnt know how to help" would be help full haha)

NEVER MIND GOT IT WORKING. WHILE GOING THROUGH THE FORUMS AGAIN I FOUND I WAS PUTTING IT IN THE WRONG PLACE. MOVED THE GLOBAL_NPC FILE TO C:\EQ\EQEmuServer\quests\global AND IT NOW WORKS.
Reply With Quote
  #12  
Old 09-16-2016, 11:19 PM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

Is there any way to take this code and add it so it only picks random items with an itemtype of 54?
Reply With Quote
Reply


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 09:43 PM.


 

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