updated resetnpc

This commit is contained in:
Stolao 2016-05-23 05:10:34 -07:00
parent 631187b3ec
commit 65419729f9

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= rAthena Dev Team //= rAthena Dev Team
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.3 //= 1.7
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= rAthena Project //= rAthena Project
//===== Description: ========================================= //===== Description: =========================================
@ -13,56 +13,44 @@
//= 1.1 Optimized for the greater good. [Kisuka] //= 1.1 Optimized for the greater good. [Kisuka]
//= 1.2 Cleaning [Euphy] //= 1.2 Cleaning [Euphy]
//= 1.3 All statuses removed upon skill reset. [Euphy] //= 1.3 All statuses removed upon skill reset. [Euphy]
//= 1.4 Compressed Script [Stolao]
//= 1.5 Added limit use option [Stolao]
//= 1.6 Changed set -> setarray [Stolao]
//= 1.7 Improved text with F_InsertPlural [Stolao]
//============================================================ //============================================================
prontera,150,193,4 script Reset Girl 124,{ prontera,150,193,4 script Reset Girl 124,{
// Skills, Stats, Both, Limit
.@ResetStat = 5000; // Zeny for stat reset setarray .@Reset, 5000, 5000, 9000, 0;
.@ResetSkill = 5000; // Zeny for skill reset
.@ResetBoth = 9000; // Zeny for resetting both together
mes "[Reset Girl]"; mes "[Reset Girl]";
if(.@Reset[3] && reset_limit > .@Reset[3]) {
mes "Sorry you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life.";
close;
}
mes "I am the Reset Girl."; mes "I am the Reset Girl.";
mes "Reset Stats: " + callfunc("F_InsertComma", .@ResetStat) + "z"; mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z";
mes "Reset Skills: " + callfunc("F_InsertComma", .@ResetSkill) + "z"; mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z";
mes "Reset Both: " + callfunc("F_InsertComma", .@ResetBoth) + "z"; mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z";
if(.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely.";
mes "Please select the service you want:"; mes "Please select the service you want:";
next; next;
switch(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel")) { set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel"));
case 1: if(.@i > 3) close;
mes "[Reset Girl]"; mes "[Reset Girl]";
if (Zeny < .@ResetSkill) { if (Zeny < .@Reset[.@i-1]) {
mes "Sorry, you don't have enough Zeny."; mes "Sorry, you don't have enough Zeny.";
close; close;
} }
Zeny -= .@ResetSkill; if(.@Reset[3]){
sc_end SC_ALL; mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?";
resetskill; if(select("Let me think:That's fine") == 1) close;
mes "There you go!";
close;
case 2:
mes "[Reset Girl]";
if (Zeny < .@ResetStat) {
mes "Sorry, you don't have enough Zeny.";
close;
} }
Zeny -= .@ResetStat; set Zeny, Zeny-.@Reset[.@i-1];
resetstatus; if(.@i&1){
mes "There you go!"; sc_end SC_ALL;// TODO make a sc_end current classes sc only
close; ResetSkill;
case 3:
mes "[Reset Girl]";
if (Zeny < .@ResetBoth) {
mes "Sorry, you don't have enough Zeny.";
close;
} }
Zeny -= .@ResetBoth; if(.@i&2) ResetStatus;
sc_end SC_ALL;
resetskill;
resetstatus;
mes "There you go!"; mes "There you go!";
if(.@Reset[3]) set reset_limit,reset_limit + 1;
close; close;
case 4:
close;
}
} }