summaryrefslogtreecommitdiff
path: root/npc/functions/nurse.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/nurse.txt')
-rw-r--r--npc/functions/nurse.txt27
1 files changed, 11 insertions, 16 deletions
diff --git a/npc/functions/nurse.txt b/npc/functions/nurse.txt
index d63f5fe68..0e6b0b4b4 100644
--- a/npc/functions/nurse.txt
+++ b/npc/functions/nurse.txt
@@ -13,6 +13,15 @@ function script Nurse {
// Handle redirects
.@d=getarg(3, 3);
+ // Calculate price
+ .@price=(MaxHp-Hp)/getarg(1,5);
+ .@price=.@price+getarg(2, 10);
+ if (BaseLevel <= 15) .@price=(.@price/10);
+ else if (BaseLevel <= 20) .@price=(.@price/5);
+ else .@price=(.@price/2);
+
+
+ // 1 - Only Healing Dialog and return .@price
if (.@d & 1) {//&1
mes "";
mesn getarg(0);
@@ -35,13 +44,6 @@ function script Nurse {
}
mes "";
- // Calculate price
- .@price=(MaxHp-Hp)/getarg(1,5);
- .@price=.@price+getarg(2, 10);
- if (BaseLevel <= 15) .@price=(.@price/10);
- else if (BaseLevel <= 20) .@price=(.@price/5);
- else .@price=(.@price/2);
-
// Skip menu flag
if (!(.@d & 2))
return .@price;
@@ -59,16 +61,9 @@ function script Nurse {
}
}// & 1
- if (.@d & 2) { // &2
- if (!(.@d & 1)) {
- // (Re)Calculate price
- .@price=(MaxHp-Hp)/getarg(1,5);
- .@price=.@price+getarg(2, 10);
- if (BaseLevel <= 15) .@price=(.@price/10);
- else if (BaseLevel <= 20) .@price=(.@price/5);
- else .@price=(.@price/2);
- }
+ // Allowed Nurse to do the healing
+ if (.@d & 2) { // &2
// Heal persona
mes "";