Jump to content
  • 0

Status Point Reset [Server Wide]


Boom

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

Hi, I just want to ask how to reset the status points of all players on the server with automatic reapplication of the all the status points that are "left" just like what the Build Manager NPC does.

 

Because I tried to use this SQL Query

 

UPDATE `char` SET `str` = '0',`agi` = '0',`vit` = '0',`int` = '0',`dex` = '0',`luk` = '0';

 

Well, it updated all the character's status to 0, but the problem is, what about the characters who are currently at their max levels and must have retained the total status points they've aqcuired through leveling.

 

Thank you!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

There should be a status point formula. I've been googling all over... But I haven't found the status point formula.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

Got it. Here's for pre-renewal. It's the SQL query for resetting status points globally while retaining their status points depending on their base levels.

 

UPDATE `char` SET `str` = '5',`agi` = '5',`vit` = '5',`int` = '5',`dex` = '5',`luk` = '5', `status_point`=((((5+base_level/5)*base_level/5)/2)*5 + (base_level/5+3)*(base_level%5)) - 3;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  353
  • Reputation:   70
  • Joined:  07/14/12
  • Last Seen:  

i did this to my old server before when a bugged happened then some players were over stat

so here's the script to fix that issue easily

 

since all of the players needs to login i created this script

1st kick all the players now they are all forced to login and do the check

 

 

-    script    statreseter    -1,{
OnPCLoginEvent:
if(resetstat!=1) // check if they already been reset
{
ResetStatus;
//remove "//" before ResetSkill if you wanna reset skills too
//ResetSkill;
set resetstat,1; // sets a variable to the player if hes stats were already reset
}
}

if you wanna do a reset again

kick all the players

then do a query on your database

delete * from `global_reg_value` where str ='resetstat'

hope it helps

Edited by icabit
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...