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 | |
---|
21 | prontera,150,184,5 script Healer#h2-1::Healer2 742,{ |
---|
22 | set @tempHp, MaxHp-Hp; |
---|
23 | set @tempSpReal, MaxSp-Sp; |
---|
24 | set @tempSp, ((MaxSp-Sp) * BaseLevel) / 5; |
---|
25 | if (@tempHp > 0) goto WOUNDED; |
---|
26 | if (@tempSpReal > 0) goto ONLY_REGENERATION; |
---|
27 | |
---|
28 | mes "[Healer]"; |
---|
29 | mes "Oh?"; |
---|
30 | mes "You do not look like a person in pain."; |
---|
31 | close; |
---|
32 | |
---|
33 | WOUNDED: |
---|
34 | if (@tempSp > 0) goto WITH_REGENERATION; |
---|
35 | mes "[Healer]"; |
---|
36 | mes "Oh dear, you look really hurt,"; |
---|
37 | mes "I can cure you for: "+@tempHp+" z)"; |
---|
38 | mes "Do you want me to cure you?"; |
---|
39 | next; |
---|
40 | menu "Healings ("+@tempHp+"z)",HEALINGS,"No, thanks",CANCEL; |
---|
41 | |
---|
42 | WITH_REGENERATION: |
---|
43 | mes "[Healer]"; |
---|
44 | mes "Do you want only your HP to be healed? ("+@tempHp+" z)"; |
---|
45 | mes "Do you want only your SP to be healed? ("+@tempSp+" z)?"; |
---|
46 | mes "Or Would you like both? ("+(@tempHp+@tempSp)+" z)"; |
---|
47 | next; |
---|
48 | menu "Only HP ("+@tempHp+"z)",HEALINGS,"Only SP ("+@tempSp+"z)",REGENERATION,"Both HP & SP ("+(@tempHp+@tempSp)+"z)",HEALINGS_AND_REGEN,"Nothing, thanks",CANCEL; |
---|
49 | |
---|
50 | ONLY_REGENERATION: |
---|
51 | mes "[Healer]"; |
---|
52 | mes "So, you only want your SP to heal? ("+@tempSp+" z)"; |
---|
53 | mes "I need to make a living..."; |
---|
54 | next; |
---|
55 | menu "Regeneration ("+@tempSp+"z)",REGENERATION,"No, thanks",CANCEL; |
---|
56 | |
---|
57 | HEALINGS: |
---|
58 | if (Zeny < @tempHp) goto NO_ZENYS; |
---|
59 | set Zeny, Zeny-@tempHp; |
---|
60 | heal @tempHp,0; |
---|
61 | goto FIN; |
---|
62 | |
---|
63 | REGENERATION: |
---|
64 | if (Zeny < @tempSp) goto NO_ZENYS; |
---|
65 | set Zeny, Zeny-@tempSp; |
---|
66 | heal 0,@tempSpReal; |
---|
67 | goto FIN; |
---|
68 | |
---|
69 | HEALINGS_AND_REGEN: |
---|
70 | if (Zeny < (@tempHp+@tempSp)) goto NO_ZENYS; |
---|
71 | set Zeny, Zeny-(@tempHp+@tempSp); |
---|
72 | heal @tempHp,@tempSpReal; |
---|
73 | goto FIN; |
---|
74 | |
---|
75 | NO_ZENYS: |
---|
76 | mes "[Healer]"; |
---|
77 | mes "Oh dear, you don't look like you have enough zeny."; |
---|
78 | mes "Sorry, i can't help you."; |
---|
79 | close; |
---|
80 | |
---|
81 | FIN: |
---|
82 | mes "[Healer]"; |
---|
83 | mes "You are Completely Healed."; |
---|
84 | close; |
---|
85 | |
---|
86 | CANCEL: |
---|
87 | mes "[Healer]"; |
---|
88 | mes "Allright. Please come again if you need anything."; |
---|
89 | close; |
---|
90 | } |
---|
91 | |
---|
92 | |
---|
93 | morocc,159,96,5 duplicate(Healer2) Healer#h2-2 742 |
---|
94 | ayothaya,155,111,5 duplicate(Healer2) Healer#h2-3 742 |
---|
95 | geffen,121,61,5 duplicate(Healer2) Healer#h2-4 742 |
---|
96 | umbala,94,162,5 duplicate(Healer2) Healer#h2-5 742 |
---|
97 | payon,180,105,5 duplicate(Healer2) Healer#h2-6 742 |
---|
98 | alberta,185,144,5 duplicate(Healer2) Healer#h2-7 742 |
---|
99 | aldebaran,134,123,5 duplicate(Healer2) Healer#h2-8 742 |
---|
100 | izlude,125,118,5 duplicate(Healer2) Healer#h2-9 742 |
---|
101 | xmas,149,136,5 duplicate(Healer2) Healer#h2-10 742 |
---|
102 | comodo,188,162,5 duplicate(Healer2) Healer#h2-11 742 |
---|
103 | amatsu,200,80,5 duplicate(Healer2) Healer#h2-12 742 |
---|
104 | gonryun,164,130,5 duplicate(Healer2) Healer#h2-13 742 |
---|
105 | yuno,152,186,5 duplicate(Healer2) Healer#h2-14 742 |
---|
106 | niflheim,188,180,5 duplicate(Healer2) Healer#h2-15 742 |
---|
107 | louyang,225,103,5 duplicate(Healer2) Healer#h2-16 742 |
---|