From 8a4bf716002a017de77fe7df301ef8e4aaf00a2e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 11:00:49 -0300 Subject: Initial commit --- db/quest_db.conf | 284 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 db/quest_db.conf (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf new file mode 100644 index 00000000..ef64fe4b --- /dev/null +++ b/db/quest_db.conf @@ -0,0 +1,284 @@ +quest_db: ( +// Quest Database +/****************************************************************************** + ************* Entry structure ************************************************ + ****************************************************************************** +{ + Id: Quest ID [int] + Name: Quest Name [string] + TimeLimit: Time Limit (seconds) [int, optional] + Targets: ( [array, optional] + { + MobId: Mob ID [int] + Count: [int] + }, + ... (can repeated up to MAX_QUEST_OBJECTIVES times) + ) + Drops: ( + { + ItemId: Item ID to drop [int] + Rate: Drop rate [int] + MobId: Mob ID to match [int, optional] + }, + ... (can be repeated) + ) +}, +******************************************************************************/ +// Drasil Island Quests (0~19) +{ + Id: 0 + Name: "ShipQuests_Julia" +}, +{ + Id: 1 + Name: "ShipQuests_Arpan" +}, +{ + Id: 2 + Name: "ShipQuests_Alige" +}, +{ + Id: 3 + Name: "ShipQuests_Peter" +}, +{ + Id: 4 + Name: "ShipQuests_Nard" +}, +{ + Id: 5 + Name: "ShipQuests_Knife" +}, +{ + Id: 6 + Name: "ShipQuests_ArpanMoney" +}, +{ + Id: 7 + Name: "ShipQuests_Door" +}, +{ + Id: 8 + Name: "ShipQuests_Couwan" +}, +{ + Id: 9 + Name: "ShipQuests_TreasureChest" +}, +{ + Id: 10 + Name: "ShipQuests_Ale" +}, +{ + Id: 11 + Name: "ShipQuests_Astapolos" +}, +{ + Id: 12 + Name: "ShipQuests_Gulukan" +}, +{ + Id: 13 + Name: "ShipQuests_Jalad" +}, +{ + Id: 14 + Name: "ShipQuests_QMuller" +}, +{ + Id: 15 + Name: "ShipQuests_Tibbo" +}, +{ + Id: 16 + Name: "ShipQuests_Gugli" +}, +{ + Id: 17 + Name: "ShipQuests_ChefGado" +}, +{ + Id: 18 + Name: "General_Cookies" +}, + +// Artis Quests (20~49) +{ + Id: 20 + Name: "ArtisQuests_LazyBrother" +}, +{ + Id: 21 + Name: "ArtisQuests_Urchin" +}, +{ + Id: 22 + Name: "ArtisQuests_CatchPiou" +}, +{ + Id: 23 + Name: "ArtisQuests_Fishman" +}, +{ + Id: 24 + Name: "ArtisQuests_QOnan" +}, +// ID 25 IS FREE +{ + Id: 26 + Name: "General_Rumly" +}, +{ + Id: 27 + Name: "ArtisQuests_Enora" +}, +// ID 28 IS FREE +{ + Id: 29 + Name: "ArtisQuests_Fexil" +}, +{ + Id: 30 + Name: "ArtisQuests_Lloyd" +}, +{ + Id: 31 + Name: "General_Janus" +}, +{ + Id: 32 + Name: "ArtisQuests_MonaDad" +}, +{ + Id: 33 + Name: "Artis_Legion_Progress" +}, +{ + Id: 34 + Name: "ArtisQuests_TrainingLegion" +}, +{ + Id: 35 + Name: "ThiefQuests_Artis" +}, + +// Argaes Quests (50~99) +{ + Id: 50 + Name: "HurnscaldQuests_Hinnak" +}, +{ + Id: 51 + Name: "HurnscaldQuests_Soup" +}, +{ + Id: 52 + Name: "HurnscaldQuests_Inspector" +}, +{ + Id: 53 + Name: "HurnscaldQuests_ForestBow" +}, +{ + Id: 54 + Name: "HurnscaldQuests_WoodenShield" +}, +{ + Id: 55 + Name: "General_Cooking" +}, +{ + Id: 56 + Name: "General_Brotherhood" +}, +{ + Id: 57 + Name: "HurnscaldQuests_Kfahr" +}, +{ + Id: 58 + Name: "ArgaesQuest_Galimatia" +}, +{ + Id: 59 + Name: "HurnscaldQuests_Rossy" +}, +{ + Id: 60 + Name: "HurnscaldQuests_BloodDonor" +}, +{ + Id: 61 + Name: "General_CptHal" +}, +{ + Id: 62 + Name: "HurnscaldQuest_Bandits" +}, + +// Event and General Quests (100~149) +{ + Id: 100 + Name: "General_Narrator" +}, +{ + Id: 101 + Name: "Halloween_VisitArtis" +}, +{ + Id: 102 + Name: "Halloween_BarrelQuest" +}, +{ + Id: 103 + Name: "General_SmearedHands" +}, +{ + Id: 104 + Name: "General_MerchantRequest" +}, + +// Tonori Quests (150~199) +{ + Id: 150 + Name: "TonoriQuest_Kylian" +}, +{ + Id: 151 + Name: "TulimsharQuest_AnwarField" +}, +{ + Id: 152 + Name: "TonoriQuest_Imec" +}, +{ + Id: 153 + Name: "TonoriQuest_Hetchel" +}, +{ + Id: 154 + Name: "TonoriQuest_Inya" +}, +{ + Id: 155 + Name: "TonoriQuest_Heathin" +}, +{ + Id: 156 + Name: "TonoriQuest_Riskim" +}, +{ + Id: 157 + Name: "TonoriQuest_Hocus" +}, +{ + Id: 158 + Name: "TonoriQuest_Joaquim" +}, + +// Test Quests, Debug Quests, etc. (1000+) +{ + Id: 1000 + Name: "Test_testing1" +}, +) -- cgit v1.2.3-60-g2f50 From 5062fac8ea8ecbbb3f2206361caa849677361c87 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 13 Apr 2021 10:36:05 -0300 Subject: Replace Banker's code with Evol2 standards (total rewrite/fully fixed) Cashier Shade OK --- db/quest_db.conf | 212 +---------------------- npc/functions/banker.txt | 432 ++++++++++++++++++----------------------------- 2 files changed, 172 insertions(+), 472 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index ef64fe4b..da5151cd 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -24,221 +24,17 @@ quest_db: ( ) }, ******************************************************************************/ -// Drasil Island Quests (0~19) +// General Quests (0~19) { Id: 0 - Name: "ShipQuests_Julia" -}, -{ - Id: 1 - Name: "ShipQuests_Arpan" -}, -{ - Id: 2 - Name: "ShipQuests_Alige" -}, -{ - Id: 3 - Name: "ShipQuests_Peter" -}, -{ - Id: 4 - Name: "ShipQuests_Nard" -}, -{ - Id: 5 - Name: "ShipQuests_Knife" -}, -{ - Id: 6 - Name: "ShipQuests_ArpanMoney" -}, -{ - Id: 7 - Name: "ShipQuests_Door" -}, -{ - Id: 8 - Name: "ShipQuests_Couwan" -}, -{ - Id: 9 - Name: "ShipQuests_TreasureChest" -}, -{ - Id: 10 - Name: "ShipQuests_Ale" -}, -{ - Id: 11 - Name: "ShipQuests_Astapolos" -}, -{ - Id: 12 - Name: "ShipQuests_Gulukan" -}, -{ - Id: 13 - Name: "ShipQuests_Jalad" -}, -{ - Id: 14 - Name: "ShipQuests_QMuller" -}, -{ - Id: 15 - Name: "ShipQuests_Tibbo" -}, -{ - Id: 16 - Name: "ShipQuests_Gugli" -}, -{ - Id: 17 - Name: "ShipQuests_ChefGado" -}, -{ - Id: 18 - Name: "General_Cookies" -}, - -// Artis Quests (20~49) -{ - Id: 20 - Name: "ArtisQuests_LazyBrother" -}, -{ - Id: 21 - Name: "ArtisQuests_Urchin" -}, -{ - Id: 22 - Name: "ArtisQuests_CatchPiou" -}, -{ - Id: 23 - Name: "ArtisQuests_Fishman" -}, -{ - Id: 24 - Name: "ArtisQuests_QOnan" -}, -// ID 25 IS FREE -{ - Id: 26 - Name: "General_Rumly" -}, -{ - Id: 27 - Name: "ArtisQuests_Enora" -}, -// ID 28 IS FREE -{ - Id: 29 - Name: "ArtisQuests_Fexil" -}, -{ - Id: 30 - Name: "ArtisQuests_Lloyd" -}, -{ - Id: 31 - Name: "General_Janus" -}, -{ - Id: 32 - Name: "ArtisQuests_MonaDad" -}, -{ - Id: 33 - Name: "Artis_Legion_Progress" -}, -{ - Id: 34 - Name: "ArtisQuests_TrainingLegion" -}, -{ - Id: 35 - Name: "ThiefQuests_Artis" -}, - -// Argaes Quests (50~99) -{ - Id: 50 - Name: "HurnscaldQuests_Hinnak" -}, -{ - Id: 51 - Name: "HurnscaldQuests_Soup" -}, -{ - Id: 52 - Name: "HurnscaldQuests_Inspector" -}, -{ - Id: 53 - Name: "HurnscaldQuests_ForestBow" -}, -{ - Id: 54 - Name: "HurnscaldQuests_WoodenShield" -}, -{ - Id: 55 - Name: "General_Cooking" -}, -{ - Id: 56 - Name: "General_Brotherhood" -}, -{ - Id: 57 - Name: "HurnscaldQuests_Kfahr" -}, -{ - Id: 58 - Name: "ArgaesQuest_Galimatia" -}, -{ - Id: 59 - Name: "HurnscaldQuests_Rossy" -}, -{ - Id: 60 - Name: "HurnscaldQuests_BloodDonor" -}, -{ - Id: 61 - Name: "General_CptHal" -}, -{ - Id: 62 - Name: "HurnscaldQuest_Bandits" -}, - -// Event and General Quests (100~149) -{ - Id: 100 Name: "General_Narrator" }, { - Id: 101 - Name: "Halloween_VisitArtis" -}, -{ - Id: 102 - Name: "Halloween_BarrelQuest" -}, -{ - Id: 103 - Name: "General_SmearedHands" -}, -{ - Id: 104 - Name: "General_MerchantRequest" + Id: 1 + Name: "General_Banker" }, -// Tonori Quests (150~199) +// Tonori Quests (20~49) { Id: 150 Name: "TonoriQuest_Kylian" diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt index 4bfe9f9a..4222619e 100644 --- a/npc/functions/banker.txt +++ b/npc/functions/banker.txt @@ -1,268 +1,172 @@ +// Bank scripts +function script Banking { + do + { + if (BankVault > 0) { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You currently have @@ GP on your bank account.", + format_number(BankVault)), + l("What do you want to do with your money?"); + } else { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("What do you want to do with your money?"); + } + + select + rif(Zeny > 0, l("Deposit.")), + rif(BankVault > 0, l("Withdraw.")), + l("I'm done."); + + switch (@menu) + { + case 1: + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("How much do you want to deposit?"); + + menuint + l("Other."), -1, + rif(Zeny >= 1000, format_number(1000) + " GP."), 1000, + rif(Zeny >= 2500, format_number(2500) + " GP."), 2500, + rif(Zeny >= 5000, format_number(5000) + " GP."), 5000, + rif(Zeny >= 10000, format_number(10000) + " GP."), 10000, + rif(Zeny >= 25000, format_number(25000) + " GP."), 25000, + rif(Zeny >= 50000, format_number(50000) + " GP."), 50000, + rif(Zeny >= 100000, format_number(100000) + " GP."), 100000, + l("All of my money."), -2, + l("I changed my mind."), -3; + + switch (@menuret) { + case -1: + input @menuret; + break; + case -2: + @menuret = Zeny; + } + + if (@menuret > 0) { + if (@menuret > Zeny) { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You do not have enough Gold on yourself."); + break; + } + + @menuret = min(MAX_BANK_ZENY, @menuret); // make sure the variable can't overflow + .@before = BankVault; // amount before the deposit + .@max = MAX_BANK_ZENY - BankVault; // maximum possible deposit + .@deposit = min(.@max, @menuret); // actual deposit + + if (.@deposit > 0) { + BankVault += .@deposit; // add to bank + Zeny -= .@deposit; // remove from inventory + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You made a cash deposit of @@ GP.", format_number(.@deposit)); + } + } + break; + + case 2: + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("How much do you want to withdraw?"); + + menuint + l("Other."), -1, + rif(BankVault >= 1000, format_number(1000) + " GP."), 1000, + rif(BankVault >= 2500, format_number(2500) + " GP."), 2500, + rif(BankVault >= 5000, format_number(5000) + " GP."), 5000, + rif(BankVault >= 10000, format_number(10000) + " GP."), 10000, + rif(BankVault >= 25000, format_number(25000) + " GP."), 25000, + rif(BankVault >= 50000, format_number(50000) + " GP."), 50000, + rif(BankVault >= 100000, format_number(100000) + " GP."), 100000, + l("All of my money."), -2, + l("I changed my mind."), -3; + + switch (@menuret) + { + case -1: + input @menuret; + break; + case -2: + @menuret = BankVault; + } + + if (@menuret > 0) { + if (@menuret > BankVault) { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You do not have enough Gold Pieces on your bank account."); + break; + } + + @menuret = min(MAX_ZENY, @menuret); // make sure the variable can't overflow + .@before = Zeny; // amount before the withdrawal + .@max = MAX_ZENY - Zeny; // maximum possible withdrawal + .@withdrawal = min(.@max, @menuret); // actual withdrawal + + if (.@withdrawal > 0) { + Zeny += .@withdrawal; // add to inventory + BankVault -= .@withdrawal; // remove from bank + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You withdrew a total of @@ GP.", format_number(.@withdrawal)); + } + } + break; + default: return; + } + } while (true); +} function script Banker { - if (BankAccount == 0) - goto L_Start; - callsub S_MoveAccount; - goto L_Start; - -L_Start: - if(@npcname$ == "") set @npcname$, strnpcinfo(1); - mes "[" + @npcname$ + "]"; - mes "\"Welcome to the bank!"; - mes "How can I help you?\""; - next; - menu - "Open my storage", L_Storage, - "Deposit", L_Dep, - "Withdraw", L_With, - "Check my balance", L_Balance, - "Change Bank Options", L_Change, - "Nevermind", L_Nev; - -L_Storage: - if (#BankOptions & OPT_STORAGE_CLOSE) close2; - openstorage; - if (#BankOptions & OPT_STORAGE_CLOSE) goto L_Return; - goto L_Start; - -L_Dep: - mes "[" + @npcname$ + "]"; - mes "\"How much would you like to deposit?\""; - next; - menu - "Other", L_Dep_Input, - "5,000 GP", L_Dep_5k, - "10,000 GP", L_Dep_10k, - "25,000 GP", L_Dep_25k, - "50,000 GP", L_Dep_50k, - "100,000 GP", L_Dep_100k, - "250,000 GP", L_Dep_250k, - "500,000 GP", L_Dep_500k, - "1,000,000 GP", L_Dep_1kk, - "All of my money", L_Dep_All, - "I've changed my mind", L_Start, - "Quit", L_Return; - -L_Dep_Input: - input @Amount; - if (@Amount >= 0) - goto L_Dep_Continue; - mes "[" + @npcname$ + "]"; - mes "\"I need a positive amount. What would you like to do?\""; - menu - "Go back", L_Start, - "Try again", L_Dep_Input, - "Deposit all", L_Dep_All, - "Nevermind", L_Nev; - -L_Dep_5k: - if (Zeny<5000) - goto L_NoMoney; - @Amount = 5000; - goto L_Dep_Continue; - -L_Dep_10k: - if (Zeny<10000) - goto L_NoMoney; - @Amount = 10000; - goto L_Dep_Continue; - -L_Dep_25k: - if (Zeny<25000) - goto L_NoMoney; - @Amount = 25000; - goto L_Dep_Continue; - -L_Dep_50k: - if (Zeny<50000) - goto L_NoMoney; - @Amount = 50000; - goto L_Dep_Continue; - -L_Dep_100k: - if (Zeny<100000) - goto L_NoMoney; - @Amount = 100000; - goto L_Dep_Continue; - -L_Dep_250k: - if (Zeny<250000) - goto L_NoMoney; - @Amount = 250000; - goto L_Dep_Continue; - -L_Dep_500k: - if (Zeny<500000) - goto L_NoMoney; - @Amount = 500000; - goto L_Dep_Continue; - -L_Dep_1kk: - if (Zeny<1000000) - goto L_NoMoney; - @Amount = 1000000; - goto L_Dep_Continue; - -L_Dep_All: - if (Zeny<1) - goto L_NoMoney; - @Amount = Zeny; - goto L_Dep_Continue; - -L_Dep_Continue: - if (Zeny < @Amount) - goto L_NoMoney; - Zeny = Zeny - @Amount; - #BankAccount = #BankAccount + @Amount; - goto L_Balance; - -L_With: - mes "[" + @npcname$ + "]"; - mes "\"How much would you like to withdraw?\""; - menu - "Other", L_With_Input, - "5,000 GP", L_With_5k, - "10,000 GP", L_With_10k, - "25,000 GP", L_With_25k, - "50,000 GP", L_With_50k, - "100,000 GP", L_With_100k, - "250,000 GP", L_With_250k, - "500,000 GP", L_With_500k, - "1,000,000 GP", L_With_1kk, - "All of my money", L_With_All, - "I've changed my mind", L_Start, - "Quit", L_Return; - -L_With_Input: - input @Amount; - if (@Amount >= 0) - goto L_With_Continue; - mes "[" + @npcname$ + "]"; - mes "\"I need a positive amount. What would you like to do?\""; - menu - "Go back", L_Start, - "Try again", L_With_Input, - "Withdraw all", L_With_All, - "Nevermind", L_Nev; - -L_With_5k: - if (#BankAccount < 5000) - goto L_NoMoney; - @Amount = 5000; - goto L_With_Continue; - -L_With_10k: - if (#BankAccount < 10000) - goto L_NoMoney; - @Amount = 10000; - goto L_With_Continue; - -L_With_25k: - if (#BankAccount < 25000) - goto L_NoMoney; - @Amount = 25000; - goto L_With_Continue; - -L_With_50k: - if (#BankAccount < 50000) - goto L_NoMoney; - @Amount = 50000; - goto L_With_Continue; - -L_With_100k: - if (#BankAccount < 100000) - goto L_NoMoney; - @Amount = 100000; - goto L_With_Continue; - -L_With_250k: - if (#BankAccount < 250000) - goto L_NoMoney; - @Amount = 250000; - goto L_With_Continue; - -L_With_500k: - if (#BankAccount < 500000) - goto L_NoMoney; - @Amount = 500000; - goto L_With_Continue; - -L_With_1kk: - if (#BankAccount < 1000000) - goto L_NoMoney; - @Amount = 1000000; - goto L_With_Continue; - -L_With_All: - if (#BankAccount < 0) - goto L_NoMoney; - @Amount = #BankAccount; - goto L_With_Continue; - -L_With_Continue: - if (#BankAccount < @Amount) - goto L_NoMoney; - Zeny = Zeny + @Amount; - #BankAccount = #BankAccount - @Amount; - goto L_Balance; - -L_Balance: - mes "[" + @npcname$ + "]"; - mes "\"Your current bank balance is:"; - mes #BankAccount + " GP\""; - if (!(#BankOptions & OPT_BANK_CLOSE) || (#BankAccount >= 10000000 && - BaseLevel >= 85 && !(#BankOptions & OPT_BANK_GOTSHADE))) next; - if (#BankAccount >= 10000000 && BaseLevel >= 85 && !(#BankOptions & OPT_BANK_GOTSHADE)) - goto L_GiveShade; - if (#BankOptions & OPT_BANK_CLOSE) goto L_Return; - goto L_Start; - -L_GiveShade: - mes "\"Oh\""; - next; - mes "\"It seems you managed to amass quite a fortune!\""; - next; - mes "\"Thank you for using our services. Please accept this little gift.\""; - #BankOptions = #BankOptions | OPT_BANK_GOTSHADE; - getitem "CashiersShade", 1; - if (#BankOptions & OPT_BANK_CLOSE) goto L_Return; + mesn; + mes l("\"Welcome to the bank!"); + mes l("How can I help you?\""); next; - npcaction 9; // clear npc dialog - goto L_Start; - -L_Nev: - mes "[" + @npcname$ + "]"; - mes "\"Goodbye then.\""; - return; - -L_NoMoney: - mes "[" + @npcname$ + "]"; - mes "\"Oh dear, it seems that you don't have enough money.\""; - goto L_Start; - -S_MoveAccount: - #BankAccount = #BankAccount + BankAccount; - BankAccount = 0; - return; - -L_Change: - setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance"; - if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage"; - if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank"; - menu - @menuitems$[0], L_Start, - @menuitems$[1], L_Change_Storage, - @menuitems$[2], L_Change_Bank; - -L_Change_Storage: - #BankOptions = (#BankOptions ^ OPT_STORAGE_CLOSE); - goto L_Start; - -L_Change_Bank: - #BankOptions = (#BankOptions ^ OPT_BANK_CLOSE); - goto L_Start; - -L_Return: - @npcname$ = ""; - return; + do + { + select + l("I would like to store some items."), + l("I would like to perform money transactions."), + l("Did I received any mail?"), + l("Bye."); + + switch (@menu) { + case 1: + closeclientdialog; + openstorage; + close; + break; + case 2: + Banking(); + // Shader quest + if (BankVault >= 10000000 && + BaseLevel >= 85 && + getq(General_Banker) < 1) { + mesq l("Oh."); + next; + mesq l("It seems you managed to amass quite a fortune!"); + next; + mesq l("Thank you for using our services. Please accept this little gift."); + setq General_Banker, 1; + getitem CashiersShade, 1; + next; + } + break; + case 3: + // NOTE: These values are HARDCODED, do not try changing it! + mesc l("Note: Transfering items on mail cost %s GP/item", fnum(2500)); + mesc l("Money transference will have a %d %% fee as well.", 2); + next; + closeclientdialog; + openmail(); + close; + break; + } + if (@menu != 4) { + speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, + l("Something else?"); + } + } while (@menu != 4); + closeclientdialog; + goodbye; + close; } -- cgit v1.2.3-60-g2f50 From 8490f950135d65de864512a306ae198ee4f451cf Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 13 Apr 2021 19:47:28 -0300 Subject: Put Kaan back into service --- db/quest_db.conf | 46 ++++++++++-------------------------------- npc/029-1/kaan.txt | 54 +++++++++++++++++++++++++++----------------------- npc/029-1/tutorial.txt | 5 ++--- 3 files changed, 42 insertions(+), 63 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index da5151cd..846fbb10 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -34,44 +34,20 @@ quest_db: ( Name: "General_Banker" }, -// Tonori Quests (20~49) +// Candor Quests (20~59) { - Id: 150 - Name: "TonoriQuest_Kylian" -}, -{ - Id: 151 - Name: "TulimsharQuest_AnwarField" -}, -{ - Id: 152 - Name: "TonoriQuest_Imec" -}, -{ - Id: 153 - Name: "TonoriQuest_Hetchel" -}, -{ - Id: 154 - Name: "TonoriQuest_Inya" -}, -{ - Id: 155 - Name: "TonoriQuest_Heathin" -}, -{ - Id: 156 - Name: "TonoriQuest_Riskim" -}, -{ - Id: 157 - Name: "TonoriQuest_Hocus" -}, -{ - Id: 158 - Name: "TonoriQuest_Joaquim" + Id: 20 + Name: "CandorQuest_Harasser" }, +// Tonori Quests (60~99) + +// Argaes Quests (100~139) + +// Kaizei Quests (140~179) + +// Other Quests (180~219) + // Test Quests, Debug Quests, etc. (1000+) { Id: 1000 diff --git a/npc/029-1/kaan.txt b/npc/029-1/kaan.txt index 5684906c..ecfe95d4 100644 --- a/npc/029-1/kaan.txt +++ b/npc/029-1/kaan.txt @@ -3,7 +3,7 @@ callfunc "PCtoNPCRange"; if(@npc_check) end; - @kaan_talked = (STARTAREA & $@SpokeToKaan); + @kaan_talked = getq(CandorQuest_Harasser); if (!(@kaan_talked)) goto L_Tanisha; if (QL_BEGIN >= 13) goto L_TutDone; if (QL_BEGIN == 12) goto L_Plan; @@ -13,21 +13,23 @@ goto L_Out; L_Tanisha: - STARTAREA = STARTAREA | $@SpokeToKaan; - mes "[Young Man]"; - mes "\"You're the person I brought here, right?"; - mes "My name is Kaan, I'm Tanisha's brother.\""; - mes "\"She was babbling at me about it all the morning until I sent her to take care of the maggots in the cafe.\""; - mes "Kaan grins mischieviously."; - mes "[Kaan]"; - mes "\"She hates maggots.\""; - mes "\"Did you already talk to Tanisha?\""; + mesn l("Young Man"); + mes l("\"You're the person I brought here, right?"); + mes l("My name is Kaan, I'm Tanisha's brother.\""); + next; + mesn; + mesq l("She was babbling at me about it all the morning until I sent her to take care of the maggots in the cafe."); + mesc l("Kaan grins mischieviously."); + next; + mesn; + mes l("\"She hates maggots."); + mes l("Did you already talk to Tanisha?\""); menu - "Yes, I helped her with the maggots.",L_Tanisha1, - "Yeah, and she's done with the maggots.",L_Tanisha1; + l("Yes, I helped her with the maggots."), L_Tanisha1, + l("Yeah, and she's done with the maggots."), L_Tanisha1; L_Tanisha1: - mes "[Kaan]"; + mesn; mes "\"Ah, that is good news."; mes "You know, we have a lot of problems with bugs here.\""; mes "\"I've slain many bugs here to keep them out of our fields.\""; @@ -37,18 +39,20 @@ L_Tanisha1: mes "Hurnscald is a wondeful place! Traders, entertainers, adventurers - it's very exciting.\""; mes "\"And Ian the trainer is hanging around there often. You should talk to him, he's a smart guy.\""; mes "\"The ferry to the south takes your there for free.\""; + setq CandorQuest_Harasser, 1; goto L_close; L_Out: - mes "[Kaan]"; - mes "\"Hello! How are you? Did you already visit Hurnscald?\""; - menu - "Yes.", L_close, - "Not yet.",L_close; + mesn; + mesq l("Hello! How are you? Did you already visit Hurnscald?"); + select + l("Yes."), + l("Not yet."); + close; L_Hasan: - mes "[Kaan]"; - mes "\"Hello! How are you? Did you already visit Hurnscald?\""; + mesn; + mesq l("Hello! How are you? Did you already visit Hurnscald?"); menu "A guy named Hasan is bullying someone.",L_Next1, "Yes.", L_close, @@ -64,21 +68,21 @@ L_Next1: goto L_Trick; L_Trick: - mes "[Kaan]"; + mesn; mes "\"Do you have any idea what Hasan's weakness could be?"; mes "I wonder if Sorfina know something about him that could help us.\""; menu "No idea.",L_close; L_TrickKnown: - mes "[Kaan]"; + mesn; mes "\"Do you have any idea what Hasan's weakness could be?"; menu "He's afraid of scorpions.",L_Next2, "No idea.",L_close; L_Next2: - mes "[Kaan]"; + mesn; mes "\"Scorpions?! Right! How could I forget?"; mes "When he was a child, he nearly died because he fell into a scorpion nest.\""; QL_BEGIN = 12; @@ -96,7 +100,7 @@ L_Explain: goto L_close; L_Plan: - mes "[Kaan]"; + mesn; mes "\"I'm ready. Just give me the sign when you're down there."; mes "Or do you want me to explain the plan again?\""; menu @@ -104,7 +108,7 @@ L_Plan: "No, everything's alright.",L_close; L_TutDone: - mes "[Kaan]"; + mesn; mes "\"Hi there. I hope you enjoy your time in Hurnscald."; mes "Hasan can be a real troublemaker, but it seems like he has calmed down for now.\""; goto L_close; diff --git a/npc/029-1/tutorial.txt b/npc/029-1/tutorial.txt index d6d05463..77ebf3e5 100644 --- a/npc/029-1/tutorial.txt +++ b/npc/029-1/tutorial.txt @@ -5,7 +5,6 @@ OnInit: $@ScorpionFighter = 0; $@ScorpionTimer = 0; set $@ScorpDeath, 0; - $@SpokeToKaan = false;//(1 << 31); FIXME end; } 029-2,21,26,0 script TutDebug NPC154,{ @@ -18,14 +17,14 @@ OnInit: L_Kaan: QL_BEGIN = 8; - STARTAREA = STARTAREA &~ $@SpokeToKaan; + setq CandorQuest_Harasser, 0; mes "Reset!"; goto L_close; L_Reset: TUT_var = 0; QL_BEGIN = 0; - STARTAREA = STARTAREA &~ $@SpokeToKaan; + setq CandorQuest_Harasser, 0; mes "Reset!"; goto L_close; -- cgit v1.2.3-60-g2f50 From 7c13373524c6100aae67127cb1e3d6f3a5f4ab79 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 14 Apr 2021 04:35:38 -0300 Subject: Rewrite partly Elanore and use partly the quest system. She would not work otherwise. --- db/quest_db.conf | 6 ++- npc/002-1/elanore.txt | 117 ++++++++++++-------------------------------------- 2 files changed, 33 insertions(+), 90 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index 846fbb10..ecae46d6 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -46,7 +46,11 @@ quest_db: ( // Kaizei Quests (140~179) -// Other Quests (180~219) +// Magic Quests (180~219) +{ + Id: 180 + Name: "MagicQuest_Healing" +}, // Test Quests, Debug Quests, etc. (1000+) { diff --git a/npc/002-1/elanore.txt b/npc/002-1/elanore.txt index b60e6085..07ff832b 100644 --- a/npc/002-1/elanore.txt +++ b/npc/002-1/elanore.txt @@ -16,31 +16,22 @@ function script ElanoreFix { } function script elanore_decrease_exp { - @Q_heal_exp = MAGIC_EXPERIENCE >> 24; - if (@Q_heal_exp < 8) goto L_OnPcKillWipe; - @Q_heal_exp = @Q_heal_exp - 8; - goto L_OnPcKillFinish; + .@heal_exp = getq2(MagicQuest_Healing); -L_OnPcKillWipe: - @Q_heal_exp = 0; - goto L_OnPcKillFinish; + if (.@heal_exp < 8) + .@heal_exp = 0; + else + .@heal_exp -= 8; -L_OnPcKillFinish: - MAGIC_EXPERIENCE = (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24); - goto L_Return; - -L_Return: + setq2(MagicQuest_Healing, .@heal_exp); return; } 002-1,75,62,0 script Elanore#_M NPC108,{ @has_magic = getskilllv(SKILL_MAGIC); - @Q_MASK = NIBBLE_1_MASK; - @Q_SHIFT = NIBBLE_1_SHIFT; - - @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; - @Q_heal_exp = MAGIC_EXPERIENCE >> 24; + @Q_status = getq(MagicQuest_Healing); + .@heal_exp = getq2(MagicQuest_Healing); // Set up SkillUp function @SUP_id = SKILL_MAGIC_LIFE; @@ -62,70 +53,22 @@ L_Return: callsub S_Update_Var; if (sc_check(SC_POISON) || sc_check(SC_DPOISON)) goto L_CurePoison; if (BaseLevel > 20) goto L_NoHeal; - @temp = rand2(4); - if(@temp == 1) goto L_Heal2; - if(@temp == 2) goto L_Heal3; - if(@temp == 3) goto L_Heal4; - goto L_Heal1; - -L_Heal1: - mesn l("Elanore the Healer"); - mes "\"You don't look too well; let me treat your wounds.\""; - next; - goto L_Heal_L; - -L_Heal2: - mesn l("Elanore the Healer"); - mes "\"I will make quick work of your wounds.\""; - next; - goto L_Heal_L; - -L_Heal3: mesn l("Elanore the Healer"); - mes "\"Need a healing?\""; + mesq any( + l("You don't look too well; let me treat your wounds."), + l("I will make quick work of your wounds."), + l("Need a healing?"), + l("Sometimes you just need to run from battle.")); next; - goto L_Heal_L; - -L_Heal4: - mesn l("Elanore the Healer"); - mes "\"Sometimes you just need to run from battle.\""; - next; - goto L_Heal_L; - -L_Heal_L: - @temp = rand2(3); - if(@temp == 1) goto L_Heal_2; - if(@temp == 2) goto L_Heal_3; - if(@temp == 3) goto L_Heal_4; - goto L_Heal_1; - -L_Heal_1: - mesn l("Elanore the Healer"); - mesq l("Here you go!"); - percentheal 100, 100; - goto L_close; - -L_Heal_2: - - mesn l("Elanore the Healer"); - mesq l("Painless, wasn't it?"); - percentheal 100, 100; - goto L_close; - -L_Heal_3: - mesn l("Elanore the Healer"); - mesq l("You should be more careful."); + mesq any( + l("Here you go!"), + l("Painless, wasn't it?"), + l("You should be more careful."), + l("Much better, right?!")); percentheal 100, 100; goto L_close; -L_Heal_4: - - mesn l("Elanore the Healer"); - mes "\"Much better, right?!\""; - heal 10000,10000; - goto L_close; - L_NoHeal: if (MAGIC_FLAGS) goto L_Chat; @@ -282,7 +225,7 @@ L_T_Initial_Noroom: L_T_ChkAdvTo2: mesn l("Elanore the Healer"); - if (@Q_heal_exp < 20) goto L_T_ChkAdvTo2_fail; + if (.@heal_exp < 20) goto L_T_ChkAdvTo2_fail; mes "Elanore smiles at you."; mes "\"From what I have been hearing, you seem to be doing well on your way to becoming a healer. I have decided to accept you as a student of the School of Life Magic.\""; next; @@ -314,17 +257,17 @@ L_T_AdvTo2_skip: L_T_ChkAdvTo2_fail: mes "\"I think I would like to observe you for a little longer to see if you would make a good healer.\""; - if (@Q_heal_exp < 5) + if (.@heal_exp < 5) mes "\"You are still at the beginning of your path, but do keep practicing.\""; - if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 15)) + if ((.@heal_exp >= 5) && (.@heal_exp < 15)) mes "\"You are making progress, but you still need more practice.\""; - if (@Q_heal_exp >= 15) + if (.@heal_exp >= 15) mes "\"You have made good progress, but please do continue in your efforts.\""; goto L_close; L_T_ChkAdvToLOH: if (getskilllv(SKILL_MAGIC) < 2) goto L_T_LOH_adv_abort0; - if (@Q_heal_exp < 30) goto L_T_LOH_adv_abort1; + if (.@heal_exp < 30) goto L_T_LOH_adv_abort1; mesn l("Elanore the Healer"); mesq l("I will now teach you how to heal by laying on your hands. The technique is similar to the spell I taught you at the beginning, but this time you transfer your own health instead of drawing health from a lifestone."); @@ -356,7 +299,7 @@ L_T_LOH_adv_abort1: L_T_Explain3: if (getskilllv(SKILL_MAGIC) < 3) goto L_T_Explain3_abort; - if (@Q_heal_exp < 50) goto L_T_Explain3_fail; + if (.@heal_exp < 50) goto L_T_Explain3_fail; mesn l("Elanore the Healer"); mesc l("Elanore smiles."); @@ -425,11 +368,11 @@ L_T_Explain3_abort: L_T_Explain3_fail: mesn l("Elanore the Healer"); - if (@Q_heal_exp < 30) + if (.@heal_exp < 30) mes "\"You seem to have regressed as a healer. This is worrisome; please mend your ways or I will not teach you any further.\""; - if ((@Q_heal_exp >= 30) && (@Q_heal_exp < 40)) + if ((.@heal_exp >= 30) && (.@heal_exp < 40)) mes "\"You still need more practice in the art of healing.\""; - if ((@Q_heal_exp >= 40)) + if ((.@heal_exp >= 40)) mes "\"You are doing well, but you need some more practice as a healer first.\""; goto L_close; @@ -589,11 +532,8 @@ L_Bye: goto L_close; L_close: - @Q_MASK = 0; - @Q_SHIFT = 0; @has_magic = 0; @Q_STATUS_MAX = 0; - @Q_heal_exp = 0; @Q_status = 0; @SUP_id = 0; @SUP_name$ = ""; @@ -604,11 +544,10 @@ L_close: @STATUS_WAITING_FOR_KADIYA = 0; @STATUS_READY_TO_LEARN_CURE_POISON = 0; @STATUS_LEARNED_CURE_POISON = 0; - @temp = 0; @xp = 0; close; S_Update_Var: - QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + setq(MagicQuest_Healing, @Q_status); return; } -- cgit v1.2.3-60-g2f50 From f92335a4c2024993899188d3548eaa7d6dbd7444 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 1 May 2021 14:27:33 -0300 Subject: Update Valon to new quest system --- db/quest_db.conf | 4 ++++ npc/029-1/valon.txt | 19 ++++++++++--------- npc/functions/clear_vars.txt | 11 +++++++++-- npc/functions/mob_points.txt | 4 +++- npc/functions/quests.txt | 6 +++--- 5 files changed, 29 insertions(+), 15 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index ecae46d6..1ac277da 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -39,6 +39,10 @@ quest_db: ( Id: 20 Name: "CandorQuest_Harasser" }, +{ + Id: 21 + Name: "CandorQuest_Valon" +}, // Tonori Quests (60~99) diff --git a/npc/029-1/valon.txt b/npc/029-1/valon.txt index eb168fee..91cb7892 100644 --- a/npc/029-1/valon.txt +++ b/npc/029-1/valon.txt @@ -12,7 +12,7 @@ OnInit: mes "Reset?"; if (askyesno() == ASK_YES) { - QL_VALON = 0; + setq CandorQuest_Valon, 0; STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT)); mes ""; mes "Reset!"; @@ -29,13 +29,14 @@ OnInit: if(@npc_check) end; ValonCount(); - if (QL_VALON >= 6) + .@q=getq(CandorQuest_Valon); + if (.@q >= 6) goto L_QuestComplete; - if (QL_VALON == 1) + if (.@q == 1) goto L_QuestAskAgain; if (@valon_count >= $@ValonMobCnt[@valon_mob]) goto L_NextMob; - if ((QL_VALON >= 2) && (QL_VALON < 6)) + if ((.@q >= 2) && (.@q < 6)) goto L_QuestStarted; goto L_QuestAsk; @@ -55,14 +56,14 @@ L_QuestAsk: mes "\"I should know I guard this gate from all manner of island beasts.\""; mes "\"Maybe you would like help and earn your stripes?\""; mes "\"The Council of Wizard's does offer a reward for helping...\""; - QL_VALON = 1; + setq CandorQuest_Valon, 1; ResetValonCntMask(); menu "YES!!! let me at them!", L_Accept, "Maybe some other time.", L_close; L_Accept: - QL_VALON = 2; + setq CandorQuest_Valon, 2; ValonCount(); goto L_NewMob; @@ -70,8 +71,8 @@ L_NextMob: getexp 40, 0; mesq l("I see you killed all the %s needed.", getmonsterlink(@valon_mob)); mesq l("The Wizard's thank thee as well."); - Zeny = Zeny + 25; - QL_VALON = (QL_VALON + 1); + Zeny += 25; + setq CandorQuest_Valon, (.@q + 1); ResetValonCntMask(); ValonCount(); if (@valon_mob == getarraysize($@ValonMob)) @@ -94,7 +95,7 @@ L_QuestOver: mesn; mesq l("Thanks once again for helping with the monsters in the island."); getexp 50, 0; - QL_VALON = (QL_VALON + 1); + setq CandorQuest_Valon, (.@q + 1); close; L_QuestComplete: diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index 61268afd..4b85640c 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -1,8 +1,15 @@ function script ClearVariables { - if(@login_event != 1) goto L_Deprecated; + if (@login_event != 1) goto L_Deprecated; - if(#BankAccount >= 0) return; + if (QL_VALON) { + setq CandorQuest_Valon, QL_VALON; + QL_VALON=0; + } + + // Don't ask me what code below does + // ---------------------------------- + if (#BankAccount >= 0) return; if (Zeny >= -#BankAccount) { Zeny = Zeny + #BankAccount; #BankAccount = 0; diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt index c80a5514..f4cbedf0 100644 --- a/npc/functions/mob_points.txt +++ b/npc/functions/mob_points.txt @@ -44,7 +44,9 @@ function script MobPoints { } ValonCount(); - if (((QL_VALON >= 2) && (QL_VALON < 6)) && (@mobId == $@ValonMob[@valon_mob])) + if (((getq(CandorQuest_Valon) >= 2) && + (getq(CandorQuest_Valon) < 6)) && + (@mobId == $@ValonMob[@valon_mob])) AddValonCntMask(); diff --git a/npc/functions/quests.txt b/npc/functions/quests.txt index fcdc13eb..657b7eff 100644 --- a/npc/functions/quests.txt +++ b/npc/functions/quests.txt @@ -37,8 +37,8 @@ function script elanore_decrease_exp { function script ValonCount { @valon_mob = 0; - if (QL_VALON >= 2) - @valon_mob = (QL_VALON - 2); + if (getq(CandorQuest_Valon) >= 2) + @valon_mob = (getq(CandorQuest_Valon) - 2); @valon_count = ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); return; } @@ -50,7 +50,7 @@ function script ResetValonCntMask { function script ValonProgress { ValonCount(); - if ((QL_VALON > 1) && (QL_VALON < 6)) + if ((getq(CandorQuest_Valon) > 1) && (getq(CandorQuest_Valon) < 6)) message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob]; return; } -- cgit v1.2.3-60-g2f50 From dc4e317c99519efb45b23e5402ffc52359f8d319 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 1 May 2021 15:08:05 -0300 Subject: Rewrite Hide'n'Seek quest with new quest system because HoraK was annoyed. --- db/quest_db.conf | 4 + npc/029-1/hideandseek.txt | 198 +++++++++++++++++++++---------------------- npc/functions/clear_vars.txt | 3 + 3 files changed, 104 insertions(+), 101 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index 1ac277da..18e0818c 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -43,6 +43,10 @@ quest_db: ( Id: 21 Name: "CandorQuest_Valon" }, +{ + Id: 22 + Name: "CandorQuest_HideNSeek" +}, // Tonori Quests (60~99) diff --git a/npc/029-1/hideandseek.txt b/npc/029-1/hideandseek.txt index cc7f0dbf..6cb00b09 100644 --- a/npc/029-1/hideandseek.txt +++ b/npc/029-1/hideandseek.txt @@ -12,50 +12,48 @@ OnInit: $@hideandseekNT_ended = (1 << 6); end; } + function script CountHideNSeek { - @hidden_kid_cnt = 0; - if (QL_HIDENSEEK & $@hideandseekNT_found1) - @hidden_kid_cnt = (@hidden_kid_cnt + 1); - if (QL_HIDENSEEK & $@hideandseekNT_found2) - @hidden_kid_cnt = (@hidden_kid_cnt + 1); - if (QL_HIDENSEEK & $@hideandseekNT_found3) - @hidden_kid_cnt = (@hidden_kid_cnt + 1); - if (QL_HIDENSEEK & $@hideandseekNT_found4) - @hidden_kid_cnt = (@hidden_kid_cnt + 1); - if (QL_HIDENSEEK & $@hideandseekNT_found5) - @hidden_kid_cnt = (@hidden_kid_cnt + 1); + .@q=getq2(CandorQuest_HideNSeek); + setq3 CandorQuest_HideNSeek, bitmask_count(.@q); + return getq3(CandorQuest_HideNSeek); +} + +function script UpdateHideNSeek { + setq2 CandorQuest_HideNSeek, getq2(CandorQuest_HideNSeek) | getarg(0); + setq3 CandorQuest_HideNSeek, bitmask_count(getq2(CandorQuest_HideNSeek)); return; } + 029-1,64,90,0 script AyashaDebug NPC258,{ + .@q=getq2(CandorQuest_HideNSeek); mes "[Ayasha Debug]"; menu "Show", L_Show, "Reset", L_Reset, - "Close.", L_close; + "Close.", -; + close; L_Show: - mes "State: " + QL_HIDENSEEK; - if (QL_HIDENSEEK & $@hideandseekNT_started) + mes "State: " + .@q; + if (.@q & $@hideandseekNT_started) mes "Start set"; - if (QL_HIDENSEEK & $@hideandseekNT_found1) + if (.@q & $@hideandseekNT_found1) mes "Found 1 set"; - if (QL_HIDENSEEK & $@hideandseekNT_found2) + if (.@q & $@hideandseekNT_found2) mes "Found 2 set"; - if (QL_HIDENSEEK & $@hideandseekNT_found3) + if (.@q & $@hideandseekNT_found3) mes "Found 3 set"; - if (QL_HIDENSEEK & $@hideandseekNT_found4) + if (.@q & $@hideandseekNT_found4) mes "Found 4 set"; - if (QL_HIDENSEEK & $@hideandseekNT_found5) + if (.@q & $@hideandseekNT_found5) mes "Found 5 set"; - if (QL_HIDENSEEK & $@hideandseekNT_ended) + if (.@q & $@hideandseekNT_ended) mes "Complete set"; - goto L_close; + close; L_Reset: - QL_HIDENSEEK = 0; - goto L_close; - -L_close: + setq CandorQuest_HideNSeek, 0, 0; close; OnInit: @@ -63,80 +61,80 @@ OnInit: disablenpc "AyashaDebug"; end; } + 029-1,62,90,0 script Ayasha NPC258,{ @child_number = 0; callfunc "XmasList"; - @Exp = 75; + .@q=getq2(CandorQuest_HideNSeek); - if (QL_HIDENSEEK > 63) goto L_Done; - if (QL_HIDENSEEK == 63) goto L_Reward; - if (QL_HIDENSEEK > 0) goto L_Doing; + if (.@q > 63) goto L_Done; + if (.@q == 63) goto L_Reward; + if (getq(CandorQuest_HideNSeek)) goto L_Doing; - mes "You see a girl who is holding her hands in front of her face."; - mes "[Ayasha]"; - mes "\"98... 99... 100!\""; - mes "She takes away her hands and looks up."; + mes l("You see a girl who is holding her hands in front of her face."); + mesn; + mesq l("98... 99... 100!"); + mesc l("She takes away her hands and looks up."); menu "Hello, what are you doing?",L_Next, - "(Leave)",L_close; + "(Leave)",-; + close; L_Next: - mes "[Ayasha]"; + mesn; mes "\"I'm playing hide and seek with my friends!"; mes "Do you want to play with us?\""; menu "Sure, sounds like fun.",L_Next1, - "I'm busy with more important things!",L_close; + "I'm busy with more important things!",-; + close; L_Next1: - mes "[Ayasha]"; + mesn; mes "\"Great! You can take my turn with searching. You need to find all five of my friends."; mes "They're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\""; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_started; - goto L_close; + setq CandorQuest_HideNSeek, 1, 0, 0; + close; L_Doing: - callfunc "CountHideNSeek"; - mes "[Ayasha]"; - mes "\"You still need to find some of my friends. You have found " + @hidden_kid_cnt + " out of 5 of my friends.\""; - mes "\"Remember, they're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\""; - goto L_close; + mesn; + mesq l("You still need to find some of my friends. You have found %d out of 5 of my friends.", CountHideNSeek()); + mesq l("Remember, they're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere."); + close; L_Reward: - mes "[Ayasha]"; - mes "\"Oh, you found them all! Good job! Now it's my turn with searching again. Go and hide!\""; - getexp @Exp, 0; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_ended; + mesn; + mesq l("Oh, you found them all! Good job! Now it's my turn with searching again. Go and hide!"); + getexp 75, 0; + setq CandorQuest_HideNSeek, 2, 127, 0; menu "I think I need to do other things now.",L_Next2; L_Next2: - mes "[Ayasha]"; + mesn; mes "\"Oh, ok."; mes "Have you already seen Hurnscald? It's a very exciting place! I love the entertainer. She can make so many funny faces.\""; - goto L_close; + close; L_Done: - mes "[Ayasha]"; + mesn; mes "\"Hello! It was fun to play with you."; mes "When you go to the Hurnscald, you can say hello to Mikhail. He's very nice! But very shy.\""; - goto L_close; - -L_close: - @Exp = 0; close; } 029-1,50,105,0 script Latif NPC262,{ @child_number = 1; callfunc "XmasList"; - @Exp = 15; + .@Exp = 15; - if (QL_HIDENSEEK > 63) goto L_Done; - if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found1)) goto L_Find; - if (QL_HIDENSEEK > 0) goto L_Doing; + .@q=getq(CandorQuest_HideNSeek); + .@q2=getq2(CandorQuest_HideNSeek); + if (.@q2 > 63) goto L_Done; + if (.@q && !(.@q2 & $@hideandseekNT_found1)) goto L_Find; + if (.@q) goto L_Doing; mes "You see a kid hiding behind a box."; menu @@ -165,17 +163,16 @@ L_Agree: L_Find: mes "[Latif]"; mes "\"Hey! Ah, you found me. Well done. But my hiding place wasn't that difficult this time.\""; - getexp @Exp, 0; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found1; + getexp .@Exp, 0; + UpdateHideNSeek($@hideandseekNT_found1); mes "\"Here, do you want a candy?\""; getitem "Candy", 1; goto L_close; L_Doing: - callfunc "CountHideNSeek"; mes "[Latif]"; mes "\"You didn't find all of us yet? Seems like the other ones found a better place to hide.\""; - mes "\"" + @hidden_kid_cnt + " out of 5 have been found.\""; + mesq l("%d out of 5 have been found.", CountHideNSeek()); goto L_close; L_Done: @@ -184,18 +181,19 @@ L_Done: goto L_close; L_close: - @Exp = 0; close; } 029-1,48,67,0 script Charda NPC260,{ @child_number = 2; callfunc "XmasList"; - @Exp = 15; + .@Exp = 15; - if (QL_HIDENSEEK > 63) goto L_Done; - if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found2)) goto L_Find; - if (QL_HIDENSEEK > 0) goto L_Doing; + .@q=getq(CandorQuest_HideNSeek); + .@q2=getq2(CandorQuest_HideNSeek); + if (.@q2 > 63) goto L_Done; + if (.@q && !(.@q2 & $@hideandseekNT_found2)) goto L_Find; + if (.@q) goto L_Doing; mes "[Charda]"; mes "\"Hello. Psht, be careful. I'm playing hide and seek with Ayasha. You'll draw attention to my hiding place.\""; @@ -205,8 +203,8 @@ L_close: L_Find: mes "[Charda]"; mes "\"Oh! Got me! You're good at this.\""; - getexp @Exp, 0; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found2; + getexp .@Exp, 0; + UpdateHideNSeek($@hideandseekNT_found2); mes "She takes something out of her pocket."; mes "\"I'm hungry now. Do you want chocolate too?\""; getitem "ChocolateBar", 1; @@ -215,10 +213,9 @@ L_Find: goto L_close; L_Doing: - callfunc "CountHideNSeek"; mes "[Charda]"; mes "\"Did you find the others yet?\""; - mes "\"Hrmm, no looks like only " + @hidden_kid_cnt + " out of 5 have been found.\""; + mesq l("Hrmm, no looks like only %d out of 5 have been found.", CountHideNSeek()); goto L_close; L_Done: @@ -231,18 +228,19 @@ L_Done: goto L_close; L_close: - @Exp = 0; close; } 029-1,100,36,0 script Faris NPC259,{ @child_number = 3; callfunc "XmasList"; - @Exp = 25; + .@Exp = 25; - if (QL_HIDENSEEK > 63) goto L_Done; - if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found3)) goto L_Find; - if (QL_HIDENSEEK > 0) goto L_Doing; + .@q=getq(CandorQuest_HideNSeek); + .@q2=getq2(CandorQuest_HideNSeek); + if (.@q2 > 63) goto L_Done; + if (.@q && !(.@q2 & $@hideandseekNT_found3)) goto L_Find; + if (.@q) goto L_Doing; mes "[Faris]"; mes "\"Oh, hi there. What are you doing here on the beach?\""; @@ -258,19 +256,18 @@ L_Next: L_Find: mes "[Faris]"; mes "\"You found me! Well done. You look a bit thirsty, here.\""; - getexp @Exp, 0; - getitem "CactusDrink", 1; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found3; + getexp .@Exp, 0; + getitem CactusDrink, 1; + UpdateHideNSeek($@hideandseekNT_found3); mes "\"It's really cool you're playing with us. I'm sure you have a lot of other things to do."; mes "You're an adventurer, right? I want to become an adventurer too when I'm grown up. I'll talk to Aidan then.\""; mes "\"Aidan is outside Sorfina's place and you can register there for monster points. That's something the Wizard's Council made up. They reward you for slaying monsters. It's so cool.\""; goto L_close; L_Doing: - callfunc "CountHideNSeek"; mes "[Faris]"; mes "\"Are you still searching for the others? Nobody else is here.\""; - mes "\"It seems you found " + @hidden_kid_cnt + " out of 5 of my friends.\""; + mesq l("It seems you found %d out of 5 of my friends.", CountHideNSeek()); goto L_close; L_Done: @@ -279,7 +276,6 @@ L_Done: goto L_close; L_close: - @Exp = 0; close; } @@ -287,11 +283,13 @@ L_close: @child_number = 4; callfunc "XmasList"; - @Exp = 15; + .@Exp = 15; - if (QL_HIDENSEEK > 63) goto L_Done; - if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found4)) goto L_Find; - if (QL_HIDENSEEK > 0) goto L_Doing; + .@q=getq(CandorQuest_HideNSeek); + .@q2=getq2(CandorQuest_HideNSeek); + if (.@q2 > 63) goto L_Done; + if (.@q && !(.@q2 & $@hideandseekNT_found4)) goto L_Find; + if (.@q) goto L_Doing; mes "[Rasin]"; mes "\"The harbor is to the south from here. There you can take a ferry to other places."; @@ -301,15 +299,14 @@ L_close: L_Find: mes "[Rasin]"; mes "\"Ah, you found me. I need to find a better place to hide next time.\""; - getexp @Exp, 0; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found4; + getexp .@Exp, 0; + UpdateHideNSeek($@hideandseekNT_found4); goto L_close; L_Doing: - callfunc "CountHideNSeek"; mes "[Rasin]"; mes "\"Hehe, I'm curious when you'll have found all of us.\""; - mes "\"There are " + @hidden_kid_cnt + " out of 5 found.\""; + mesq l("There are %d out of 5 found.", CountHideNSeek()); goto L_close; L_Done: @@ -319,7 +316,6 @@ L_Done: goto L_close; L_close: - @Exp = 0; close; } @@ -327,11 +323,13 @@ L_close: @child_number = 5; callfunc "XmasList"; - @Exp = 15; + .@Exp = 15; - if (QL_HIDENSEEK > 63) goto L_Done; - if ((QL_HIDENSEEK > 0) && !(QL_HIDENSEEK & $@hideandseekNT_found5)) goto L_Find; - if (QL_HIDENSEEK > 0) goto L_Doing; + .@q=getq(CandorQuest_HideNSeek); + .@q2=getq2(CandorQuest_HideNSeek); + if (.@q2 > 63) goto L_Done; + if (.@q && !(.@q2 & $@hideandseekNT_found5)) goto L_Find; + if (.@q) goto L_Doing; mes "You see a girl standing behind the wheat. She has a look of intense concentration on her face."; menu @@ -347,15 +345,14 @@ L_Find: mes "[Ghada]"; mes "\"Oh no! You found me! You must be very clever."; mes "My friend Sandra is clever too, but she said it's a waste of time to play hide and seek.\""; - getexp @Exp, 0; - QL_HIDENSEEK = QL_HIDENSEEK | $@hideandseekNT_found5; + getexp .@Exp, 0; + UpdateHideNSeek($@hideandseekNT_found5); goto L_close; L_Doing: - callfunc "CountHideNSeek"; mes "[Ghada]"; mes "\"Are you still searching for the others? I'm sure you'll find them soon.\""; - mes "\"You found " + @hidden_kid_cnt + " out of 5 us.\""; + mesq l("You found %d out of 5 us.", CountHideNSeek()); goto L_close; L_Done: @@ -364,6 +361,5 @@ L_Done: goto L_close; L_close: - @Exp = 0; close; } diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index 8f2729b0..a93d59ad 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -6,6 +6,9 @@ function script ClearVariables { setq CandorQuest_Valon, QL_VALON; QL_VALON=0; } + if (QL_HIDENSEEK) { + setq CandorQuest_HideNSeek, (QL_HIDENSEEK >= 64 ? 2 : 1), (QL_HIDENSEEK-1); + } // Don't ask me what code below does // ---------------------------------- -- cgit v1.2.3-60-g2f50 From 93fd0fff03385a7d7e2e9d72adbeddb219ad5146 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 27 May 2021 04:16:26 -0300 Subject: Rewrite Cindy Quest to quest system, with ID 140 --- db/quest_db.conf | 4 ++++ npc/009-1/milly.txt | 6 +++--- npc/031-1/angelaOutside.txt | 50 +++++++++++++++++++-------------------------- npc/031-1/house.txt | 12 +++++------ npc/031-2/angelaHouse.txt | 9 ++++---- npc/031-2/cindyHouse.txt | 2 +- npc/031-4/cindyCave.txt | 49 +++++++++++++++++++++----------------------- 7 files changed, 62 insertions(+), 70 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index 18e0818c..f2c17956 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -53,6 +53,10 @@ quest_db: ( // Argaes Quests (100~139) // Kaizei Quests (140~179) +{ + Id: 140 + Name: "KaizeiQuest_Cindy" +}, // Magic Quests (180~219) { diff --git a/npc/009-1/milly.txt b/npc/009-1/milly.txt index b0c88c7a..38bf8b36 100644 --- a/npc/009-1/milly.txt +++ b/npc/009-1/milly.txt @@ -5,7 +5,7 @@ @got_boneknife = ((QUEST_Forestbow_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) >= 4; @got_setzer = ((QUEST_Forestbow_state & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) >= 8; @saved_rossy = (FLAGS & FLAG_ROSSI_COMPLETED); - @saved_cindy = QL_CINDY == 4; + @saved_cindy = (getq(KaizeiQuest_Cindy) > 4); if (FLAGS & FLAG_GOT_BEANIEHAT) goto L_FinishedGood; if (FLAGS & FLAG_DECLINED_BEANIEHAT) goto L_FinishedBad; @@ -407,7 +407,7 @@ L_DRossy: close; L_DCindy: - QL_CINDY = 4; + setq(KaizeiQuest_Cindy, 5); mes "Cindy quest set to completed."; close; @@ -433,7 +433,7 @@ L_NRossy: close; L_NCindy: - QL_CINDY = 0; + setq(KaizeiQuest_Cindy, 0); mes "Cindy quest set to not completed."; close; diff --git a/npc/031-1/angelaOutside.txt b/npc/031-1/angelaOutside.txt index 92bb502a..dbacd7c3 100644 --- a/npc/031-1/angelaOutside.txt +++ b/npc/031-1/angelaOutside.txt @@ -1,26 +1,22 @@ 031-1,81,24,0 script Debug#Angela NPC195,{ - mes "Current state: " + QL_CINDY; + mes "Current state: " + getq(KaizeiQuest_Cindy); mes "---"; mes "Available states:"; - mes "0 - can not do the quest."; - mes "5 - does not have the quest."; - mes "6 - got the quest."; - mes "1 - can go rescue cindy."; - mes "2 - rescued cindy."; - mes "3 - got reward from cindy."; - mes "4 - got reward from angela."; + mes "0 - can not do the quest or does not have the quest."; + mes "1 - got the quest."; + mes "2 - can go rescue cindy."; + mes "3 - rescued cindy."; + mes "4 - got reward from cindy."; + mes "5 - got reward from angela."; menu "set state", L_Set, - "close", L_close; + "close", -; + close; L_Set: - input @state; - if(@state < 0 || @state > 6) set @state, 0; - QL_CINDY = @state; - goto L_close; - -L_close: + input .@state, 0, 6; + setq(KaizeiQuest_Cindy, .@state); close; OnInit: @@ -29,27 +25,23 @@ OnInit: } 031-1,79,24,0 script Angela NPC195,15,15,{ - if (QL_CINDY == 3) goto L_Please_Visit_Again; - if (QL_CINDY > 1 && QL_CINDY < 5) goto L_Please_Visit; - if (QL_CINDY == 1) goto L_Please_Help; + .@q = getq(KaizeiQuest_Cindy); + if (.@q == 4) goto L_Please_Visit_Again; + if (.@q > 2 && .@q < 6) goto L_Please_Visit; + if (.@q == 2) goto L_Please_Help; mes "[Angela]"; mes "\"Please, I need help! My little daughter!\""; next; mes "\"It's terrible, oh my dear child!\""; next; - if (countitem("ConcentrationPotion") > 0 && BaseLevel >= .minlevel && QL_CINDY == 6) + if (countitem("ConcentrationPotion") > 0 && BaseLevel >= .minlevel && .@q == 1) goto L_Menu_Potion; menu "\"Please calm down and tell me what happened.\"", L_Whining, "Leave", L_close; -OnTouch: - if(BaseLevel >= .minlevel && QL_CINDY < 1) - QL_CINDY = 5; - end; - L_Whining: mes "[Angela]"; mes "\"My poor little daughter, please! Oh no, oh no...\""; @@ -76,8 +68,8 @@ L_Whining: L_GetQuest: next; - QL_CINDY = 6; - mes "Perhaps you could give her something to help concentrate ?"; + setq(KaizeiQuest_Cindy, 1); + mes "Perhaps you could give her something to help concentrate?"; goto L_close; L_Menu_Potion: @@ -87,9 +79,9 @@ L_Menu_Potion: "Leave", L_close; L_Calm_Down: - if (countitem("ConcentrationPotion") == 0) + if (countitem(ConcentrationPotion) == 0) goto L_No_Potion; - delitem "ConcentrationPotion", 1; + delitem ConcentrationPotion, 1; mes "She drinks the concentration potions and calms down."; mes "[Angela]"; mes "\"Thank you, this was helpful.\""; @@ -103,7 +95,7 @@ L_Calm_Down: mes "\"Oh my poor little girl. I'm so worried - what might they do with her? Oh no!\""; next; mes "\"You look like an adventurer! Please, can you go in that cave and rescue my little Cindy? I beg you for help!\""; - QL_CINDY = 1; + setq(KaizeiQuest_Cindy, 2); goto L_close; L_No_Potion: diff --git a/npc/031-1/house.txt b/npc/031-1/house.txt index 690d6da0..642be608 100644 --- a/npc/031-1/house.txt +++ b/npc/031-1/house.txt @@ -1,11 +1,9 @@ 031-1,95,80,0 script #Door NPC45,0,0,{ - if (QL_CINDY == 3 || QL_CINDY == 4) - goto L_Warp; - message strcharinfo(0), "Door : ##BThe door is locked."; - end; - -L_Warp: - warp "031-2", 23, 28; + if (getq(KaizeiQuest_Cindy) > 3) + warp "031-2", 23, 28; + else + message strcharinfo(0), l("Door : ##BThe door is locked."); end; } + diff --git a/npc/031-2/angelaHouse.txt b/npc/031-2/angelaHouse.txt index 37cb82cc..55c2c7df 100644 --- a/npc/031-2/angelaHouse.txt +++ b/npc/031-2/angelaHouse.txt @@ -1,7 +1,8 @@ 031-2,29,28,0 script Angela#house NPC196,{ - if (QL_CINDY == 4) goto L_Hello_Again; - if (QL_CINDY == 3) goto L_Reward; + .@q= getq(KaizeiQuest_Cindy); + if (.@q > 4) goto L_Hello_Again; + if (.@q == 4) goto L_Reward; mes "..."; goto L_close; @@ -19,8 +20,8 @@ L_Reward: getinventorylist; if (@inventorylist_count == 100) goto L_Full_Inv; - getitem "RockKnife", 1; - QL_CINDY = 4; + getitem RockKnife, 1; + setq(KaizeiQuest_Cindy, 5); next; mes "\"I hope this will be useful for you.\""; diff --git a/npc/031-2/cindyHouse.txt b/npc/031-2/cindyHouse.txt index dcda8cd2..798d4037 100644 --- a/npc/031-2/cindyHouse.txt +++ b/npc/031-2/cindyHouse.txt @@ -1,6 +1,6 @@ 031-2,27,26,0 script Cindy#house NPC197,{ - if (QL_CINDY == 3 || QL_CINDY == 4) goto L_Happy_Random; + if (getq(KaizeiQuest_Cindy) > 3) goto L_Happy_Random; mes "..."; goto L_close; diff --git a/npc/031-4/cindyCave.txt b/npc/031-4/cindyCave.txt index d30b7281..39ff62e4 100644 --- a/npc/031-4/cindyCave.txt +++ b/npc/031-4/cindyCave.txt @@ -1,13 +1,11 @@ 031-4,42,42,0 script Cindy NPC198,{ + .@q = getq(KaizeiQuest_Cindy); if ($@FIGHT_YETI_STATUS != 0) goto L_Yeti; - @KEYS_AMOUNT = 10; - @minLevel = 70; - - if (QL_CINDY == 4) goto L_Please_Visit; - if (QL_CINDY == 2) goto L_Reward; - if (QL_CINDY == 1) goto L_Please_Help; + if (.@q > 4) goto L_Please_Visit; + if (.@q == 3) goto L_Reward; + if (.@q == 2) goto L_Please_Help; mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage."; next; @@ -34,11 +32,11 @@ L_Next: "Leave", L_close; L_Try_Cage: - if (BaseLevel < @minLevel) + if (BaseLevel < .minLevel) goto L_To_Weak; - if (countitem(TreasureKey) < @KEYS_AMOUNT) + if (countitem(TreasureKey) < .KEYS_AMOUNT) goto L_Not_Enough_Keys; - delitem TreasureKey, @KEYS_AMOUNT; + delitem TreasureKey, .KEYS_AMOUNT; mes "As you try to open the door of the cage, there is a loud squeaking noise."; next; mes "You get an uncomfortable feeling and Cindy starts to shiver."; @@ -71,18 +69,17 @@ L_Reward: if (@inventorylist_count == 100) goto L_Full_Inv; - @reward = rand(15); - if (@reward < 10) + .@reward = rand2(15); + if (.@reward < 10) goto L_Wizard_Hat; - getitem "WoodenStaff", 1; - QL_CINDY = 3; + getitem WoodenStaff, 1; + setq(KaizeiQuest_Cindy, 4); goto L_Visit; L_Wizard_Hat: // get a wizard hat in one of the ten colors - no white - setarray @wizardhats[0], 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209; - getitem @wizardhats[@reward], 1; - QL_CINDY = 3; + getitem any(2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209), 1; + setq(KaizeiQuest_Cindy, 4); goto L_Visit; L_Visit: @@ -95,16 +92,16 @@ L_Please_Visit: mesn; mes "\"Thank you, thank you! You're a hero! Please come home with me to our house at the beach!\""; next; - mesc l("You can relive the memories for %d %s, however, the rewards cannot be obtained again.", @KEYS_AMOUNT*2, getitemlink(TreasureKey)); - if (countitem(TreasureKey) < @KEYS_AMOUNT*2) + mesc l("You can relive the memories for %d %s, however, the rewards cannot be obtained again.", .KEYS_AMOUNT*2, getitemlink(TreasureKey)); + if (countitem(TreasureKey) < .KEYS_AMOUNT*2) goto L_close; mesc l("Do you want to?"); next; if (askyesno() == ASK_YES && !$@FIGHT_YETI_STATUS && - BaseLevel >= @minLevel) + BaseLevel >= .minLevel) { - delitem TreasureKey, @KEYS_AMOUNT; + delitem TreasureKey, .KEYS_AMOUNT; goto L_Try_Cage; } goto L_close; @@ -122,11 +119,7 @@ L_Full_Inv: goto L_close; L_close: - @KEYS_AMOUNT = 0; - @minLevel = 0; @inventorylist_count = 0; - cleararray @wizardhats, 0, 10; - @reward = 0; close; OnTimer5000: @@ -207,9 +200,9 @@ OnReward: @bonus = (BaseLevel/2); DailyQuestBonus = DailyQuestBonus + @bonus; message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ; - if (QL_CINDY != 1 ) + if (getq(KaizeiQuest_Cindy) != 2) goto L_End; - QL_CINDY = 2; + setq(KaizeiQuest_Cindy, 3); message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you."; BOSS_POINTS = BOSS_POINTS + 70; message strcharinfo(0), "You gain 70 Boss Points giving you a total of " + BOSS_POINTS + "."; @@ -233,5 +226,9 @@ OnInit: "Cindy : There are coming more and more!", "Cindy : Watch your back! There are so many of them!", "Cindy : This seems to be their final attack! I believe in you!"; + + .KEYS_AMOUNT = 10; + .minLevel = 70; + .distance = 5; end; } -- cgit v1.2.3-60-g2f50 From 617890517395670dd1be6fd3af92e3e6e3e86e80 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 5 Jul 2021 16:11:20 -0300 Subject: As Hocus requested... Players are now able to use the Evil Obelisk to warp to Keshlam. --- db/quest_db.conf | 6 ++++++ npc/018-3/evil-obelisk.txt | 12 ++++++++++++ npc/027-2/alacrius.txt | 6 ++++-- npc/099-7/boss.txt | 17 +++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) (limited to 'db/quest_db.conf') diff --git a/db/quest_db.conf b/db/quest_db.conf index f2c17956..fd7e29d3 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -64,6 +64,12 @@ quest_db: ( Name: "MagicQuest_Healing" }, +// Misc Quests (220~259) +{ + Id: 220 + Name: "Quest_Reapercry" +}, + // Test Quests, Debug Quests, etc. (1000+) { Id: 1000 diff --git a/npc/018-3/evil-obelisk.txt b/npc/018-3/evil-obelisk.txt index df9c71b0..d9bce317 100644 --- a/npc/018-3/evil-obelisk.txt +++ b/npc/018-3/evil-obelisk.txt @@ -1,5 +1,17 @@ 018-3,67,28,0 script Evil Obelisk NPC185,{ + if (getq(Quest_Reapercry) == 3) { + mesc l("We've already seen such obelisk before... Do you want to sacrifice %d %s?", 10, getitemlink(Soul)); + if (countitem(Soul) >= 10) { + next; + if (askyesno() == ASK_YES) { + delitem Soul, 10; + warp "099-7", 95, 31; + closeclientdialog; + close; + } + } + } @map$ = "018-3"; @x0 = 56; @y0 = 22; diff --git a/npc/027-2/alacrius.txt b/npc/027-2/alacrius.txt index 5c5e0094..f1dd9a26 100644 --- a/npc/027-2/alacrius.txt +++ b/npc/027-2/alacrius.txt @@ -12,8 +12,10 @@ L_Quest: // Rand() is probably not the best way to do that. - if (!#CRYPT_PASSWORD) - #CRYPT_PASSWORD = rand(4095); + if (!#CRYPT_PASSWORD) { + #CRYPT_PASSWORD = rand2(4095); + setq Quest_Reapercry, 1; + } next; mes "##1--------- The Alacrius Riddle"; mes ""; diff --git a/npc/099-7/boss.txt b/npc/099-7/boss.txt index 7f47910e..d6a6ac20 100644 --- a/npc/099-7/boss.txt +++ b/npc/099-7/boss.txt @@ -709,3 +709,20 @@ L_Done: end; } +099-7,95,33,0 script An Evil Obelisk NPC185,{ + mes l("An evil obelisk. Totally not suspcious. At all."); + // 1 = Assigned; 2 = Warped; 3 = Obelisk + if (getq(Quest_Reapercry) == 2) { + next; + mesc l("(You touch the mysterious obelisk. Somehow you feels peace and pain at the same time.)"); + mesc l("(Suddenly a strange sensation flows through you. It feels like your body leaves your soul and becomes one with the stone.)"); + mesc l("(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the obelisk feels like just an ordinary evil stone.)"); + setq Quest_Reapercry, 3; + } + close; + +OnInit: + .distance=3; + end; +} + -- cgit v1.2.3-60-g2f50