summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/inn.txt
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2015-04-30 01:11:22 -0500
committerWushin <pasekei@gmail.com>2015-04-30 01:11:22 -0500
commit49b17a120e1b9ae26ef3039219051745ff46e913 (patch)
tree877deffe3f331b74d6af72bc0cf8f30f840736aa /world/map/npc/functions/inn.txt
parentb28709f705abf9ca0fff5bf79f95d0599722fdff (diff)
parent3a0df71ee09f9fceb323f608638cc94d9d65124e (diff)
downloadclassic-serverdata-49b17a120e1b9ae26ef3039219051745ff46e913.tar.gz
classic-serverdata-49b17a120e1b9ae26ef3039219051745ff46e913.tar.bz2
classic-serverdata-49b17a120e1b9ae26ef3039219051745ff46e913.tar.xz
classic-serverdata-49b17a120e1b9ae26ef3039219051745ff46e913.zip
Merge pull request #336 from mekolat/new-builtins
Use the new builtins
Diffstat (limited to 'world/map/npc/functions/inn.txt')
-rw-r--r--world/map/npc/functions/inn.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/world/map/npc/functions/inn.txt b/world/map/npc/functions/inn.txt
index ffa75582..e45c398c 100644
--- a/world/map/npc/functions/inn.txt
+++ b/world/map/npc/functions/inn.txt
@@ -2,12 +2,13 @@
function|script|Inn
{
+ if(@npcname$ == "") set @npcname$, strnpcinfo(1);
mes "[" + @npcname$ + "]";
mes "\"Would you like to rest? It's only " + @cost + " gp.\"";
next;
menu
"Yes", L_Next,
- "No", L_No;
+ "No", L_Close;
L_Next:
if (Zeny < @cost)
@@ -17,15 +18,18 @@ L_Next:
mes "[" + @npcname$ + "]";
mes "\"Sleep well!\"";
- close;
+ next;
+ goto L_Close;
-L_No:
+L_Close:
mes "[" + @npcname$ + "]";
mes "\"See you.\"";
+ set @npcname$, "";
close;
L_NoMoney:
mes "[" + @npcname$ + "]";
mes "\"You don't have enough money to stay here.\"";
- close;
+ next;
+ goto L_Close;
}