diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-04-13 10:16:10 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-04-13 15:10:57 -0700 |
commit | 9c9034116fab44475c9bad57b727a374fbd01ebf (patch) | |
tree | 65a628a11e3b06294f9906257f7dfba4f82eefe5 /world/map/npc/009-4/orum.txt | |
parent | df95c80ad1c48f3563a13d0bf22872ffc0bb7d29 (diff) | |
download | serverdata-9c9034116fab44475c9bad57b727a374fbd01ebf.tar.gz serverdata-9c9034116fab44475c9bad57b727a374fbd01ebf.tar.bz2 serverdata-9c9034116fab44475c9bad57b727a374fbd01ebf.tar.xz serverdata-9c9034116fab44475c9bad57b727a374fbd01ebf.zip |
Refactor torches to avoid a bug and make more consistent and obvious
Also avoid some silliness with rand()
Diffstat (limited to 'world/map/npc/009-4/orum.txt')
-rw-r--r-- | world/map/npc/009-4/orum.txt | 65 |
1 files changed, 19 insertions, 46 deletions
diff --git a/world/map/npc/009-4/orum.txt b/world/map/npc/009-4/orum.txt index c7c6eb55..8ee21c7c 100644 --- a/world/map/npc/009-4/orum.txt +++ b/world/map/npc/009-4/orum.txt @@ -210,62 +210,36 @@ L_Setup_Lair: set OrumQuest, 2; // Second Barrier - set @temp, rand(1,6); - set @Color, 1; - if (@temp == 1 || @temp == 4) - set @Color, 1; - if (@temp == 2 || @temp == 5) - set @Color, 5; - if (@temp == 3 || @temp == 6) - set @Color, 9; + set @BarrierColor, 1 + rand(3) * 4; set @Barrier, 0; - callfunc("SetBarrierColor"); + callfunc "SetBarrierColor"; + + set @TorchIntensity, 0; set @Torch, 0; - set @Color, rand(1, 12); - set @Intensity, 0; - callfunc("SetTorchColor"); - callfunc("SetTorchIntensity"); + set @TorchColor, rand(1, 12); + callfunc "SetTorchColor"; + callfunc "SetTorchIntensity"; // Third Barrier - set @temp, rand(1,6); - set @Color, 3; - if (@temp == 1 || @temp == 4) - set @Color, 3; - if (@temp == 2 || @temp == 5) - set @Color, 7; - if (@temp == 3 || @temp == 6) - set @Color, 11; + set @BarrierColor, 3 + rand(3) * 4; set @Barrier, 1; - callfunc("SetBarrierColor"); + callfunc "SetBarrierColor"; set @Torch, 1; - set @Color, rand(1, 12); - callfunc("SetTorchColor"); - callfunc("SetTorchIntensity"); + set @TorchColor, rand(1, 12); + callfunc "SetTorchColor"; + callfunc "SetTorchIntensity"; // End Barrier - set @temp, rand(1,12); - set @Color, 2; - if (@temp == 1 || @temp == 7) - set @Color, 2; - if (@temp == 2 || @temp == 8) - set @Color, 4; - if (@temp == 3 || @temp == 9) - set @Color, 6; - if (@temp == 4 || @temp == 10) - set @Color, 8; - if (@temp == 5 || @temp == 11) - set @Color, 10; - if (@temp == 6 || @temp == 12) - set @Color, 12; + set @BarrierColor, 2 + rand(6) * 2; set @Barrier, 2; - callfunc("SetBarrierColor"); + callfunc "SetBarrierColor"; set @Torch, 2; - set @Color, rand(1, 12); - callfunc("SetTorchColor"); - callfunc("SetTorchIntensity"); + set @TorchColor, rand(1, 12); + callfunc "SetTorchColor"; + callfunc "SetTorchIntensity"; goto L_Close; L_Use_First_Barrier: @@ -577,10 +551,9 @@ L_Close: set @EXP_BREAK_BARRIERS, 0; - set @temp, 0; - set @Color, 0; set @Barrier, 0; + set @BarrierColor, 0; set @Torch, 0; - set @Intensity, 0; + set @TorchColor, 0; close; } |