Bringer Posted October 8, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: April 16 Share Posted October 8, 2016 (edited) i'm Looking For This Script Sample Screen shot Reset Specitic Stat[ STR AGI VIT INT DEX LUK ] Edited October 12, 2016 by Bringer Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted October 15, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted October 15, 2016 you can actually done this without need of any custom source mod. Example: https://pastebin.com/dZx4Xjw0 Quote Link to comment Share on other sites More sharing options...
1 _Okuz_ Posted October 15, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 15, 2016 (edited) Meh.. I knew about the compatibility but I was waiting for someone to come with another solution like you did. I'm used to use the 'set' and I've been using this old syntax since eAthena but I'm gonna try to stop. Again, I'm sorry for that and feel free to replace them. Thank you for this command, it'll be very usefull for this npc. EDIT-- Here is the final version without source mod as @Secrets suggested. // Author: _Okuz_ // Version: 1.0.3 - 16:15 15/10/2016 prontera,150,150,5 script Reset NPC 690,{ mes "[Reset NPC]"; mes "..."; mes "..."; mes "..."; mes "..."; next; .@option = select("Reset Specific Stat:Reset Status:Reset Skills:Reset Both") - 1; if (Zeny < .reset_settings[.@option]) { mes "[Reset NPC]"; mes "..."; close; } Zeny -= .reset_settings[.@option]; .@option = 1<<.@option; if (.@option & 1) { mes "[Reset NPC]"; mes "..."; next; .@status = select("Str:Agi:Vit:Int:Dex:Luk") - 1; setarray .@backup_status[0], readparam(bStr), readparam(bAgi), readparam(bVit), readparam(bInt), readparam(bDex), readparam(bLuk); resetstatus; for (.@i = 0; .@i < 6; .@i++) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i] - 1; StatusPoint -= needed_status_point(callsub(S_getStatusConst, .@i), -(.@backup_status[.@i] - 1)); } } else { if (.@option & 2 || .@option & 8) resetstatus; if (.@option & 4 || .@option & 8) resetskill; } close; // Arg(0): status_index S_getStatusConst: .@i = getarg(0); switch (.@i) { case 0: return bStr; case 1: return bAgi; case 2: return bVit; case 3: return bInt; case 4: return bDex; case 5: return bLuk; default: debugmes "[Error] : Invalid 'status_index' on " + strnpcinfo(3) + "."; } end; OnInit: setarray .reset_settings[0], 5000, // 5000z for Specific Stat 5000, // 5000z for Status 5000, // 5000z for Skills 7500; // 7500z for Both (Status + Skills) } Tested and working. Edited October 16, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted October 9, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: April 16 Author Share Posted October 9, 2016 i'm Looking For This Script Sample Screen shot Reset Specitic Stat [ STR AGI VIT INT DEX LUK ] bump i can anyone make this script? Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 11, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 11, 2016 (edited) Hello Bringer, This is such a nice idea, I'm gonna create this script tonight.Att, _Okuz_. Edited October 11, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted October 12, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: April 16 Author Share Posted October 12, 2016 Hello Bringer, This is such a nice idea, I'm gonna create this script tonight. Att, _Okuz_. ok thanks Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 13, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 13, 2016 (edited) Hello again Bringer, Unfortunately I'm not able to test it (I'm currently at work right now... ). Please let me know if it works as you expect. // Author: _Okuz_ // Version: 1.0.0 - 11:46 13/10/2016 prontera,150,150,5 script Reset NPC 502,{ mes "[Reset NPC]"; mes "..."; mes "..."; mes "..."; mes "..."; next; set .@option, select("Reset Specific Stat:Reset Status:Reset Skills:Reset Both") - 1; if (Zeny < .reset_settings[.@option]) { mes "[Reset NPC]"; mes "..."; close; } set Zeny, Zeny - .reset_settings[.@option]; set .@option, 1<<.@option; if (.@option & 1) { mes "[Reset NPC]"; mes "..."; next; set .@status, select("Str:Agi:Vit:Int:Dex:Luk") - 1; setarray .@backup_status[0], readparam(bStr), readparam(bAgi), readparam(bVit), readparam(bInt), readparam(bDex), readparam(bLuk); resetstatus; for (set .@i, 0; .@i < 6; set .@i, .@i + 1) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i]; } } else { if (.@option & 2 || .@option & 8) resetstatus; if (.@option & 4 || .@option & 8) resetskills; } close; // Arg(0): status_index S_getStatusConst: set .@i, getarg(0); switch (.@i) { case 0: return bStr; case 1: return bAgi; case 2: return bVit; case 3: return bInt; case 4: return bDex; case 5: return bLuk; default: debugmes "[Error] : Invalid 'status_index' on " + strnpcinfo(3) + "."; } end; OnInit: setarray .reset_settings[0], 5000, // 5000z for Specific Stat 5000, // 5000z for Status 5000, // 5000z for Skills 7500; // 7500z for Both (Status + Skills) } Att,_Okuz_, Edited October 13, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted October 13, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: April 16 Author Share Posted October 13, 2016 Hello again Bringer, Unfortunately I'm not able to test it (I'm currently at work right now... ). Please let me know if it works as you expect. // Author: _Okuz_ // Version: 1.0.0 - 11:46 13/10/2016 prontera,150,150,5 script Reset NPC 502,{ mes "[Reset NPC]"; mes "..."; mes "..."; mes "..."; mes "..."; next; set .@option, select("Reset Specific Stat:Reset Status:Reset Skills:Reset Both") - 1; if (Zeny < .reset_settings[.@option]) { mes "[Reset NPC]"; mes "..."; close; } set Zeny, Zeny - .reset_settings[.@option]; set .@option, 1<<.@option; if (.@option & 1) { mes "[Reset NPC]"; mes "..."; next; set .@status, select("Str:Agi:Vit:Int:Dex:Luk") - 1; setarray .@backup_status[0], readparam(bStr), readparam(bAgi), readparam(bVit), readparam(bInt), readparam(bDex), readparam(bLuk); resetstatus; for (set .@i, 0; .@i < 6; set .@i, .@i + 1) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i]; } } else { if (.@option & 2 || .@option & 8) resetstatus; if (.@option & 4 || .@option & 8) resetskills; } close; // Arg(0): status_index S_getStatusConst: set .@i, getarg(0); switch (.@i) { case 0: return bStr; case 1: return bAgi; case 2: return bVit; case 3: return bInt; case 4: return bDex; case 5: return bLuk; default: debugmes "[Error] : Invalid 'status_index' on " + strnpcinfo(3) + "."; } end; OnInit: setarray .reset_settings[0], 5000, // 5000z for Specific Stat 5000, // 5000z for Status 5000, // 5000z for Skills 7500; // 7500z for Both (Status + Skills) } Att, _Okuz_, Ok First Test 100% Working STR 500 AGI 500 VIT 500 INT 500 DEX 500 LUK 500 my STR -499 2nd Test STR 1 AGI 1 VIT 1 INT 1 DEX 1 LUK 1 i Choose Again The Str and again my STR is 1 BUT STR 1 AGI 2 VIT 2 INT 2 DEX 2 LUK 2 Everytime i have 1 allstats and choose reset any stat my other stats add +1 Stats Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 13, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 13, 2016 (edited) Alright, I got it.I'll be back soon with the fix. EDIT-- I'm back, well the solution seems to be very easy. // Author: _Okuz_ // Version: 1.0.1 - 11:46 13/10/2016 prontera,150,150,5 script Reset NPC 690,{ mes "[Reset NPC]"; mes "..."; mes "..."; mes "..."; mes "..."; next; set .@option, select("Reset Specific Stat:Reset Status:Reset Skills:Reset Both") - 1; if (Zeny < .reset_settings[.@option]) { mes "[Reset NPC]"; mes "..."; close; } set Zeny, Zeny - .reset_settings[.@option]; set .@option, 1<<.@option; if (.@option & 1) { mes "[Reset NPC]"; mes "..."; next; set .@status, select("Str:Agi:Vit:Int:Dex:Luk") - 1; setarray .@backup_status[0], readparam(bStr), readparam(bAgi), readparam(bVit), readparam(bInt), readparam(bDex), readparam(bLuk); resetstatus; for (set .@i, 0; .@i < 6; set .@i, .@i + 1) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i] - 1; } } else { if (.@option & 2 || .@option & 8) resetstatus; if (.@option & 4 || .@option & 8) resetskill; } close; // Arg(0): status_index S_getStatusConst: set .@i, getarg(0); switch (.@i) { case 0: return bStr; case 1: return bAgi; case 2: return bVit; case 3: return bInt; case 4: return bDex; case 5: return bLuk; default: debugmes "[Error] : Invalid 'status_index' on " + strnpcinfo(3) + "."; } end; OnInit: setarray .reset_settings[0], 5000, // 5000z for Specific Stat 5000, // 5000z for Status 5000, // 5000z for Skills 7500; // 7500z for Both (Status + Skills) } Now it should work as expected. Att, _Okuz_. Edited October 13, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 Brahms Posted October 14, 2016 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Share Posted October 14, 2016 i think something is wrong with the script. when you reset specific stats.. For example.. 255 max base lvl will give your character a total of 7,237 statspoints. When you put Str +254 for a total of Str 255 that will cost you 3,611 statspoint. So here's what happen, when i reset Str instead of giving me back a 3,611 statspoints it will give a full 7,237 statspoints. im just saying Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 (edited) Seems that statusup is not counting them correctly. I need to find a way to recalculate the status points after using the statusup... maybe there is already a built in function for that, but honestly I don't know. I'll working on it, thank you for your report Brahms! Att, _Okuz_.EDIT--Hey Brahms, are you able to test something for me? Change this: for (set .@i, 0; .@i < 6; set .@i, .@i + 1) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i] - 1; } To this: for (set .@i, 0; .@i < 6; set .@i, .@i + 1) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i] - 1; } recalculatestat; // new line added to force to recalculate status points! Maybe it should work now!Att,_Okuz_. Edited October 14, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 Brahms Posted October 14, 2016 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Share Posted October 14, 2016 ok dude let me try.. it says missing function name or calling undeclared function. give me the last script buddy then ill try it. Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 // Author: _Okuz_ // Version: 1.0.1 - 11:46 13/10/2016 prontera,150,150,5 script Reset NPC 690,{ mes "[Reset NPC]"; mes "..."; mes "..."; mes "..."; mes "..."; next; set .@option, select("Reset Specific Stat:Reset Status:Reset Skills:Reset Both") - 1; if (Zeny < .reset_settings[.@option]) { mes "[Reset NPC]"; mes "..."; close; } set Zeny, Zeny - .reset_settings[.@option]; set .@option, 1<<.@option; if (.@option & 1) { mes "[Reset NPC]"; mes "..."; next; set .@status, select("Str:Agi:Vit:Int:Dex:Luk") - 1; setarray .@backup_status[0], readparam(bStr), readparam(bAgi), readparam(bVit), readparam(bInt), readparam(bDex), readparam(bLuk); resetstatus; for (set .@i, 0; .@i < 6; set .@i, .@i + 1) { if (.@status == .@i) continue; statusup2 callsub(S_getStatusConst, .@i), .@backup_status[.@i] - 1; } recalculatestat; } else { if (.@option & 2 || .@option & 8) resetstatus; if (.@option & 4 || .@option & 8) resetskill; } close; // Arg(0): status_index S_getStatusConst: set .@i, getarg(0); switch (.@i) { case 0: return bStr; case 1: return bAgi; case 2: return bVit; case 3: return bInt; case 4: return bDex; case 5: return bLuk; default: debugmes "[Error] : Invalid 'status_index' on " + strnpcinfo(3) + "."; } end; OnInit: setarray .reset_settings[0], 5000, // 5000z for Specific Stat 5000, // 5000z for Status 5000, // 5000z for Skills 7500; // 7500z for Both (Status + Skills) } Every time you get an error try posting some screenshots of your map-server console. By doing this you helps me to understand what exactly is going on. Besides that, make sure that your rAthena is up to date. Att, _Okuz_. Quote Link to comment Share on other sites More sharing options...
0 Brahms Posted October 14, 2016 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Share Posted October 14, 2016 ok buddy. let me try them.. Here's what it says buddy. All.txt is a file where i put the script. Quote Link to comment Share on other sites More sharing options...
0 Azeroth Posted October 14, 2016 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 383 Reputation: 121 Joined: 03/31/12 Last Seen: January 29, 2023 Share Posted October 14, 2016 (edited) This script seems interested i've been looking for this kind of script also.Which can reset a specific stat, instead of resetall.Edited: I found a bug which players gives a full stats. ok buddy. let me try them.. Here's what it says buddy. All.txt is a file where i put the script. Probably your missing a script command for this? *recalculatestat;This command will force a stat recalculation for the attached player. Edited October 14, 2016 by Azeroth Quote Link to comment Share on other sites More sharing options...
0 Brahms Posted October 14, 2016 Group: Members Topic Count: 48 Topics Per Day: 0.02 Content Count: 149 Reputation: 3 Joined: 07/29/16 Last Seen: August 6, 2019 Share Posted October 14, 2016 i think something is wrong with the script. when you reset specific stats.. For example.. 255 max base lvl will give your character a total of 7,237 statspoints. When you put Str +254 for a total of Str 255 that will cost you 3,611 statspoint. So here's what happen, when i reset Str instead of giving me back a 3,611 statspoints it will give a full 7,237 statspoints. im just saying same as azeroth. but he has a better explanation for the bug since he uploaded images. Quote Link to comment Share on other sites More sharing options...
0 Deleted User Posted October 14, 2016 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 235 Reputation: 55 Joined: 12/02/11 Last Seen: February 26, 2021 Share Posted October 14, 2016 I just made a quick test for this also it has a bug. it gives you full stats points. Quote Link to comment Share on other sites More sharing options...
0 Secrets Posted October 14, 2016 Group: Developer Topic Count: 36 Topics Per Day: 0.01 Content Count: 588 Reputation: 438 Joined: 01/26/16 Last Seen: April 16 Share Posted October 14, 2016 *recalculatestat;This command will force a stat recalculation for the attached player. This has nothing to do with stat reset, just fyi. Quote Link to comment Share on other sites More sharing options...
0 Azeroth Posted October 14, 2016 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 383 Reputation: 121 Joined: 03/31/12 Last Seen: January 29, 2023 Share Posted October 14, 2016 *recalculatestat;This command will force a stat recalculation for the attached player. This has nothing to do with stat reset, just fyi. Oh sad, are you able to help us out? i find it very useful. Hope you can fixed it. Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 (edited) *recalculatestat;This command will force a stat recalculation for the attached player. This has nothing to do with stat reset, just fyi. I'm not able to read the script.c to check its behavior now. I just tried that because it says it'll recalculate status then I thought it would work for that. Do you know any command or any way to recalculate the status?EDIT-- I'm gonna read all the atcommands, maybe we can find the solution there. Edited October 14, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted October 14, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: April 16 Author Share Posted October 14, 2016 *recalculatestat; This command will force a stat recalculation for the attached player. This has nothing to do with stat reset, just fyi. I'm not able to read the script.c to check its behavior now. I just tried that because it says it'll recalculate status then I thought it would work for that. Do you know any command or any way to recalculate the status? hmm what about use atcommand Agi -499 ? Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 14, 2016 (edited) EDIT--Here is what I found: statusup uses pc_statusup to increase status and it does subtract status points when raising a status. statusup2 uses pc_statusup2 to raise or decrease status and it doesn't subtracts status points when increasing / decreasing a status.Here is the source doc: pc_statusup: /** * Raises a stat by the specified amount. * * Obeys max_parameter limits. * Subtracts status points according to the cost of the increased stat points. * * @param sd The target character. * @param type The stat to change (see enum _sp) * @param increase The stat increase (strictly positive) amount. * @retval true if the stat was increased by any amount. * @retval false if there were no changes. */================================================== pc_statusp2: /** * Raises a stat by the specified amount. * * Obeys max_parameter limits. * Does not subtract status points for the cost of the modified stat points. * * @param sd The target character. * @param type The stat to change (see enum _sp) * @param val The stat increase (or decrease) amount. * @return the stat increase amount. * @retval 0 if no changes were made. */ We have three options to resolve this issue: 1) Change the usage of statusup2 for statusup and loop through each status to increase them by 1 each time till the .@backup_status[<status>] amount. (without source mod) 2) Change the statusup arguments to receive an extra argument that is the amount of points we want to increase. (source mod required)3) Use needed_status_point() to calculate the points that we need to subtract. (without source mod) I choosed the second one and here is the final script and the .patch / .diff... I'm gonna send a PR regarding this but honestly I don't know if they will accept or not.EDIT--The second option breaks up statusup backward compatibility and should not be used. Edited October 15, 2016 by _Okuz_ 1 Quote Link to comment Share on other sites More sharing options...
0 Deleted User Posted October 15, 2016 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 235 Reputation: 55 Joined: 12/02/11 Last Seen: February 26, 2021 Share Posted October 15, 2016 EDIT--Here is what I found: statusup uses pc_statusup to increase status and it does subtract status points when raising a status. statusup2 uses pc_statusup2 to raise or decrease status and it doesn't subtracts status points when increasing / decreasing a status.Here is the source doc: pc_statusup: /** * Raises a stat by the specified amount. * * Obeys max_parameter limits. * Subtracts status points according to the cost of the increased stat points. * * @param sd The target character. * @param type The stat to change (see enum _sp) * @param increase The stat increase (strictly positive) amount. * @retval true if the stat was increased by any amount. * @retval false if there were no changes. */ ================================================== pc_statusp2: /** * Raises a stat by the specified amount. * * Obeys max_parameter limits. * Does not subtract status points for the cost of the modified stat points. * * @param sd The target character. * @param type The stat to change (see enum _sp) * @param val The stat increase (or decrease) amount. * @return the stat increase amount. * @retval 0 if no changes were made. */ We have two options to resolve this issue: 1) Change the usage of statusup2 for statusup and loop through each status to increase them by 1 each time till the .@backup_status[<status>] amount. (without source mod) 2) Change the statusup arguments to receive an extra argument that is the amount of points we want to increase. (source mod required) I choosed the second one and here is the final script and the .patch / .diff... I'm gonna send a PR regarding this but honestly I don't know if they will accept or not. I'll test it when i get home. Thank you for this _Okuz_ i appreciate it. + 1 Quote Link to comment Share on other sites More sharing options...
0 Secrets Posted October 15, 2016 Group: Developer Topic Count: 36 Topics Per Day: 0.01 Content Count: 588 Reputation: 438 Joined: 01/26/16 Last Seen: April 16 Share Posted October 15, 2016 I choosed the second one and here is the final script and the .patch / .diff... I'm gonna send a PR regarding this but honestly I don't know if they will accept or not. I would reject it for sake of backward compatibility since your diff completely break all scripts using <char id> parameter in statusup command. I have recently implemented needed_status_point script command to calculate amount of status points needed for raising stats to a point, so use that to get the amount of status points to subtract. *needed_status_point(<type>,<val>{,<char id>}); Returns the number of stat points needed to change the specified stat <type> by <val>. If <val> is negative, returns the number of stat points that would be needed to raise the specified stat from (current value - <val>) to current value. By the way, it's 2016 now, stop using the `set` script command. Quote Link to comment Share on other sites More sharing options...
0 Deleted User Posted October 15, 2016 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 235 Reputation: 55 Joined: 12/02/11 Last Seen: February 26, 2021 Share Posted October 15, 2016 (edited) Where's the attachment? Edit: I just found out you have posted the script without the source mod: Thank you once again, and secre for ur solution. EDIT-- Here is what I found: statusup uses pc_statusup to increase status and it does subtract status points when raising a status. statusup2 uses pc_statusup2 to raise or decrease status and it doesn't subtracts status points when increasing / decreasing a status. Here is the source doc: pc_statusup: /** * Raises a stat by the specified amount. * * Obeys max_parameter limits. * Subtracts status points according to the cost of the increased stat points. * * @param sd The target character. * @param type The stat to change (see enum _sp) * @param increase The stat increase (strictly positive) amount. * @retval true if the stat was increased by any amount. * @retval false if there were no changes. */ ================================================== pc_statusp2: /** * Raises a stat by the specified amount. * * Obeys max_parameter limits. * Does not subtract status points for the cost of the modified stat points. * * @param sd The target character. * @param type The stat to change (see enum _sp) * @param val The stat increase (or decrease) amount. * @return the stat increase amount. * @retval 0 if no changes were made. */ We have three options to resolve this issue: 1) Change the usage of statusup2 for statusup and loop through each status to increase them by 1 each time till the .@backup_status[<status>] amount. (without source mod) 2) Change the statusup arguments to receive an extra argument that is the amount of points we want to increase. (source mod required) 3) Use needed_status_point() to calculate the points that we need to subtract. (without source mod) I choosed the second one and here is the final script and the .patch / .diff... I'm gonna send a PR regarding this but honestly I don't know if they will accept or not. EDIT-- The second option breaks up statusup backward compatibility and should not be used. Edited October 15, 2016 by Kaze Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 15, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 15, 2016 (edited) you can actually done this without need of any custom source mod. Example: https://pastebin.com/dZx4Xjw0 Yes! I said the same thing on my previous posts. I have listed your solution as my first option to resolve this issue but Secrets gave us some info regarding a command that pretty much resolves the whole thing. By the way I released the latest version, without source mod like you said Thank you again! PS: I love the way you script, it's so clean and easy to understand! Edited October 15, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
Question
Bringer
i'm Looking For This Script Sample Screen shot
Reset Specitic Stat
[ STR AGI VIT INT DEX LUK ]

Edited by BringerLink to comment
Share on other sites
29 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.