resetnpc.txt 2.1 KB

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