summaryrefslogtreecommitdiff
path: root/world/map/npc/009-4/barriers.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-10-20 23:08:32 -0500
committerwushin <pasekei@gmail.com>2014-10-20 23:10:33 -0500
commitfe2f7f944eb90bcbad53a1d9b86f2d09025f2217 (patch)
tree0084c41e598ae8f5d935d51b51e96c09e001fc4e /world/map/npc/009-4/barriers.txt
parent2882833197d794e77616e211834022dc3538a6d9 (diff)
downloadserverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.tar.gz
serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.tar.bz2
serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.tar.xz
serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.zip
Reset barriers if barrier color 0
closes #180
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|,