diff options
Diffstat (limited to 'world/map/npc/009-4/torches.txt')
-rw-r--r-- | world/map/npc/009-4/torches.txt | 74 |
1 files changed, 28 insertions, 46 deletions
diff --git a/world/map/npc/009-4/torches.txt b/world/map/npc/009-4/torches.txt index 4ad0c686..0164acd4 100644 --- a/world/map/npc/009-4/torches.txt +++ b/world/map/npc/009-4/torches.txt @@ -10,7 +10,8 @@ function|script|GetTorchColor L_Error: mes "Torch number is out of range."; - close; + close2; + return; } function|script|SetTorchColor @@ -24,11 +25,13 @@ function|script|SetTorchColor L_Error: mes "Torch number is out of range."; - close; + close2; + return; L_Error2: mes "Torch color is out of range."; - close; + close2; + return; } function|script|GetTorchIntensity @@ -42,7 +45,8 @@ function|script|GetTorchIntensity L_Error: mes "Torch number is out of range."; - close; + close2; + return; } function|script|SetTorchIntensity @@ -56,11 +60,13 @@ function|script|SetTorchIntensity L_Error: mes "Torch number is out of range."; - close; + close2; + return; L_Error2: mes "Torch intensity is out of range."; - close; + close2; + return; } function|script|DoneWithTorches @@ -75,44 +81,14 @@ function|script|DoneWithTorches if (OrumQuest < 8) mes "Without that powder the note mentions there isn't much you can do with this torch."; - close; + close2; + goto L_Return; L_Different: mes "The flame on this torch looks different than the rest. You better tell Orum about it before doing anything."; set OrumQuest, 6; - close; - -L_Return: - return; -} - -// To make sure in range of torches -function|script|InRangeTorch1 -{ - if (isin("009-4",67,20,69,25)) - goto L_Return; - mes "You're too far away to do anything with that torch."; - close; - -L_Return: - return; -} -function|script|InRangeTorch2 -{ - if (isin("009-4",65,41,69,46)) - goto L_Return; - mes "You're too far away to do anything with that torch."; - close; - -L_Return: - return; -} -function|script|InRangeTorch3 -{ - if (isin("009-4",33,84,37,88)) - goto L_Return; - mes "You're too far away to do anything with that torch."; - close; + close2; + goto L_Return; L_Return: return; @@ -144,7 +120,8 @@ L_Color_Loop: L_Leave: mes "The flame flickers as if it's laughing at you."; - close; + close2; + return; L_Use_Red: if (countitem("RedPowder") < 1) @@ -228,7 +205,8 @@ L_Use_Blue: L_No_Powder: mes "You notice you're all out of that color of powder. Perhaps Orum can make you some more."; - close; + close2; + return; L_Color_Dec: set @TorchColor, @TorchColor - 1; @@ -277,13 +255,15 @@ L_Failed: set @TorchIntensity, 0; callfunc "SetTorchIntensity"; heal -Hp, 0; - close; + close2; + return; } // First Torch 009-4,68,21,0|script|Torch#1|400 { - callfunc "InRangeTorch1"; + callfunc "PCtoNPCRange"; + if(@npc_check) end; callfunc "DoneWithTorches"; set @Torch, 0; @@ -295,7 +275,8 @@ L_Failed: // Second Torch 009-4,67,42,0|script|Torch#2|400 { - callfunc "InRangeTorch2"; + callfunc "PCtoNPCRange"; + if(@npc_check) end; callfunc "DoneWithTorches"; set @Torch, 1; @@ -307,7 +288,8 @@ L_Failed: // Third Torch 009-4,33,86,0|script|Torch#3|400 { - callfunc "InRangeTorch3"; + callfunc "PCtoNPCRange"; + if(@npc_check) end; callfunc "DoneWithTorches"; set @Torch, 2; |