summaryrefslogtreecommitdiff
path: root/world/map/npc/009-4/orum.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/orum.txt
parent2882833197d794e77616e211834022dc3538a6d9 (diff)
downloadclassic-serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.tar.gz
classic-serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.tar.bz2
classic-serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.tar.xz
classic-serverdata-fe2f7f944eb90bcbad53a1d9b86f2d09025f2217.zip
Reset barriers if barrier color 0
closes #180
Diffstat (limited to 'world/map/npc/009-4/orum.txt')
-rw-r--r--world/map/npc/009-4/orum.txt99
1 files changed, 67 insertions, 32 deletions
diff --git a/world/map/npc/009-4/orum.txt b/world/map/npc/009-4/orum.txt
index 2b222255..c547af05 100644
--- a/world/map/npc/009-4/orum.txt
+++ b/world/map/npc/009-4/orum.txt
@@ -18,6 +18,37 @@
//# OrumQuestBarrier nibble (0,1,2) stores the color of the barriers #
//#################################################################################
+009-4.gat,35,115,0|script|OrumDebug|158,
+{
+ mes "[Orum Debug]";
+ menu
+ "Set Quest State", L_SetQuest,
+ "Reset Quest", L_ResetQuest,
+ "Display Quest", L_Display;
+
+L_SetQuest:
+ input @quest_state;
+ set OrumQuest, @quest_state;
+ goto L_Close;
+
+L_ResetQuest:
+ set OrumQuest, 0;
+ set OrumQuestBarrier, 0;
+ set OrumQuestTorch, 0;
+ goto L_Close;
+
+L_Display:
+ mes OrumQuest;
+ goto L_Close;
+
+L_Close:
+ end;
+
+OnInit:
+ if (!debug)
+ disablenpc "OrumDebug";
+ end;
+}
009-4.gat,37,115,0|script|Orum#barrier|158,
{
// needed to pass the very first barrier
@@ -221,38 +252,7 @@ L_Missing_Materials:
L_Setup_Lair:
set OrumQuest, 2;
-
- // Second Barrier
- set @BarrierColor, 1 + rand(3) * 4;
- set @Barrier, 0;
- callfunc "SetBarrierColor";
-
- set @TorchIntensity, 0;
-
- set @Torch, 0;
- set @TorchColor, rand(1, 12);
- callfunc "SetTorchColor";
- callfunc "SetTorchIntensity";
-
- // Third Barrier
- set @BarrierColor, 3 + rand(3) * 4;
- set @Barrier, 1;
- callfunc "SetBarrierColor";
-
- set @Torch, 1;
- set @TorchColor, rand(1, 12);
- callfunc "SetTorchColor";
- callfunc "SetTorchIntensity";
-
- // End Barrier
- set @BarrierColor, 2 + rand(6) * 2;
- set @Barrier, 2;
- callfunc "SetBarrierColor";
-
- set @Torch, 2;
- set @TorchColor, rand(1, 12);
- callfunc "SetTorchColor";
- callfunc "SetTorchIntensity";
+ callfunc "SetUpOrumQuest";
goto L_Close;
L_Use_First_Barrier:
@@ -592,3 +592,38 @@ L_Close:
set @TorchColor, 0;
close;
}
+function|script|SetUpOrumQuest|,
+{
+ // Second Barrier
+ set @BarrierColor, 1 + rand(3) * 4;
+ set @Barrier, 0;
+ callfunc "SetBarrierColor";
+
+ set @TorchIntensity, 0;
+
+ set @Torch, 0;
+ set @TorchColor, rand(1, 12);
+ callfunc "SetTorchColor";
+ callfunc "SetTorchIntensity";
+
+ // Third Barrier
+ set @BarrierColor, 3 + rand(3) * 4;
+ set @Barrier, 1;
+ callfunc "SetBarrierColor";
+
+ set @Torch, 1;
+ set @TorchColor, rand(1, 12);
+ callfunc "SetTorchColor";
+ callfunc "SetTorchIntensity";
+
+ // End Barrier
+ set @BarrierColor, 2 + rand(6) * 2;
+ set @Barrier, 2;
+ callfunc "SetBarrierColor";
+
+ set @Torch, 2;
+ set @TorchColor, rand(1, 12);
+ callfunc "SetTorchColor";
+ callfunc "SetTorchIntensity";
+ return;
+}