Log in

View Full Version : Activate Defiant Drops


werebat
06-28-2011, 07:11 PM
Hey guys, here is an SQL that will activate the Defiant drops. I wrote this when I realized the Defiant gear was not dropping. It is set to allow all mobs a 4% chance of dropping Defiant gear based on the mob level and required level of the item. In other words a level 10 mob will have a chance at dropping Simple Defiant gear and not Ornate Defiant. As always, back up your database before running. Make sure you do not have any lootdrop ids over 100000 since that is the id I am using. if you do just edit these numbers as you see fit.


#add defiant drops
insert into lootdrop values (100001, 'Crude Defiant');
insert into lootdrop_entries select 100001, id, 1, 1, 2 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100001, 1, 4 from npc_types where loottable_id > 0 and level between 0 and 4;

insert into lootdrop values (100002, 'Simple Defiant');
insert into lootdrop_entries select 100002, id, 1, 1, 2 from items where name like 'Simple Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100002, 1, 4 from npc_types where loottable_id > 0 and level between 5 and 14;

insert into lootdrop values (100003, 'Rough Defiant');
insert into lootdrop_entries select 100003, id, 1, 1, 2 from items where name like 'Rough Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100003, 1, 4 from npc_types where loottable_id > 0 and level between 15 and 25;

insert into lootdrop values (100004, 'Ornate Defiant');
insert into lootdrop_entries select 100004, id, 1, 1, 2 from items where name like 'Ornate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100004, 1, 4 from npc_types where loottable_id > 0 and level between 26 and 36;

insert into lootdrop values (100005, 'Flawed Defiant');
insert into lootdrop_entries select 100005, id, 1, 1, 2 from items where name like 'Flawed Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100005, 1, 4 from npc_types where loottable_id > 0 and level between 37 and 47;

insert into lootdrop values (100006, 'Intricate Defiant');
insert into lootdrop_entries select 100006, id, 1, 1, 2 from items where name like 'Intricate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100006, 1, 4 from npc_types where loottable_id > 0 and level between 48 and 58;

insert into lootdrop values (100007, 'Elaborate Defiant');
insert into lootdrop_entries select 100007, id, 1, 1, 2 from items where name like 'Elaborate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100007, 1, 4 from npc_types where loottable_id > 0 and level between 59 and 69;

insert into lootdrop values (100008, 'Elegant Defiant');
insert into lootdrop_entries select 100008, id, 1, 1, 2 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100008, 1, 4 from npc_types where loottable_id > 0 and level >= 70;

killinyousoftly
06-28-2011, 10:01 PM
thanx for the code it worked geat!

Zothen
07-12-2011, 03:25 AM
Just keep in mind that

1. many mobs dont even got a loottable (id)

2. some mobs share the same loottable so there may be duplicate entries after your sql commands ( maybe "distinct" is preventing that, i am no sql expert ;) )

werebat
07-12-2011, 08:44 AM
Just keep in mind that

1. many mobs dont even got a loottable (id)

2. some mobs share the same loottable so there may be duplicate entries after your sql commands ( maybe "distinct" is preventing that, i am no sql expert ;) )

Yes that is true, this was just a quick and dirty sql for the most part. Only mobs with loottables will activate. And the 'distinct' should prevent the duplicates as you stated.

I actually encountered a forest drakeling with a crude defiant spear. You could see the spear graphic along his side and it looked like it was jousting. Wish I had captured the jpg.

I was working to make it more intuitive by insuring that only humanoid mobs drop the items but got sidetracked. I will resume at some point. I am a C++/SQL developer and have been spending more time looking at the code lately.

Zothen
07-12-2011, 08:58 AM
I think the idea behind defiant gear is that almost every mob can drop it.

And I thought animal mobs cant show equipped gear, I am really surprised about your story.

sorvani
07-12-2011, 09:08 AM
Animal mobs all over show equipped gear

Shiny151
07-12-2011, 10:55 AM
This is great werebat. Thank you! Dumb question; but just to be sure, if i wanted to change the drop percentage would I just change the 4 in the last line of each group to reflect that?

