PDA

View Full Version : Need a SQL Query Script Please


dew1960
08-14-2012, 02:51 AM
My SQL skills are rather rusty and lacking in general.

I am hoping someone can help me out with this or already has a script I could use to do what I want.

You know all those items that drop that have no sell value like tradeskill items in Gloomingdeep? Mostly from the DoN tradeskill recipes that I am not sure of but don't think are even in the current game. You know the mangled pelt, the silk drops, etc?

I would like to be able to run a script to set a basic value to them depending on the level of the tradeskill combine. So that the items that are for higher lvl tradeskills are worth more but so that all can be sold to a vendor.

My server is new and most people just don't bother with a lot of those tradeskill recipes even if they do still exist, or is it just me and my perception?

Anyhow, that is what I would like to do for my own server. ON the live servers now, these all have some value. It's not anything you would go farm them for, but at least you get something for them instead of having to sort out your bags and not be able to "loot all" with the proper client because some of it is just junk, LOL.

It would also be cool if I had a script that would do that for every item that has no value or is set for no sale. I could go through and do it individually with my peqphpeditor but that would take forever and a day, LOL.

Thanks for helping if you can.



I did a Google and forum search and I could not find any thing posted for this although there were some similar posts and general scripts for other stuff like plat leveling.

So, if you can help me out or point me to where I need to get this from, I would definitely appreciate it. Thank you.

Tabasco
08-14-2012, 08:49 AM
UPDATE `tradeskill_recipe` RIGHT JOIN `tradeskill_recipe_entries` ON (tradeskill_recipe.id = recipe_id) RIGHT JOIN items ON (items.id = item_id)
SET price = trivial * 10, nodrop = 1
WHERE componentcount > 0 AND iscontainer = 0 AND price = 0


I've tested the select form of that but nothing else.
That should set the price to trivial value * 10 and allow the item to be traded. I don't think vendors will take a nodrop item, but I could be wrong.

dew1960
08-14-2012, 10:40 AM
UPDATE `tradeskill_recipe` RIGHT JOIN `tradeskill_recipe_entries` ON (tradeskill_recipe.id = recipe_id) RIGHT JOIN items ON (items.id = item_id)
SET price = trivial * 10, nodrop = 1
WHERE componentcount > 0 AND iscontainer = 0 AND price = 0


I've tested the select form of that but nothing else.
That should set the price to trivial value * 10 and allow the item to be traded. I don't think vendors will take a nodrop item, but I could be wrong.

Thank you! I think I saw a variable in the db ruleset to override no drop, but it might have just been for GM's. I am sure this will help tho.

I appreciate it. :)