//===== eAthena Script =======================================
//= Nyxsis Reset Agent NPC
//===== By: ==================================================
//= Lucas Murray <admin@undefinedfire.com>
//===== URL: =================================================
//= http://www.nyxsis-ro.com
//===== Current Version: =====================================
//= 1.1a
//===== Description: =========================================
//= Customised Reset NPC for use on NyxsisRO only.
//============================================================
prontera.gat,148,190,4 script Reset Agent 899,{
LStart:
mes "[Reset Agent]";
mes "I see that you have picked up some bad battle scars on your adventure. Would you like me to make you forget all about them?";
next;
LGetPrice:
// Shift the formula a few levels
set @priceLevel, BaseLevel - 5;
if(@priceLevel < 1) set @priceLevel, 1;
// So yeah, numbers in this scripting language are all 32bit signed integers. It can't even support 99 to the power
// of five none-the-less to the power of seven. Lets send it to MySQL and let that do the equation instead. ^_^
query_sql "SELECT POWER("+@priceLevel+", 7)/10000000", @resetCost;
set @resetCost, @resetCost[0];
// If trancended increase the price 2x
if(Upper == 1) set @resetCost, @resetCost*2;
// Job-based price changes (Ignore priest change price until Nyxsis grows)
if(BaseJob == Job_Alchem || BaseJob == Job_Blacksmith) set @resetCost, @resetCost*3;
if(BaseJob == Job_Gunslinger) set @resetCost, @resetCost*3/4;
if(BaseJob == Job_Ninja) set @resetCost, @resetCost*3/4;
//if(BaseJob == Job_Priest) set @resetCost, @resetCost*2;
//if(BaseJob == Job_SuperNovice || (BaseJob == Job_Novice && BaseLevel > 44)) set @resetCost, @resetCost*2;
// Minimum 100z
if(@resetCost < 100) set @resetCost, 100;
// Format the cost (DUDE! The query_sql function rocks!)
query_sql "SELECT FORMAT("+@resetCost+", 0)", @formattedCost$;
set @formattedCost$, @formattedCost$[0];
LMainMenu:
menu "Reset Stats",LStats,"Reset Skills",LSkills,"Why do you charge so much?",LAbout,"Sorry to bother you",LEnd;
LStats:
mes "[Reset Agent]";
mes "Would like me to reset all your player stats?";
mes "^FF0000It will cost "+@formattedCost$+"z";
next;
menu "Yes, I want to reset my stats",-,"I'm fine how I am",LEnd;
if(Zeny < @resetCost) goto LPoor;
mes "[Reset Agent]";
mes "Alright, your player stats have been reset! Make sure you use them wisely this time.";
set Zeny, Zeny - @resetCost;
logmes "Reset Agent: "+strcharinfo(0)+" has reset their status.";
ResetStatus;
close;
LSkills:
mes "[Reset Agent]";
mes "Would like me to reset all your job skills? Please note that all your quest skills will still remain available after the reset.";
mes "^FF0000It will cost "+@formattedCost$+"z";
next;
menu "Yes, I want to reset my skills",-,"I'm fine how I am",LEnd;
if(Zeny < @resetCost) goto LPoor;
mes "[Reset Agent]";
mes "Alright, your job skills have been reset! Make sure you use them wisely this time.";
set Zeny, Zeny - @resetCost;
logmes "Reset Agent: "+strcharinfo(0)+" has reset their skills.";
ResetSkill;
close;
LPoor:
mes "[Reset Agent]";
mes "I'm sorry but I cannot give out my services for free. Please come back when you have enough zeny.";
close;
LAbout:
mes "[Reset Agent]";
mes "Here at Nyxsis, we really value giving people a fair chance to make their mark, as well as grant people opportunities to reset if they've made mistakes.";
next;
mes "[Reset Agent]";
mes "While we expect you to do your research when building your character, we realize that you can't be perfect on the first try.";
next;
mes "[Reset Agent]";
mes "This is our way of granting you that wish, while preventing people from exploiting it.";
next;
mes "[Reset Agent]";
mes "So you want to know how I determine my price? Well, the price of a reset increases with the amount of base experience you have.";
next;
mes "[Reset Agent]";
mes "There is also a slight price difference depending on your job, for example both alchemists and blacksmiths are more expensive. Prices for characters that have transcended are also greater.";
next;
mes "[Reset Agent]";
mes "Again, my services are only available to whom have made a mistake in their choice of build. Please do not exploit this, you will probably be losing more money than it's worth.";
next;
mes "[Reset Agent]";
mes "Would you like to reset now before getting more battle experience?";
next;
goto LMainMenu;
LEnd:
mes "[Reset Agent]";
mes "Remember Nyxsis is all about have fun, please read and follow the rules.";
close;
}