So, we have the resetnpc.txt in custom scripts which is nice, but I also want to give players playing Star Gladiator the ability to reset at will for a fee. Current script is...
//===== rAthena Script =======================================
//= Reset NPC
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Resets skills, stats, or both.
//===== Additional Comments: =================================
//= 1.0 First Version
//= 1.1 Optimized for the greater good. [Kisuka]
//= 1.2 Cleaning [Euphy]
//= 1.3 All statuses removed upon skill reset. [Euphy]
//= 1.4 Compressed Script, Added limit use option [Stolao]
//= Changed set -> setarray, Improved text with F_InsertPlural
//============================================================
prontera,150,193,4 script Reset Girl 124,{
// Skills, Stats, Both, Limit
setarray [email protected], 5000, 5000, 9000, 0;
mes "[Reset Girl]";
if([email protected][3] && reset_limit > [email protected][3]) {
mes "Sorry you can only reset "+callfunc("F_InsertPlural",[email protected][3],"time")+" in your life.";
close;
}
mes "I am the Reset Girl.";
mes "Reset Stats: "+ callfunc("F_InsertComma",[email protected][1]) +"z";
mes "Reset Skills: "+ callfunc("F_InsertComma",[email protected][0]) +"z";
mes "Reset Both: "+ callfunc("F_InsertComma",[email protected][2]) +"z";
if([email protected][3]) mes "You may only reset "+callfunc("F_InsertPlural",[email protected][3],"time")+", so use "+(([email protected][3]>1)?"them":"it")+" wisely.";
mes "Please select the service you want:";
next;
set [email protected],(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel"));
if([email protected] > 3) close;
mes "[Reset Girl]";
if (Zeny < [email protected][[email protected]]) {
mes "Sorry, you don't have enough Zeny.";
close;
}
if([email protected][3]){
mes "You can only reset "+callfunc("F_InsertPlural",[email protected][3],"time")+" in your life, are you sure?";
if(select("Let me think:That's fine") == 1) close;
}
set Zeny, [email protected][[email protected]];
if([email protected]&1){
sc_end SC_ALL;// TODO make a sc_end current classes sc only
ResetSkill;
}
if([email protected]&2) ResetStatus;
mes "There you go!";
if([email protected][3]) set reset_limit,reset_limit + 1;
close;
}
What would I have to add, and where, to make said NPC viable for my needs?
So, we have the resetnpc.txt in custom scripts which is nice, but I also want to give players playing Star Gladiator the ability to reset at will for a fee. Current script is...
//===== rAthena Script ======================================= //= Reset NPC //===== By: ================================================== //= rAthena Dev Team //===== Current Version: ===================================== //= 1.4 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Resets skills, stats, or both. //===== Additional Comments: ================================= //= 1.0 First Version //= 1.1 Optimized for the greater good. [Kisuka] //= 1.2 Cleaning [Euphy] //= 1.3 All statuses removed upon skill reset. [Euphy] //= 1.4 Compressed Script, Added limit use option [Stolao] //= Changed set -> setarray, Improved text with F_InsertPlural //============================================================ prontera,150,193,4 script Reset Girl 124,{ // Skills, Stats, Both, Limit setarray [email protected], 5000, 5000, 9000, 0; mes "[Reset Girl]"; if([email protected][3] && reset_limit > [email protected][3]) { mes "Sorry you can only reset "+callfunc("F_InsertPlural",[email protected][3],"time")+" in your life."; close; } mes "I am the Reset Girl."; mes "Reset Stats: "+ callfunc("F_InsertComma",[email protected][1]) +"z"; mes "Reset Skills: "+ callfunc("F_InsertComma",[email protected][0]) +"z"; mes "Reset Both: "+ callfunc("F_InsertComma",[email protected][2]) +"z"; if([email protected][3]) mes "You may only reset "+callfunc("F_InsertPlural",[email protected][3],"time")+", so use "+(([email protected][3]>1)?"them":"it")+" wisely."; mes "Please select the service you want:"; next; set [email protected],(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel")); if([email protected] > 3) close; mes "[Reset Girl]"; if (Zeny < [email protected][[email protected]]) { mes "Sorry, you don't have enough Zeny."; close; } if([email protected][3]){ mes "You can only reset "+callfunc("F_InsertPlural",[email protected][3],"time")+" in your life, are you sure?"; if(select("Let me think:That's fine") == 1) close; } set Zeny, [email protected][[email protected]]; if([email protected]&1){ sc_end SC_ALL;// TODO make a sc_end current classes sc only ResetSkill; } if([email protected]&2) ResetStatus; mes "There you go!"; if([email protected][3]) set reset_limit,reset_limit + 1; close; }What would I have to add, and where, to make said NPC viable for my needs?
Link to comment
Share on other sites