summaryrefslogtreecommitdiff
path: root/npc/003-1/taree.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-24 09:31:04 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-24 09:31:04 -0300
commitf0bb6f6af0d05e67af0d827d1d3b1fe160d5e05e (patch)
treec9a1c8c3d32bd142a8092572888decc77dec63d7 /npc/003-1/taree.txt
parent41f3f54bf2f770f8682aae8b4b9393661cec493c (diff)
downloadserverdata-f0bb6f6af0d05e67af0d827d1d3b1fe160d5e05e.tar.gz
serverdata-f0bb6f6af0d05e67af0d827d1d3b1fe160d5e05e.tar.bz2
serverdata-f0bb6f6af0d05e67af0d827d1d3b1fe160d5e05e.tar.xz
serverdata-f0bb6f6af0d05e67af0d827d1d3b1fe160d5e05e.zip
Rewrite Taree to use a function
Diffstat (limited to 'npc/003-1/taree.txt')
-rw-r--r--npc/003-1/taree.txt27
1 files changed, 17 insertions, 10 deletions
diff --git a/npc/003-1/taree.txt b/npc/003-1/taree.txt
index 2980140f0..f45e89481 100644
--- a/npc/003-1/taree.txt
+++ b/npc/003-1/taree.txt
@@ -4,14 +4,19 @@
// Description:
// Mouboo Renting (var MOUBOO_RENTTIME )
-003-1,63,31,0 script Taree NPC_ELVEN_MAN_MOUBOO_SHOP,{
- if (MOUBOO_RENTTIME > gettimetick(2))
- goto L_Rented;
+// MoubooRent( NPC Name )
+function script MoubooRent {
+ .@n$=getarg(0, strnpcinfo(0));
+ if (MOUBOO_RENTTIME > gettimetick(2)) {
+ mesn .@n$;
+ mesq l("Moo!");
+ return;
+ }
- mesn;
+ mesn .@n$;
mesq l("Moo!");
next;
- mesn;
+ mesn .@n$;
mesq l("Do you want to rent a Mouboo? It allows quick traveling!");
next;
menuint
@@ -24,7 +29,7 @@
mes "";
switch (@menuret) {
case 0:
- close;
+ return;
case 100:
.@time=86400; break;
case 270:
@@ -43,11 +48,13 @@
MOUBOO_RENTTIME=gettimetick(2)+.@time;
Zeny-=@menuret;
rentitem RidingMouboo, .@time;
- close;
+ return;
+}
-L_Rented:
- mesn;
- mesq l("Moo!");
+003-1,63,31,0 script Taree NPC_ELVEN_MAN_MOUBOO_SHOP,{
+ MoubooRent();
+ closeclientdialog;
+ goodbye();
close;
OnInit: