Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2015, 12:44 AM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default Couple of Questions about spawning NPC's and Loottables.

So I have been trying to figure this out for a few days now and am stumped.

Question 1) How would I go about adding an item to drop globally across the server from any creature that is above level 51?

I cannot seem to see a way to globally add a dropped item ( I did look at the Activating defiant drops post on the forums and got some ideas...but nothing panned out)

So overview Is there a way to make it so any creature over level 51 has a 1% chance to drop this specific item?


Question 2) In attempts to edit the respawn time for some Npc's I run into this issue.

For example.

I want to recreate The Va'Dyn in Akehva and give that NPC a 1 hour spawn time.

To do this atm I have to use #Npctype spawn "Va'dyn Id#"
Then target it and type #npcspawn create.

This works fine aside from that fact that the newly created Va'Dyn has no stats. It copies the HP and nothing else into the Database. Min damage max damage attack resists...

I did edit the respawn times of all creatures with respawns higher than an hour but many creatures do not actively spawn so I have to add them then do it but it messes up their stats when I do this?

Anyone have a better way to do this?


******EDIT*****

Ok it seems like maybe I can use the dbspawn2 command instead and achieve my goals. Would that be correct?
Reply With Quote
  #2  
Old 10-09-2015, 01:34 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

1. You can use global_npc.pl in your global folder to do global NPC drops on NPCs above level 51 like this:
Code:
sub EVENT_SPAWN {
    if ($mlevel > 51) {
        if (quest::ChooseRandom(1..100) == 1) {
            $npc->AddItem(ID);
        }
    }
}
2. #npcspawn create creates a new NPC which explains why it copies some data. It also adds a spawn entry based on that new NPC. Try using #npcspawn add and modifying the spawn time that way.
Reply With Quote
  #3  
Old 10-09-2015, 06:58 AM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

Cool stuff Kingly!
Reply With Quote
  #4  
Old 10-09-2015, 08:07 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Haha, thanks, writing stuff like that is fun. Wrote something on Raid Addicts that gives double loot based on a client have a double loot buff, pretty fun stuff.
Reply With Quote
  #5  
Old 10-09-2015, 03:30 PM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

Oh! that sounds sweet on the double loot buff!! You folks that can write this stuff amaze me. I am a neeeewwwwwbie when it comes to coding.

=)
Reply With Quote
  #6  
Old 10-09-2015, 04:58 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Haha, well just message me if you need any assistance with anything.
Reply With Quote
  #7  
Old 10-14-2015, 02:46 PM
RussellMatt27
Fire Beetle
 
Join Date: Aug 2013
Location: United States
Posts: 18
Default

This is perfect! I was looking for something like that rather than having to add the item to each loot drop entry in the DB. Thanks!
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 06:02 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3