summaryrefslogtreecommitdiff
path: root/world/map/npc/009-4/barriers.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/009-4/barriers.txt')
-rw-r--r--world/map/npc/009-4/barriers.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/world/map/npc/009-4/barriers.txt b/world/map/npc/009-4/barriers.txt
index f3f2e085..ae960d97 100644
--- a/world/map/npc/009-4/barriers.txt
+++ b/world/map/npc/009-4/barriers.txt
@@ -1,8 +1,13 @@
//# see detailed description at orum.txt
function|script|GetBarrierColor|,
{
- if (@Barrier < 0 || @Barrier > 2) goto L_Error;
+ if (@Barrier < 0 || @Barrier > 2)
+ goto L_Error;
+ if (@BarrierColor <= 0 || @BarrierColor > 12)
+ goto L_Error2;
+ goto L_GetBarrierColor;
+L_GetBarrierColor:
set @Mask, 15;
set @Shift, 4 * @Barrier;
set @BarrierColor, (OrumQuestBarrier >> @Shift) & @Mask;
@@ -11,6 +16,10 @@ function|script|GetBarrierColor|,
L_Error:
mes "Barrier number is out of range.";
close;
+
+L_Error2:
+ callfunc "SetUpOrumQuest";
+ goto L_GetBarrierColor;
}
function|script|SetBarrierColor|,