From fe2f7f944eb90bcbad53a1d9b86f2d09025f2217 Mon Sep 17 00:00:00 2001 From: wushin Date: Mon, 20 Oct 2014 23:08:32 -0500 Subject: Reset barriers if barrier color 0 closes #180 --- world/map/npc/009-4/barriers.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'world/map/npc/009-4/barriers.txt') 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|, -- cgit v1.2.3-70-g09d2