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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-01-2013, 12:42 PM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default Updating weapons (SQL Help)

Hi,

I am attempting to replace all fabled weapon stats with regular weapon stats.
I have a list of fabled Items and a list of regular items, and I've matched up each of the IDs.

To replace all the stats on Fabled items with the stats on the regular items - what would that code look like?

I also want to randomize some stats on the (then normalized fabled items, in this case WEAPONS) , and to do that I could do this, right?
Code:
Update `items` set `damage` = `damage`*(RAND()+1), `astr`=`astr`+(15*RAND()), `asta`=`asta`+(15*RAND()),(ETC) WHERE (`itemtype` = 0 OR `itemtype` = 1 OR `itemtype` = 2 OR `itemtype` = 3 OR `itemtype` = 4 OR `itemtype` = 5 

OR `itemtype` = 35 OR `itemtype` = 45) AND `name` like '%fabled%' AND `damage` > 1;
That would set the damage between 100-200% and add strength of 0-15, and add stamina between 0-15, right?

Do I need to make the randoms INTs or will the standard FLOATs be fine for this application?
Code:
CONVERT(INT, (10+3)RAND()) #example
Edit: I hope this is clear, My mind is a little fuzzy today.
In short:
1. Take Fabled Item, Replace stats with unfabled item (including req and rec level, etc)
2. Apply semi-random stats to fabled items.
Reply With Quote
 


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