werebat
07-12-2011, 04:18 PM
This is great werebat. Thank you! Dumb question; but just to be sure, if i wanted to change the drop percentage would I just change the 4 in the last line of each group to reflect that?

Yes. the 4 is the percentage value. I should have included the column headers, but I just copied what I had in my adjustment file.

I have a bunch of sql's to do various things like preventing aggro from gray mobs (the ones that dont give experience anymore), setting the OOC combat regen values and corpse rules. Pretty much things I would have liked to have seen in live.

werebat
07-12-2011, 04:25 PM
I think the idea behind defiant gear is that almost every mob can drop it.

And I thought animal mobs cant show equipped gear, I am really surprised about your story.

True, but I dont like the idea of snakes dropping breastplates for example. The current script allows all mobs to drop. But I would like to alter it to just allow humanoid mobs to drop.

And regular weapons dont show on the animal mobs, but the defiant spear did, really weird but it would have made a great screenshot. If I see it again I will screenshoot it, F9 I think. To be specific it was a Thorn Drakeling with a Crude Defiant Spear in Misty Thicket.

revloc02c
07-12-2011, 08:46 PM
I only played EQ up to about level 53 on live, and that was a long time ago. (I love running my own server, glad this stuff exists.)

So I am just wondering what Defiant armor is. I can look it up on Zam just fine, but I gather there's more to it that just a bunch of similarly named items. Does it have some sort of progression or levels or something?

Zothen
07-13-2011, 02:07 AM
True, but I dont like the idea of snakes dropping breastplates for example.

I see. If you browse the drop lists at magelo or ZAM, you'll see even animals drop defiant gear on live servers. Not all though.

For me, its ok, cause my mobs drop them only at a 1/100 chance, so you wont see them too often. If only humanoids carry all the good stuff, why fight animals at all? I like the idea that even a simple spiderling could drop uber gear. ;)

Shiny151
07-14-2011, 11:12 AM
Would anything lower than 1 percent work in terms of a drop rate? Does the system recognize decimals?

I like the idea of Defiant dropping but making it oober rare.

Zothen
07-15-2011, 03:19 AM
Unfortunetely no. The algorithm uses integers for random numbers, so probabilities are 1-100.

Only item chances per lootdrop table can be larger numbers, but that means you have to put some dummy drops in the same defiant lootdrop to make them rarer than 1/100.

Baruuk
09-26-2011, 08:49 PM
Thanks Werebat - but I can't seem to get this to work. I'm hoping someone can help. To test out the code on my server, I took the first section (pasted below) and put it into a SQL file and sourced it in. Things went fine. I reloaded the world, killed about 20 mobs under lvl 5 and never saw 1 drop of Defiant armor. I then opened George's NPC/Loot tool (just started using), selected several random lvl 1-4 mobs in various zones and I see that they have a Lootdrop_ID listed for the entry I just imported (ie: 100001) with a 20% chance. However, on the right pane where Item_Id, Equipped, Chance, etc is listed in the tool, I see no entries for the armor. Did I miss a step to get that in there? I see other loot entries for mobs - ie - for a bat I see bat fur, etc. I made certain I had no Lootdrop_IDs above 90,000. I can however, simply go in game and do a #fi Crude Defiant and I get a listing of the various armor/weapons. Any thoughts on what might be wrong?

Here's the code I sourced in as a test:

#add defiant drops
insert into lootdrop values (100001, 'Crude Defiant');
insert into lootdrop_entries select 100001, id, 1, 1, 2 from items where name like 'Crude Defiant%' and nodrop = 0;
insert into loottable_entries select distinct loottable_id, 100001, 1, 20 from npc_types where loottable_id > 0 and level between 0 and 4;

Any help is appreciated - looking forward to having defiant in.

Thanks in advance!

werebat
09-26-2011, 09:51 PM
The sql looks for the Defiant items that are set to nodrop of 0. Are they still 0? if they were changed to 1 then it wont find them. I used a fresh database when I created it so check to see if anything has changed with the defiant items.

Baruuk
09-26-2011, 09:58 PM
Hmm trying this again with the pasted code below. You had nodrop = 1 above. However when I look at Crude Defiant items in the database they are marked as tradeable. I'm trying this again with:

