diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-12-16 00:51:25 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-12-16 00:51:25 -0300 |
commit | fee2c1ddb38792a4758d45c0e3ee8a4442ac8792 (patch) | |
tree | a1159082b90e906111a68cdad6da252939a144ff | |
parent | e8da0c19b7ec5ac82a522d14a76e6849c174914e (diff) | |
download | serverdata-fee2c1ddb38792a4758d45c0e3ee8a4442ac8792.tar.gz serverdata-fee2c1ddb38792a4758d45c0e3ee8a4442ac8792.tar.bz2 serverdata-fee2c1ddb38792a4758d45c0e3ee8a4442ac8792.tar.xz serverdata-fee2c1ddb38792a4758d45c0e3ee8a4442ac8792.zip |
Christmas 2024 - Ofelia's Event : Not yet completed
Groups 1, 2 and 4 are not yet hooked.
Untested.
No rewards are currently given.
36 files changed, 367 insertions, 83 deletions
diff --git a/db/constants.conf b/db/constants.conf index 432bd8481..8365050e6 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -411,7 +411,7 @@ constants_db: { Ele_Ghost: 8 Ele_All: 255 - // Compatibility, legacy, DO NOT USE + // Compatibility, legacy, DO NOT USE Ele_Nature: 5 Ele_Poison: 5 Ele_Undead: 9 @@ -1670,8 +1670,8 @@ constants_db: { HH_SAULC: 128 HH_MOUBOO: 256 HH_MOUBOOTAUR: 512 - // Composed Variable for optimization - HH_REQUISITE: 15 + // Composed Variable for optimization + HH_REQUISITE: 15 comment__: "difficulty levels" EASY: 0 @@ -1847,6 +1847,7 @@ constants_db: { NPC_LOF_STRANGER: 234 NPC_LOF_NOBLEMAN: 235 NPC_SHEILA: 236 + NPC_ANGELA_SNOW: 237 NPC_ANGELA2: 238 NPC_DIMOND: 240 NPC_BARD_HARPS: 241 @@ -2055,7 +2056,7 @@ constants_db: { NPC_SWITCH_ONLINE: 915 NPC_ROLLINGSTONE: 916 - // Avatars (1000+) + // Avatars (1000+) AVATAR_CARDA: 1000 AVATAR_CARD2: 1001 AVATAR_CARD3: 1002 @@ -2105,34 +2106,34 @@ constants_db: { NO_INN: 0 CURRENT_INN: 2 - comment__: "CRAFT enum" - CRAFT_COOKING: 4 - CRAFT_ALCHEMY: 8 - CRAFT_EQUIPMENT: 16 - - comment__: "CRAFT Scope enum" - CRAFT_NPC: 4 - CRAFT_PLAYER: 8 - CRAFT_GUILD: 16 - - comment__: "CRAFT Rarity enum" - CRAFT_BASIC: 1 - CRAFT_INTERMEDIARY: 2 - CRAFT_ADVANCED: 4 - CRAFT_EXPERT: 8 - CRAFT_MASTER: 16 - - comment__: "CRAFT Bonus Correction enum" - CSYS_ARMOR: 1 - CSYS_ZWEIHANDER: 2 - CSYS_BRAWLING: 4 - CSYS_RANGED: 8 - CSYS_MAGICAL: 16 - CSYS_SPECIAL: 32 - CSYS_OTHER: 64 - CSYS_SAVIOR: 128 - CSYS_SHIELD: 256 - CSYS_LEGENDARY: 512 + comment__: "CRAFT enum" + CRAFT_COOKING: 4 + CRAFT_ALCHEMY: 8 + CRAFT_EQUIPMENT: 16 + + comment__: "CRAFT Scope enum" + CRAFT_NPC: 4 + CRAFT_PLAYER: 8 + CRAFT_GUILD: 16 + + comment__: "CRAFT Rarity enum" + CRAFT_BASIC: 1 + CRAFT_INTERMEDIARY: 2 + CRAFT_ADVANCED: 4 + CRAFT_EXPERT: 8 + CRAFT_MASTER: 16 + + comment__: "CRAFT Bonus Correction enum" + CSYS_ARMOR: 1 + CSYS_ZWEIHANDER: 2 + CSYS_BRAWLING: 4 + CSYS_RANGED: 8 + CSYS_MAGICAL: 16 + CSYS_SPECIAL: 32 + CSYS_OTHER: 64 + CSYS_SAVIOR: 128 + CSYS_SHIELD: 256 + CSYS_LEGENDARY: 512 comment__: "Easter eggs enum" EE_NONE: 0 @@ -2185,7 +2186,7 @@ constants_db: { COLLECT_MOUNTS: 65536 COLLECT_PETS: 131072 COLLECT_ALL: 262144 - // Maximum 32 collectibles, currently used: 19 + // Maximum 32 collectibles, currently used: 19 comment__: "Misc Flags enum" FLAG_NONE: 0 @@ -2204,12 +2205,12 @@ constants_db: { MK_SHOWDOWN: 6 MK_CUTSCENE: 7 - // Special - MK_SIEGE_DURATION: 790 - MK_IDLE_DURATION: 30 - MK_IDLE_VARIATION: 5 - MK_SIEGE_TOTALPOWER: 1000 - MK_FIRESOFSTEAM_START: 6 + // Special + MK_SIEGE_DURATION: 790 + MK_IDLE_DURATION: 30 + MK_IDLE_VARIATION: 5 + MK_SIEGE_TOTALPOWER: 1000 + MK_FIRESOFSTEAM_START: 6 comment__: "Fortress Island Reqs" MKIF_LV_0F: 3 @@ -2234,45 +2235,45 @@ constants_db: { RB_DEFAULT: 19 // dispbottom + debugmes + pleasereport comment__: "Blue Sage Constants" - // Q - Quest / Investigation Quest + // Q - Quest / Investigation Quest BS_QVISITOR: 1 BS_QHELPER: 2 - // PM - Page Maker + // PM - Page Maker BS_PMINK: 1 BS_PMBINDING: 2 BS_PMPAGE: 4 BS_PMGLUE: 8 BS_PMALL: 15 - // N - Npc - BS_NPC01: 1 - BS_NPC02: 2 - BS_NPC03: 4 - BS_NPC04: 8 - BS_NPC05: 16 - BS_NPC06: 32 - BS_NPC07: 64 - BS_NPCALL: 127 - // S - Slime Nest - BS_SNEST1: 1 - BS_SNEST2: 2 - BS_SNEST3: 4 - BS_SNEST4: 8 - BS_SNEST5: 16 - BS_SNEST6: 32 - BS_SNEST7: 64 - BS_SNEST8: 128 - BS_SNEST9: 256 - BS_SNESTALL: 511 + // N - Npc + BS_NPC01: 1 + BS_NPC02: 2 + BS_NPC03: 4 + BS_NPC04: 8 + BS_NPC05: 16 + BS_NPC06: 32 + BS_NPC07: 64 + BS_NPCALL: 127 + // S - Slime Nest + BS_SNEST1: 1 + BS_SNEST2: 2 + BS_SNEST3: 4 + BS_SNEST4: 8 + BS_SNEST5: 16 + BS_SNEST6: 32 + BS_SNEST7: 64 + BS_SNEST8: 128 + BS_SNEST9: 256 + BS_SNESTALL: 511 comment__: "Fragments Expedition Constants" - FRAG_HASKEY: 1 - FRAG_NEEDSKEY: 2 - FRAG_EXPLOREDCAMP: 4 - FRAG_CAMP_01: 8 - FRAG_CAMP_02: 16 - FRAG_CAMP_03: 32 - FRAG_LETTER: 64 - FRAG_LADDER: 128 + FRAG_HASKEY: 1 + FRAG_NEEDSKEY: 2 + FRAG_EXPLOREDCAMP: 4 + FRAG_CAMP_01: 8 + FRAG_CAMP_02: 16 + FRAG_CAMP_03: 32 + FRAG_LETTER: 64 + FRAG_LADDER: 128 comment__: "Rossy Quest Constants" ROSSY_INSTIME: 900 // 15 minutes @@ -2291,11 +2292,66 @@ constants_db: { ROSSY_BOSSCAVE: 1024 comment__: "Event Feat Constants" - EVFEAT_EASTER: 1 - EVFEAT_VALENTINE: 2 - EVFEAT_CHRISTMAS: 4 - EVFEAT_OLYMPICS: 8 // NOT IN USE - EVFEAT_PINKIE: 16 // NOT IN USE + EVFEAT_EASTER: 1 + EVFEAT_VALENTINE: 2 + EVFEAT_CHRISTMAS: 4 + EVFEAT_OLYMPICS: 8 // NOT IN USE + EVFEAT_PINKIE: 16 // NOT IN USE + + comment__: "Christmas 2024 Feat Constants" + X24_PVP: 1 + X24_FEFE: 2 + X24_BLOOD: 4 + X24_CTF: 8 + X24_GROATA: 16 + X24_ICICLE: 32 + X24_COD: 64 + X24_ELECTION: 128 + X24_MK: 256 + X24_SIEGE: 256 // DUPLICATE + X24_HH: 512 + X24_CELESTIA: 1024 + X24_VORAZ: 2048 + X24_GEMINI: 4096 + X24_CINDY: 8192 + X24_AEROS: 16384 + X24_FORT: 16384 // DUPLICATE + X24_FISHING: 32768 + X24_RAIN: 65536 + X24_BOSS: 131072 + X24_LOCKPICK: 262144 + X24_DUNGEON: 524288 + X24_SEALED: 1048576 + X24_KAMELOT: 2097152 + X24_DEMURE: 4194304 + X24_BREWING: 8388608 + X24_COOKING: 16777216 + X24_REFINING: 33554432 + X24_POKER: 67108864 + X24_GROUP1: 134217728 + X24_GROUP2: 268435456 + X24_GROUP3: 536870912 + X24_GROUP4: 1073741824 + + // Control for the groups + X24_G1_CRAPS: 0 + X24_G1_SEQUENCE: 1 + X24_G1_HIGHLOW: 2 + X24_G1_BLACKJACK: 3 + X24_G1_MAX: 4 + + X24_G2_UDT: 0 + X24_G2_MPT: 1 + X24_G2_MAX: 2 + + X24_G3_TREASURE: 0 + X24_G3_TREE: 1 + X24_G3_MAX: 2 + + X24_G4_INSURANCE: 0 + X24_G4_GRENADE: 1 + X24_G4_MAX: 2 + comment__: "Homunculus deployment constants" HCD_PIOUFIELDS: 1 @@ -2343,24 +2399,24 @@ constants_db: { MODE_PARTY: 2 comment__: "craft skill groups IDs" - // Base tier + // Base tier CRGROUP_BASE: 1 - // First tier + // First tier CRGROUP_ATK: 2 CRGROUP_DEF: 4 CRGROUP_ACC: 8 CRGROUP_EVD: 16 - // Second tier + // Second tier CRGROUP_REGEN: 32 CRGROUP_SPEED: 64 CRGROUP_DOUBLE: 128 CRGROUP_MAXPC: 256 - // Third tier + // Third tier CRGROUP_SCRESIST: 512 CRGROUP_SCINFLICT: 1024 CRGROUP_MANAUSE: 2048 CRGROUP_BOSSATK: 4096 - // Final tier + // Final tier CRGROUP_FINAL: 8192 comment__: "Effects" @@ -2397,7 +2453,7 @@ constants_db: { FX_HEALING: 703 comment__: "Emotes" - // TMW2 Emotes + // TMW2 Emotes E_DISGUST: 1 E_SURPRISE: 2 E_HAPPY: 3 @@ -2415,7 +2471,7 @@ constants_db: { E_QUEST: 15 E_THUMBUP: 16 E_DOUBT: 17 - // Mana Plus Emotes + // Mana Plus Emotes E_KITTY: 101 E_XD: 102 E_JOY: 103 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 6d295135d..8f375934c 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -190,6 +190,7 @@ item_db: ( monster(.@map$, .@x, .@y, l("Oak"), 1017, 1); $TREE_PLANTED+=+1; callfunc "SaggyScoreUpdate", callfunc("rand2", 1, 2); + callfunc "X24Event", X24_GROUP3, X24_G3_TREE; } else { monster(.@map$, .@x, .@y, l("Not An Oak"), SpringSquirrel, 1); } @@ -18100,6 +18101,7 @@ item_db: ( monster(.@map$, .@x, .@y, l("Oak"), 1017, 1); $TREE_PLANTED+=+1; callfunc "SaggyScoreUpdate", callfunc("rand2", 1, 2); + callfunc "X24Event", X24_GROUP3, X24_G3_TREE; } } "> diff --git a/npc/001-1/portal.txt b/npc/001-1/portal.txt index 16b674db7..8951124f5 100644 --- a/npc/001-1/portal.txt +++ b/npc/001-1/portal.txt @@ -18,6 +18,7 @@ OnTouch: L_Leave: warp getsavepoint(0), getsavepoint(1), getsavepoint(2); + X24Event(X24_AEROS); goto L_Close; L_Enable: @@ -137,6 +138,7 @@ OnTouch: if (@menu == 2) warp getsavepoint(0), getsavepoint(1), getsavepoint(2); + X24Event(X24_AEROS); closedialog; close; } diff --git a/npc/001-10-1/scripts.txt b/npc/001-10-1/scripts.txt index ae6b5c86a..8fae177ae 100644 --- a/npc/001-10-1/scripts.txt +++ b/npc/001-10-1/scripts.txt @@ -43,6 +43,7 @@ OnReward1: // FALLTHROUGH OnReward2: if (.pwin && getcharid(1) == .pwin) { + X24Event(X24_COD); setq2 LoFQuest_COD, getq2(LoFQuest_COD) + 1; getitem BottledDust, 1; } diff --git a/npc/001-7/celestia_bossfight.txt b/npc/001-7/celestia_bossfight.txt index e67ec4f8d..6d531da22 100644 --- a/npc/001-7/celestia_bossfight.txt +++ b/npc/001-7/celestia_bossfight.txt @@ -144,7 +144,8 @@ OnVictory: stopnpctimer; setnpcdisplay .name$, NPC_SUMMONING_CIRC; //Karma=Karma+1; - Mobpt+=10000; + .@mpt = 80000 / min(8, TOP3AVERAGELVL() / 5); + Mobpt+=.@mpt; getitem StrangeCoin, 2; getmapxy(.@m$, .@x, .@y, 0); makeitem(StrangeCoin, 1, .@m$, .@x+rand2(-1,1), .@y+rand2(-1,1)); @@ -158,6 +159,7 @@ OnVictory: OnDefeat: getexp 0, 100; compareandsetq HurnscaldQuest_Celestia, 7, 6; + X24Event(X24_CELESTIA); end; OnTimer60000: diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt index 9ba3cf5e8..d1722b723 100644 --- a/npc/001-8/hub.txt +++ b/npc/001-8/hub.txt @@ -371,6 +371,7 @@ OnPCLogoutEvent: // If you are the victor (and didn't cheat), you can now hold your reward ;-) if (@qhub_victor) { + X24Event(X24_VORAZ); getitem any(MercBoxA, MercBoxA, SilverGift, MercBoxBB, GoldenGift), 1; Zeny=Zeny+rand2(500, 2500); } diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt index 4803c7baa..91be3a26a 100644 --- a/npc/006-1/crazyfefe.txt +++ b/npc/006-1/crazyfefe.txt @@ -373,6 +373,7 @@ function CleanUp { // Special case for survivors. OnReward2: + X24Event(X24_FEFE); if (@crazypoints > CRAZYPOINTS) { CRAZYPOINTS=@crazypoints; dispbottom l("Crazyfefe Cave: New Highscore: @@ points", CRAZYPOINTS); diff --git a/npc/006-5/groata.txt b/npc/006-5/groata.txt index ca149f74f..f57856240 100644 --- a/npc/006-5/groata.txt +++ b/npc/006-5/groata.txt @@ -370,6 +370,7 @@ function script GroataGrotto { // Rewards OnLv50: + X24Event(X24_GROATA); if (getq(CandorQuest_Groata) == 1) { dispbottom l("This is ridiculous. Groata is not here, I am wasting my time!"); sleep2(5000); diff --git a/npc/006-7/ctrl.txt b/npc/006-7/ctrl.txt index 17243b561..6de5a304b 100644 --- a/npc/006-7/ctrl.txt +++ b/npc/006-7/ctrl.txt @@ -13,6 +13,7 @@ OnTouch: end; OnRw: + X24Event(X24_ICICLE); getexp 1000000, 0; Mobpt += 10000; dispbottom l("Der Schneemann has been defeated: %s Monster Points gained.", fnum(10000)); diff --git a/npc/006-8/kage.txt b/npc/006-8/kage.txt index 894c6e4f4..284610222 100644 --- a/npc/006-8/kage.txt +++ b/npc/006-8/kage.txt @@ -109,6 +109,7 @@ OnSkip: end; OnFinish: if (getcharid(4) == .win) { + X24Event(X24_CTF); Zeny+=670; Mobpt+=500; dispbottom l("You earned %s Monster Points for winning.", fnum(500)); diff --git a/npc/017-3/chagashroom.txt b/npc/017-3/chagashroom.txt index 74e86a790..75c0e7b59 100644 --- a/npc/017-3/chagashroom.txt +++ b/npc/017-3/chagashroom.txt @@ -141,6 +141,7 @@ L_Main: if (rand(1000,10000) < redwine_chance()) { mesc l("Success!"), 3; getitem RedPlushWine, REDWINE_AMMO*3; + X24Event(X24_BREWING); } else { mesc l("The wine wasn't ready yet and you lost it..."), 1; } diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt index ff970865c..671ec4e6e 100644 --- a/npc/018-2-2/main.txt +++ b/npc/018-2-2/main.txt @@ -28,6 +28,7 @@ OnFinish: setpcblock(PCBLOCK_SOFT, true); addtimer(4000, "#HH_CONTROLLER01::OnCompulsoryWarp"); //recovery(getcharid(3)); + X24Event(X24_HH); end; OnCompulsoryWarp: diff --git a/npc/018-7-1/demure.txt b/npc/018-7-1/demure.txt index 5f2001ca8..8f3d27686 100644 --- a/npc/018-7-1/demure.txt +++ b/npc/018-7-1/demure.txt @@ -157,6 +157,7 @@ OnDem2: mapannounce(getmap(), "CONGRATULATIONS - YOU WIN", bc_map | bc_pc); Zeny += rand2(500, 1500)*max(1, @d_mode2); // FIXME: Add a proper reward + X24Event(X24_DEMURE); maptimer2(.@m$, 1000, strnpcinfo(NPC_NAME_UNIQUE)+"::OnBye"); 01871_Demure_BlackBox(); } diff --git a/npc/019-4-1/_import.txt b/npc/019-4-1/_import.txt index e01bc7dd3..6c63d5614 100644 --- a/npc/019-4-1/_import.txt +++ b/npc/019-4-1/_import.txt @@ -5,3 +5,4 @@ "npc/019-4-1/chief.txt", "npc/019-4-1/cook.txt", "npc/019-4-1/golbarez.txt", +"npc/019-4-1/ofelia.txt", diff --git a/npc/019-4-1/ofelia.txt b/npc/019-4-1/ofelia.txt new file mode 100644 index 000000000..05e5997c2 --- /dev/null +++ b/npc/019-4-1/ofelia.txt @@ -0,0 +1,140 @@ +// TMW2/LoF scripts. +// Authors: +// TMW-LoF Team +// Jesusalva +// Description: +// Christmas 2024 Quest +// Uses a player scoped variable, X24_CHALLENGES_DONE +// Once event ends, rewards are claimed and variable is cleared +// If rewards are never claimed, their score accumulates for next year. + +019-4-1,54,44,0 script Ofelia NPC_ANGELA_SNOW,{ + function _done; + + // Christmas still running + if ($EVENT$ == "Christmas") + goto L_Main; + + // Last year + if (X24_CHALLENGES_DONE) + goto L_Reward; + + // Not in season + goto L_OutOfSeason; + +L_OutOfSeason: + mesn; + mesq l("I entered this building to shield myself from the snowstorm, but now I can't bring myself to leave..."); + close; + +L_Reward: + inventoryplace NPCEyes, 6, Iten, 1; + //X24_CHALLENGES_DONE = 0; // !!!!!TODO!!!!! + close; + +L_Main: + if (!getq(SQuest_Christmas)) { + mesn; + mesq l("Hi! Sorry, it's too cold outside, so I'm still catching my breath. Try talking to Christmas Chief first?"); + close; + } + mesn; + mesq l("Hey %s, did you knew that in 2025 AD (or 425 AT) Moubootaur Legends celebrates its 7th anniversary?", strcharinfo(0)); + dnext; + mesn; + mesq l("Despite being so old, many adventurers didn't experience everything this world has to offer, or did it so long ago they forgot. So for this Christmas Event, I'm challenging everyone to finish some of these challenges."); + next; + mesc b(l("You have accomplished %d challenges this year.", bitmask_count(X24_CHALLENGES_DONE))), 1; + //msObjective(false, l("- Complete %s during Christmas", "Nothing")); + // X24Event( X24_BITID ) + + msObjective(_done(X24_PVP), l("- Complete %s during Christmas", l("a PVP victory"))); + msObjective(_done(X24_FEFE), l("- Complete %s during Christmas", l("a Candor Battle"))); + msObjective(_done(X24_BLOOD), l("- Complete %s during Christmas", l("a Candor Bloodbath"))); + msObjective(_done(X24_CTF), l("- Complete %s during Christmas", l("a Capture the Flag"))); + msObjective(_done(X24_GROATA), l("- Complete %s during Christmas", l("Groata Grotto"))); + msObjective(_done(X24_ICICLE), l("- Complete %s during Christmas", l("The Icicle Challenge"))); + msObjective(_done(X24_COD), l("- Complete %s during Christmas", l("Call of Dusty"))); + msObjective(_done(X24_SEALED), l("- Complete %s during Christmas", l("The Sealed Moubootaur Showdown"))); + // WITH REDUNDANCY + if ($GAME_STORYLINE >= 5) + msObjective(_done(X24_MK), l("- Complete %s during Christmas", l("The Monster King Showdown"))); + else + msObjective(_done(X24_SIEGE), l("- Complete %s during Christmas", l("a Siege"))); + // NOT WITH REDUNDANCY + msObjective(_done(X24_HH), l("- Complete %s during Christmas", l("any Heroes Hold Dungeon"))); + msObjective(_done(X24_CELESTIA), l("- Complete %s during Christmas", l("The Yeti King Duel"))); // NOTE: Duel, not just quest + msObjective(_done(X24_VORAZ), l("- Complete %s during Christmas", l("Arena Quirin Voraz"))); + msObjective(_done(X24_GEMINI), l("- Complete %s during Christmas", l("Gemini Sisters Quest"))); + msObjective(_done(X24_CINDY), l("- Complete %s during Christmas", l("Cindy's Rescue"))); + // WITH REDUNDANCY + if ($GAME_STORYLINE >= 5) + msObjective(_done(X24_AEROS), l("- Complete %s during Christmas", l("Aeros Raid"))); + else + msObjective(_done(X24_FORT), l("- Complete %s during Christmas", l("Fortress Town Siege"))); + // NOT WITH REDUNDANCY + msObjective(_done(X24_FISHING), l("- Complete %s during Christmas", l("a rare fishing"))); + msObjective(_done(X24_RAIN), l("- Complete %s during Christmas", l("killing a monster while it rains"))); + msObjective(_done(X24_BOSS), l("- Complete %s during Christmas", l("killing a roaming boss"))); + msObjective(_done(X24_LOCKPICK), l("- Complete %s during Christmas", l("lock-picking a vault or similar"))); + msObjective(_done(X24_DUNGEON), l("- Complete %s during Christmas", l("a buried dungeon"))); + msObjective(_done(X24_ELECTION), l("- Complete %s during Christmas", l("a vote for town admin"))); + msObjective(_done(X24_KAMELOT), l("- Complete %s during Christmas", l("a Kamelot Raid"))); + msObjective(_done(X24_DEMURE), l("- Complete %s during Christmas", l("a Duel with Demure"))); + msObjective(_done(X24_BREWING), l("- Complete %s during Christmas", l("brewing a fermented beverage"))); + msObjective(_done(X24_COOKING), l("- Complete %s during Christmas", l("cooking any dish"))); + msObjective(_done(X24_REFINING), l("- Complete %s during Christmas", l("refining any equipment"))); + // UDT Challenge, A Monster Point Exchange, Planting a Tree, A «Casino Game», Using an Insurance, Detonating a Grenade, Visiting Aethyra. + // Gamblers: Black Jack (Tulim), Craps (Halin), Sequence (LoF), Higher or Lower (Nivalis), Poker (Aethyra) + // A Guild Skill Use? Guild Craft? ~~Donate Blood~~ Something of magic? At least 36 tasks were listed above... Up to 40 for all gamblers. But max is 31 tasks for an INT_MAX. Some will not make the cut. + // Visiting Aethyra and playing Poker in Aethyra can be merged + // Worst case, the last N challenges can be randomized (e.g. Grenade or Tree) + // ...Based on getcharid(0) + YEAR % N + // But will need some rework on the wrapper X24Event. + msObjective(_done(X24_POKER), l("- Complete %s during Christmas", l("a game of Poker"))); + // Groups, only group 3 currently works; group 1, 2 and 4 are TBD + .@cur = getcharid(0) + getq(SQuest_Christmas); + // .:: GROUP 1 ::. + switch (.@cur % X24_G1_MAX) { + case X24_G1_CRAPS: + msObjective(_done(X24_GROUP1), l("- Complete %s during Christmas", l("a game of Craps"))); break; + case X24_G1_SEQUENCE: + msObjective(_done(X24_GROUP1), l("- Complete %s during Christmas", l("a game of Sequence"))); break; + case X24_G1_HIGHLOW: + msObjective(_done(X24_GROUP1), l("- Complete %s during Christmas", l("a game of Higher or Lower"))); break; + case X24_G1_BLACKJACK: + msObjective(_done(X24_GROUP1), l("- Complete %s during Christmas", l("a game of Black Jack"))); break; + } + // .:: GROUP 2 ::. + switch (.@cur % X24_G2_MAX) { + case X24_G2_UDT: + msObjective(_done(X24_GROUP2), l("- Complete %s during Christmas", l("an UDT Challenge"))); break; + case X24_G2_MPT: + msObjective(_done(X24_GROUP2), l("- Complete %s during Christmas", l("a Monster Point trade"))); break; + } + // .:: GROUP 3 ::. + switch (.@cur % X24_G3_MAX) { + case X24_G3_TREASURE: + msObjective(_done(X24_GROUP3), l("- Complete %s during Christmas", l("opening a treasure box"))); break; + case X24_G3_TREE: + msObjective(_done(X24_GROUP3), l("- Complete %s during Christmas", l("planting a tree"))); break; + } + // .:: GROUP 4 ::. + switch (.@cur % X24_G4_MAX) { + case X24_G4_INSURANCE: + msObjective(_done(X24_GROUP3), l("- Complete %s during Christmas", l("using an insurance"))); break; + case X24_G4_GRENADE: + msObjective(_done(X24_GROUP3), l("- Complete %s during Christmas", l("using a grenade or equivalent magic"))); break; + } + + next; + mesn; + mesq l("Talk to me once Christmas is over to claim your rewards. The more challenges you accomplish, the better the rewards, but it might be impossible to do all of them."); + close; + +function _done { + return X24_CHALLENGES_DONE & getarg(0); +} + +} + diff --git a/npc/021-4/main.txt b/npc/021-4/main.txt index 679429d70..cf5b032fb 100644 --- a/npc/021-4/main.txt +++ b/npc/021-4/main.txt @@ -191,6 +191,7 @@ OnReward: setq2 NivalisQuest_Cindy, getq2(NivalisQuest_Cindy)+1; getexp 10000, JobLevel*rand2(12,16); getitem TreasureMap, 1; + X24Event(X24_CINDY); end; // Winner Reward diff --git a/npc/024-9/sake.txt b/npc/024-9/sake.txt index 6c30f2f62..c7ec4054e 100644 --- a/npc/024-9/sake.txt +++ b/npc/024-9/sake.txt @@ -151,6 +151,7 @@ L_Main: if (rand(1000,10000) < dwarvensake_chance()) { mesc l("Success!"), 3; getitem DwarvenSake, DWARVEN_AMMO*3; + X24Event(X24_BREWING); } else { mesc l("The sake wasn't ready yet and you lost it..."), 1; } diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c index cbb0abd95..1fe66fc53 100644 --- a/npc/025-1/ctrl.c +++ b/npc/025-1/ctrl.c @@ -512,6 +512,7 @@ OnConBonus: .@qn = 1; getitem .@it, .@qn; getexp 25000, 10000; + X24Event(X24_FORT); end; } diff --git a/npc/025-1/rum.txt b/npc/025-1/rum.txt index 5b6d70a59..a8498758f 100644 --- a/npc/025-1/rum.txt +++ b/npc/025-1/rum.txt @@ -154,6 +154,7 @@ L_Main: getitem WhiskeyAle, (FORTRESS_AMMO*.cupammo); else getitem CrazyRum, (FORTRESS_AMMO*.cupammo); + X24Event(X24_BREWING); } else { mesc l("The %s wasn't ready yet and you lost it...", l("Rum")), 1; } diff --git a/npc/026-7/boss.txt b/npc/026-7/boss.txt index 5ef2d191a..5c41ebefd 100644 --- a/npc/026-7/boss.txt +++ b/npc/026-7/boss.txt @@ -709,6 +709,7 @@ OnVictory: getitembound MysteriousFruit, 3, 4; // You get 3 char bound fruits getexp 0, 250000; // 250k job exp on first victory } + X24Event(X24_MK); // Effects specialeffect(FX_FANFARE, SELF, getcharid(3)); // Bailout diff --git a/npc/029-9/boss.txt b/npc/029-9/boss.txt index 8f9089e88..24900253c 100644 --- a/npc/029-9/boss.txt +++ b/npc/029-9/boss.txt @@ -413,6 +413,7 @@ OnMFSurvive: MOUBOOTAUR_WINNER=gettimetick(2); getitem StrangeCoin, 250; // First victory - major reward } + X24Event(X24_SEALED); specialeffect(FX_FANFARE, AREA, getcharid(3)); end; @@ -542,7 +543,8 @@ L_Defeat: .Support4=0; .Support5=0; killmonsterall("029-9"); - kamibroadcast("The players were defeated at Fires of Steam Showdown.", "Fires of Steam"); + if ($FIRESOFSTEAM < 10) + kamibroadcast("The players were defeated at Fires of Steam Showdown.", "Fires of Steam"); enablenpc "#029-9_97_49"; // Exit enablenpc "#029-9_91_26"; // To Moubootaur enablenpc "#029-9_103_48"; // To Storage diff --git a/npc/031-4/gambler.txt b/npc/031-4/gambler.txt index 4099711df..d523f710b 100644 --- a/npc/031-4/gambler.txt +++ b/npc/031-4/gambler.txt @@ -153,6 +153,7 @@ L_Tally: Zeny += .@gp; break; } + X24Event(X24_POKER); } dnext; goto L_Menu; diff --git a/npc/034-4/exit.txt b/npc/034-4/exit.txt index c7b76eebb..ef8fcc8ff 100644 --- a/npc/034-4/exit.txt +++ b/npc/034-4/exit.txt @@ -23,6 +23,7 @@ OnRw: getitem StrangeCoin, 1; if (!GEMINI_WINNER) GEMINI_WINNER = gettimetick(2); + X24Event(X24_GEMINI); end; OnExit: diff --git a/npc/042-11/boss.txt b/npc/042-11/boss.txt index df5e02171..c1f08c209 100644 --- a/npc/042-11/boss.txt +++ b/npc/042-11/boss.txt @@ -32,6 +32,7 @@ OnTouch: if (askyesno() == ASK_YES) { warp "042-0@"+.@g, 46, 25; callfunc("KamelotTreasure", 1024, true); // Give a reward from the exclusive chest + X24Event(X24_KAMELOT); } close; diff --git a/npc/craft/cooking.txt b/npc/craft/cooking.txt index a6ab0e382..09d668256 100644 --- a/npc/craft/cooking.txt +++ b/npc/craft/cooking.txt @@ -140,6 +140,7 @@ function script CookingSystem { setitemoptionbyindex(.@index, 0, .@opt1, .@val1); } // if seasoning } // if can season + X24Event(X24_COOKING); .success=true; } else { .success=false; diff --git a/npc/functions/event.txt b/npc/functions/event.txt index c19c1d35c..cf05d2cf2 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -605,6 +605,47 @@ function script CraftmasterDay { return; } +// X24Event( BIT_ID{, GROUP} ) +function script X24Event { + if (!playerattached()) + return; + + // Date check + if ($EVENT$ != "Christmas") + return; + if (!getq(SQuest_Christmas)) + return; + + // Extract Arguments + .@bit = getarg(0); + .@sub = getarg(1, 0); + + if (.@bit < X24_GROUP1) { + // Ungrouped Values + X24_CHALLENGES_DONE = (X24_CHALLENGES_DONE | getarg(0)); + } else { + // Grouped ones depend on the sub + .@cur = getcharid(0) + getq(SQuest_Christmas); + // It actually wraps based on the group + switch (.@bit) { + case X24_GROUP1: + .@cur = .@cur % X24_G1_MAX; break; + case X24_GROUP2: + .@cur = .@cur % X24_G2_MAX; break; + case X24_GROUP3: + .@cur = .@cur % X24_G3_MAX; break; + case X24_GROUP4: + .@cur = .@cur % X24_G4_MAX; break; + } + // Only count if it matched + if (.@sub == .@cur) + X24_CHALLENGES_DONE = (X24_CHALLENGES_DONE | getarg(0)); + } + // We're done, don't spend much time here + return; +} + + diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index bac766f98..2b38be7fd 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -225,8 +225,10 @@ function script fishing { // Ancient Blueprint: 0.05% per bait bonus (no luck) if (rand2(2000) < .@bp_chance*.@bai) { .@fish_id = AncientBlueprint; + X24Event(X24_FISHING); } else if (rand2(0, 100) < .@bai+.@boost) { .@fish_id = any_of(.@rare_fish); + X24Event(X24_FISHING); } else { .@fish_id = any_of(.@common_fish); } diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index c56cb40b6..153e66750 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -200,6 +200,7 @@ function script HUB_Logout { } // Died or logged out at Candor Survival if (.@mapa$ == "006-9" && $@SURVIVAL_CANDOR) { + X24Event(X24_BLOOD); .@score = gettimetick(2)-$@SURVIVAL_CANDOR; if (.@score > SCANDORPTS) { SCANDORPTS=.@score; @@ -1302,6 +1303,9 @@ function script HUB_PvP { } // Blightbringer owner } // Blightbringer logic } + + // Event Handler + X24Event(X24_PVP); return; } diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt index 9775fa3ed..e60374bdd 100644 --- a/npc/functions/lockpicks.txt +++ b/npc/functions/lockpicks.txt @@ -118,6 +118,7 @@ function script LockPicking { // Get EXP and inform the success if (THIEF_RANK) THIEF_EXP += max(0, .@d*.@m-THIEF_RANK); + X24Event(X24_LOCKPICK); return 1; } } while (true); diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt index 98ca54d3c..a11a2f2d3 100644 --- a/npc/functions/mobpoint.txt +++ b/npc/functions/mobpoint.txt @@ -128,6 +128,8 @@ OnNPCKillEvent: $@MK_TRIGGERED=true; if (strmobinfo(3,killedrid) >= 100) @bloodykill[killedrid] += 1; + if (getmapmask(getmap()) & MASK_RAIN) + callfunc "X24Event", X24_RAIN; // Unset killedrid. This affects multiple calls of this function // But it is in overall more reliable imao killedrid=0; diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 1cd4200a5..07f6d3aca 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -352,6 +352,7 @@ function script POL_Candidate { mesc l("The vote was cast."), 3; mesc l("You supported: ")+getd("$"+getarg(0)+"_CANDIDATE$"+"["+.@vote+"]"), 3; + X24Event(X24_ELECTION); next; return true; } diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index 900969093..24683798c 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -183,6 +183,7 @@ function script refineMaster { mesq l("HAHAHAHAH! Shiny as new, and stronger than ever! Have fun!"); mesc l("Weapons: +8 attack, +8 magic attack"); mesc l("Armors: +3~5 defense"); + X24Event(X24_REFINING); next; // Item is weakened. (1% per refine level) (Savior Immunity) } else if (rand2(100) < .@rlv && !.@savior) { diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt index 380c49d80..67503996d 100644 --- a/npc/functions/siege.txt +++ b/npc/functions/siege.txt @@ -519,6 +519,7 @@ OnSergeantDeath: $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; specialeffect(FX_FANFARE, AREA, getcharid(3)); + X24Event(X24_SIEGE); end; OnLieutenantDeath: @@ -530,6 +531,7 @@ OnLieutenantDeath: $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; specialeffect(FX_FANFARE, AREA, getcharid(3)); + X24Event(X24_SIEGE); end; OnCaptainDeath: @@ -541,6 +543,7 @@ OnCaptainDeath: $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; specialeffect(FX_FANFARE, AREA, getcharid(3)); + X24Event(X24_SIEGE); end; OnColonelDeath: @@ -552,6 +555,7 @@ OnColonelDeath: $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; specialeffect(FX_FANFARE, AREA, getcharid(3)); + X24Event(X24_SIEGE); end; OnGeneralDeath: @@ -563,6 +567,7 @@ OnGeneralDeath: $@EXP_EVENT_TIME=1; donpcevent "@exprate::OnPlayerCall"; specialeffect(FX_FANFARE, AREA, getcharid(3)); + X24Event(X24_SIEGE); end; } diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt index d9bc42b81..489c3c407 100644 --- a/npc/functions/treasure.txt +++ b/npc/functions/treasure.txt @@ -71,6 +71,7 @@ function script TreasureBox { } else { mesc l("You find @@ inside!", l("nothing")); } + X24Event(X24_GROUP3, X24_G3_TREASURE); return; } diff --git a/npc/functions/util.txt b/npc/functions/util.txt index cbac0246e..75607185f 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -1409,6 +1409,7 @@ function script announce_bosskill { } else { mapannounce getarg(0), getmonsterlink(getarg(1)) + " defeated by: " + strcharinfo(0), bc_all; } + callfunc "X24Event", X24_BOSS; return; } diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index 9caeaf3c2..04aaedfff 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -557,6 +557,8 @@ function script shovel_randomdungeon { ShovelQuests_DungeonX=0; ShovelQuests_DungeonY=0; dispbottom l("Now, to find the treasure chest!"); + // TODO FIXME: This should not be here; This should be on the Treasure Chest + X24Event(X24_DUNGEON); closeclientdialog; return; } |