From c8f2dea0bd0068aac6f59a5053d4f0576f21bb23 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 16 Sep 2013 11:04:07 -0700 Subject: Refactor all broken returns into goto L_Return --- world/map/npc/009-4/torches.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'world/map/npc/009-4/torches.txt') diff --git a/world/map/npc/009-4/torches.txt b/world/map/npc/009-4/torches.txt index 79fb6ca1..eaf8c837 100644 --- a/world/map/npc/009-4/torches.txt +++ b/world/map/npc/009-4/torches.txt @@ -67,7 +67,7 @@ L_Error2: function|script|DoneWithTorches|, { if (OrumQuest < 11 && OrumQuest >= 8) - return; + goto L_Return; if (OrumQuest < 7) goto L_Different; @@ -82,29 +82,41 @@ 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.gat",67,20,69,25)) - return; + 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.gat",65,41,69,46)) - return; + 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.gat",33,84,37,88)) - return; + goto L_Return; mes "You're too far away to do anything with that torch."; close; + +L_Return: + return; } function|script|TorchLoop|, -- cgit v1.2.3-60-g2f50