#add defiant drops
insert into lootdrop values (100005, 'Crude Defiant');
insert into lootdrop_entries select 100005, id, 1, 1, 2 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100005, 1, 4 from npc_types where loottable_id > 0 and level between 0 and 4;

Baruuk
09-26-2011, 10:11 PM
Yep that did it - thanks Werebat. That's what I get for modifying the code :) I had changed the nodrop to 0 instead of 1. It populated fine this time. Now I just need code to remove nodrop from items :) I'll look that up thanks again!

Baruuk
09-26-2011, 10:40 PM
Pardon my asking, but what would be the easiest way to completely remove a Lootdrop_ID from all NPCs from lvl 1-4? For example, I had created the Lootdrop_ID of 100001 for those level ranges, but now that I no longer need it (and it is in every mob lvl 1-4's loot table), I'd like to remove it. I'm guessing it's a SQL query - I'm just a tad new to those.

Thanks!

Congdar
09-27-2011, 10:47 AM
Now I just need code to remove nodrop from items :) I'll look that up thanks again!


update variables set value=1 where varname='DisableNoDrop';

Baruuk
09-27-2011, 02:32 PM
Thanks bud.

provocating
12-19-2011, 02:47 PM
Anyone find a work around to get these drops rates lower ? I too like the idea of any mob having the potential to drop something, but 1% seems way too high. I can already tell from a week of killing that 1% global will be too high. Maybe .05 would be a good number. What about maybe a filler item that is nothing ? I guess that would not work either though.

werebat
12-20-2011, 09:50 AM
You could "dilute" it. For example, if you have a lootdrop made up of a crude defiant bracer set at 1%, then it will have a 1% chance of dropping. Now if you add a ration or some other item to that lootdrop, then there is a 1% chance of dropping either one based on their pcts.

Ration 50%
Defiant Armor Piece 50%
Lootdrop at 1% means there is a .05 (half a percent) chance of dropping the defiant piece.

Ration 90%
Defiant Armor Piece 10%
Lootdrop at 1% means there is a .01 (tenth of a percent) chance of dropping the defiant piece.

That is how I understand it. I have a solo server so when a defiant drop occurs it usually not usable by my class so it is still rare for me to find one I can actually use. I also did the same with the Melee Augments and Gloomingdeep items since I dont use the tutorial.

provocating
12-20-2011, 10:27 AM
In another post, the same thing was suggested. I think I am going to do that.

Shiny151
05-25-2012, 12:20 AM
Would anyone have an update to this code? In the most recent database this code doesn't work anymore. I get an error of:

* SQL Error: Column count doesn't match value count at row 1 */

Thanks!

Aeryn
05-25-2012, 05:31 AM
Would anyone have an update to this code? In the most recent database this code doesn't work anymore. I get an error of:

* SQL Error: Column count doesn't match value count at row 1 */

Thanks!

Just needs min and max levels adding to lootdrop entries


#add defiant drops
insert into lootdrop values (100001, 'Crude Defiant');
insert into lootdrop_entries select 100001, id, 1, 1, 2, 0, 127 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100001, 1, 4 from npc_types where loottable_id > 0 and level between 0 and 4;

insert into lootdrop values (100002, 'Simple Defiant');
insert into lootdrop_entries select 100002, id, 1, 1, 2, 0, 127 from items where name like 'Simple Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100002, 1, 4 from npc_types where loottable_id > 0 and level between 5 and 14;

insert into lootdrop values (100003, 'Rough Defiant');
insert into lootdrop_entries select 100003, id, 1, 1, 2, 0, 127 from items where name like 'Rough Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100003, 1, 4 from npc_types where loottable_id > 0 and level between 15 and 25;

insert into lootdrop values (100004, 'Ornate Defiant');
insert into lootdrop_entries select 100004, id, 1, 1, 2, 0, 127 from items where name like 'Ornate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100004, 1, 4 from npc_types where loottable_id > 0 and level between 26 and 36;

insert into lootdrop values (100005, 'Flawed Defiant');
insert into lootdrop_entries select 100005, id, 1, 1, 2, 0, 127 from items where name like 'Flawed Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100005, 1, 4 from npc_types where loottable_id > 0 and level between 37 and 47;

