sietse11 Posted March 23, 2014 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 127 Reputation: 7 Joined: 02/10/13 Last Seen: February 1, 2019 Share Posted March 23, 2014 How do I perform a global stat reset? I wanne add a bit of code to the stat resetter giving GM's of gm lvl 99+ the possibibilty to do a global stat reset. How would I add this to euphies stat resetter? Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 4, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Share Posted April 4, 2014 if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close; It seems this only works for online characters. I need it to work for the entire character database. Any easy fix for this? You can use my script for this. It will reset a player's stats on login. (only once every time you reset) Can you please add the full code I should be using in your next reply, cause im confused if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ goto L_reset; close; end; } } OnInterIfInitOnce: set $statreset, 0; end; OnPCLoginEvent: if (statreset != $statreset){ dispbottom "Your stats have been resetted."; resetstatus; set statreset, $statreset; } end; L_reset: set $statreset, statreset+1; dispbottom "Everyone's Stats have been resetted."; end; Quote Link to comment Share on other sites More sharing options...
Yuka Posted March 23, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Share Posted March 23, 2014 I don't know the script, but basically it should look like this: if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ goto L_reset; close; end; } } OnInterIfInitOnce: set $statreset, 0; end; OnPCLoginEvent: if (statreset != $statreset){ dispbottom "Your stats have been resetted."; resetstatus; set statreset, $statreset; } end; L_reset: set $statreset, statreset+1; dispbottom "Everyone's Stats have been resetted."; end; Just put it at the beginning of your script. You might need to replace "OnInterIfInitOnce" with "OnInit" (watch out if there already is an OnInit or OnInterIfInitOnce) for the first time and then change it back. It should pop a NPC dialouge with the quesion "Do you want to reset Stats for everyone?" for GMs with GM-Level >98 and just the usual stuff for everyone else. When you select "No" it should continue with the normal script. Quote Link to comment Share on other sites More sharing options...
Patskie Posted March 24, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted March 24, 2014 if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close; Quote Link to comment Share on other sites More sharing options...
Yuka Posted March 24, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Share Posted March 24, 2014 if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close; Oh wow, addrid is pretty cool. Quote Link to comment Share on other sites More sharing options...
sietse11 Posted March 27, 2014 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 127 Reputation: 7 Joined: 02/10/13 Last Seen: February 1, 2019 Author Share Posted March 27, 2014 Pretty decent. My only problem now is I cant use the defaulth options as a GM. But thats easily fixed Ill add the full code later. Quote Link to comment Share on other sites More sharing options...
sietse11 Posted April 2, 2014 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 127 Reputation: 7 Joined: 02/10/13 Last Seen: February 1, 2019 Author Share Posted April 2, 2014 if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close; It seems this only works for online characters. I need it to work for the entire character database. Any easy fix for this? Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 2, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Share Posted April 2, 2014 (edited) if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close; It seems this only works for online characters. I need it to work for the entire character database. Any easy fix for this? You can use my script for this. It will reset a player's stats on login. (only once every time you reset) Edited April 2, 2014 by Greyford Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted April 3, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted April 3, 2014 Open your mysql database and use the "ragnarok" db, execute this code: UPDATE `char` SET `str`=1, `agi`=1, `vit`=1, `int`=1, `dex`=1, `luk`=1; NOTE: This code will set every stat of ALL PLAYERS (listed inside the `char` table) to 1, but will not give the players statpoints. Quote Link to comment Share on other sites More sharing options...
sietse11 Posted April 4, 2014 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 127 Reputation: 7 Joined: 02/10/13 Last Seen: February 1, 2019 Author Share Posted April 4, 2014 if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close; It seems this only works for online characters. I need it to work for the entire character database. Any easy fix for this? You can use my script for this. It will reset a player's stats on login. (only once every time you reset) Can you please add the full code I should be using in your next reply, cause im confused Quote Link to comment Share on other sites More sharing options...
sietse11 Posted April 4, 2014 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 127 Reputation: 7 Joined: 02/10/13 Last Seen: February 1, 2019 Author Share Posted April 4, 2014 Spank you! Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 9, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 9, 2014 Another way - script reset_all -1,{ OnInit: bindatcmd "resetall", strnpcinfo(3) + "::OnCmd",99,99; end; OnCmd: .@config$ = checkre(3) ? "prere" : "re"; .group_limit = ( atoi(.@atcmd_parameters$[0]) < 1 ) ? 99 : atoi( .@atcmd_parameters$[0] ); query_sql "update `char` set status_point = ( select points from `status_points_"+ .@config$ +"` where `status_points_"+ .@config$ +"`.`base_level` = `char`.`base_level` ), "+ "`str` = 1, `agi` = 1, `vit` = 1, `int` = 1, `dex` = 1, `luk` = 1 "+ "where online = 0 and account_id not in ( select account_id from login where group_id >= "+ .group_limit +" )"; announce "[GM] " + strcharinfo(0) + " reset all the stats.", bc_all; addrid 0; if ( getgroupid() < .group_limit ) resetstatus; end; } [paste=79h03exenzoq] [paste=cks0m5eejyj] This one instantly resets the stats and give the status points to all players (online/offline) below the specific group level (99 by default) ex @resetall 80 Quote Link to comment Share on other sites More sharing options...
Question
sietse11
How do I perform a global stat reset?
I wanne add a bit of code to the stat resetter giving GM's of gm lvl 99+ the possibibilty to do a global stat reset.
How would I add this to euphies stat resetter?
Link to comment
Share on other sites
11 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.