summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/dev/test.txt7
-rw-r--r--npc/instances/SealedShrine.txt13
2 files changed, 14 insertions, 6 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index 8e94d6ee7..9c2de9a55 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -611,6 +611,10 @@ function script HerculesSelfTestHelper {
callsub(OnCheck, "Callsub (parent scope vars isolation)", .@x, 1);
callsub(OnCheck, "Callsub (nested scopes)", callsub(OnTestNestedScope), 1);
callsub(OnCheck, "Callsub (deeply nested scopes)", callsub(OnTestDeepNestedScope, 30, 0), 1);
+ .@x = 1;
+ .@y = callsub(OnSetReference, .@x);
+ callsub(OnCheck, "Callsub (setting references)", .@y, 2);
+ callsub(OnCheck, "Callsub (setting references)", .@x, 2);
deletearray .@x;
setarray .@x, 1, 2, 3, 4;
callsub(OnCheck, "Callsub (array references)", callsub(OnTestArrayRefs, .@x), 4);
@@ -750,6 +754,9 @@ OnCheckStr:
callsub(OnReportError, .@msg$, .@val$, .@ref$);
}
return;
+OnSetReference:
+ set getarg(0), getarg(0) + 1;
+ return getarg(0);
}
- script HerculesSelfTest -1,{
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index 240bc1ac4..5bbe81d27 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -121,7 +121,7 @@ monk_test,309,146,3 script Friar Patrick#edq 4_M_OLDFRIAR,{
}
else {
for (.@i = 1; .@i <= 2; ++.@i) {
- if( instance_attachmap("" + .@i + "@cata", .@instance) == "" )
+ if( instance_attachmap(.@i + "@cata", .@instance) == "" )
break;
}
if( .@i < 2 ) {
@@ -348,7 +348,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
next;
mes "[Rust Blackhand]";
mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
- if (questprogress(3042)==1)
+ if (questprogress(3042))
erasequest 3042;
setquest 3043;
close;
@@ -366,12 +366,12 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
close;
}
}
- else if (!.@new_maje && countitem(6004) == 0) {
+ else if (!.@new_maje && !countitem(6004)) {
mes "[Rust Blackhand]";
mes "If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?";
close;
}
- else if (.@new_maje == 2 && countitem(6004) > 0) {
+ else if (.@new_maje == 2 && countitem(6004)) {
switch(select("About the Cursed Baphomet Doll:Stop talking.")) {
case 1:
mes "[Rust Blackhand]";
@@ -405,8 +405,9 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
next;
mes "[Rust Blackhand]";
mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
- if (questprogress(3042)==1)
+ if (questprogress(3042))
erasequest 3042;
+ erasequest 3043;
setquest 3043;
close;
case 2:
@@ -423,7 +424,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 4_M_DWARF,{
close;
}
}
- else if (.@new_maje == 2 && countitem(6004) == 0) {
+ else if (.@new_maje == 2 && !countitem(6004)) {
mes "[Rust Blackhand]";
mes "Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away.";
close;