summaryrefslogtreecommitdiff
path: root/npc/custom/healers/heal_payment.txt
blob: e8d2e4f6c2e961a8ccc711ef984f28fa90bbd7d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//===== rAthena Script =======================================
//= Healer (with payment)
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= NPC heals/regenerates people against zenys
//===== Additional Comments: =================================
//= alternative dog with payment.
//= each HP need 1 zeny
//= each SP need (baselevel / 5) zenys
//= calculation is done at start of the script
//= Added Duplicates And Correct payon Loc [Darkchild]
//= Some modifications. Added NPC locations. [massdriller]
//= Removed Duplicates [Silent]
//============================================================

-	script	healer2	-1,{
	set @tempHp, MaxHp-Hp;
	set @tempSpReal, MaxSp-Sp;
	set @tempSp, ((MaxSp-Sp) * BaseLevel) / 5;
	if (@tempHp > 0) goto WOUNDED;
	if (@tempSpReal > 0) goto ONLY_REGENERATION;
	
	mes "[Healer]";
	mes "Oh?";
	mes "You do not look like a person in pain.";
	close;

WOUNDED:
	if (@tempSp > 0) goto WITH_REGENERATION;
	mes "[Healer]";
	mes "Oh dear, you look really hurt,";
	mes "I can cure you for: "+@tempHp+" z)";
	mes "Do you want me to cure you?";
	next;
	menu "Healings ("+@tempHp+"z)",HEALINGS,"No, thanks",CANCEL;

WITH_REGENERATION:
	mes "[Healer]";
	mes "Do you want only your HP to be healed? ("+@tempHp+" z)";
	mes "Do you want only your SP to be healed? ("+@tempSp+" z)?";
	mes "Or Would you like both? ("+(@tempHp+@tempSp)+" z)";
	next;
	menu "Only HP ("+@tempHp+"z)",HEALINGS,"Only SP ("+@tempSp+"z)",REGENERATION,"Both HP & SP ("+(@tempHp+@tempSp)+"z)",HEALINGS_AND_REGEN,"Nothing, thanks",CANCEL;

ONLY_REGENERATION:
	mes "[Healer]";
	mes "So, you only want your SP to heal? ("+@tempSp+" z)";
	mes "I need to make a living...";
	next;
	menu "Regeneration ("+@tempSp+"z)",REGENERATION,"No, thanks",CANCEL;

HEALINGS:
	if (Zeny < @tempHp) goto NO_ZENYS;
	set Zeny, Zeny-@tempHp;
	heal @tempHp,0;
	goto FIN;

REGENERATION:
	if (Zeny < @tempSp) goto NO_ZENYS;
	set Zeny, Zeny-@tempSp;
	heal 0,@tempSpReal;
	goto FIN;

HEALINGS_AND_REGEN:
	if (Zeny < (@tempHp+@tempSp)) goto NO_ZENYS;
	set Zeny, Zeny-(@tempHp+@tempSp);
	heal @tempHp,@tempSpReal;
	goto FIN;

NO_ZENYS:
	mes "[Healer]";
	mes "Oh dear, you don't look like you have enough zeny.";
	mes "Sorry, i can't help you.";
	close;

FIN:
	mes "[Healer]";
	mes "You are Completely Healed.";
	close;

CANCEL:
	mes "[Healer]";
	mes "Allright. Please come again if you need anything.";
	close;
}

// NPC Duplicates
alberta,185,144,5	duplicate(healer2)	Healer#alb	742
aldebaran,134,123,5	duplicate(healer2)	Healer#alde	742
amatsu,200,80,5	duplicate(healer2)	Healer#ama	742
ayothaya,155,111,5	duplicate(healer2)	Healer#ayo	742
comodo,188,162,5	duplicate(healer2)	Healer#com	742
geffen,121,61,5	duplicate(healer2)	Healer#gef	742
gonryun,164,130,5	duplicate(healer2)	Healer#gon	742
izlude,125,118,5	duplicate(healer2)	Healer#izl	742
louyang,225,103,5	duplicate(healer2)	Healer#lou	742
morocc,159,96,5	duplicate(healer2)	Healer#mor	742
niflheim,188,180,5	duplicate(healer2)	Healer#nif	742
payon,180,105,5	duplicate(healer2)	Healer#pay	742
prontera,150,184,5	duplicate(healer2)	Healer#pront	742
umbala,94,162,5	duplicate(healer2)	Healer#umb	742
xmas,149,136,5	duplicate(healer2)	Healer#xmas	742
yuno,152,186,5	duplicate(healer2)	Healer#yuno	742