Jhosef Posted June 28, 2012 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 299 Reputation: 5 Joined: 04/05/12 Last Seen: September 9, 2012 Share Posted June 28, 2012 (edited) i just want to reset the stats of all my player in the server is this correct update `char` set str=1,agi=1,vit=1,`int`=1,dex=1,luk=1; update `char` set status_point = ( 45 + ( base_level %5 ) * floor( base_level /5 ) + base_level *3 + floor( ( floor( ( base_level -5 )/5 ) * ( 10 + ( floor( ( base_level -5 )/5 ) -1 ) * 5 ) ) /2 ) ) where base_level > 5; update `char` set status_point = status_point + 52 where class >= 4001 and class <= 4022; Edited June 28, 2012 by Jhosef Quote Link to comment Share on other sites More sharing options...
Yanji Posted June 28, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 23 Reputation: 1 Joined: 06/22/12 Last Seen: October 5, 2012 Share Posted June 28, 2012 I don't think you can use the second SQL query, but I'm not completely sure about it, but the first and third queries look good to me. (Not a SQL expert, so I might be wrong) Quote Link to comment Share on other sites More sharing options...
Rikimaru Posted June 28, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 658 Reputation: 57 Joined: 11/20/11 Last Seen: July 1, 2017 Share Posted June 28, 2012 I tested the following SQL Script on my SQL Database and it worked : UPDATE `char` set `str`=1,`agi`=1,`vit`=1,`int`=1,`dex`=1,`luk`=1; UPDATE `char` set `status_point` = (45+(base_level*160)) where `base_level`>5; UPDATE `char` set `status_point` = (status_point+52) where class >= 4001 and class <= 4022; Quote Link to comment Share on other sites More sharing options...
Yanji Posted June 28, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 23 Reputation: 1 Joined: 06/22/12 Last Seen: October 5, 2012 Share Posted June 28, 2012 Rikimaru = SQL pro. Me = Noob. Quote Link to comment Share on other sites More sharing options...
Question
Jhosef
i just want to reset the stats of all my player in the server
is this correct
update `char` set str=1,agi=1,vit=1,`int`=1,dex=1,luk=1;
update `char` set status_point = ( 45 + ( base_level %5 ) * floor( base_level /5 ) + base_level *3 + floor( ( floor( ( base_level -5 )/5 ) * ( 10 + ( floor( ( base_level -5 )/5 ) -1 ) * 5 ) ) /2 ) ) where base_level > 5;
update `char` set status_point = status_point + 52 where class >= 4001 and class <= 4022;
Edited by JhosefLink to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.