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, 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
  #2  
Old 12-05-2010, 01:42 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
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
Reply

Thread Tools
Display Modes

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