insert into lootdrop values (100006, 'Intricate Defiant');
insert into lootdrop_entries select 100006, id, 1, 1, 2, 0, 127 from items where name like 'Intricate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100006, 1, 4 from npc_types where loottable_id > 0 and level between 48 and 58;

insert into lootdrop values (100007, 'Elaborate Defiant');
insert into lootdrop_entries select 100007, id, 1, 1, 2, 0, 127 from items where name like 'Elaborate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100007, 1, 4 from npc_types where loottable_id > 0 and level between 59 and 69;

insert into lootdrop values (100008, 'Elegant Defiant');
insert into lootdrop_entries select 100008, id, 1, 1, 2, 0, 127 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 100008, 1, 4 from npc_types where loottable_id > 0 and level >= 70;

Not something i use myself, but should work

Shiny151
05-25-2012, 09:03 AM
Just needs min and max levels adding to lootdrop entries

Yes I noticed that too and tried this. For some reason I received the same error. I'll try it again this weekend. Perhaps I'm overlooking something.

Thanks!

Warking
10-03-2012, 01:35 AM
I am also getting the same error:

SQL Error: Column count doesn't match value count at row 1 */

werebat
10-03-2012, 09:25 AM
The recent loot system changed the table structures. I fixed it to match the new table structures but have not posted yet.

CruelCahal
10-13-2012, 01:30 AM
For anyone still looking for a working Defiant Loottable, try this, it should all be good.

#add defiant drops
insert into lootdrop values (300000, 'Crude Defiant');
insert into lootdrop_entries select 300000, id, 1, 1, 2, 0, 127, 1 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300000, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 0 and 4;

insert into lootdrop values (300001, 'Simple Defiant');
insert into lootdrop_entries select 300001, id, 1, 1, 2, 0, 127, 1 from items where name like 'Simple Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300001, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 5 and 14;

insert into lootdrop values (300002, 'Rough Defiant');
insert into lootdrop_entries select 300002, id, 1, 1, 2, 0, 127, 1 from items where name like 'Rough Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300002, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 15 and 25;

insert into lootdrop values (300003, 'Ornate Defiant');
insert into lootdrop_entries select 300003, id, 1, 1, 2, 0, 127, 1 from items where name like 'Ornate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300003, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 26 and 36;

insert into lootdrop values (300004, 'Flawed Defiant');
insert into lootdrop_entries select 300004, id, 1, 1, 2, 0, 127, 1 from items where name like 'Flawed Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300004, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 37 and 47;

insert into lootdrop values (300005, 'Intricate Defiant');
insert into lootdrop_entries select 300005, id, 1, 1, 2, 0, 127, 1 from items where name like 'Intricate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300005, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 48 and 58;

insert into lootdrop values (300006, 'Elaborate Defiant');
insert into lootdrop_entries select 300006, id, 1, 1, 2, 0, 127, 1 from items where name like 'Elaborate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300006, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 59 and 69;

insert into lootdrop values (300007, 'Elegant Defiant');
insert into lootdrop_entries select 300007, id, 1, 1, 2, 0, 127, 1 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300007, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level >= 70;



You can, of course, change the loottable ID to values other than 300000-300007 or any other value you would prefer to change but this will get you set up for the drops.

Warkral
11-24-2012, 12:34 PM
For anyone still looking for a working Defiant Loottable, try this, it should all be good.

#add defiant drops
insert into lootdrop values (300000, 'Crude Defiant');
insert into lootdrop_entries select 300000, id, 1, 1, 2, 0, 127, 1 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300000, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 0 and 4;

insert into lootdrop values (300001, 'Simple Defiant');
insert into lootdrop_entries select 300001, id, 1, 1, 2, 0, 127, 1 from items where name like 'Simple Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300001, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 5 and 14;

insert into lootdrop values (300002, 'Rough Defiant');
insert into lootdrop_entries select 300002, id, 1, 1, 2, 0, 127, 1 from items where name like 'Rough Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300002, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 15 and 25;

