Does anyone know how to insert a set value into a whole column at once?
such as the Droplist table chance column ?
I.E.
if DBmanager has the table DROPlist open and showing 20 different MobID how can I change the chance value of all 20 at one time from a value of say 5 to all a value of 60
so I dont have to manualy change each MobID chance value one at a time.
any help wold be great ,
Thanks guys
DBtool manager
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 152
- Joined: Sat Sep 09, 2006 7:15 am
- Location: Polska
what exacly do you want to change ?
the chanse of one item ?
or do you want to change the chance on every drop/spoil in your table ?
if you want to change the chance of all drops of some mobs you need their id
anything else ?
if you want to change the chanse of drop of all weapons in the game use
or change a chanse to all armors that drop
or everything else not related to wepon/armor table
the chanse of one item ?
Code: Select all
UPDATE droplist SET chance = 1000 WHERE Itemid = 57 - this one changes the chanse of adena drop in all mobs
Code: Select all
UPDATE droplist SET chance = 1000 - this one does it
Code: Select all
UPDATE droplist SET chance = 1000 WHERE mobid = 12345 - this one changes chance of every item of selected mob
if you want to change the chanse of drop of all weapons in the game use
Code: Select all
UPDATE droplist SET chance = 1000 WHERE itemid IN (SELECT weapon.item_id FROM weapon);
Code: Select all
UPDATE droplist SET chance = 1000 WHERE itemid IN (SELECT armor.item_id FROM armor);
Code: Select all
UPDATE droplist SET chance = 1000 WHERE itemid IN (SELECT etcitem.item_id FROM etcitem);
-
- Posts: 59
- Joined: Fri Sep 15, 2006 9:27 pm
good info
thanks
but,
what im trying to do is this,
I want to get all droplist items that have a default chance of 1 to 50 to be all 200
all the droplist items that have a default chance of 50-100 to be 250
and all droplist default chance of between 100 to 200 be 300
the rest (300+) is fine where its at.
it seems that anything under 150 chance is way to rare on my server of only 10-15 people.
in fact, for over 4 months we never saw one normal mob rare drop (armor ect.) with a 7x drop rate.
but one day i took a few hours and one by one changed all the droplist from 1 to 200 to a set value of 333 and people started to acually get rare items here an there off normal mobs.
but when I recently updated the server I lost all the chance settings for some weird reason, and I cant restore the backup i made of it,
it just wont take for some reason, and I dont want to spend 6 hours updating it one by one again
Thanks for the info though, its really usefull for other settings.
thanks
but,
what im trying to do is this,
I want to get all droplist items that have a default chance of 1 to 50 to be all 200
all the droplist items that have a default chance of 50-100 to be 250
and all droplist default chance of between 100 to 200 be 300
the rest (300+) is fine where its at.
it seems that anything under 150 chance is way to rare on my server of only 10-15 people.
in fact, for over 4 months we never saw one normal mob rare drop (armor ect.) with a 7x drop rate.
but one day i took a few hours and one by one changed all the droplist from 1 to 200 to a set value of 333 and people started to acually get rare items here an there off normal mobs.
but when I recently updated the server I lost all the chance settings for some weird reason, and I cant restore the backup i made of it,
it just wont take for some reason, and I dont want to spend 6 hours updating it one by one again
Thanks for the info though, its really usefull for other settings.
-
- Advanced User
- Posts: 308
- Joined: Wed May 10, 2006 11:40 am
- Location: U.K.
You probably want something like this ...
Note that you have to do them in that order, or else it will all go a little ga-ga
Code: Select all
UPDATE droplist SET chance = 300 WHERE chance > 99 and chance < 201;
UPDATE droplist SET chance = 250 WHERE chance > 49 and chance < 100;
UPDATE droplist SET chance = 200 WHERE chance > 0 and chance < 50;
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.