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 12-05-2010, 12:49 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Question SQL HELP : Recipes and Plat

As a quick fix, I'd like to make any item that is a reward from successful combine from a trade skill to be edited to 0 price to prevent any pp profits in tradeskills. This could probably be done with a mysql query cross referencing tradeskill_recipe_entries table with items table. Any experts can help?
Reply With Quote
  #2  
Old 12-05-2010, 01:06 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by thepoetwarrior View Post
As a quick fix, I'd like to make any item that is a reward from successful combine from a trade skill to be edited to 0 price to prevent any pp profits in tradeskills. This could probably be done with a mysql query cross referencing tradeskill_recipe_entries table with items table. Any experts can help?
Code:
UPDATE `items`, `tradeskill_recipe_entries` SET `items.price` = '0' WHERE `items.id` = `tradeskill_recipe_entries.item_id` AND `tradeskill_recipe_entries.successcount` = '1';
Reply With Quote
  #3  
Old 12-05-2010, 01:31 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Instead of just setting price to 0, here are some examples for setting the price to 1/10th it's current price and then setting sellrate to 10, which should mean the vendors pay 1/10th what they did before, but sell them for the same rate as before.

I haven't tested the UPDATE query below, but it is based on the SELECT query, which seems to work fine. Feel free to mess around with them to have them do what you want. Probably want to test them on a non-production database before you update your real one though.

Code:
SELECT tradeskill_recipe_entries.item_id, tradeskill_recipe_entries.successcount, items.id, items.sellrate, items.price FROM tradeskill_recipe_entries, items WHERE tradeskill_recipe_entries.successcount > 0 AND tradeskill_recipe_entries.item_id = items.id AND items.sellrate < 10;

Code:
UPDATE tradeskill_recipe_entries, items SET items.sellrate = 10, items.price = (items.price / 10) WHERE tradeskill_recipe_entries.successcount > 0 AND tradeskill_recipe_entries.item_id = items.id AND items.sellrate < 10;
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 12-05-2010, 01:42 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by trevius View Post
Instead of just setting price to 0, here are some examples for setting the price to 1/10th it's current price and then setting sellrate to 10, which should mean the vendors pay 1/10th what they did before, but sell them for the same rate as before.

I haven't tested the UPDATE query below, but it is based on the SELECT query, which seems to work fine. Feel free to mess around with them to have them do what you want. Probably want to test them on a non-production database before you update your real one though.

Code:
SELECT tradeskill_recipe_entries.item_id, tradeskill_recipe_entries.successcount, items.id, items.sellrate, items.price FROM tradeskill_recipe_entries, items WHERE tradeskill_recipe_entries.successcount > 0 AND tradeskill_recipe_entries.item_id = items.id AND items.sellrate < 10;

Code:
UPDATE tradeskill_recipe_entries, items SET items.sellrate = 10, items.price = (items.price / 10) WHERE tradeskill_recipe_entries.successcount > 0 AND tradeskill_recipe_entries.item_id = items.id AND items.sellrate < 10;
That's not what he asked for lol. You could design any pricing scheme depending on what you want to do. Or even based on the triviality of the tradeskill etc.
Reply With Quote
  #5  
Old 12-05-2010, 02:56 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Thanks, thats the type of stuff I was looking for. Editing prices can have undesired side effects, such as a with sub combines, a success item used to create a different item, etc. Plat is so trivial on the server anyways, so I wouldn't mind making the rewards worth 0 plat.
Reply With Quote
  #6  
Old 12-05-2010, 03:08 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

How does the sellrate value work? Is it 100 / Sell rate? So 100 / sellrate(1) = 100% value? And 100 / sellrate(10) = 10% sell back value? Just a guess, please confirm =)
Reply With Quote
  #7  
Old 12-05-2010, 03:32 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Worked, thank you very much!
Reply With Quote
  #8  
Old 12-05-2010, 03:58 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Sellrate is a multiplier for the price of the item that the merchant will sell. So, if a merchant is selling something with a price of 10000 (10 plat), and the sellrate is 1, the cost to buy it would be about 1 plat. But, if that same item had the sellrate changed to 15, the cost to buy it would now be 10 plat X 15 = about 150 plat (give or take depending on bonuses like CHA and Faction). You can also make the sellrate lower than the price by setting it to something like 0.5, where the item would then cost about half of what it sold to the merchant for (in this case, about 5 plat). You never want to set sellrate below 1 for this reason; so you don't run into issues where things are worth more to sell than they cost to buy.

Also, sellrate only affects how much an item costs from a merchant. It does not affect how much the merchant will buy the item for. So, you can have something cost 50 times what the merchant will pay for it if you wanted (by setting sellrate to 50).
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 12-05-2010, 05:48 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Thanks, and a semi related question which I know has been some what tackled before. How can I check who's exploited plat? I have several different tools, some of which I haven't figured out how to install. The server stat 1.1c seems to work, but loads player profiles so slowly. I assume plat is in the players blob field, and I have about 80,000 characters in the database now which is a huge amount of data to pull. Any easy way I can view and sort plat locally due to bandwidth, etc?
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 05:28 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