insert into lootdrop values (300003, 'Ornate Defiant');
insert into lootdrop_entries select 300003, id, 1, 1, 2, 0, 127, 1 from items where name like 'Ornate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300003, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 26 and 36;

insert into lootdrop values (300004, 'Flawed Defiant');
insert into lootdrop_entries select 300004, id, 1, 1, 2, 0, 127, 1 from items where name like 'Flawed Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300004, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 37 and 47;

insert into lootdrop values (300005, 'Intricate Defiant');
insert into lootdrop_entries select 300005, id, 1, 1, 2, 0, 127, 1 from items where name like 'Intricate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300005, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 48 and 58;

insert into lootdrop values (300006, 'Elaborate Defiant');
insert into lootdrop_entries select 300006, id, 1, 1, 2, 0, 127, 1 from items where name like 'Elaborate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300006, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level between 59 and 69;

insert into lootdrop values (300007, 'Elegant Defiant');
insert into lootdrop_entries select 300007, id, 1, 1, 2, 0, 127, 1 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300007, 1, 4, 1, 0 from npc_types where loottable_id > 0 and level >= 70;



You can, of course, change the loottable ID to values other than 300000-300007 or any other value you would prefer to change but this will get you set up for the drops.

This worked perfectly. For those of us without the knowledge to write this, thank you very much.

LordAdakos
03-03-2013, 09:40 AM
For the new loot system:


insert into lootdrop values (100001, 'Crude Defiant');
insert into lootdrop_entries select 100001, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Crude Defiant%';
insert into loottable_entries select distinct loottable_id, 100001, 1, 1, 0, 4 from npc_types where loottable_id > 0 and level between 0 and 14;


I think ... (the script works, but im still figuring out possibilities)

Shiny151
03-05-2013, 09:00 PM
Has anyone noticed if you add defiant based on these scripts you'll sometimes find mobs that are dropping defiant gear that's out of their range? For example, if i only want Elegant Defiant to drop by using this:

insert into lootdrop values (300007, 'Elegant Defiant');
insert into lootdrop_entries select 300007, id, 1, 1, 2, 0, 127, 1 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 300007, 1, 4, 1, 1 from npc_types where loottable_id > 0 and level >= 70;

...only mobs equal or higher than level 70 should be dropping this. If I start with a clean database and use the above and then use George's Loot Editor to examine the mobs drop tables in BoT, I see random mobs below level 70 with Elegant gear in their drop tables. How can I prevent this so it stays strictly in range of the mobs level?

vkrr
04-01-2013, 01:38 PM
I noticed that too shiny, I first thought it was a bug. Upon closer inspection it appears that there may be a loottable shared that is getting the same application of the loottable_entry. I havnt found a good fix yet, but i hope this info helps

Shiny151
04-01-2013, 03:23 PM
I wonder if there's some sort of exclusion we can apply to the sql that if any mob tied to a table is lower than the the required range of the defiant gear that it doesn't add any defiant to the table. I'd prefer that option rather than having to clean up all the loot tables.

vkrr
04-01-2013, 03:47 PM
you'd have to compare the loottable assigned to the mob to any other mob with the assigned loot table.
Someone who knows more about SQL than I would have to help you out, though.

Theorycrafting:
Compare loottable assigned to any mob with all other mobs who have the same loottable
if any of them are lower than X, don't add it, otherwise, add it.

maybe something like this for starters (assuming these are the right table and column names)

select * from lootdrop INNER JOIN npc_types on lootdrop.id = npc_types.lootdrop_id;
select lootdrop .*,npc_types .* from lootdrop ,npc_types where lootdrop.id = npc_types.lootdrop_id;

Shiny151
04-02-2013, 08:39 AM
I'm not versed well enough to figure this one out; I'm only slightly dangerous with sql. Perhaps you and werebat can put your heads together and figure this one out. Seems like you're on the right path though.


you'd have to compare the loottable assigned to the mob to any other mob with the assigned loot table.
Someone who knows more about SQL than I would have to help you out, though.

Theorycrafting:
Compare loottable assigned to any mob with all other mobs who have the same loottable
if any of them are lower than X, don't add it, otherwise, add it.

