From 5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d Mon Sep 17 00:00:00 2001 From: gumi Date: Thu, 18 Aug 2016 18:45:01 -0400 Subject: last minute changes --- db/constants.conf | 2 +- db/re/skill_db.conf | 9 ++ npc/000-2-0/julia.txt | 50 ++++----- npc/001-1/calypsan.txt | 26 +++-- npc/001-1/chelios.txt | 19 ++-- npc/001-1/enora.txt | 57 +++++------ npc/001-1/fexil.txt | 12 +-- npc/001-1/qonan.txt | 12 +-- npc/001-1/qpid.txt | 32 +++--- npc/001-1/rumly.txt | 114 ++++++++++----------- npc/001-1/salem.txt | 51 +++++---- npc/001-2-0/resa.txt | 19 ++-- npc/001-2-12/oscar.txt | 12 +-- npc/001-2-19/lloyd.txt | 33 +++--- npc/001-2-2/moon.txt | 10 +- npc/001-2-26/ivan.txt | 11 +- npc/001-2-41/edouard.txt | 16 +-- npc/001-2-9/janus.txt | 19 ++-- npc/commands/debug-look.txt | 40 ++++---- npc/commands/debug-preset.txt | 40 ++------ npc/commands/debug-quest.txt | 92 ++++++++--------- npc/commands/debug-skill.txt | 26 ++--- npc/commands/debug.txt | 50 ++++----- npc/commands/event.txt | 10 +- npc/commands/motd.txt | 36 +++---- npc/commands/numa.txt | 49 --------- npc/commands/scheduled-broadcasts.txt | 75 +++++++------- npc/commands/super-menu.txt | 69 +++++++++++++ npc/commands/warp.txt | 6 ++ npc/commands/zeny.txt | 6 ++ npc/functions/quest-debug/000-ShipQuests_Julia.txt | 2 +- npc/functions/quest-debug/001-ShipQuests_Arpan.txt | 2 +- npc/functions/quest-debug/002-ShipQuests_Alige.txt | 2 +- npc/functions/quest-debug/003-ShipQuests_Peter.txt | 2 +- npc/functions/quest-debug/004-ShipQuests_Nard.txt | 10 +- npc/functions/quest-debug/005-ShipQuests_Knife.txt | 2 +- .../quest-debug/006-ShipQuests_ArpanMoney.txt | 2 +- npc/functions/quest-debug/007-ShipQuests_Door.txt | 2 +- .../quest-debug/008-ShipQuests_Couwan.txt | 2 +- .../quest-debug/009-ShipQuests_TreasureChest.txt | 2 +- npc/functions/quest-debug/010-ShipQuests_Ale.txt | 2 +- .../quest-debug/011-ShipQuests_Astapolos.txt | 2 +- .../quest-debug/012-ShipQuests_Gulukan.txt | 2 +- npc/functions/quest-debug/013-ShipQuests_Jalad.txt | 2 +- .../quest-debug/014-ShipQuests_QMuller.txt | 2 +- npc/functions/quest-debug/015-ShipQuests_Tibbo.txt | 2 +- npc/functions/quest-debug/016-ShipQuests_Gugli.txt | 24 +++-- .../quest-debug/017-ShipQuests_ChefGado.txt | 2 +- npc/functions/quest-debug/018-General_Cookies.txt | 2 +- .../quest-debug/019-ArtisQuests_LazyBrother.txt | 2 +- .../quest-debug/020-ArtisQuests_Urchin.txt | 2 +- .../quest-debug/021-ArtisQuests_CatchPiou.txt | 2 +- .../quest-debug/022-ArtisQuests_Fishman.txt | 2 +- .../quest-debug/023-ArtisQuests_QOnan.txt | 2 +- npc/functions/quest-debug/026-General_Rumly.txt | 2 +- .../quest-debug/027-ArtisQuests_Enora.txt | 2 +- npc/functions/quest-debug/028-General_Narrator.txt | 2 +- .../quest-debug/029-ArtisQuests_Fexil.txt | 2 +- .../quest-debug/030-ArtisQuests_Lloyd.txt | 2 +- npc/functions/quest-debug/031-General_Janus.txt | 2 +- .../quest-debug/032-ArtisQuests_MonaDad.txt | 2 +- npc/functions/quest-debug/functions.txt | 31 ++---- npc/scripts.conf | 2 +- 63 files changed, 546 insertions(+), 582 deletions(-) delete mode 100644 npc/commands/numa.txt create mode 100644 npc/commands/super-menu.txt diff --git a/db/constants.conf b/db/constants.conf index a4224aa9..1ca76177 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -3613,7 +3613,7 @@ constants_db: { /* ==================================================== */ /** evol constants **/ - debug: 1 + debug: 0 comment__: "outdated constants. must be removed" // >>> diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 8b4a237c..73e5ae82 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -37495,4 +37495,13 @@ skill_db: ( SPCost: 14 } }, +{ + Id: 20002 + Name: "EVOL_SUPER_MENU" + Description: "Super Menu" + MaxLevel: 1 + SkillType: { + Self: true + } +}, ) diff --git a/npc/000-2-0/julia.txt b/npc/000-2-0/julia.txt index e17d93da..8206a0b9 100644 --- a/npc/000-2-0/julia.txt +++ b/npc/000-2-0/julia.txt @@ -263,32 +263,32 @@ function mainMenu { do { - menuint - rif(debug, menuaction(l("debug"))), 11, - rif(.@q3 == 5 && .@q4 < 1, l("What can I do now?")), 1, - rif(.@q3 == 3 && .@q2 == 0, l("I heard rumors about some old hostilities between you and Gado. Are they true?")), 2, - rif(.@q2 == 2 && countitem(PoisonedDish), l("Well... No wait, I have something for you but you shouldn't eat it... I'm taking it back to the kitchen.")), 3, - rif(.@q2 == 2 && countitem(PoisonedDish), l("I have brought you a tasty present for your delicate mouth.")), 4, - rif(getskilllv(NV_BASIC) < 6, l("Something is wrong with me, I can't smile nor sit.")), 5, - lg("I made a mistake, I would like to change my language."), 6, - l("Could you explain to me where I am?"), 7, - l("What happened to me?"), 8, - l("Can I read these rules again?"), 9, - l("Nothing, sorry."), 10; - - switch (@menuret) + select + rif(debug, menuaction(l("debug"))), + rif(.@q3 == 5 && .@q4 < 1, l("What can I do now?")), + rif(.@q3 == 3 && .@q2 == 0, l("I heard rumors about some old hostilities between you and Gado. Are they true?")), + rif(.@q2 == 2 && countitem(PoisonedDish), l("Well... No wait, I have something for you but you shouldn't eat it... I'm taking it back to the kitchen.")), + rif(.@q2 == 2 && countitem(PoisonedDish), l("I have brought you a tasty present for your delicate mouth.")), + rif(getskilllv(NV_BASIC) < 6, l("Something is wrong with me, I can't smile nor sit.")), + lg("I made a mistake, I would like to change my language."), + l("Could you explain to me where I am?"), + l("What happened to me?"), + l("Can I read these rules again?"), + l("Nothing, sorry."); + + switch (@menu) { - case 1: gotoSleep; break; - case 2: heardRumors; break; - case 3: gotRegrets; break; - case 4: poisonJulia; break; - case 5: basicSkill; break; - case 6: chooseLang .@s$; break; - case 7: whereAmI; break; - case 8: whatHappened; break; - case 9: readRules; break; - case 10: closedialog; end; - case 11: QuestDebug0; closedialog; end; + case 2: gotoSleep; break; + case 3: heardRumors; break; + case 4: gotRegrets; break; + case 5: poisonJulia; break; + case 6: basicSkill; break; + case 7: chooseLang .@s$; break; + case 8: whereAmI; break; + case 9: whatHappened; break; + case 10: readRules; break; + case 1: QuestDebug0; + case 11: closedialog; end; } } while (1); } diff --git a/npc/001-1/calypsan.txt b/npc/001-1/calypsan.txt index d597e30e..88cd5267 100644 --- a/npc/001-1/calypsan.txt +++ b/npc/001-1/calypsan.txt @@ -61,16 +61,16 @@ do { - menuint - rif(.@fexil == 1, l("Have you seen Fexil?")), 0, - menuaction(l("Trade")), 1, - l("How do these dyes work?"), 2, - l("I want to make my own dyes."), 3, - menuaction(l("Quit")), 4; + select + rif(.@fexil == 1, l("Have you seen Fexil?")), + menuaction(l("Trade")), + l("How do these dyes work?"), + l("I want to make my own dyes."), + menuaction(l("Quit")); - switch (@menuret) + switch (@menu) { - case 0: + case 1: setcamnpc "Fexil#001-1"; speech 5, l("Oh yeye did, his store is just beside me!"), @@ -78,22 +78,20 @@ restorecam; break; - case 1: + case 2: sell_dye; close; - case 2: + case 3: explain_dyes; break; - case 3: + case 4: speech 5, l("Yoiis is not yet ready to make his own dyes."), l("But in the future I might be able to help you create some of your own."); break; - case 4: - break; } - } while (@menuret != 4); + } while (@menu != 5); closedialog; goodbye; diff --git a/npc/001-1/chelios.txt b/npc/001-1/chelios.txt index 1cebfdc7..2be8f87d 100644 --- a/npc/001-1/chelios.txt +++ b/npc/001-1/chelios.txt @@ -81,13 +81,14 @@ do { .@enora = getq (ArtisQuests_Enora); - menuint rif (.@enora == 1, lg("I came to retrieve a package for Enora.")), 1, - rif (.@enora == 3, l("I have your black iron.")), 2, - rif (.@enora >= 2, l("Where is the Merchant Guild?")), 3, - l("What is this building?"), 4, - menuaction(l("Quit")), 5; - - switch (@menuret) + select + rif (.@enora == 1, lg("I came to retrieve a package for Enora.")), + rif (.@enora == 3, l("I have your black iron.")), + rif (.@enora >= 2, l("Where is the Merchant Guild?")), + l("What is this building?"), + menuaction(l("Quit")); + + switch (@menu) { case 1: give_small_quest; @@ -101,10 +102,8 @@ case 4: blacksmith_house; break; - case 5: - break; } - } while (@menuret != 5); + } while (@menu != 5); closedialog; goodbye; diff --git a/npc/001-1/enora.txt b/npc/001-1/enora.txt index a6eab456..231ad613 100644 --- a/npc/001-1/enora.txt +++ b/npc/001-1/enora.txt @@ -369,35 +369,35 @@ do { .@q = getq(ArtisQuests_Enora); - menuint - rif(.@q == 0, l("She told me that you had some tasks for me.")), 0, - rif(.@q == 4 || .@q == 6 || .@q == 9, l("I have your package.")), 1, - rif(.@q == 8 && countitem(PiberriesInfusion) >= 5, l("I have your package.")), 2, - rif(.@q >= 10, l("I cleaned up the hill.")), 3, - rif(.@q >= 10, l("How many Fluffies did I kill on the hill?")), 4, - rif(.@q >= 1, l("Who is Don?")), 5, - rif(.@q >= 5, l("Where is the light armor shop?")), 6, - rif(.@q >= 7, l("Where is the market?")), 7, - rif(.@q >= 10, l("Where is the hill?")), 8, - rif(.@q >= 1, l("What is this \"legion\"?")), 9, - l("I wish I could remember something..."), 10, - rif(.@q != 0, l("Nothing.")), 11; - - switch (@menuret) + select + rif(.@q == 0, l("She told me that you had some tasks for me.")), + rif(.@q == 4 || .@q == 6 || .@q == 9, l("I have your package.")), + rif(.@q == 8 && countitem(PiberriesInfusion) >= 5, l("I have your package.")), + rif(.@q >= 10, l("I cleaned up the hill.")), + rif(.@q >= 10, l("How many Fluffies did I kill on the hill?")), + rif(.@q >= 1, l("Who is Don?")), + rif(.@q >= 5, l("Where is the light armor shop?")), + rif(.@q >= 7, l("Where is the market?")), + rif(.@q >= 10, l("Where is the hill?")), + rif(.@q >= 1, l("What is this \"legion\"?")), + l("I wish I could remember something..."), + rif(.@q != 0, l("Nothing.")); + + switch (@menu) { - case 0: + case 1: enora_first_quest; break; - case 1: + case 2: enora_quest_complete; break; - case 2: + case 3: enora_paid_potions; break; - case 3: + case 4: enora_hill_cleaned; break; - case 4: + case 5: speech 5, l("You killed @@ Fluffies.", ArtisFluffyKilled); if (ArtisFluffyKilled > 8) @@ -406,29 +406,28 @@ next; } break; - case 5: - enora_don; case 6: + enora_don; + case 7: enora_light_armor; break; - case 7: + case 8: enora_market; break; - case 8: + case 9: enora_hill; break; - case 9: + case 10: enora_legion; break; - case 10: + case 11: enora_memories; break; - case 11: + case 12: speech 5, l("Please come back anytime!"); - break; } - } while (@menuret != 11); + } while (@menu != 12); closedialog; goodbye; diff --git a/npc/001-1/fexil.txt b/npc/001-1/fexil.txt index 8684aa3c..807d54b4 100644 --- a/npc/001-1/fexil.txt +++ b/npc/001-1/fexil.txt @@ -76,13 +76,13 @@ .@fexil = getq(ArtisQuests_Fexil); - menuint - l("OK, let's trade."), 1, - rif(.@fexil == 2, l("Do you still need help?")), 2, - rif(.@fexil > 2 && countitem(FluffyFur) > 0, l("I have some fur for you.")), 3, - l("No. Sorry."), 4; + select + l("OK, let's trade."), + rif(.@fexil == 2, l("Do you still need help?")), + rif(.@fexil > 2 && countitem(FluffyFur) > 0, l("I have some fur for you.")), + l("No. Sorry."); - switch (@menuret) + switch (@menu) { case 1: closedialog; diff --git a/npc/001-1/qonan.txt b/npc/001-1/qonan.txt index 062dcf13..b237de07 100644 --- a/npc/001-1/qonan.txt +++ b/npc/001-1/qonan.txt @@ -44,13 +44,13 @@ l("I'm afraid to go there myself, but if you take the risk, you can have half of the loot."), l("So, what do you say?"); - menuint - l("I like money! Consider it done."), 0, - l("Too risky, I might end up in jail. Do it yourself."), 1; + select + l("I like money! Consider it done."), + l("Too risky, I might end up in jail. Do it yourself."); - switch(@menuret) + switch(@menu) { - case 0: + case 1: setq ArtisQuests_QOnan, 1; getrandompoint(178,26,182,29); npcdebug "Chest buriad at (" + .move__rand_x + "," + .move__rand_y + ")"; @@ -61,7 +61,7 @@ l("I hope to see you soon."); getitem IronShovel, 1; close; - case 1: + case 2: speech 3, l("Come on, don't be a coward!"), l("Anyway, let me know if you change your mind."); diff --git a/npc/001-1/qpid.txt b/npc/001-1/qpid.txt index 27f7517e..e6dd8021 100644 --- a/npc/001-1/qpid.txt +++ b/npc/001-1/qpid.txt @@ -171,39 +171,37 @@ { .@enora = getq(ArtisQuests_Enora); - menuint - rif (.@enora == 7, l("Enora wants her potions.")), 0, - menuaction(l("Trade")), 1, - rif (.@enora > 7, l("What was your riddle?")), 2, - l("How do you do your potions?"), 3, - l("What are you reading?"), 4, - menuaction(l("Quit")), 5; - - switch (@menuret) + select + rif (.@enora == 7, l("Enora wants her potions.")), + menuaction(l("Trade")), + rif (.@enora > 7, l("What was your riddle?")), + l("How do you do your potions?"), + l("What are you reading?"), + menuaction(l("Quit")); + + switch (@menu) { - case 0: + case 1: enora_quest; break; - case 1: + case 2: closedialog; shop "Store#Potion001-1"; close; - case 2: + case 3: riddle_enigma; break; - case 3: + case 4: alchemist_information; break; - case 4: + case 5: speech 5, l("It's a poem, about poems... Why are you asking that?"), l("Because I am an orc I can't read such things? That's rubbish."), l("I borrowed it from the library, you should try to cultivate yourself more instead of insinuate things about people you don't know!"); break; - case 5: - break; } - } while (@menuret != 5); + } while (@menu != 6); closedialog; goodbye; diff --git a/npc/001-1/rumly.txt b/npc/001-1/rumly.txt index f677b4ac..195a8aa6 100644 --- a/npc/001-1/rumly.txt +++ b/npc/001-1/rumly.txt @@ -27,20 +27,20 @@ L_Menu: .@visited = getq(General_Rumly); .@plush_count = lognbaselvl(1, 10); - menuint - l("Plushrooms you say?"), 0, - l("Who are you?"), 1, - rif(.@visited > 0, l("Can you reset my stats please?")), 2, - lg("You are weird, I have to go sorry."), 3; + select + l("Plushrooms you say?"), + l("Who are you?"), + rif(.@visited > 0, l("Can you reset my stats please?")), + lg("You are weird, I have to go sorry."); - switch (@menuret) + switch (@menu) { - case 0: + case 1: speech 5, l("Wind and grass is nice and cool, so juicy sweet..."), l("Our only wish to eat a plush, so juicy sweet..."); goto L_Menu; - case 1: + case 2: speech 5, lg("Why are you asking? And who are you too? I've never seen you around before..."), lg("Wait, are you one of those from the Legion of Aemil? I didn't do anything wrong, I promise!"), @@ -63,15 +63,15 @@ L_Menu: l("Bring me some of these plushrooms and I will show you how it works!"), l("Although the more powerful you are, the more plushrooms you will need."); - menuint - l("Sounds good!"), 0, - rif(countitem(Plushroom) >= .@plush_count, lg("I think I have enough plushrooms on me.")), 1, - l("We will talk about it later."), 2, - l("My stats are too good, I won't need it."), 3; + select + l("Sounds good!"), + rif(countitem(Plushroom) >= .@plush_count, lg("I think I have enough plushrooms on me.")), + l("We will talk about it later."), + l("My stats are too good, I won't need it."); - switch (@menuret) + switch (@menu) { - case 0: + case 1: if (.@visited < 2) { setq General_Rumly, 2; @@ -81,17 +81,17 @@ L_Menu: l("Great! Can't wait for some tasty mushrooms!"); goto L_Menu; - case 1: - goto L_ResetStats; case 2: - goto L_Later; + goto L_ResetStats; case 3: + goto L_Later; + case 4: goto L_Never; } - case 2: - goto L_ResetStats; case 3: + goto L_ResetStats; + case 4: if (.@visited < 2) goto L_Quit; .@rand = rand (2); @@ -139,55 +139,49 @@ L_ConfirmReset: speech 5, l("Let me just have a quick look at you. Hm... I will need @@ @@s to reset your stats.", .@plush_count, getitemlink(Plushroom)); - menuint - rif(countitem(Plushroom) >= .@plush_count, lg("Here, take as many as you need, I have plenty!")), 0, - rif(countitem(Plushroom) > 0 && countitem(Plushroom) < .@plush_count, lg("I don't have enough plushrooms...")), 1, - rif(countitem(Plushroom) == 0, lg("Oh no, I don't have any plushroom on me right now.")), 2, - lg("I have to go, sorry."), 3; + select + rif(countitem(Plushroom) >= .@plush_count, lg("Here, take as many as you need, I have plenty!")), + rif(countitem(Plushroom) > 0 && countitem(Plushroom) < .@plush_count, lg("I don't have enough plushrooms...")), + rif(countitem(Plushroom) == 0, lg("Oh no, I don't have any plushroom on me right now.")), + lg("I have to go, sorry."); - switch (@menuret) + if (@menu > 1) { - case 0: - delitem Plushroom, .@plush_count; + goto L_Later; + } - speech 5, - l("Thank you."), - l("Now stand still... It should not take much time..."); + delitem Plushroom, .@plush_count; - .@wasSP = StatusPoint; - resetstatus; - if (.@visited < 3) - { - setq General_Rumly, 3; - } - if (StatusPoint == .@wasSP) - { - speech 4, - l("It seems that you have no status points to reset!"), - lg("But the plushroom you brought was really awesome you know."), - lg("Come back when you will really need me. And bring more plushrooms with you!"); - } - else - { - speech 4, - l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), - l("Spend it wisely this time."), - lg("But you are welcome to reset your stats again if you bring me some more plushrooms!"); - } - goto L_Quit; - break; - case 1: - case 2: - case 3: - goto L_Later; - break; + speech 5, + l("Thank you."), + l("Now stand still... It should not take much time..."); + + .@wasSP = StatusPoint; + resetstatus; + if (.@visited < 3) + { + setq General_Rumly, 3; + } + if (StatusPoint == .@wasSP) + { + speech 4, + l("It seems that you have no status points to reset!"), + lg("But the plushroom you brought was really awesome you know."), + lg("Come back when you will really need me. And bring more plushrooms with you!"); + } + else + { + speech 4, + l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), + l("Spend it wisely this time."), + lg("But you are welcome to reset your stats again if you bring me some more plushrooms!"); } + goto L_Quit; + case 2: goto L_Later; - break; case 3: goto L_Never; - break; } L_Later: diff --git a/npc/001-1/salem.txt b/npc/001-1/salem.txt index e3b8cd74..3d6fd9c8 100644 --- a/npc/001-1/salem.txt +++ b/npc/001-1/salem.txt @@ -18,12 +18,13 @@ .@price = getarg(0); mesq l("The piou costs @@ E.", .@price); next; - menuint l("Alright, I'll take one."), 1, - l("I changed my mind."), 2; + select + l("Alright, I'll take one."), + l("I changed my mind."); mes ""; mesn; - if (@menuret == 2) + if (@menu == 2) return 4; if (Zeny < .@price) { @@ -107,23 +108,23 @@ L_SalemMenuShop: .@fexil = getq(ArtisQuests_Fexil); - menuint - l("What about those pious? They look so cute."), 0, - l("Let's trade."), 1, - rif(.@q != 0, l("I'd like to buy a piou.")), 2, - rif(.@fexil == 1, l("I'm looking for somebody named Fexil.")), 3, - menuaction(l("Quit")), 4; + select + l("What about those pious? They look so cute."), + l("Let's trade."), + rif(.@q != 0, l("I'd like to buy a piou.")), + rif(.@fexil == 1, l("I'm looking for somebody named Fexil.")), + menuaction(l("Quit")); - switch (@menuret) + switch (@menu) { - case 0: + case 1: goto L_AboutPious; break; - case 1: + case 2: closedialog; shop "Store#General001-1"; close; - case 2: + case 3: if (.@q == 2 && ArtisQuests_PiouDiscount) { speech 5, @@ -133,12 +134,10 @@ L_SalemMenuShop: if (!BuyPiou(@ArtisQuests_PiouPrice)) ArtisQuests_PiouDiscount = 0; break; - case 3: + case 4: speech 5, l("I think that I've seen this weakling wandering around the beach south from here this morning."); break; - case 5: - break; } closedialog; @@ -168,25 +167,21 @@ L_AboutPious: mesq l("If you catch the escaped piou and bring it back, I will give you a 90% discount on a piou."); next; - menuint rif (.@q == 0, l("Sounds like a good deal to me. I'll do it.")), 0, - rif (.@q == 1, l("I'm on my way! I will bring it back to you.")), 1, - l("I don't really have time to go chasing pious, let me just buy one at the regular price (30000 E)."), 2, - l("I don't want to buy a piou right now."), 3; + select + rif (.@q == 0, l("Sounds like a good deal to me. I'll do it.")), + rif (.@q == 1, l("I'm on my way! I will bring it back to you.")), + l("I don't really have time to go chasing pious, let me just buy one at the regular price (30000 E)."), + l("I don't want to buy a piou right now."); mes ""; mesn; - switch (@menuret) + switch (@menu) { - case 0: - goto L_QuestInfo; case 1: - break; - case 2: - BuyPiou @ArtisQuests_PiouPrice; - break; + goto L_QuestInfo; case 3: - break; + BuyPiou @ArtisQuests_PiouPrice; } closedialog; goodbye; diff --git a/npc/001-2-0/resa.txt b/npc/001-2-0/resa.txt index 778953de..4e46aba5 100644 --- a/npc/001-2-0/resa.txt +++ b/npc/001-2-0/resa.txt @@ -45,26 +45,27 @@ do { .@enora = getq (ArtisQuests_Enora); - menuint rif (.@enora == 5, lg("I came to retrieve a package for Enora.")), 0, - menuaction(l("Trade")), 1, - l("How can I improve my equipment?"), 2, - menuaction(l("Quit")), 3; + select + rif (.@enora == 5, lg("I came to retrieve a package for Enora.")), + menuaction(l("Trade")), + l("How can I improve my equipment?"), + menuaction(l("Quit")); - switch (@menuret) + switch (@menu) { - case 0: + case 1: enora_quest; closedialog; goodbye; close; - case 1: + case 2: closedialog; shop "Store#001-2-0"; close; - case 2: + case 3: explain_craft; break; - case 3: + case 4: closedialog; goodbye; close; diff --git a/npc/001-2-12/oscar.txt b/npc/001-2-12/oscar.txt index b604730a..a3247b84 100644 --- a/npc/001-2-12/oscar.txt +++ b/npc/001-2-12/oscar.txt @@ -113,12 +113,12 @@ do { - menuint - l("Could you bleach my clothes?"), 1, - l("Do you live here alone?"), 2, - menuaction(l("Quit")), 3; + select + l("Could you bleach my clothes?"), + l("Do you live here alone?"), + menuaction(l("Quit")); - switch (@menuret) + switch (@menu) { case 1: remove_cards_from_item(); @@ -131,7 +131,7 @@ break; } - } while (@menuret != 3); + } while (@menu != 3); closedialog; goodbye; diff --git a/npc/001-2-19/lloyd.txt b/npc/001-2-19/lloyd.txt index 6174b20b..6a6585cf 100644 --- a/npc/001-2-19/lloyd.txt +++ b/npc/001-2-19/lloyd.txt @@ -246,31 +246,32 @@ { .@enora = getq (ArtisQuests_Enora); - menuint rif (.@enora == 2, l("I'm searching some black iron ingots.")), 0, - l("I would like to store some items."), 1, - l("I would like to deposit some money."), 2, - l("What is this guild for?"), 3, - l("Does the guild has any work for me right now?"), 4, - l("Bye."), 5; - - switch (@menuret) + select + rif (.@enora == 2, l("I'm searching some black iron ingots.")), + l("I would like to store some items."), + l("I would like to deposit some money."), + l("What is this guild for?"), + l("Does the guild has any work for me right now?"), + l("Bye."); + + switch (@menu) { - case 0: + case 1: enora_quest; break; - case 1: + case 2: openstorage; closedialog; close; break; - case 2: + case 3: bank_account; break; - case 3: + case 4: mes ""; explain_guild; break; - case 4: + case 5: if (getq(ArtisQuests_Fexil) >= 1) { speech 5, @@ -281,15 +282,13 @@ paper_to_deliver; continue; - case 5: - break; } - if (@menuret != 5) + if (@menu != 6) { speech 5, l("Something else?"); } - } while (@menuret != 5); + } while (@menu != 6); closedialog; goodbye; diff --git a/npc/001-2-2/moon.txt b/npc/001-2-2/moon.txt index 4b5c44a3..4b974795 100644 --- a/npc/001-2-2/moon.txt +++ b/npc/001-2-2/moon.txt @@ -141,12 +141,12 @@ L_QuestStarted: mesq l("Do you have @@s for me?", getitemlink("CrocClaw")); next; - menuint - l("Check out this one."), 1, - l("I should put more effort into this."), 2, - l("Where can I find some Croc Claws?"), 3; + select + l("Check out this one."), + l("I should put more effort into this."), + l("Where can I find some Croc Claws?"); - switch (@menuret) + switch (@menu) { case 1: .@MustRepeat = CheckCrowClaw; diff --git a/npc/001-2-26/ivan.txt b/npc/001-2-26/ivan.txt index 93c82398..4cfb170d 100644 --- a/npc/001-2-26/ivan.txt +++ b/npc/001-2-26/ivan.txt @@ -59,11 +59,12 @@ speech 4, l("Yes what do you need?"); - menuint rif(.@enora == 8, l("The Legion needs some potions.")), 1, - rif(.@enora >= 8, l("Who are you?")), 2, - menuaction(l("Quit")), 3; + select + rif(.@enora == 8, l("The Legion needs some potions.")), + rif(.@enora >= 8, l("Who are you?")), + menuaction(l("Quit")); - switch (@menuret) + switch (@menu) { case 1: enora_quest; @@ -71,8 +72,6 @@ case 2: ivan_description; break; - case 3: - break; } closedialog; diff --git a/npc/001-2-41/edouard.txt b/npc/001-2-41/edouard.txt index 926c4758..ea7ce202 100644 --- a/npc/001-2-41/edouard.txt +++ b/npc/001-2-41/edouard.txt @@ -127,14 +127,14 @@ OnChair: do { - menuint - l("What is my current hairstyle and hair color?"), 1, - l("I'd like to get a different style."), 2, - l("Can you do something with my color?"), 3, - l("What's your story again?"), 4, - l("I'm fine for now, thank you."), 5; - - switch (@menuret) + select + l("What is my current hairstyle and hair color?"), + l("I'd like to get a different style."), + l("Can you do something with my color?"), + l("What's your story again?"), + l("I'm fine for now, thank you."); + + switch (@menu) { case 1: BarberSayStyle 3; diff --git a/npc/001-2-9/janus.txt b/npc/001-2-9/janus.txt index f7d865a8..78bc84db 100644 --- a/npc/001-2-9/janus.txt +++ b/npc/001-2-9/janus.txt @@ -133,13 +133,14 @@ setq General_Janus, 2; } - menuint rif (getq (General_Janus) == 1, l("I would like to create a party.")), 1, - rif (getq (General_Janus) == 2, l("I would like to create a guild.")), 2, - l("What service do you offer?"), 3, - l("Your name is Ianus or Janus?"), 4, - menuaction(l("Quit")), 5; - - switch (@menuret) + select + rif (getq (General_Janus) == 1, l("I would like to create a party.")), + rif (getq (General_Janus) == 2, l("I would like to create a guild.")), + l("What service do you offer?"), + l("Your name is Ianus or Janus?"), + menuaction(l("Quit")); + + switch (@menu) { case 1: create_party; @@ -153,10 +154,8 @@ case 4: janus_is_not_ianus; break; - case 5: - break; } - } while (@menuret != 5); + } while (@menu != 5); closedialog; goodbye; diff --git a/npc/commands/debug-look.txt b/npc/commands/debug-look.txt index 85dea836..3c4640c5 100644 --- a/npc/commands/debug-look.txt +++ b/npc/commands/debug-look.txt @@ -21,28 +21,31 @@ function script BarberDebug { function setStyle { clear; setnpcdialogtitle l("Appearance Debug - Barber"); - mes l("Please enter the desired hairstyle:"); + mes l("Hair style") + ": " + getlook (LOOK_HAIR); next; - input .@h; - setlook LOOK_HAIR, max(0, min(0x7F, .@h)); + mes l("Please enter the desired style") + " (1-255)"; + input .@h, 1, 0xFF; + setlook LOOK_HAIR, max(1, min(0xFF, .@h)); return; } function setColor { clear; setnpcdialogtitle l("Appearance Debug - Barber"); - mes l("Please enter the desired hair color:"); + mes l("Hair color") + ": " + getlook (LOOK_HAIR_COLOR); next; - input .@h; - setlook LOOK_HAIR_COLOR, max(0, min(0x7F, .@h)); + mes l("Please enter the desired color") + " (0-255)"; + input .@h, 0, 0xFF; + setlook LOOK_HAIR_COLOR, max(0, min(0xFF, .@h)); return; } function setRace { clear; setnpcdialogtitle l("Appearance Debug - Race"); - mes l("Please enter the desired race:"); + mes l("Race") + ": " + Class; next; - input .@r; - jobchange max(0, min(0x7FFF, .@h)); + mes l("Please enter the desired race") + " (0-32767)"; + input .@r, 0, 0x7FFF; + jobchange max(0, min(0x7FFF, .@r)); return; } @@ -60,25 +63,22 @@ function script BarberDebug { mes l("Race") + ": " + Class; mes "---"; - mes ""; - mes l("What do you want to change?"); next; - menuint - menuimage("actions/edit", l("Gender")), 1, - menuimage("actions/edit", l("Hair style")), 2, - menuimage("actions/edit", l("Hair color")), 3, - menuimage("actions/edit", l("Race")), 4, - rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), 5, - menuimage("actions/exit", l("Close")), 6; + mes l("What do you want to change?"); + select + menuimage("actions/edit", l("Gender") + " [" + l("Requires logout") + "]"), + menuimage("actions/edit", l("Hair style")), + menuimage("actions/edit", l("Hair color")), + menuimage("actions/edit", l("Race")), + rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))); - switch (@menuret) + switch (@menu) { case 1: setGender; break; case 2: setStyle; break; case 3: setColor; break; case 4: setRace; break; case 5: return; - case 6: closedialog; end; } } while (1); } diff --git a/npc/commands/debug-preset.txt b/npc/commands/debug-preset.txt index 1012c71c..7b7b94fe 100644 --- a/npc/commands/debug-preset.txt +++ b/npc/commands/debug-preset.txt @@ -23,6 +23,11 @@ function script DoRoutine { clearitem; } + if (compare(.@routine$[0], "e")) + { + nude; + } + if (compare(.@routine$[0], "k")) { resetskill; @@ -91,40 +96,10 @@ function script DoRoutine { } } } -} -function script DebugPresets { - - if (getarg(0, "m") != "m") - { - DoRoutine getarg(0); - end; - } - - clear; - setnpcdialogtitle l("Debug Presets"); - mes l("This menu allows you to select debug presets."); - mes ""; - mes l("What preset do you want to use?"); - next; - // TODO: create presets and add them to a hash table, then dynamically build this menu - menuint - menuimage("actions/abort", l("Abort")), 1, - l("New player"), 2, - rif(getarg(0,"") == "m", menuimage("actions/back", l("Return to Debug menu"))), 1, - menuimage("actions/exit", l("Close")), 3; - - switch (@menuret) - { - case 1: return; - case 2: DoRoutine "-tksxq z w000-0"; break; - } - - closedialog; + return; } - - - script @pre 32767,{ end; @@ -137,8 +112,7 @@ OnCall: { .@atcmd_parameters$[0] = implode(.@atcmd_parameters$[0], " "); } - DebugPresets strip(.@atcmd_parameters$[0]); - closedialog; + DoRoutine strip(.@atcmd_parameters$[0]); end; OnInit: diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt index a7cb9fab..208291f5 100644 --- a/npc/commands/debug-quest.txt +++ b/npc/commands/debug-quest.txt @@ -11,20 +11,18 @@ function script GlobalQuestDebug { mes l("Please select a quest:"); menuint - menuimage("actions/back", l("Go back")), 32766, - l("Gugli (main quest)"), 16, - "Ale", 10, - "Astapolos", 11, - "Gulukan", 12, - "Jalad", 13, - "QMuller", 14, - "Tibbo", 15, - menuimage("actions/exit", l("Close")), 32767; + menuimage("actions/back", l("Go back")), -1, + l("Gugli (main quest)"), ShipQuests_Gugli, + "Ale", ShipQuests_Ale, + "Astapolos", ShipQuests_Astapolos, + "Gulukan", ShipQuests_Gulukan, + "Jalad", ShipQuests_Jalad, + "Q'Muller", ShipQuests_QMuller, + "Tibbo", ShipQuests_Tibbo; switch (@menuret) { - case 32766: return; - case 32767: closedialog; end; + case -1: return; default: callfunc "QuestDebug" + @menuret; } } while (1); @@ -39,26 +37,24 @@ function script GlobalQuestDebug { mes l("Please select a quest:"); menuint - menuimage("actions/back", l("Go back")), 32766, - "Julia", 0, - "Arpan", 1, - "Alige", 2, - "Peter", 3, - "Nard", 4, - l("Knife"), 5, - l("Money"), 6, - l("Door"), 7, - "Couwan", 8, - l("Treasure Chest"), 9, - "Gugli", 16, - "Gado", 17, - menuimage("actions/exit", l("Close")), 32767; + menuimage("actions/back", l("Go back")), -1, + "Julia", ShipQuests_Julia, + "Arpan", ShipQuests_Arpan, + "Alige", ShipQuests_Alige, + "Peter", ShipQuests_Peter, + "Nard", ShipQuests_Nard, + l("Knife"), ShipQuests_Knife, + l("Money"), ShipQuests_ArpanMoney, + l("Door"), ShipQuests_Door, + "Couwan", ShipQuests_Couwan, + l("Treasure Chest"), ShipQuests_TreasureChest, + "Gugli", ShipQuests_Gugli, + "Gado", ShipQuests_ChefGado; switch (@menuret) { case 16: qDebugGugli; break; - case 32766: return; - case 32767: closedialog; end; + case -1: return; default: callfunc "QuestDebug" + @menuret; } } while (1); @@ -74,22 +70,20 @@ function script GlobalQuestDebug { mes l("Please select a quest:"); menuint - menuimage("actions/back", l("Go back")), 32766, - l("Lazy Brother"), 19, - l("Urchin"), 20, - l("Catching a piou"), 21, - "Eugene (" + l("fisherman") + ")", 22, - "Q'Onan", 23, - "Enora", 27, - "Fexil", 29, - "Lloyd", 30, - l("Mona's dad"), 32, - menuimage("actions/exit", l("Close")), 32767; + menuimage("actions/back", l("Go back")), , + l("Lazy Brother"), ArtisQuests_LazyBrother, + l("Urchin"), ArtisQuests_Urchin, + l("Catching a piou"), ArtisQuests_CatchPiou, + "Eugene (" + l("fisherman") + ")", ArtisQuests_Fishman, + "Q'Onan", ArtisQuests_QOnan, + "Enora", ArtisQuests_Enora, + "Fexil", ArtisQuests_Fexil, + "Lloyd", ArtisQuests_Lloyd, + l("Mona's dad"), ArtisQuests_MonaDad; switch (@menuret) { - case 32766: return; - case 32767: closedialog; end; + case -1: return; default: callfunc "QuestDebug" + @menuret; } } while (1); @@ -105,17 +99,15 @@ function script GlobalQuestDebug { mes l("Please select a quest:"); menuint - menuimage("actions/back", l("Go back")), 32766, - l("Cookies"), 18, - "Rumly", 26, - l("Narrator"), 28, - "Janus", 31, - menuimage("actions/exit", l("Close")), 32767; + menuimage("actions/back", l("Go back")), -1, + l("Cookies"), General_Cookies, + "Rumly", General_Rumly, + l("Narrator"), General_Narrator, + "Janus", General_Janus; switch (@menuret) { - case 32766: return; - case 32767: closedialog; end; + case -1: return; default: callfunc "QuestDebug" + @menuret; } } while (1); @@ -133,8 +125,7 @@ function script GlobalQuestDebug { l("Prologue"), "Artis", l("Other"), - rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), - menuimage("actions/exit", l("Close")); + rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))); switch (@menu) { @@ -142,7 +133,6 @@ function script GlobalQuestDebug { case 2: qDebugArtis; break; case 3: qDebugGeneral; break; case 4: return; - default: closedialog; end; } } while (1); } diff --git a/npc/commands/debug-skill.txt b/npc/commands/debug-skill.txt index f782e753..187c4009 100644 --- a/npc/commands/debug-skill.txt +++ b/npc/commands/debug-skill.txt @@ -13,22 +13,20 @@ function script GlobalSkillDebug { setnpcdialogtitle l("Skill Debug - Modify Skill"); .@k = getarg(0,1); .@v = getskilllv(.@k); - menuint - menuimage("actions/abort", l("Abort")), 1, - rif(.@v > 0, menuimage("actions/remove", l("Remove this skill"))), 2, - rif(.@v < 10, menuimage("actions/raise", l("Raise this skill"))), 3, - rif(.@v > 0, menuimage("actions/lower", l("Lower this skill"))), 4, - menuimage("actions/edit", l("Set the level manually")), 5, - menuimage("actions/back", l("Return to skill debug menu")), 1, - menuimage("actions/exit", l("Close")), 6; - - switch (@menuret) + select + menuimage("actions/abort", l("Abort")), + rif(.@v > 0, menuimage("actions/remove", l("Remove this skill"))), + rif(.@v < 10, menuimage("actions/raise", l("Raise this skill"))), + rif(.@v > 0, menuimage("actions/lower", l("Lower this skill"))), + menuimage("actions/edit", l("Set the level manually")), + menuimage("actions/back", l("Return to skill debug menu")); + + switch (@menu) { case 2: skill .@k, 0, 0; break; case 3: skill .@k, min(10, .@v + 1), 0; break; case 4: skill .@k, max(0, .@v - 1), 0; break; case 5: setSkill .@k; break; - case 6: closedialog; end; } return; @@ -52,13 +50,11 @@ function script GlobalSkillDebug { menuint "NV_BASIC", NV_BASIC, - rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), 32766, - menuimage("actions/exit", l("Close")), 32767; + rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), -1; switch (@menuret) { - case 32766: return; - case 32767: closedialog; end; + case -1: return; } modifySkill @menuret; diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index 1a5cdec9..306bed56 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -20,21 +20,19 @@ function script GlobalDebugMenu { clear; setnpcdialogtitle l("Debug - Reset"); mes l("What do you want to reset?"); - menuint - menuimage("actions/abort", l("Abort")), 1, - menuimage("actions/reset", l("Reset stats, skills, level")), 2, - menuimage("actions/nuke", l("Reset EVERYTHING")), 3, - menuimage("actions/back", l("Return to Debug menu")), 1, - menuimage("actions/exit", l("Close")), 4; + select + menuimage("actions/abort", l("Abort")), + menuimage("actions/reset", l("Reset stats, skills, level")), + menuimage("actions/nuke", l("Reset EVERYTHING")), + menuimage("actions/back", l("Return to Debug menu")); - switch (@menuret) - { - case 2: - case 3: doReset @menuret; - case 1: return; - } + switch (@menu) + { + case 2: + case 3: doReset @menu; + } - closedialog; + return; } function changeLevel { @@ -97,30 +95,26 @@ function script GlobalDebugMenu { mes l("This menu allows you to modify your account data."); mes ""; mes l("What do you want to do?"); - menuint - menuimage("actions/manage", l("Change my level")), 1, - menuimage("actions/manage", l("Change my stats")), 2, - menuimage("actions/manage", l("Change my skills")), 3, - menuimage("actions/manage", l("Change my appearance")), 4, - menuimage("actions/edit", l("Change my quests")), 5, - menuimage("actions/reset", l("Select a preset")), 6, - menuimage("actions/nuke", l("Reset")), 7, - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 8, - menuimage("actions/exit", l("Close")), 9; + select + menuimage("actions/manage", l("Change my level")), + menuimage("actions/manage", l("Change my stats")), + menuimage("actions/manage", l("Change my skills")), + menuimage("actions/manage", l("Change my appearance")), + menuimage("actions/edit", l("Change my quests")), + menuimage("actions/reset", l("Reset")), + rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); .@c = getarg(0,0) ? 2 : 1; - switch (@menuret) + switch (@menu) { case 1: changeLevel; break; case 2: changeStats; break; case 3: GlobalSkillDebug .@c; break; case 4: BarberDebug .@c; break; case 5: GlobalQuestDebug .@c; break; - case 6: DebugPresets "m"; break; - case 7: resetAll; break; - case 8: return; - case 9: closedialog; end; + case 6: resetAll; break; + case 7: return; } } while(1); } diff --git a/npc/commands/event.txt b/npc/commands/event.txt index ed40c184..a01162e2 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -4,16 +4,14 @@ function script GlobalEventMenu { mes l("This menu allows you to manage events and gives access to event-related tools."); mes ""; mes l("There is no event available right now."); - menuint - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 1, - menuimage("actions/exit", l("Close")), 2; - if (@menuret == 1) + if (getarg(0,0)) { - return; + select + menuimage("actions/home", l("Return to Super Menu")); } - closedialog; + return; } diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt index b0bc4ebd..ff3e6b49 100644 --- a/npc/commands/motd.txt +++ b/npc/commands/motd.txt @@ -95,15 +95,15 @@ function script MOTDConfig { clear; mes l("line @@: @@", .@n, $MOTD_Messages$[.@n]); next; - menuint - menuimage("actions/back", l("Modify another line")), 1, - menuimage("actions/remove", l("Remove this line")), 2, - menuimage("actions/edit", l("Modify this line")), 3, - rif(.@n > 0, menuimage("actions/raise", l("Move this line up"))), 4, - rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))), 5, - menuimage("actions/home", l("Return to main menu")), 6; - - switch (@menuret) + select + menuimage("actions/back", l("Modify another line")), + menuimage("actions/remove", l("Remove this line")), + menuimage("actions/edit", l("Modify this line")), + rif(.@n > 0, menuimage("actions/raise", l("Move this line up"))), + rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))), + menuimage("actions/home", l("Return to main menu")); + + switch (@menu) { case 2: removeLine .@n; return; case 3: editLine .@n; return; @@ -137,21 +137,19 @@ function script MOTDConfig { mes l("Enabled: @@", (.@d ? l("no") : l("yes"))); next; - menuint - menuimage("actions/toggle", (.@d ? l("Enable") : l("Disable"))), 1, - menuimage("actions/add", l("Add a new line")), 2, - rif(.@size, menuimage("actions/manage", l("Modify, move, or remove a line"))), 3, - rif(.@size, menuimage("actions/test", l("Test MOTD"))), 4, - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 5, - menuimage("actions/exit", l("Close")), 6; + select + menuimage("actions/toggle", (.@d ? l("Enable") : l("Disable"))), + menuimage("actions/add", l("Add a new line")), + rif(.@size, menuimage("actions/manage", l("Modify, move, or remove a line"))), + rif(.@size, menuimage("actions/test", l("Test MOTD"))), + rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); - switch (@menuret) + switch (@menu) { case 1: toggleMOTD; break; case 2: addNewLine; break; case 3: modifyLine .@size; break; case 4: displayMOTD; break; - case 6: closedialog; end; default: return; } } while (1); @@ -174,7 +172,7 @@ OnPCLoginEvent: } if (debug) { - dispbottom "##7<<##B @@?test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>"; + dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>"; } end; diff --git a/npc/commands/numa.txt b/npc/commands/numa.txt deleted file mode 100644 index f9fff699..00000000 --- a/npc/commands/numa.txt +++ /dev/null @@ -1,49 +0,0 @@ -function script SuperMenu { - do - { - .@gid = getgroupid(); - clear; - setnpcdialogtitle l("Super Menu"); - mes l("This menu contains all options available to you, based on your access privileges."); - mes ""; - mes l("What do you want to access?"); - next; - menuint - rif(.@gid >= 3, l("Scheduled broadcasts")), 1, - rif(.@gid >= 3, l("MOTD")), 2, - rif(.@gid >= 4, l("Event management")), 3, - l("Debug"), 4, - l("Close"), 5; - - switch (@menuret) - { - case 1: StoneBoard 1; break; - case 2: MOTDConfig 1; break; - case 3: GlobalEventMenu 1; break; - case 4: GlobalDebugMenu 1; break; - default: return; - } - } while (1); -} - - - -- script @numa 32767,{ - end; - -OnCall: - .@gid = getgroupid(); - - if (!debug && .@gid < 3) - { - dispbottom l("You do not have the required access privileges to use the Super Menu."); - end; - } - - SuperMenu; - closedialog; - end; - -OnInit: - bindatcmd "numa", "@numa::OnCall", 0, 99, 0; -} diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt index b520f0b0..51f1f6a6 100644 --- a/npc/commands/scheduled-broadcasts.txt +++ b/npc/commands/scheduled-broadcasts.txt @@ -30,7 +30,7 @@ function script StoneBoard { l("Every 24 hours"), 24, l("Never (only on login)"), 0; - return max(0, @menuret); + return @menuret; } function setMaxRep { @@ -50,7 +50,7 @@ function script StoneBoard { l("Send 20 times"), 20, l("Send indefinitely"), 0; - return max(0, @menuret); + return @menuret; } function setOnLogin { @@ -61,11 +61,11 @@ function script StoneBoard { clear; mes l("Send this message also on login?"); next; - menuint - l("No"), 0, - l("Yes"), 1; + select + l("No"), + l("Yes"); - return max(0, @menuret); + return (@menu - 1); } function newBroadcast { @@ -98,14 +98,13 @@ function script StoneBoard { } next; - menuint - menuimage("actions/cancel", l("Discard")), 1, - menuimage("actions/edit", l("Start over")), 2, - menuimage("actions/test", l("Start broadcasting")), 3, - menuimage("actions/test", l("Start broadcasting, and make an extra broadcast right now")), 4, - menuimage("actions/exit", l("Close")), 5; - - switch (@menuret) + select + menuimage("actions/cancel", l("Discard")), + menuimage("actions/edit", l("Start over")), + menuimage("actions/test", l("Start broadcasting")), + menuimage("actions/test", l("Start broadcasting, and make an extra broadcast right now")); + + switch (@menu) { case 3: case 4: @@ -120,12 +119,11 @@ function script StoneBoard { { initnpctimer "@sched"; } - if (@menuret == 4) + if (@menu == 4) { announce $@SCHED_Msg$, bc_all; } case 1: return; - case 5: closedialog; end; } } while(1); @@ -147,7 +145,7 @@ function script StoneBoard { mes l("Sent on login: @@", ($@SCHED_Opt[0] ? l("yes") : l("no"))); if ($@SCHED_Opt[1]) { - .@next = max(1, ((3600000 * ($@SCHED_Opt[1] - $@SCHED_Opt[4])) - getnpctimer(0))); + .@next = max(1, ((3600000 * ($@SCHED_Opt[1] - $@SCHED_Opt[4])) - getnpctimer(0, "@sched"))); mes l("Interval: every @@ hour(s)", $@SCHED_Opt[1]); mes l("Next broadcast: @@", FuzzyTimeFromMs(.@next)); } @@ -160,20 +158,18 @@ function script StoneBoard { } next; - menuint - menuimage("actions/abort", l("Abort")), 5, - rif(.@a, menuimage("actions/test", l("Manually trigger the current broadcast"))), 2, - rif(.@a, menuimage("actions/remove", l("Stop broadcasting"))), 3, - rif(!(.@a), menuimage("actions/add", l("Set a new broadcast"))), 4, - rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 5, - menuimage("actions/exit", l("Close")), 6; - - switch (@menuret) + select + menuimage("actions/abort", l("Abort")), + rif(.@a, menuimage("actions/test", l("Manually trigger the current broadcast"))), + rif(.@a, menuimage("actions/remove", l("Stop broadcasting"))), + rif(!(.@a), menuimage("actions/add", l("Set a new broadcast"))), + rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))); + + switch (@menu) { case 2: announce $@SCHED_Msg$, bc_all; break; case 3: $@SCHED_Msg$ = ""; break; case 4: newBroadcast; break; - case 6: closedialog; end; default: return; } } while (1); @@ -185,21 +181,26 @@ function script StoneBoard { end; OnTimer3600000: - ++$@SCHED_Opt[4]; - if ($@SCHED_Opt[4] == ($@SCHED_Opt[1] - 1)) + if ($@SCHED_Msg$ == "") + { + stopnpctimer; + end; + } + + ++$@SCHED_Opt[4]; // increase hours counter + if ($@SCHED_Opt[4] == $@SCHED_Opt[1]) { stopnpctimer; - ++$@SCHED_Opt[2]; - if ($@SCHED_Msg$ != "") + ++$@SCHED_Opt[2]; // increase total counter + announce $@SCHED_Msg$, bc_all; + $@SCHED_Opt[4] = 0; // reset hours counter + if ($@SCHED_Opt[2] >= $@SCHED_Opt[3] && $@SCHED_Opt[3] > 0) { - announce $@SCHED_Msg$, bc_all; - $@SCHED_Opt[4] = 0; - if ($@SCHED_Opt[2] < $@SCHED_Opt[3] && $@SCHED_Opt[3] > 0) - { - initnpctimer; - } + $@SCHED_Msg$ = ""; // reset message + end; } } + initnpctimer; end; OnCall: diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt new file mode 100644 index 00000000..fede6e71 --- /dev/null +++ b/npc/commands/super-menu.txt @@ -0,0 +1,69 @@ +function script SuperMenu { + do + { + .@gid = getgroupid(); + + if (.@gid < 3) + { + GlobalDebugMenu; + return; + } + + clear; + setnpcdialogtitle l("Super Menu"); + mes l("This menu contains all options available to you, based on your access privileges."); + mes ""; + mes l("What do you want to access?"); + next; + select + l("Scheduled broadcasts"), + l("MOTD"), + rif(.@gid >= 4, l("Event management")), + l("Debug"); + + switch (@menu) + { + case 1: StoneBoard 1; break; + case 2: MOTDConfig 1; break; + case 3: GlobalEventMenu 1; break; + case 4: GlobalDebugMenu 1; break; + } + } while (1); +} + + + +- script @super 32767,{ + end; + +OnCall: + .@gid = getgroupid(); + + if (!debug && .@gid < 3) + { + dispbottom l("You do not have the required access privileges to use the Super Menu."); + end; + } + + SuperMenu; + closedialog; + end; + +OnPCLoginEvent: + .@debug_skill = getskilllv(EVOL_SUPER_MENU); + + if (.@debug_skill > 0 && !debug) + { + skill EVOL_SUPER_MENU, 0, 0; // remove debug skill + } + + else if (.@debug_skill < 1 && debug) + { + skill EVOL_SUPER_MENU, 1, 0; // give debug skill + } + end; + +OnInit: + bindatcmd "super", "@super::OnCall", 0, 99, 0; + bindatcmd "numa", "@super::OnCall", 0, 99, 0; // alias for those used to TMW's @numa +} diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt index f8e25bc0..b4354d51 100644 --- a/npc/commands/warp.txt +++ b/npc/commands/warp.txt @@ -227,5 +227,11 @@ OnCall: end; OnInit: + if (debug > 0) + { + bindatcmd "w", "@w::OnCall", 0, 2, 0; + end; + } + bindatcmd "w", "@w::OnCall", 1, 2, 1; } diff --git a/npc/commands/zeny.txt b/npc/commands/zeny.txt index 560c7a94..2948a285 100644 --- a/npc/commands/zeny.txt +++ b/npc/commands/zeny.txt @@ -86,5 +86,11 @@ OnCall: end; OnInit: + if (debug > 0) + { + bindatcmd "esp", "@esp::OnCall", 0, 2, 0; + end; + } + bindatcmd "esp", "@esp::OnCall", 3, 99, 1; } 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; } diff --git a/npc/scripts.conf b/npc/scripts.conf index 31de12c5..cc5933fe 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -80,7 +80,7 @@ "npc/commands/debug-skill.txt", "npc/commands/debug-preset.txt", "npc/commands/debug.txt", -"npc/commands/numa.txt", +"npc/commands/super-menu.txt", // config script "npc/config/hairstyle_config.txt", -- cgit v1.2.3-60-g2f50