Posts: 603
Threads: 73
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Aug 2011
Reputation:
0
hey all i would like to know what the query would be for this i want to update t_item from values 10019-1512 a_rare_index_0-5 and a_rare_prob_0-5 can somone make me a query for it would it be somthing like this?
UPDATE t_item Where a_index = 10019-1512 SET a_rare_index_0-5= 14 SET a_rare_prob_0-5= 6;
Posts: 313
Threads: 20
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jul 2011
Reputation:
0
The correct order is UPDATE SET WHERE
So your code yould be:
UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index BETWEEN 10019 AND 1512
Posts: 603
Threads: 73
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Aug 2011
Reputation:
0
sorry but are you not missing = and ;?
UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index = BETWEEN 10019 AND 1512;
Posts: 313
Threads: 20
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jul 2011
Reputation:
0
Nope the query is correct. Or you want this to apply for only 2 items, because what I posed is only valid for range of items with the a_index between 10019 and 1512( if there are 100 items between these range, this will apply on all the items)
For only 2 items just make(there are 2 methods)
UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index in (10019, 1512);
Or this:
UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index = 10019 OR a_index = 1512;
if you add = before between it will generate a error, and ";" it is not necessary, it only specifices, the query to executes(if you want to execute 2 queries in 1 you will need ";" to separate the queries)
if you run only 1 query ";" is not necessary, only if you run multiple queries in 1 file.(in MSSQL you can run multiple lines without ";", but more queries in 1 will increase the query timeout, plus it has a limit on this, on how big the query is)
Posts: 4
Threads: 0
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jan 2014
Reputation:
0
hey I am wondering if there is a query I can run to set starting levels of all characters to level 1 rather than hex editing it please and thank you
Posts: 190
Threads: 12
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jun 2011
Reputation:
0
hey I am wondering if there is a query I can run to set starting levels of all characters to level 1 rather than hex editing it please and thank you
gameserver editing only way, when char is created it will be automatical level 90, no matter if u run a query over it, because the char is online it wont be updated.
when char is logged of, only them the value changes
Posts: 4
Threads: 0
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jan 2014
Reputation:
0
im aware the char info wont change if its online I was after a query for sql to set the beginning level of a char on the server to start at level 1 instead of 90 asin how do I change the server files so the newly created characters start at level 1 instead of level 90
Posts: 190
Threads: 12
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jun 2011
Reputation:
0
you are changing the start level in gameserver and not database..
making a query that updates the chars to level 1 isnt possible, because its gonna run again and again and again and again and again to make the char level 1...
u can make like UPDATE t_characters SET a_level = 1; but it will just set ALL chars to level 1.. u can also make a script to make only all chars to level 1 when they are lvl 90, but then if they reach 90 again and log out they gonna be level 1 again
Posts: 4
Threads: 0
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jan 2014
Reputation:
0
okies mp u got any idea of the offsets for hex editing the info than?
Posts: 190
Threads: 12
Thanks Received: 0 in 0 posts
Thanks Given: 0
Joined: Jun 2011
Reputation:
0
open gameserver_d with a hex editor, go to this offset: 000991BF
change it from 5A to 01
|