maybe something like this for starters (assuming these are the right table and column names)

select * from lootdrop INNER JOIN npc_types on lootdrop.id = npc_types.lootdrop_id;
select lootdrop .*,npc_types .* from lootdrop ,npc_types where lootdrop.id = npc_types.lootdrop_id;

MisifuWiki
05-15-2013, 08:28 PM
For to me any of the scrips posted in this thread works for me at peqdb 2506 , anyone can make defiant works ??

MisifuWiki
05-21-2013, 11:40 AM
I try differents scripts and finally i got one wich work with db rev2506 /Cheers !!!! Then i will share with you all.


insert into lootdrop values (200002, 'Crude Defiant');
insert into lootdrop_entries select 200002, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Crude Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200002, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 1 and 4;

insert into lootdrop values (200003, 'Simple Defiant');
insert into lootdrop_entries select 200003, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Simple Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200003, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 5 and 14;

insert into lootdrop values (200004, 'Rough Defiant');
insert into lootdrop_entries select 200004, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Rough Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200004, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 15 and 25;

insert into lootdrop values (200005, 'Ornate Defiant');
insert into lootdrop_entries select 200005, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Ornate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200005, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 26 and 36;

insert into lootdrop values (200006, 'Flawed Defiant');
insert into lootdrop_entries select 200006, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Flawed Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200006, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 37 and 47;

insert into lootdrop values (200007, 'Intrincate Defiant');
insert into lootdrop_entries select 200007, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Intrincate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200007, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 48 and 58;

insert into lootdrop values (200008, 'Elaborate Defiant');
insert into lootdrop_entries select 200008, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Elaborate Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200008, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level between 59 and 69;

insert into lootdrop values (200009, 'Elegant Defiant');
insert into lootdrop_entries select 200009, id, 1, 1, 3, 0, 0, 127, 1 from items where name like 'Elegant Defiant%' and nodrop = 1;
insert into loottable_entries select distinct loottable_id, 200009, 1, 1, 0, 10 from npc_types where loottable_id > 0 and level >= 70;


And this is all folks !!!

warkid
11-09-2013, 10:11 AM
what do i edit to increase drop rate? the 10 or something els?

Lord of Steel
02-21-2014, 03:01 PM
I wanted to remove defiant and the googles brought me here.

So here is what i just ran on my db if anyone wants to remove the chance for these to drop

UPDATE peq.loottable_entries
JOIN peq.lootdrop_entries ON peq.lootdrop_entries.lootdrop_id = peq.loottable_entries.lootdrop_id
JOIN peq.items ON peq.items.id = peq.lootdrop_entries.item_id
SET peq.loottable_entries.probability = 0
WHERE peq.items.name like "%defiant%" AND peq.items.lore like "%For%"


haven't tested it yet in game but it should work

Furniture
02-21-2014, 05:07 PM
just thought i should add that while that query will remove defiant drops, theres many more pieces of defiant type gear that still drops, as well as augments, tradeskill items, etc.

Just a warning for those looking to get rid of all out of era stuff like defiant out of their database

dagulus2
02-22-2014, 10:05 AM
shouldent this be 'SET peq.lootdrop_entries.probability = 0' rather than 'SET peq.loottable_entries.probability = 0' ?

sorvani
02-22-2014, 05:37 PM
Depends. If the defiant is always on its own loot drop you can. Otherwise setting the specific entry to zero makes just that item in the loot drop not get rolled.

werebat
02-23-2014, 08:03 AM
This sql will remove all defiant from lootdrops. It also includes the combatant and adept stuff which is pretty much defiant for other slots.

delete from lootdrop_entries
where item_id in (select id from items where name regexp '(Crude|Simple|Rough|Ornate|Flawed|Intricate|Elabo rate|Elegant)( Defiant| Combatant| Adept)');

Bohbo
12-25-2014, 12:18 PM
With some of the new DB Fields / Updates the code doesn't match the column count. For anyone having trouble try this structure.

See the 2 highlighted values. This will match up the column count.


insert into lootdrop_entries select 100001, id, 1, 1, 2, 0, 0, 127, 1 from items where name like 'Crude Defiant%' and nodrop = 1;