summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/banker.txt40
-rw-r--r--npc/functions/barber.txt3
-rw-r--r--npc/functions/magic.txt2
-rw-r--r--npc/functions/mob_points.txt7
-rw-r--r--npc/functions/strangerquiz.txt7
5 files changed, 46 insertions, 13 deletions
diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt
index 00f033c9..3c060071 100644
--- a/npc/functions/banker.txt
+++ b/npc/functions/banker.txt
@@ -1,6 +1,7 @@
//
function script Banker {
+
if (BankAccount > 0) callsub S_MoveAccount;
L_Start:
@@ -13,13 +14,16 @@ L_Start:
"Withdraw", L_With,
"Check my balance", L_Balance,
"Open my storage", L_Storage,
+ "Change Bank Options", L_Change,
"Nevermind", L_Nev;
-
+
close;
-
+
// need to close window before opening storage.
L_Storage:
+ if (#BankOptions & OPT_STORAGE_CLOSE) close2;
openstorage;
+ if (#BankOptions & OPT_STORAGE_CLOSE) end;
goto L_Start;
L_Dep:
@@ -40,7 +44,7 @@ L_Dep:
"I've changed my mind", L_Start,
"Quit", -;
return;
-
+
L_Dep_Input:
input @Amount;
if (@Amount >= 0) goto L_Dep_Continue;
@@ -96,13 +100,13 @@ L_Dep_1kk:
L_Dep_All:
if (zeny<1) goto L_NoMoney;
set @Amount, zeny;
-
+
L_Dep_Continue:
if (zeny < @Amount) goto L_NoMoney;
set zeny, zeny - @Amount;
set #BankAccount, #BankAccount + @Amount;
goto L_Balance;
-
+
L_With:
mes "[" + @npcname$ + "]";
mes "\"How much would you like to withdraw?\"";
@@ -182,25 +186,43 @@ L_With_Continue:
set zeny, zeny + @Amount;
set #BankAccount, #BankAccount - @Amount;
goto L_Balance;
-
+
L_Balance:
mes "[" + @npcname$ + "]";
mes "\"Your current bank balance is:";
mes #BankAccount + " GP\"";
+ if (#BankOptions & OPT_BANK_CLOSE) close;
goto L_Start;
-
+
L_Nev:
mes "[" + @npcname$ + "]";
mes "\"Goodbye then.\"";
return;
-
+
L_NoMoney:
mes "[" + @npcname$ + "]";
mes "\"Oh dear, it seems that you don't have enough money.\"";
goto L_Start;
-
+
S_MoveAccount:
set #BankAccount, #BankAccount + BankAccount;
set BankAccount, 0;
return;
+
+L_Change:
+ setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance";
+ if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage";
+ if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank";
+ menu
+ @menuitems$[0], L_Start,
+ @menuitems$[1], L_Change_Storage,
+ @menuitems$[2], L_Change_Bank;
+
+L_Change_Storage:
+ set #BankOptions, (#BankOptions ^ OPT_STORAGE_CLOSE);
+ goto L_Start;
+
+L_Change_Bank:
+ set #BankOptions, (#BankOptions ^ OPT_BANK_CLOSE);
+ goto L_Start;
}
diff --git a/npc/functions/barber.txt b/npc/functions/barber.txt
index 28f17ec5..8d0a32e3 100644
--- a/npc/functions/barber.txt
+++ b/npc/functions/barber.txt
@@ -28,12 +28,13 @@ L_Style:
"Mane", -,
"Bun", -,
"Shoulder Length Flick", -,
+ "Fizzy", -,
"Surprise me", -,
"Nah, I'm fine", L_Done;
L_Process_Style:
set @style, @menu - 1;
- if (@style == 18) set @style, rand(18);
+ if (@style == 19) set @style, rand(19);
setlook 1, @style;
return;
diff --git a/npc/functions/magic.txt b/npc/functions/magic.txt
index 6e741312..c4abcab6 100644
--- a/npc/functions/magic.txt
+++ b/npc/functions/magic.txt
@@ -147,7 +147,7 @@ L_Q_post_astralsoul:
set @menu, 0;
set @c, @choice_idx[@menu];
- return @c;
+ return;
}
diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt
index 54ee47bc..a84e24a5 100644
--- a/npc/functions/mob_points.txt
+++ b/npc/functions/mob_points.txt
@@ -7,7 +7,7 @@ function script MobPoints {
1, // Maggot
2, // Scorpion
20, // Red Scorpion
- 10, // Green Slime
+ 40, // Green Slime
30, // Giant Maggot
15, // Yellow Slime
25, // Red Slime
@@ -43,7 +43,7 @@ function script MobPoints {
5, // Squirrel
0, // Fire Lizard
80, // Wisp
- 0, // Snail
+ 15, // Snail
80, // Spectre
100, // Skeleton
100, // Lady Skeleton
@@ -82,6 +82,9 @@ function script MobPoints {
100, // Drunken Skeleton
100, // Tipsy Skeleton
100, // Drunken Lady Skeleton
+ 60, // BlueSpark
+ 60, // RedSpark
+ 0, // Serqet
// Add more here
0; // END
diff --git a/npc/functions/strangerquiz.txt b/npc/functions/strangerquiz.txt
new file mode 100644
index 00000000..28fc6887
--- /dev/null
+++ b/npc/functions/strangerquiz.txt
@@ -0,0 +1,7 @@
+
+function script StrangerQuiz {
+ // param @quizparam$$
+ // return in @quizanswer$
+ set @quizanswer$, getspellinvocation(@quizparam$);
+ return;
+}