Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2012, 06:20 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default Help with Sql commands

First off i'm completely new to running my own server but i'm attempting it to appease my wife so please bear with me.

Trying to do a global item scale of all equips/item by like 5x there normal stats
ex str/sta/agi/dex/int/wis/cha resists and so forth. What would be the commands to do this via Sql. Looked all over can't find any help with these other than mob scaleing.
UPDATE npc_types SET ac = level;
UPDATE npc_types SET mindmg = level;
UPDATE npc_types SET maxdmg = level + 1;
UPDATE npc_types SET str = level/2;
UPDATE npc_types SET sta = level/2;
UPDATE npc_types SET dex = level/2;
UPDATE npc_types SET agi = level/2;
UPDATE npc_types SET wis = level/2;
UPDATE npc_types SET _int = level/2;
UPDATE npc_types SET cha = level/2;
UPDATE npc_types SET mr = level/2;
UPDATE npc_types SET fr = level/2;
UPDATE npc_types SET cr = level/2;
UPDATE npc_types SET dr = level/2;
UPDATE npc_types SET pr = level/2;
UPDATE npc_types SET hp_regen_rate = (level/10);
UPDATE npc_types SET mana_regen_rate = (level/5);

But this makes server entirely too weak. Lol forgot to back up database and had to do fresh install again. So could def use explict dirrections or link to a guild with eqemu sql commands. http://www.w3schools.com/sql/sql_update.asp Doesnt help me much considering i don't know what fields to even type in or how to 5x the stats. Any help much appreciated.
Reply With Quote
  #2  
Old 11-23-2012, 06:33 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

With just SQL you aren't going to be making very meaningful formulas by level, and EQ doesn't really pay much attention to level after 45.

For your purposes you might do something like
UPDATE npc_types SET ac = ac / 2
UPDATE npc_types SET mindmg = mindmg / 2

Use the existing scaling and ignore levels so when you get to a special boss encounter they are still harder than a regular mob of their level elsewhere, just not as hard as they are on live.

For items you might do something like
UPDATE items SET dex = dex * 2 WHERE dex > 0

If you want to add additional related stats you might run something like
UPDATE items SET agi = dex WHERE dex > 0
UPDATE items SET haste = 30 WHERE agi > 15 AND haste < 30
UPDATE items SET mana = 300 WHERE int > 10 AND mana < 300
UPDATE items SET hp = 300 WHERE (sta > 10 OR str > 10) AND hp < 300

For better mysql documentation, go straight to the source.
http://dev.mysql.com/doc/
Reply With Quote
  #3  
Old 11-23-2012, 06:46 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

to get a list of fields in the items table, use:

Code:
DESCRIBE items;
this link will give you a little more info as to what some of the fields are for. scroll down to where it says "struct Item_Struct".

so for example, if you wanted to multiply the following fields by 5

Code:
	sint8	CR;				// Save vs Cold
	sint8	DR;				// Save vs Disease
	sint8	PR;				// Save vs Poison
	sint8	MR;				// Save vs Magic
	sint8	FR;				// Save vs Fire
	sint8	AStr;			// Strength
	sint8	ASta;			// Stamina
	sint8	AAgi;			// Agility
	sint8	ADex;			// Dexterity
	sint8	ACha;			// Charisma
	sint8	AInt;			// Intelligence
	sint8	AWis;			// Wisdom
	sint32	HP;				// HP
	sint32	Mana;			// Mana
	sint32	AC;				// AC
the command would be
Code:
UPDATE items SET
    CR=CR*5,
    DR=DR*5,
    PR=PR*5,
    MR=MR*5,
    FR=FR*5,
    AStr=AStr*5,
    ASta=AStr*5,
    AAgi=AAgi*5,
    ADex=ADex*5,
    ACha=ACha*5,
    AInt=AInt*5,
    AWis=AWis*5,
    HP=HP*5,
    Mana=Mana*5,
    AC=AC*5;
