heal_payment.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. //===== eAthena Script =======================================
  2. //= Healer Script (/w payments)
  3. //===== By: ==================================================
  4. //= Yor & abunch of other people
  5. //===== Current Version: =====================================
  6. //= 1.3
  7. //===== Compatible With: =====================================
  8. //= Any Athena Version
  9. //===== Description: =========================================
  10. //= NPC heals/regenerates people against zenys
  11. //===== Additional Comments: =================================
  12. //= alternative dog with payment.
  13. //= each HP need 1 zeny
  14. //= each SP need (baselevel / 5) zenys
  15. //= calculation is done at start of the script
  16. //= Added Duplicates And Correct payon Loc [Darkchild]
  17. //= Some modifications. Added NPC locations. [massdriller]
  18. //= Removed Duplicates [Silent]
  19. //============================================================
  20. prontera,150,184,5 script Healer#h2-1::Healer2 742,{
  21. set @tempHp, MaxHp-Hp;
  22. set @tempSpReal, MaxSp-Sp;
  23. set @tempSp, ((MaxSp-Sp) * BaseLevel) / 5;
  24. if (@tempHp > 0) goto WOUNDED;
  25. if (@tempSpReal > 0) goto ONLY_REGENERATION;
  26. mes "[Healer]";
  27. mes "Oh?";
  28. mes "You do not look like a person in pain.";
  29. close;
  30. WOUNDED:
  31. if (@tempSp > 0) goto WITH_REGENERATION;
  32. mes "[Healer]";
  33. mes "Oh dear, you look really hurt,";
  34. mes "I can cure you for: "+@tempHp+" z)";
  35. mes "Do you want me to cure you?";
  36. next;
  37. menu "Healings ("+@tempHp+"z)",HEALINGS,"No, thanks",CANCEL;
  38. WITH_REGENERATION:
  39. mes "[Healer]";
  40. mes "Do you want only your HP to be healed? ("+@tempHp+" z)";
  41. mes "Do you want only your SP to be healed? ("+@tempSp+" z)?";
  42. mes "Or Would you like both? ("+(@tempHp+@tempSp)+" z)";
  43. next;
  44. menu "Only HP ("+@tempHp+"z)",HEALINGS,"Only SP ("+@tempSp+"z)",REGENERATION,"Both HP & SP ("+(@tempHp+@tempSp)+"z)",HEALINGS_AND_REGEN,"Nothing, thanks",CANCEL;
  45. ONLY_REGENERATION:
  46. mes "[Healer]";
  47. mes "So, you only want your SP to heal? ("+@tempSp+" z)";
  48. mes "I need to make a living...";
  49. next;
  50. menu "Regeneration ("+@tempSp+"z)",REGENERATION,"No, thanks",CANCEL;
  51. HEALINGS:
  52. if (Zeny < @tempHp) goto NO_ZENYS;
  53. set Zeny, Zeny-@tempHp;
  54. heal @tempHp,0;
  55. goto FIN;
  56. REGENERATION:
  57. if (Zeny < @tempSp) goto NO_ZENYS;
  58. set Zeny, Zeny-@tempSp;
  59. heal 0,@tempSpReal;
  60. goto FIN;
  61. HEALINGS_AND_REGEN:
  62. if (Zeny < (@tempHp+@tempSp)) goto NO_ZENYS;
  63. set Zeny, Zeny-(@tempHp+@tempSp);
  64. heal @tempHp,@tempSpReal;
  65. goto FIN;
  66. NO_ZENYS:
  67. mes "[Healer]";
  68. mes "Oh dear, you don't look like you have enough zeny.";
  69. mes "Sorry, i can't help you.";
  70. close;
  71. FIN:
  72. mes "[Healer]";
  73. mes "You are Completely Healed.";
  74. close;
  75. CANCEL:
  76. mes "[Healer]";
  77. mes "Allright. Please come again if you need anything.";
  78. close;
  79. }
  80. morocc,159,96,5 duplicate(Healer2) Healer#h2-2 742
  81. ayothaya,155,111,5 duplicate(Healer2) Healer#h2-3 742
  82. geffen,121,61,5 duplicate(Healer2) Healer#h2-4 742
  83. umbala,94,162,5 duplicate(Healer2) Healer#h2-5 742
  84. payon,180,105,5 duplicate(Healer2) Healer#h2-6 742
  85. alberta,185,144,5 duplicate(Healer2) Healer#h2-7 742
  86. aldebaran,134,123,5 duplicate(Healer2) Healer#h2-8 742
  87. izlude,125,118,5 duplicate(Healer2) Healer#h2-9 742
  88. xmas,149,136,5 duplicate(Healer2) Healer#h2-10 742
  89. comodo,188,162,5 duplicate(Healer2) Healer#h2-11 742
  90. amatsu,200,80,5 duplicate(Healer2) Healer#h2-12 742
  91. gonryun,164,130,5 duplicate(Healer2) Healer#h2-13 742
  92. yuno,152,186,5 duplicate(Healer2) Healer#h2-14 742
  93. niflheim,188,180,5 duplicate(Healer2) Healer#h2-15 742
  94. louyang,225,103,5 duplicate(Healer2) Healer#h2-16 742