diff options
Diffstat (limited to 'npc/functions/quest-debug')
32 files changed, 57 insertions, 66 deletions
diff --git a/npc/functions/quest-debug/000-ShipQuests_Julia.txt b/npc/functions/quest-debug/000-ShipQuests_Julia.txt index 00e0120a..17e36a69 100644 --- a/npc/functions/quest-debug/000-ShipQuests_Julia.txt +++ b/npc/functions/quest-debug/000-ShipQuests_Julia.txt @@ -17,7 +17,7 @@ function script QuestDebug0 { l("Got the quest"), 1, l("Completed"), 2; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/001-ShipQuests_Arpan.txt b/npc/functions/quest-debug/001-ShipQuests_Arpan.txt index 777d58b4..e0d7f5ac 100644 --- a/npc/functions/quest-debug/001-ShipQuests_Arpan.txt +++ b/npc/functions/quest-debug/001-ShipQuests_Arpan.txt @@ -18,7 +18,7 @@ function script QuestDebug1 { l("You opened the chest"), 2, l("Completed"), 3; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/002-ShipQuests_Alige.txt b/npc/functions/quest-debug/002-ShipQuests_Alige.txt index abbd506d..805cbcd1 100644 --- a/npc/functions/quest-debug/002-ShipQuests_Alige.txt +++ b/npc/functions/quest-debug/002-ShipQuests_Alige.txt @@ -18,7 +18,7 @@ function script QuestDebug2 { l("Alige asks for food"), 2, l("Completed"), 3; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/003-ShipQuests_Peter.txt b/npc/functions/quest-debug/003-ShipQuests_Peter.txt index f5d87abb..d65f3a42 100644 --- a/npc/functions/quest-debug/003-ShipQuests_Peter.txt +++ b/npc/functions/quest-debug/003-ShipQuests_Peter.txt @@ -21,7 +21,7 @@ function script QuestDebug3 { l("Peter asks to kill rattos again"), 4, l("Peter gave reward"), 5; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/004-ShipQuests_Nard.txt b/npc/functions/quest-debug/004-ShipQuests_Nard.txt index 3431fd23..b8c8eed9 100644 --- a/npc/functions/quest-debug/004-ShipQuests_Nard.txt +++ b/npc/functions/quest-debug/004-ShipQuests_Nard.txt @@ -19,19 +19,19 @@ function script QuestDebug4 { GenericQuestDebug ShipQuests_Nard, l("Does not have the quest"), 0, l("Nard asks to help crew"), 1, - menuimage("actions/manage", l("Debug Gugli quest")), 32700, + menuimage("actions/manage", l("Debug Gugli quest")), -1, l("Completed Gugli's task"), 2, l("Nard asks to solve conflict"), 3, - menuimage("actions/manage", l("Debug Gado quest")), 32701, + menuimage("actions/manage", l("Debug Gado quest")), -2, l("Solved conflict"), 4, l("Official crew member"), 5, l("Talked to narrator"), 6; switch (@menuret) { - case 32700: callfunc "QuestDebug16"; break; - case 32701: callfunc "QuestDebug17"; break; - case 32766: return; + case -1: callfunc "QuestDebug16"; break; + case -2: callfunc "QuestDebug17"; break; + default: if (@menuret < 0) return; } } while (1); diff --git a/npc/functions/quest-debug/005-ShipQuests_Knife.txt b/npc/functions/quest-debug/005-ShipQuests_Knife.txt index f192a126..6d2ca71b 100644 --- a/npc/functions/quest-debug/005-ShipQuests_Knife.txt +++ b/npc/functions/quest-debug/005-ShipQuests_Knife.txt @@ -16,7 +16,7 @@ function script QuestDebug5 { l("Does not have the quest"), 0, l("Got the knife"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt b/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt index 0e00d0d9..97961c1a 100644 --- a/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt +++ b/npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt @@ -17,7 +17,7 @@ function script QuestDebug6 { l("Elmo told about money"), 1, l("Arpan gave money"), 2; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/007-ShipQuests_Door.txt b/npc/functions/quest-debug/007-ShipQuests_Door.txt index bc29888e..6a8cae01 100644 --- a/npc/functions/quest-debug/007-ShipQuests_Door.txt +++ b/npc/functions/quest-debug/007-ShipQuests_Door.txt @@ -16,7 +16,7 @@ function script QuestDebug7 { l("Does not have the quest"), 0, l("Heard conversation"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/008-ShipQuests_Couwan.txt b/npc/functions/quest-debug/008-ShipQuests_Couwan.txt index e9763a56..9ad2ca2c 100644 --- a/npc/functions/quest-debug/008-ShipQuests_Couwan.txt +++ b/npc/functions/quest-debug/008-ShipQuests_Couwan.txt @@ -17,7 +17,7 @@ function script QuestDebug8 { l("Couwan asks to deliver box"), 1, l("Delivered box, got reward"), 2; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt b/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt index ea2e1dec..e125bfa0 100644 --- a/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt +++ b/npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt @@ -16,7 +16,7 @@ function script QuestDebug9 { l("Does not have the quest"), 0, l("Opened treasure chest"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/010-ShipQuests_Ale.txt b/npc/functions/quest-debug/010-ShipQuests_Ale.txt index 67aed1fb..8f3c7e46 100644 --- a/npc/functions/quest-debug/010-ShipQuests_Ale.txt +++ b/npc/functions/quest-debug/010-ShipQuests_Ale.txt @@ -16,7 +16,7 @@ function script QuestDebug10 { l("Does not have the quest"), 0, l("Got the package"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt b/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt index 9e4d6e2b..dc2d3ad9 100644 --- a/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt +++ b/npc/functions/quest-debug/011-ShipQuests_Astapolos.txt @@ -16,7 +16,7 @@ function script QuestDebug11 { l("Does not have the quest"), 0, l("Got the package"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt b/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt index 878b536f..a491d8a0 100644 --- a/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt +++ b/npc/functions/quest-debug/012-ShipQuests_Gulukan.txt @@ -16,7 +16,7 @@ function script QuestDebug12 { l("Does not have the quest"), 0, l("Got the package"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/013-ShipQuests_Jalad.txt b/npc/functions/quest-debug/013-ShipQuests_Jalad.txt index d5640411..2398583b 100644 --- a/npc/functions/quest-debug/013-ShipQuests_Jalad.txt +++ b/npc/functions/quest-debug/013-ShipQuests_Jalad.txt @@ -16,7 +16,7 @@ function script QuestDebug13 { l("Does not have the quest"), 0, l("Got the package"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/014-ShipQuests_QMuller.txt b/npc/functions/quest-debug/014-ShipQuests_QMuller.txt index 1f69efdd..f6db5b3a 100644 --- a/npc/functions/quest-debug/014-ShipQuests_QMuller.txt +++ b/npc/functions/quest-debug/014-ShipQuests_QMuller.txt @@ -16,7 +16,7 @@ function script QuestDebug14 { l("Does not have the quest"), 0, l("Got the package"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt b/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt index f963a0f0..e37fe97d 100644 --- a/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt +++ b/npc/functions/quest-debug/015-ShipQuests_Tibbo.txt @@ -16,7 +16,7 @@ function script QuestDebug15 { l("Does not have the quest"), 0, l("Got the package"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/016-ShipQuests_Gugli.txt b/npc/functions/quest-debug/016-ShipQuests_Gugli.txt index 70c5a441..cf98ca6d 100644 --- a/npc/functions/quest-debug/016-ShipQuests_Gugli.txt +++ b/npc/functions/quest-debug/016-ShipQuests_Gugli.txt @@ -23,23 +23,25 @@ function script QuestDebug16 { GenericQuestDebug ShipQuests_Gugli, l("Does not have the quest"), 0, l("Gugli asks to collect packages"), 1, - menuimage("actions/manage", l("Reset subquests")), 32700, - menuimage("actions/manage", l("Set subquests as completed")), 32701, + menuimage("actions/manage", l("Reset subquests")), -1, + menuimage("actions/manage", l("Set subquests as completed")), -2, l("Got reward from gugli"), 2; switch (@menuret) { case 0: - case 32700: - case 32701: - setq ShipQuests_Ale, (@menuret == 32701 ? 1 : 0); - setq ShipQuests_Astapolos, (@menuret == 32701 ? 1 : 0); - setq ShipQuests_Gulukan, (@menuret == 32701 ? 1 : 0); - setq ShipQuests_Jalad, (@menuret == 32701 ? 1 : 0); - setq ShipQuests_QMuller, (@menuret == 32701 ? 1 : 0); - setq ShipQuests_Tibbo, (@menuret == 32701 ? 1 : 0); + case 2: + case -1: + case -2: + .@v = (@menuret == -2 || @menuret == 2); + setq ShipQuests_Ale, .@v; + setq ShipQuests_Astapolos, .@v; + setq ShipQuests_Gulukan, .@v; + setq ShipQuests_Jalad, .@v; + setq ShipQuests_QMuller, .@v; + setq ShipQuests_Tibbo, .@v; break; - case 32766: return; + default: if (@menuret < 0) return; } } while (1); diff --git a/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt b/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt index 8bf5ea6f..5191802e 100644 --- a/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt +++ b/npc/functions/quest-debug/017-ShipQuests_ChefGado.txt @@ -21,7 +21,7 @@ function script QuestDebug17 { l("Completed, Julia wins (returned poison)"), 5, l("Completed, Julia wins"), 6; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/018-General_Cookies.txt b/npc/functions/quest-debug/018-General_Cookies.txt index 43bf44af..90be1282 100644 --- a/npc/functions/quest-debug/018-General_Cookies.txt +++ b/npc/functions/quest-debug/018-General_Cookies.txt @@ -16,7 +16,7 @@ function script QuestDebug18 { l("Does not have the quest"), 0, l("Got a cookie"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt b/npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt index 02d674b0..d2ca14d5 100644 --- a/npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt +++ b/npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt @@ -19,7 +19,7 @@ function script QuestDebug19 { l("Told bobo to go home"), 3, l("Katja gave reward"), 4; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/020-ArtisQuests_Urchin.txt b/npc/functions/quest-debug/020-ArtisQuests_Urchin.txt index a7f73a5d..df85c261 100644 --- a/npc/functions/quest-debug/020-ArtisQuests_Urchin.txt +++ b/npc/functions/quest-debug/020-ArtisQuests_Urchin.txt @@ -17,7 +17,7 @@ function script QuestDebug20 { l("Moon needs @@", l("Croc Claw")), 1, l("Found @@, got exp", l("Croc Claw")), 2; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt b/npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt index 9548ef9b..3393ad64 100644 --- a/npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt +++ b/npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt @@ -17,7 +17,7 @@ function script QuestDebug21 { l("Salem asks to catch piou"), 1, l("Returned piou to Salem"), 2; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/022-ArtisQuests_Fishman.txt b/npc/functions/quest-debug/022-ArtisQuests_Fishman.txt index 65c6ff44..a576bcdd 100644 --- a/npc/functions/quest-debug/022-ArtisQuests_Fishman.txt +++ b/npc/functions/quest-debug/022-ArtisQuests_Fishman.txt @@ -17,7 +17,7 @@ function script QuestDebug22 { l("Eugene needs tentacles"), 1, l("Gave tentacles, got reward"), 2; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/023-ArtisQuests_QOnan.txt b/npc/functions/quest-debug/023-ArtisQuests_QOnan.txt index 6028604c..22f8ff50 100644 --- a/npc/functions/quest-debug/023-ArtisQuests_QOnan.txt +++ b/npc/functions/quest-debug/023-ArtisQuests_QOnan.txt @@ -18,7 +18,7 @@ function script QuestDebug23 { l("Found the chest"), 2, l("Gave to Q'Onan, got reward"), 3; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/026-General_Rumly.txt b/npc/functions/quest-debug/026-General_Rumly.txt index ad245420..b4e90a59 100644 --- a/npc/functions/quest-debug/026-General_Rumly.txt +++ b/npc/functions/quest-debug/026-General_Rumly.txt @@ -18,7 +18,7 @@ function script QuestDebug26 { l("Rumly wants @@", l("Plushroom")), 2, l("Gave @@ to Rumly", l("Plushroom")), 3; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/027-ArtisQuests_Enora.txt b/npc/functions/quest-debug/027-ArtisQuests_Enora.txt index ef8c7d43..2f6805e1 100644 --- a/npc/functions/quest-debug/027-ArtisQuests_Enora.txt +++ b/npc/functions/quest-debug/027-ArtisQuests_Enora.txt @@ -26,7 +26,7 @@ function script QuestDebug27 { l("Enora asks to kill fluffys"), 10, l("Completed, got reward"), 11; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/028-General_Narrator.txt b/npc/functions/quest-debug/028-General_Narrator.txt index e5c19c7f..15596919 100644 --- a/npc/functions/quest-debug/028-General_Narrator.txt +++ b/npc/functions/quest-debug/028-General_Narrator.txt @@ -16,7 +16,7 @@ function script QuestDebug28 { l("Game introduction"), 0, l("Visited Artis at least once"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt b/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt index b8cf6283..b1a48c29 100644 --- a/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt +++ b/npc/functions/quest-debug/029-ArtisQuests_Fexil.txt @@ -18,7 +18,7 @@ function script QuestDebug29 { l("Fexil needs help"), 2, l("Fexil wants to buy fur"), 3; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt b/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt index 4ac85cc5..a8e3a322 100644 --- a/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt +++ b/npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt @@ -16,7 +16,7 @@ function script QuestDebug30 { l("Does not have the quest"), 0, l("Registered"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/031-General_Janus.txt b/npc/functions/quest-debug/031-General_Janus.txt index 797e3357..b5e62ecf 100644 --- a/npc/functions/quest-debug/031-General_Janus.txt +++ b/npc/functions/quest-debug/031-General_Janus.txt @@ -24,7 +24,7 @@ function script QuestDebug31 { case 1: skill NV_BASIC, min(6, getskilllv(NV_BASIC)), 0; break; case 2: case 3: skill NV_BASIC, max(7, getskilllv(NV_BASIC)), 0; break; - case 32766: return; + default: if (@menuret < 0) return; } } while (1); diff --git a/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt b/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt index f1b142f9..28e6020c 100644 --- a/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt +++ b/npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt @@ -16,7 +16,7 @@ function script QuestDebug32 { l("Does not have the quest"), 0, l("Mona's dad is missing"), 1; - if (@menuret == 32766) + if (@menuret < 0) { return; } diff --git a/npc/functions/quest-debug/functions.txt b/npc/functions/quest-debug/functions.txt index c193f9f8..e0c0af9e 100644 --- a/npc/functions/quest-debug/functions.txt +++ b/npc/functions/quest-debug/functions.txt @@ -4,24 +4,17 @@ function script GenericQuestDebug { if (!debug) { select - menuimage("actions/back", l("Go back")), - menuimage("actions/exit", l("Close")); + menuimage("actions/back", l("Go back")); - if (@menu == 1) - { - @menuret = 32766; - return 32766; - } - - closedialog; - end; + @menuret = -0x7FFFFFFF; + return 1; } mes l("Choose desired quest state:"); deletearray .@vals; .@menustr$ = menuimage("actions/abort", l("Do nothing")) + ":"; - .@vals[0] = 32766; + .@vals[0] = -0x7FFFFFFF; .@cnt = 1; for (.@f = 1; .@f < getargcount(); .@f += 2) @@ -30,7 +23,7 @@ function script GenericQuestDebug { { .@qv = getarg(.@f + 1); .@s$ = menuimage("actions/" + (.@qv ? "edit" : "reset"), "[" + .@qv + "] " + getarg(.@f)); - .@menustr$ += (.@qv >= 32700 ? getarg(.@f) : .@s$) + ":"; + .@menustr$ += (.@qv < 0 ? getarg(.@f) : .@s$) + ":"; .@vals[.@cnt] = .@qv; ++.@cnt; } @@ -38,13 +31,10 @@ function script GenericQuestDebug { if (getgroupid() >= 99) { - .@menustr$ += menuimage("actions/nuke", l("Set state manually")) + ":"; - .@vals[.@cnt] = 32765; - ++.@cnt; + .@menustr$ += menuimage("actions/nuke", l("Set state manually")); + .@vals[.@cnt] = -0x7FFFFFFE; } - .@menustr$ += menuimage("actions/exit", l("Close")); - .@vals[.@cnt] = 32767; @menu = 255; @menuret = -1; @@ -60,12 +50,11 @@ function script GenericQuestDebug { switch (@menuret) { - case 32765: input .@w; setq getarg(0,0), .@w; - case 32766: return 1; - case 32767: closedialog; end; + case -0x7FFFFFFE: input @menuret; setq getarg(0,0), @menuret; + case -0x7FFFFFFF: return 1; } - if (@menuret < 32700) + if (@menuret >= 0) { setq getarg(0,0), @menuret; } |