you will need to be aware that any stat with a negative value will also be multiplied, so it won't make everything better/stronger/more appealing.
Reply With Quote
  #4  
Old 11-23-2012, 07:03 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default Thanks a bunch

So i'm reading this correctly. To 5x stats i'd simply type
UPDATE items SET CR=CR*5
And do this command for each stat i'd like to x ?

Don't think i'ma bother with mob scaleing hoping wife will just "think" they are scaled sense equips will balance out things for her and her bots lol.
Reply With Quote
  #5  
Old 11-23-2012, 07:45 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

yes, * is the multiplication operator.
you might consider updating each stat individually, as tabasco suggested, to keep from multiplying negative values:

Code:
UPDATE items SET CR=CR*5 WHERE CR > 0;
that would only multiply positive CR values.

additionally, you could run something like this:

Code:
UPDATE items SET CR=0 WHERE CR < 0;
to set any negative CR values to 0.
Reply With Quote
  #6  
Old 11-24-2012, 09:09 AM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

Yea those commands are working out nicely. Could use a couple more to finish up server. Sql command to jincrease all items drop chance and one to lower respawn on mobs higher than level say 51 to like an hour. Unless theres one to do like raid mobs only to hour respawn. Was thinking Update npcs set with hp >100k but thats whewre i'm lost. lol Tried georges Npc/loot editor but don't see how to do more than 1 item at a time or 1 zone at a time max.
Reply With Quote
  #7  
Old 11-24-2012, 10:04 AM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

Spawn times:
http://www.eqemulator.org/forums/sho...ht=spawn+times

Under the new loot system increasing drop chance is pretty easy:
UPDATE lootdrop_entries SET chance = chance * 2

You might also look at loottable_entries and mess with droplimit and mindrop, but that could result in huge piles of unwanted loot.
Reply With Quote
  #8  
Old 11-24-2012, 10:14 AM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

UPDATE lootdrop_entries SET chance = chance * 2 keeps saying error in syntax so not sure what is wrong...
Reply With Quote
  #9  
Old 11-24-2012, 10:26 AM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ignore that idiot don't have a clue what hes doin lol. forgot to add ; at end of command haha.
Reply With Quote
  #10  
Old 11-24-2012, 11:10 AM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

Concerning that lootdrop query, it's possible that it could set a chance higher than 100 and inside a loottable entry that has a droplimit.
I think the entry point for the lootdrop is randomized, so every possible drop is still there, but you might run
UPDATE lootdrop_entries SET chance = 100 WHERE chance > 100
Reply With Quote
  #11  
Old 11-24-2012, 12:31 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Quote:
Originally Posted by Tabasco View Post
I think the entry point for the lootdrop is randomized, so every possible drop is still there
This is correct, the entry point to the loot drop is randomized each time.
Reply With Quote
  #12  
Old 12-07-2012, 08:45 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

I'm stuck can anyone tell me why even when i run a command like
Update items set astr = astr *2 where astr > 0; i'm still getting tons of post luclin items with negitive stats. I've even tried running
Upadate items set astr = 0 where astr < 0; to try and correct the problems but doesnt seem to matter. Any help would would be greatly appreciated.
Reply With Quote
  #13  
Old 12-07-2012, 09:37 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

Is there a sql command to just set item stats back to default something like
update items set astr = default lol
Reply With Quote
  #14  
Old 12-07-2012, 09:51 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

ok nm just divided all the stats i multipled by same amount corrected eveything to base stats agian just can't * stuff more than 3x without getting stupid negetive stats for somereason.
Reply With Quote
  #15  
Old 12-08-2012, 01:03 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

it's possible that the results of the math that you are doing are outside the range of the column you are working with or the range of the data type the server is expecting (or both).

http://dev.mysql.com/doc/refman/5.0/...ric-types.html
http://www.cplusplus.com/doc/tutorial/variables/
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:35 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