resetnpc.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //===== rAthena Script =======================================
  2. //= Reset NPC
  3. //===== Description: =========================================
  4. //= Resets skills, stats, or both.
  5. //===== Additional Comments: =================================
  6. //= 1.0 First Version
  7. //= 1.1 Optimized for the greater good. [Kisuka]
  8. //= 1.2 Cleaning [Euphy]
  9. //= 1.3 All statuses removed upon skill reset. [Euphy]
  10. //= 1.4 Compressed Script, Added limit use option [Stolao]
  11. //= Changed set -> setarray, Improved text with F_InsertPlural
  12. //= 1.5 Added sc_end_class to reset related status changes [sader1992]
  13. //============================================================
  14. prontera,150,193,4 script Reset Girl 124,{
  15. // Skills, Stats, Both, Limit
  16. setarray .@Reset, 5000, 5000, 9000, 0;
  17. mes "[Reset Girl]";
  18. if(.@Reset[3] && reset_limit > .@Reset[3]) {
  19. mes "Sorry you can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life.";
  20. close;
  21. }
  22. mes "I am the Reset Girl.";
  23. mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z";
  24. mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z";
  25. mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z";
  26. if(.@Reset[3]) mes "You may only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+", so use "+((.@Reset[3]>1)?"them":"it")+" wisely.";
  27. mes "Please select the service you want:";
  28. next;
  29. set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel"));
  30. if(.@i > 3) close;
  31. mes "[Reset Girl]";
  32. if (Zeny < .@Reset[.@i-1]) {
  33. mes "Sorry, you don't have enough Zeny.";
  34. close;
  35. }
  36. if(.@Reset[3]){
  37. mes "You can only reset "+callfunc("F_InsertPlural",.@Reset[3],"time")+" in your life, are you sure?";
  38. if(select("Let me think:That's fine") == 1) close;
  39. }
  40. set Zeny, Zeny-.@Reset[.@i-1];
  41. if(.@i&1){
  42. sc_end_class;
  43. ResetSkill;
  44. }
  45. if(.@i&2) ResetStatus;
  46. mes "There you go!";
  47. if(.@Reset[3]) set reset_limit,reset_limit + 1;
  48. close;
  49. }