diff --git a/config.lua.dist b/config.lua.dist index 536c78c3b..81d8e5a3f 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -239,6 +239,7 @@ onlyPremiumAccount = false -- Customs -- NOTE: stashMoving = true, stow an container inside your stash +-- NOTE: stashItemCount, the maximum items quantity in stash -- NOTE: depotChest, the non-stackable items will be moved to the selected depot chest(I - XVIII). -- NOTE: autoBank = true, the dropped coins from monsters will be automatically deposited to your bank account. -- NOTE: toggleGoldPouchAllowAnything will allow players to move items or gold to gold pouch @@ -254,7 +255,9 @@ onlyPremiumAccount = false -- NOTE: startStreakLevel will make a reward streak level for new players who never logged in -- NOTE: if showLootsInBestiary is true, will cause all loots to be shown in the bestiary even if the player has not reached the required number of kills -- NOTE: minTownIdToBankTransfer blocks towns less than defined from receiving money transfers +-- NOTE: enableSupportOutfit enable GODS and GMS to select support outfit (gamemaster, customer support or community manager) stashMoving = false +stashItemCount = 5000 depotChest = 4 autoLoot = false autoBank = false @@ -273,6 +276,7 @@ enablePlayerPutItemInAmmoSlot = false startStreakLevel = 0 showLootsInBestiary = false minTownIdToBankTransfer = 3 +enableSupportOutfit = true -- Teleport summon -- Set to true will never remove the summon @@ -502,6 +506,9 @@ rateMonsterHealth = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 +-- Npc rates +rateNpcHealth = 1.0 + -- Boss rates rateBossHealth = 1.0 rateBossAttack = 1.0 @@ -539,6 +546,7 @@ location = "USA" -- Leave empty if you wish to disable. discordWebhookURL = "" discordSendFooter = true +discordWebhookDelayMs = 1000 -- Vip System (Get more info in: https://github.com/opentibiabr/canary/pull/1063) -- NOTE: set vipSystemEnabled to true to enable the vip system functionalities (this overrides premium checks) diff --git a/data-otxserver/lib/core/quests.lua b/data-otxserver/lib/core/quests.lua index a35dcb15d..2e1741bee 100644 --- a/data-otxserver/lib/core/quests.lua +++ b/data-otxserver/lib/core/quests.lua @@ -608,12 +608,12 @@ if not Quests then }, [7] = { name = "Factions", - startStorageId = Storage.Factions, + startStorageId = Storage.Quest.U7_4.DjinnWar.Factions, startStorageValue = 1, missions = { [1] = { name = "The Marid and the Efreet - Djinn Greeting", - storageId = Storage.DjinnWar.Faction.Greeting, + storageId = Storage.Quest.U7_4.DjinnWar.Faction.Greeting, missionId = 1064, startValue = 1, endValue = 2, @@ -625,7 +625,7 @@ if not Quests then }, [2] = { name = "The Marid and the Efreet - Marid Faction", - storageId = Storage.DjinnWar.Faction.MaridDoor, + storageId = Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor, missionId = 1065, startValue = 1, endValue = 2, @@ -637,7 +637,7 @@ if not Quests then }, [3] = { name = "The Efreet and the Efreet - Efreet Faction", - storageId = Storage.DjinnWar.Faction.EfreetDoor, + storageId = Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor, missionId = 1066, startValue = 1, endValue = 2, @@ -651,12 +651,12 @@ if not Quests then }, [8] = { name = "Friends and Traders", - startStorageId = Storage.FriendsandTraders.DefaultStart, + startStorageId = Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "The Sweaty Cyclops", - storageId = Storage.FriendsandTraders.TheSweatyCyclops, + storageId = Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, missionId = 1067, startValue = 1, endValue = 2, @@ -669,7 +669,7 @@ if not Quests then }, [2] = { name = "The Mermaid Marina", - storageId = Storage.FriendsandTraders.TheMermaidMarina, + storageId = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, missionId = 1068, startValue = 1, endValue = 2, @@ -682,7 +682,7 @@ if not Quests then }, [3] = { name = "The Blessed Stake", - storageId = Storage.FriendsandTraders.TheBlessedStake, + storageId = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, missionId = 1069, startValue = 1, endValue = 12, @@ -2125,7 +2125,7 @@ if not Quests then missions = { [1] = { name = "Assassin Addon: The Red Death", - storageId = Storage.OutfitQuest.AssassinSecondAddon, + storageId = Storage.Quest.U7_8.AssassinOutfits.AssassinBaseOutfit, missionId = 10168, startValue = 1, endValue = 2, @@ -2137,7 +2137,7 @@ if not Quests then }, [2] = { name = "Citizen Addon: Backpack", - storageId = Storage.OutfitQuest.Citizen.MissionBackpack, + storageId = Storage.Quest.U7_8.CitizenOutfits.MissionBackpack, missionId = 10169, startValue = 1, endValue = 2, @@ -2150,18 +2150,19 @@ if not Quests then }, [3] = { name = "Citizen Addon: Feather Hat", - storageId = Storage.OutfitQuest.Citizen.MissionHat, + storageId = Storage.Quest.U7_8.CitizenOutfits.MissionHat, missionId = 10170, startValue = 1, endValue = 2, states = { [1] = "Collect a legion helmet, 100 chicken feathers and 50 honeycombs and bring them to either \z Hanna or Norma to have them make a feather hat addon for you.", + [2] = "You got the Citizen Hat Addon!", }, }, [4] = { name = "Barbarian Outfit Quest", - storageId = Storage.OutfitQuest.BarbarianAddon, + storageId = Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, missionId = 10171, startValue = 1, endValue = 17, @@ -2193,10 +2194,10 @@ if not Quests then }, [5] = { name = "Beggar Outfit: The Newest Fashion", - storageId = Storage.OutfitQuest.BeggarOutfit, + storageId = Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, missionId = 10172, startValue = 1, - endValue = 6, + endValue = 8, states = { [1] = "Your current task is to bring Hugo 20 pieces of brown cloth, like the worn and ragged ghoul clothing.", [2] = "Your current task is to bring 50 pieces of minotaur leather to Hugo. \z @@ -2206,11 +2207,13 @@ if not Quests then [5] = "You brought all items required for the "poor man's look" to Hugo. \z He told you to come back to him after a whole day has passed, then the outfit should be finished.", [6] = "You got the outfit!", + [7] = "Now you need to go after the items to get the first addon.", + [8] = "Congratulations, you delivered the items for the first addon.", }, }, [6] = { name = "Druid Outfit Quest", - storageId = Storage.OutfitQuest.DruidHatAddon, + storageId = Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, missionId = 10173, startValue = 1, endValue = 10, @@ -2231,7 +2234,7 @@ if not Quests then }, [7] = { name = "Hunter Outfit Quest", - storageId = Storage.OutfitQuest.HunterHatAddon, + storageId = Storage.Quest.U7_8.HunterOutfits.HunterHatAddon, missionId = 10174, startValue = 1, endValue = 5, @@ -2245,7 +2248,7 @@ if not Quests then }, [8] = { name = "Knight Addon: Helmet", - storageId = Storage.OutfitQuest.Knight.MissionHelmet, + storageId = Storage.Quest.U7_8.KnightOutfits.MissionHelmet, missionId = 10175, startValue = 1, endValue = 6, @@ -2264,7 +2267,7 @@ if not Quests then }, [9] = { name = "Mage & Summoner Outfit Quest (Wand)", - storageId = Storage.OutfitQuest.MageSummoner.AddonWand, + storageId = Storage.Quest.U7_8.MageAndSummonerOutfits.AddonWand, missionId = 10176, startValue = 1, endValue = 7, @@ -2282,7 +2285,7 @@ if not Quests then }, [10] = { name = "Mage & Summoner Outfit Quest (Fluid Belt)", - storageId = Storage.OutfitQuest.MageSummoner.AddonBelt, + storageId = Storage.Quest.U7_8.MageAndSummonerOutfits.AddonBelt, missionId = 10177, startValue = 1, endValue = 2, @@ -2293,7 +2296,7 @@ if not Quests then }, [11] = { name = "Female Mage and Male Summoner Addon: Headgear", - storageId = Storage.OutfitQuest.MageSummoner.MissionHatCloak, + storageId = Storage.Quest.U7_8.MageAndSummonerOutfits.MissionHatCloak, missionId = 10178, startValue = 1, endValue = 11, @@ -2330,7 +2333,7 @@ if not Quests then }, [13] = { name = "Warrior Addon: Shoulder Spike", - storageId = Storage.OutfitQuest.WarriorShoulderAddon, + storageId = Storage.Quest.U7_8.WarriorOutfits.WarriorShoulderAddon, missionId = 10180, startValue = 1, endValue = 7, @@ -2353,7 +2356,7 @@ if not Quests then }, [14] = { name = "Wizard Outfits Quest", - storageId = Storage.OutfitQuest.WizardAddon, + storageId = Storage.Quest.U7_8.WizardOutfits, missionId = 10181, startValue = 1, endValue = 7, @@ -2369,7 +2372,7 @@ if not Quests then }, [15] = { name = "Pirate Outfit Quest (Sabre)", - storageId = Storage.OutfitQuest.PirateSabreAddon, + storageId = Storage.Quest.U7_8.PirateOutfits.PirateSabreAddon, missionId = 10182, startValue = 1, endValue = 5, @@ -2383,7 +2386,7 @@ if not Quests then }, [16] = { name = "Oriental Addon: Hipwear", - storageId = Storage.OutfitQuest.FirstOrientalAddon, + storageId = Storage.Quest.U7_8.OrientalOutfits.FirstOrientalAddon, missionId = 10183, startValue = 1, endValue = 2, @@ -2396,7 +2399,7 @@ if not Quests then }, [17] = { name = "Oriental Addon: Headgear", - storageId = Storage.OutfitQuest.SecondOrientalAddon, + storageId = Storage.Quest.U7_8.OrientalOutfits.SecondOrientalAddon, missionId = 10184, startValue = 1, endValue = 5, @@ -2413,7 +2416,7 @@ if not Quests then }, [18] = { name = "Shaman Addon: Staff", - storageId = Storage.OutfitQuest.Shaman.MissionStaff, + storageId = Storage.Quest.U7_8.ShamanOutfits.MissionStaff, missionId = 10185, startValue = 1, endValue = 2, @@ -2424,7 +2427,7 @@ if not Quests then }, [19] = { name = "Shaman Addon: Mask", - storageId = Storage.OutfitQuest.Shaman.MissionMask, + storageId = Storage.Quest.U7_8.ShamanOutfits.MissionMask, missionId = 10186, startValue = 1, endValue = 2, @@ -2437,12 +2440,12 @@ if not Quests then }, [13] = { name = "Sam's Old Backpack", - startStorageId = Storage.SamsOldBackpack, + startStorageId = Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, startStorageValue = 1, missions = { [1] = { name = "Dwarven Armor Quest", - storageId = Storage.SamsOldBackpack, + storageId = Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, missionId = 10187, startValue = 1, endValue = 3, @@ -2751,75 +2754,98 @@ if not Quests then }, [16] = { name = "The Ancient Tombs", - startStorageId = Storage.TheAncientTombs.DefaultStart, + startStorageId = Storage.Quest.U7_4.TheAncientTombs.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "Omruc's Treasure", - storageId = Storage.TheAncientTombs.OmrucsTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.OmrucsTreasure, missionId = 10210, startValue = 1, - endValue = 1, - description = "You defeated Omruc and received a helmet adornment", + endValue = 2, + states = { + [1] = "Now you can start the steps until you reach Omruc's room.", + [2] = "You defeated Omruc and received a helmet adornment.", + }, }, [2] = { name = "Thalas' Treasure", - storageId = Storage.TheAncientTombs.ThalasTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.ThalasTreasure, missionId = 10211, startValue = 1, - endValue = 1, - description = "You defeated Thalas and received a Gem Holder", + endValue = 2, + states = { + [1] = "Congratulations, you have pulled all 8 levers and can now continue to the next step.", + [2] = "You defeated Thalas and received a Gem Holder", + }, }, [3] = { name = "Diphtrah's Treasure", - storageId = Storage.TheAncientTombs.DiphtrahsTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.DiphtrahsTreasure, missionId = 10212, startValue = 1, - endValue = 1, - description = "You defeated Dipthrah and received a Damaged Helmet", + endValue = 3, + states = { + [1] = "Now you need to pull all 11 levers to be able to continue.", + [2] = "Now you need to use all the plaques before accessing Diphtrah's room.", + [3] = "Congratulations, this step has been completed.", + }, }, [4] = { name = "Mahrdis' Treasure", - storageId = Storage.TheAncientTombs.MahrdisTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.MahrdisTreasure, missionId = 10213, startValue = 1, - endValue = 1, - description = "You defeated Mahrdis and received a Helmet Ornament", + endValue = 2, + states = { + [1] = "You need to defeat Mahrdis and receive a Helmet Ornament.", + [2] = "You defeated Mahrdis and received a Helmet Ornament.", + }, }, [5] = { name = "Vashresamun's Treasure", - storageId = Storage.TheAncientTombs.VashresamunsTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.VashresamunsTreasure, missionId = 10214, startValue = 1, - endValue = 1, - description = "You solved the musical riddles of Vashresamun's Tomb and received a left horn.", + endValue = 3, + states = { + [1] = "Once you've started this quest, you'll need to play the musicals before teleporting.", + [2] = "Congratulations, you played the musical correctly, now you can continue.", + [3] = "You solved the musical riddles of Vashresamun's Tomb and received a left horn.", + }, }, [6] = { name = "Morguthis' Treasure", - storageId = Storage.TheAncientTombs.MorguthisTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.MorguthisTreasure, missionId = 10215, startValue = 1, - endValue = 1, - description = "You defeated Morguthis and received a Right Horn", + endValue = 2, + states = { + [1] = "Now you need to go over the blue fireworks on the path.", + [2] = "You defeated Morguthis and received a Right Horn.", + }, }, [7] = { name = "Rahemos' Treasure", - storageId = Storage.TheAncientTombs.RahemosTreasure, + storageId = Storage.Quest.U7_4.TheAncientTombs.RahemosTreasure, missionId = 10216, startValue = 1, - endValue = 1, - description = "You defeated Rahemos and received a Helmet Piece", + endValue = 2, + states = { + [1] = "You have started the steps to access Rahemos' room, and you will need to pull some levers to get to Rahemos' room.", + [2] = "You defeated Rahemos and received a Helmet Piece.", + }, }, }, }, [17] = { name = "The Ape City", - startStorageId = Storage.TheApeCity.Started, + startStorageId = Storage.Quest.U7_6.TheApeCity.Started, startStorageValue = 1, missions = { [1] = { name = "Hairycles' Missions", - storageId = Storage.TheApeCity.Questline, + storageId = Storage.Quest.U7_6.TheApeCity.Questline, missionId = 10217, startValue = 1, endValue = 18, @@ -2947,12 +2973,12 @@ if not Quests then }, [19] = { name = "The Djinn War - Efreet Faction", - startStorageId = Storage.DjinnWar.EfreetFaction.Start, + startStorageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start, startStorageValue = 1, missions = { [1] = { name = "Efreet Mission 1: The Supply Thief", - storageId = Storage.DjinnWar.EfreetFaction.Mission01, + storageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission01, missionId = 10221, startValue = 1, endValue = 3, @@ -2966,7 +2992,7 @@ if not Quests then }, [2] = { name = "Efreet Mission 2: The Tear of Daraman", - storageId = Storage.DjinnWar.EfreetFaction.Mission02, + storageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission02, missionId = 10222, startValue = 1, endValue = 3, @@ -2980,7 +3006,7 @@ if not Quests then }, [3] = { name = "Efreet Mission 3: The Sleeping Lamp", - storageId = Storage.DjinnWar.EfreetFaction.Mission03, + storageId = Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03, missionId = 10223, startValue = 1, endValue = 3, @@ -2995,12 +3021,12 @@ if not Quests then }, [20] = { name = "The Djinn War - Marid Faction", - startStorageId = Storage.DjinnWar.MaridFaction.Start, + startStorageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Start, startStorageValue = 1, missions = { [1] = { name = "Marid Mission 1: The Dwarven Kitchen", - storageId = Storage.DjinnWar.MaridFaction.Mission01, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission01, missionId = 10224, startValue = 1, endValue = 2, @@ -3012,7 +3038,7 @@ if not Quests then }, [2] = { name = "Marid Mission 2: The Spyreport", - storageId = Storage.DjinnWar.MaridFaction.Mission02, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission02, missionId = 10225, startValue = 1, endValue = 2, @@ -3025,7 +3051,7 @@ if not Quests then }, [3] = { name = "Rata'Mari and the Cheese", - storageId = Storage.DjinnWar.MaridFaction.RataMari, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.RataMari, missionId = 10226, startValue = 1, endValue = 2, @@ -3036,7 +3062,7 @@ if not Quests then }, [4] = { name = "Marid Mission 3: The Sleeping Lamp", - storageId = Storage.DjinnWar.MaridFaction.Mission03, + storageId = Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03, missionId = 10227, startValue = 1, endValue = 3, @@ -3560,7 +3586,7 @@ if not Quests then storageId = Storage.Postman.Mission07, missionId = 10258, startValue = 1, - endValue = 8, + endValue = 9, states = { [1] = "Kevin wants you to bring him the measurements of Benjamin, Lokur, Dove, Liane, Chrystal and Olrik.", [2] = "You have received the measurements from 1 of 6 post officers.", @@ -3568,8 +3594,8 @@ if not Quests then [4] = "You have received the measurements from 3 of 6 post officers.", [5] = "You have received the measurements from 4 of 6 post officers.", [6] = "You have received the measurements from 5 of 6 post officers.", - [7] = "You have received all measurements, report back to Kevin!", - [8] = "You have reported back that you have completed the mission.", + [8] = "You have received all measurements, report back to Kevin!", + [9] = "You have reported back that you have completed the mission.", }, }, [8] = { @@ -3627,12 +3653,12 @@ if not Quests then }, [25] = { name = "The Shattered Isles", - startStorageId = Storage.TheShatteredIsles.DefaultStart, + startStorageId = Storage.Quest.U7_8.TheShatteredIsles.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "A Djinn in Love", - storageId = Storage.TheShatteredIsles.ADjinnInLove, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ADjinnInLove, missionId = 10263, startValue = 1, endValue = 5, @@ -3648,7 +3674,7 @@ if not Quests then }, [2] = { name = "A Poem for the Mermaid", - storageId = Storage.TheShatteredIsles.APoemForTheMermaid, + storageId = Storage.Quest.U7_8.TheShatteredIsles.APoemForTheMermaid, missionId = 10264, startValue = 1, endValue = 3, @@ -3663,7 +3689,7 @@ if not Quests then }, [3] = { name = "Access to Goroma", - storageId = Storage.TheShatteredIsles.AccessToGoroma, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToGoroma, missionId = 10265, startValue = 1, endValue = 1, @@ -3672,7 +3698,7 @@ if not Quests then }, [4] = { name = "Access to Laguna Island", - storageId = Storage.TheShatteredIsles.AccessToLagunaIsland, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToLagunaIsland, missionId = 10266, startValue = 1, endValue = 1, @@ -3681,7 +3707,7 @@ if not Quests then }, [5] = { name = "Access to Meriana", - storageId = Storage.TheShatteredIsles.AccessToMeriana, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToMeriana, missionId = 10267, startValue = 1, endValue = 1, @@ -3690,7 +3716,7 @@ if not Quests then }, [6] = { name = "Access to Nargor", - storageId = Storage.TheShatteredIsles.AccessToNargor, + storageId = Storage.Quest.U7_8.TheShatteredIsles.AccessToNargor, missionId = 10268, startValue = 1, endValue = 1, @@ -3699,7 +3725,7 @@ if not Quests then }, [7] = { name = "Ray's Mission 1: Fafnar's Fire", - storageId = Storage.TheShatteredIsles.RaysMission1, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission1, missionId = 10269, startValue = 1, endValue = 3, @@ -3714,7 +3740,7 @@ if not Quests then }, [8] = { name = "Ray's Mission 2: Sabotage", - storageId = Storage.TheShatteredIsles.RaysMission2, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission2, missionId = 10270, startValue = 1, endValue = 3, @@ -3729,7 +3755,7 @@ if not Quests then }, [9] = { name = "Ray's Mission 3: Spy Mission", - storageId = Storage.TheShatteredIsles.RaysMission3, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission3, missionId = 10271, startValue = 1, endValue = 2, @@ -3742,7 +3768,7 @@ if not Quests then }, [10] = { name = "Ray's Mission 4: Proof of Death", - storageId = Storage.TheShatteredIsles.RaysMission4, + storageId = Storage.Quest.U7_8.TheShatteredIsles.RaysMission4, missionId = 10272, startValue = 1, endValue = 5, @@ -3761,7 +3787,7 @@ if not Quests then }, [11] = { name = "Reputation in Sabrehaven: Suspicious", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10273, startValue = 2, endValue = 13, @@ -3790,7 +3816,7 @@ if not Quests then }, [12] = { name = "Reputation in Sabrehaven: Friendly", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10274, startValue = 14, endValue = 17, @@ -3805,7 +3831,7 @@ if not Quests then }, [13] = { name = "Reputation in Sabrehaven: Cordial", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10275, startValue = 18, endValue = 19, @@ -3814,7 +3840,7 @@ if not Quests then }, [14] = { name = "Reputation in Sabrehaven: Loyal", - storageId = Storage.TheShatteredIsles.ReputationInSabrehaven, + storageId = Storage.Quest.U7_8.TheShatteredIsles.ReputationInSabrehaven, missionId = 10276, startValue = 20, endValue = 22, @@ -3826,7 +3852,7 @@ if not Quests then }, [15] = { name = "The Counterspell", - storageId = Storage.TheShatteredIsles.TheCounterspell, + storageId = Storage.Quest.U7_8.TheShatteredIsles.TheCounterspell, missionId = 10277, startValue = 1, endValue = 4, @@ -3843,7 +3869,7 @@ if not Quests then }, [16] = { name = "The Errand", - storageId = Storage.TheShatteredIsles.TheErrand, + storageId = Storage.Quest.U7_8.TheShatteredIsles.TheErrand, missionId = 10278, startValue = 1, endValue = 2, @@ -3855,7 +3881,7 @@ if not Quests then }, [17] = { name = "The Governor's Daughter", - storageId = Storage.TheShatteredIsles.TheGovernorDaughter, + storageId = Storage.Quest.U7_8.TheShatteredIsles.TheGovernorDaughter, missionId = 10279, startValue = 1, endValue = 3, @@ -4076,12 +4102,12 @@ if not Quests then }, [28] = { name = "The Explorer Society", - startStorageId = Storage.ExplorerSociety.QuestLine, + startStorageId = Storage.Quest.U7_6.ExplorerSociety.QuestLine, startStorageValue = 1, missions = { [1] = { name = "Joining the Explorers", - storageId = Storage.ExplorerSociety.JoiningTheExplorers, + storageId = Storage.Quest.U7_6.ExplorerSociety.JoiningTheExplorers, missionId = 10295, startValue = 1, endValue = 5, @@ -4096,7 +4122,7 @@ if not Quests then }, [2] = { name = "The Ice Delivery", - storageId = Storage.ExplorerSociety.TheIceDelivery, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheIceDelivery, missionId = 10296, startValue = 6, endValue = 8, @@ -4110,7 +4136,7 @@ if not Quests then }, [3] = { name = "The Butterfly Hunt", - storageId = Storage.ExplorerSociety.TheButterflyHunt, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheButterflyHunt, missionId = 10297, startValue = 9, endValue = 17, @@ -4131,7 +4157,7 @@ if not Quests then }, [4] = { name = "The Plant Collection", - storageId = Storage.ExplorerSociety.ThePlantCollection, + storageId = Storage.Quest.U7_6.ExplorerSociety.ThePlantCollection, missionId = 10298, startValue = 18, endValue = 26, @@ -4149,7 +4175,7 @@ if not Quests then }, [5] = { name = "The Lizard Urn", - storageId = Storage.ExplorerSociety.TheLizardUrn, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheLizardUrn, missionId = 10299, startValue = 27, endValue = 29, @@ -4163,7 +4189,7 @@ if not Quests then }, [6] = { name = "The Bonelord Secret", - storageId = Storage.ExplorerSociety.TheBonelordSecret, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheBonelordSecret, missionId = 10300, startValue = 30, endValue = 32, @@ -4176,7 +4202,7 @@ if not Quests then }, [7] = { name = "The Orc Powder", - storageId = Storage.ExplorerSociety.TheOrcPowder, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheOrcPowder, missionId = 10301, startValue = 33, endValue = 35, @@ -4190,7 +4216,7 @@ if not Quests then }, [8] = { name = "The Elven Poetry", - storageId = Storage.ExplorerSociety.TheElvenPoetry, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheElvenPoetry, missionId = 10302, startValue = 36, endValue = 38, @@ -4202,7 +4228,7 @@ if not Quests then }, [9] = { name = "The Memory Stone", - storageId = Storage.ExplorerSociety.TheMemoryStone, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheMemoryStone, missionId = 10303, startValue = 39, endValue = 41, @@ -4214,7 +4240,7 @@ if not Quests then }, [10] = { name = "The Rune Writings", - storageId = Storage.ExplorerSociety.TheRuneWritings, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheRuneWritings, missionId = 10304, startValue = 42, endValue = 44, @@ -4228,7 +4254,7 @@ if not Quests then }, [11] = { name = "The Ectoplasm", - storageId = Storage.ExplorerSociety.TheEctoplasm, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheEctoplasm, missionId = 10305, startValue = 45, endValue = 47, @@ -4239,7 +4265,7 @@ if not Quests then }, [12] = { name = "The Spectral Dress", - storageId = Storage.ExplorerSociety.TheSpectralDress, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheSpectralDress, missionId = 10306, startValue = 48, endValue = 50, @@ -4251,7 +4277,7 @@ if not Quests then }, [13] = { name = "The Spectral Stone", - storageId = Storage.ExplorerSociety.TheSpectralStone, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheSpectralStone, missionId = 10307, startValue = 51, endValue = 55, @@ -4266,7 +4292,7 @@ if not Quests then }, [14] = { name = "The Astral Portals", - storageId = Storage.ExplorerSociety.TheAstralPortals, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheAstralPortals, missionId = 10308, startValue = 56, endValue = 56, @@ -4277,7 +4303,7 @@ if not Quests then }, [15] = { name = "The Island of Dragons", - storageId = Storage.ExplorerSociety.TheIslandofDragons, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheIslandofDragons, missionId = 10309, startValue = 57, endValue = 59, @@ -4289,7 +4315,7 @@ if not Quests then }, [16] = { name = "The Ice Music", - storageId = Storage.ExplorerSociety.TheIceMusic, + storageId = Storage.Quest.U7_6.ExplorerSociety.TheIceMusic, missionId = 10310, startValue = 60, endValue = 62, @@ -4303,14 +4329,14 @@ if not Quests then }, [17] = { name = "The Undersea Kingdom", - storageId = Storage.ExplorerSociety.CalassaQuest, + storageId = Storage.Quest.U7_6.ExplorerSociety.CalassaQuest, missionId = 10311, startValue = 1, endValue = 3, states = { - [1] = "Captain Max will bring you to Calassa whenever you are ready. \z - Please try to retrieve the missing logbook which must be in one of the sunken shipwrecks.", + [1] = "Captain Max will bring you to Calassa whenever you are ready. Please try to retrieve the missing logbook which must be in one of the sunken shipwrecks.", [2] = "Report about your Calassa mission to Berenice in Liberty Bay.", + [3] = "Congratulations, you completed the remaining part of this mission!", }, }, }, @@ -5641,9 +5667,9 @@ if not Quests then startValue = 1, endValue = 3, states = { - [1] = "Mr Morris tasked you to find an ancient amulet that was lost somewhare on Dawnport - probably next to a corpse somewhare.", - [2] = "Come back to Mr Morris", - [3] = "Mr Morris thanks for the help", + [1] = "Mr Morris tasked you to find an ancient amulet that was lost somewhere on Dawnport - probably next to a corpse somewhere.", + [2] = "Come back to Mr Morris.", + [3] = "Mr Morris thanks for you the help.", }, }, [3] = { @@ -5653,8 +5679,8 @@ if not Quests then startValue = 1, endValue = 2, states = { - [1] = "Mr Morris urged you fo find a log book that was stolen by trolls.", - [2] = "Mr Morris thanks for the help", + [1] = "Mr Morris urged you to find a log book that was stolen by trolls.", + [2] = "Mr Morris thanks you for the help.", }, }, [4] = { @@ -5664,9 +5690,9 @@ if not Quests then startValue = 1, endValue = 3, states = { - [1] = "Mr Morris needs the rae Dawnfire herb harvested and brought to hin. It grows on grey sand only, he said.", - [2] = "Come back to Mr Morris", - [3] = "Mr Morris thanks for the help", + [1] = "Mr Morris needs the rare Dawnfire herb harvested and brought to him. It grows on gray sand only, he said.", + [2] = "Come back to Mr Morris.", + [3] = "Mr Morris thanks you for the help.", }, }, [5] = { @@ -5677,40 +5703,40 @@ if not Quests then endValue = 5, states = { [1] = "The key to the adventurer's dormitory has disappeared. Maybe you can find it. Ask around to find out who was the last to have seen it.", - [2] = "use the fishing rod in the nearby lake to fish old nasty", + [2] = "Use the fishing rod in the nearby lake to fish Old Nasty.", [3] = "Come back to Woblin with Old Nasty", - [4] = "Come back to Mr Morris with key 0010", + [4] = "Come back to Mr Morris with Key 0010", [5] = "Mr Morris thanks for the help", }, }, [6] = { - name = "Task: Mountain Trolls", - storageId = 65062, + name = "Task: A Toll on Trolls", + storageId = Storage.Quest.U10_55.Dawnport.MorrisTrollCount, missionId = 10394, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Mountain Trolls.", (math.max(player:getStorageValue(65062), 0))) + return string.format("You already hunted %d/20 Mountain Trolls.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisTrollCount), 0))) end, }, [7] = { - name = "Task: Muglex Clan Footman", - storageId = 65061, + name = "Task: The Goblin Slayer", + storageId = Storage.Quest.U10_55.Dawnport.MorrisGoblinCount, missionId = 10395, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Muglex Clan Footman.", (math.max(player:getStorageValue(65061), 0))) + return string.format("You already hunted %d/20 Muglex Clan Footman.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisGoblinCount), 0))) end, }, [8] = { - name = "Task: Minotaur Bruisers", - storageId = 65060, + name = "Task: Plus Minos a Few", + storageId = Storage.Quest.U10_55.Dawnport.MorrisMinosCount, missionId = 10396, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Minotaurs Bruisers.", (math.max(player:getStorageValue(65060), 0))) + return string.format("You already hunted %d/20 Minotaurs Bruisers.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisMinosCount), 0))) end, }, }, @@ -5746,16 +5772,17 @@ if not Quests then }, [3] = { name = "Mission 03: A Rational Request", - storageId = Storage.TheRookieGuard.Mission03, + storageId = Storage.TheRookieGuard.RatKills, missionId = 10399, - startValue = 1, - endValue = 2, - states = { - [1] = function(player) - return string.format("Vascalir sent you to the Rookgaard sewers to kill 5 rats. You have already killed %d/5. Return to Vascalir once you're done.", player:getStorageValue(Storage.TheRookieGuard.RatKills)) - end, - [2] = "Vascalir was pleased with your hunting efforts. You've proven that you are a skilled hunter, ready for the task at hand.", - }, + startValue = 0, + endValue = 5, + description = function(player) + return string.format( + "Vascalir sent you to the Rookgaard sewers to kill 5 rats. You have already killed %d/5. \z + Return to Vascalir once you're done.", + (math.max(player:getStorageValue(Storage.TheRookieGuard.RatKills), 0)) + ) + end, }, [4] = { name = "Mission 04: Home-Brewed", @@ -6510,5 +6537,20 @@ if not Quests then }, }, }, + [49] = { + name = "The Outlaw Camp", + startStorageId = Storage.QuestChests.OutlawCamp, + startStorageValue = 1, + missions = { + [1] = { + name = "Outlaw Treasure", + storageId = Storage.QuestChests.OutlawCamp, + missionId = 10451, + startValue = 1, + endValue = 1, + description = "You made your way through the Outlaw Camp and found the hidden treasure of the bandits.", + }, + }, + }, } end diff --git a/data-otxserver/lib/core/storages.lua b/data-otxserver/lib/core/storages.lua index 2b8d9a778..fa7537eeb 100644 --- a/data-otxserver/lib/core/storages.lua +++ b/data-otxserver/lib/core/storages.lua @@ -66,8 +66,6 @@ Reserved player action storage key ranges (const.h) [4502] = key 4502 [4503] = key 4503 [4600] = key 4600 - [4601] = key 4601 - [4603] = key 4603 [5000] = key 5000 [5002] = key 5002 [5010] = key 5010 @@ -81,34 +79,27 @@ Storage = { -- General storages Dragonfetish = 30003, EdronRopeQuest = 30004, - GhostShipQuest = 30005, OrcKingGreeting = 30006, MarkwinGreeting = 30007, -- EmoteSpells Storage cannot be changed, it is set in source code EmoteSpells = 30008, WagonTicket = 30009, - BloodHerbQuest = 30010, FirstMageWeapon = 30011, ToOutfoxAFoxQuest = 30012, KawillBlessing = 30014, RentedHorseTimer = 30015, FountainOfLife = 30016, - KnightwatchTowerDoor = 30017, -- Promotion Storage cannot be changed, it is set in source code Promotion = 30018, RookgaardHints = 30019, RookgaardDestiny = 30020, EruaranGreeting = 30021, MaryzaCookbook = 30022, - Factions = 30024, -- unused TrainerRoom = 30027, -- unused NpcSpawn = 30028, -- unused ExerciseDummyExhaust = 30029, - SamsOldBackpack = 30030, - SamsOldBackpackDoor = 30031, ChayenneReward = 30033, SwampDiggingTimeout = 30034, - HydraEggQuest = 30035, Atrad = 30036, ElementalistQuest1 = 30037, ElementalistQuest2 = 30038, @@ -128,7 +119,6 @@ Storage = { -- Reserved in Global.Storage.FamiliarSummonEvent60 = 30055 ChayenneKeyTime = 30056, FreeQuests = 30057, - BattleAxeQuest = 30059, ShrineEntrance = 30060, PlayerWeaponReward = 30061, --[[ @@ -526,41 +516,6 @@ Storage = { AmuletTimer = 50520, AmuletStatus = 50521, }, - ExplorerSociety = { - -- Reserved storage from 50530 - 50599 - QuestLine = 50530, - SpectralStone = 50531, - SkullOfRatha = 50532, - GiantSmithHammer = 50533, - JoiningTheExplorers = 505344, - TheIceDelivery = 50535, - TheButterflyHunt = 50536, - ThePlantCollection = 50537, - TheLizardUrn = 50538, - TheBonelordSecret = 50539, - TheOrcPowder = 50540, - CalassaQuest = 50541, - TheMemoryStone = 50542, - TheRuneWritings = 50543, - TheEctoplasm = 50544, - TheSpectralDress = 50545, - TheSpectralStone = 50546, - TheAstralPortals = 50547, - TheIslandofDragons = 50548, - TheIceMusic = 50549, - BansheeDoor = 50550, - BonelordsDoor = 50551, - CalassaDoor = 50552, - MemoryStoneDoor = 50553, - ElvenDoor = 50554, - OrcDoor = 50555, - ChorurnDoor = 50556, - DwacatraDoor = 50557, - FamilyBroochDoor = 50558, - TheElvenPoetry = 50559, - SpectralStoneDoor = 50560, - IceMusicDoor = 50561, - }, TravellingTrader = { -- Reserved storage from 50600 - 50619 Mission01 = 50600, @@ -572,34 +527,6 @@ Storage = { Mission07 = 50606, -- unused packageDoor = 50607 }, - DjinnWar = { - -- Reserved storage from 50620 - 50649 - Faction = { - Greeting = 50620, - MaridDoor = 50621, - EfreetDoor = 50622, - }, - RecievedLamp = 50625, - -- Blue djinn - MaridFaction = { - Start = 50630, - Mission01 = 50631, - Mission02 = 50632, - RataMari = 50633, - Mission03 = 50634, - DoorToLamp = 50635, - DoorToEfreetTerritory = 50636, - }, - -- Green djinn - EfreetFaction = { - Start = 50640, - Mission01 = 50641, - Mission02 = 50642, - Mission03 = 50643, - DoorToLamp = 50644, - DoorToMaridTerritory = 50645, - }, - }, VampireHunter = { -- Reserved storage from 50650 - 50659 Rank = 50650, @@ -814,123 +741,13 @@ Storage = { -- Until all outfit quests are completed DefaultStart = 50960, Ref = 50961, - Citizen = { - -- Mission storages for temporary questlog entries - MissionHat = 50966, - AddonHat = 50967, - MissionBackpack = 50968, - AddonBackpack = 50969, - AddonBackpackTimer = 50970, - }, - -- Begger Outfit Quest - BeggarFirstAddonDoor = 50975, -- Staff quest - BeggarSecondAddon = 50976, - -- Druid-outfit Quest - DruidHatAddon = 50977, - DruidBodyAddon = 50978, - DruidAmuletDoor = 50979, - -- Barbarian-outfit Quest - BarbarianAddon = 50980, - BarbarianAddonWaitTimer = 50981, - -- Beggar - BeggarOutfit = 50982, - BeggarOutfitTimer = 50983, - -- Hunter-outfit Quest - HunterMusicSheet01 = 50984, - HunterMusicSheet02 = 50985, - HunterMusicSheet03 = 50986, - HunterMusicSheet04 = 50987, - HunterBodyAddon = 50988, - HunterHatAddon = 50989, - Hunter = { - AddonGlove = 50990, - AddonHat = 50991, - }, - Knight = { - AddonSword = 50992, - MissionHelmet = 50993, - AddonHelmet = 50994, - AddonHelmetTimer = 50995, - RamsaysHelmetDoor = 50996, - }, - MageSummoner = { - AddonWand = 50997, - AddonBelt = 50998, - MissionHatCloak = 50999, - AddonHatCloak = 51000, - AddonWandTimer = 51001, - }, - -- Nobleman Outfit - NoblemanFirstAddon = 51002, - NoblemanSecondAddon = 51003, -- Norseman-outfit Quest NorsemanAddon = 51004, - -- Warrior-outfit Quest - WarriorShoulderAddon = 51005, - WarriorSwordAddon = 51006, - WarriorShoulderTimer = 51007, - -- Wizard-outfit Quest - WizardAddon = 51008, - -- Pirate-outfit Quest - PirateBaseOutfit = 51009, - PirateSabreAddon = 51010, - PirateHatAddon = 51011, - -- Assassin Outfit - AssassinBaseOutfit = 51012, - AssassinFirstAddon = 51013, - AssassinSecondAddon = 51014, -- Golden Outfit GoldenOutfit = 51015, - NightmareOutfit = 51016, - NightmareDoor = 51017, - BrotherhoodOutfit = 51018, - BrotherhoodDoor = 51019, - Shaman = { - AddonStaffMask = 51020, - MissionStaff = 51021, - MissionMask = 51022, - }, DeeplingAnchor = 51023, - FirstOrientalAddon = 51024, - SecondOrientalAddon = 51025, RoyalCostumeOutfit = 51026, }, - TheAncientTombs = { - -- Reserved storage from 50940 - 51059 - DefaultStart = 50940, - VashresamunInstruments = 50941, - VashresamunsDoor = 50942, - MorguthisBlueFlameStorage1 = 50943, - MorguthisBlueFlameStorage2 = 50944, - MorguthisBlueFlameStorage3 = 50945, - MorguthisBlueFlameStorage4 = 50946, - MorguthisBlueFlameStorage5 = 50947, - MorguthisBlueFlameStorage6 = 50948, - MorguthisBlueFlameStorage7 = 50949, - - OmrucsTreasure = 50950, - ThalasTreasure = 50951, - DiphtrahsTreasure = 50952, - MahrdisTreasure = 50953, - VashresamunsTreasure = 50954, - MorguthisTreasure = 50955, - RahemosTreasure = 50956, - }, - TheApeCity = { - -- Reserved storage from 51060 - 51079 - Started = 51060, - Questline = 51061, - DworcDoor = 51062, - ChorDoor = 51063, - ParchmentDecyphering = 51064, - FibulaDoor = 51065, - WitchesCapSpot = 51066, - CasksDoor = 51067, - Casks = 51068, - HolyApeHair = 51069, - SnakeDestroyer = 51070, - ShamanOufit = 51071, - }, TheInquisition = { -- Reserved storage from 51110 - 51139 Questline = 51110, @@ -1103,14 +920,6 @@ Storage = { BossRoom = 51332, }, }, - FriendsandTraders = { - -- Reserved storage from 51340 - 51359 - DefaultStart = 51340, - TheSweatyCyclops = 51341, - TheMermaidMarina = 51342, - TheBlessedStake = 51343, - TheBlessedStakeWaitTime = 51344, - }, Postman = { -- Reserved storage from 51360 - 51389 Mission01 = 51360, @@ -1248,32 +1057,6 @@ Storage = { Questline = 51532, }, }, - TheShatteredIsles = { - -- Reserved storage from 51540 - 51589 - DefaultStart = 51540, - TheGovernorDaughter = 51541, - TheErrand = 51542, - AccessToMeriana = 51543, - APoemForTheMermaid = 51544, - ADjinnInLove = 51545, - AccessToLagunaIsland = 51546, - AccessToGoroma = 51547, - Shipwrecked = 51548, - DragahsSpellbook = 51549, - TheCounterspell = 51550, - ReputationInSabrehaven = 51551, - RaysMission1 = 51552, - RaysMission2 = 51553, - RaysMission3 = 51554, - RaysMission4 = 51555, - AccessToNargor = 51556, - TortoiseEggNargorDoor = 51557, - TortoiseEggNargorTime = 51558, - YavernDoor = 51559, - TavernMap1 = 51560, - TavernMap2 = 51561, - TavernMap3 = 51562, - }, SearoutesAroundYalahar = { -- Reserved storage from 51590 - 51609 TownsCounter = 51590, @@ -1399,17 +1182,12 @@ Storage = { FormorgarMinesHoistSkeleton = 51737, FormorgarMinesHoistChest = 51738, -- Custom Quests, currently not using system.lua (aid 2000) - BlackKnightTreeCrownShield = 51739, - BlackKnightTreeCrownArmor = 51740, - BlackKnightTreeKey = 51741, KosheiAmulet1 = 51742, KosheiAmulet2 = 51743, - SilverBrooch = 51744, FamilyBrooch = 51745, DCQGhoul = 51746, FirewalkerBoots = 51747, DeeperFibulaKey = 51748, - SixRubiesQuest = 51749, ParchmentRoomQuest = 51750, WarzoneReward1 = 51751, WarzoneReward2 = 51752, @@ -1420,30 +1198,13 @@ Storage = { FathersBurdenCrystal = 51757, FathersBurdenSilk = 51758, FathersBurdenCloth = 51759, - OutlawCampKey1 = 51760, - OutlawCampKey2 = 51761, - OutlawCampKey3 = 51762, - DoubletQuest = 51763, - HoneyFlower = 51764, - BananaPalm = 51765, WhisperMoss = 51766, OldParchment = 51767, DragahsSpellbook = 51768, StealFromThieves = 51769, - }, - PitsOfInferno = { - -- Reserved storage from 52000 - 52019 - ShortcutHubDoor = 52000, - ShortcutLeverDoor = 52001, - Pumin = 52002, - WeaponReward = 52003, - ThroneInfernatil = 52004, - ThroneTafariel = 52005, - ThroneVerminor = 52006, - ThroneApocalypse = 52007, - ThroneBazir = 52008, - ThroneAshfalor = 52009, - ThronePumin = 52010, + OutlawCamp = 51770, -- quest log to The Outlaw Camp + WitchHouseQuest = 51771, + SimonTheBeggarsFavoriteStaff = 51772, }, HorestisTomb = { -- Reserved storage from 52020 - 52029 @@ -1573,17 +1334,6 @@ Storage = { QuestLine = 52148, TheLostBrother = 52149, }, - DreamersChallenge = { - -- Reserved storage from 52160 - 52199 - LeverNightmare1 = 52160, - LeverNightmare2 = 52161, - LeverNightmare3 = 52162, - LeverBrotherhood1 = 52163, - LeverBrotherhood2 = 52164, - LeverBrotherhood3 = 52165, - TicTac = 52166, - Reward = 52167, - }, HallsOfHope = { -- Reserved storage from 52200 - 52219 Questline = 52200, @@ -1711,9 +1461,18 @@ Storage = { ID3007 = 3007, ID3008 = 3008, ID3012 = 3012, + ID3142 = 3142, + ID3301 = 3301, + ID3302 = 3302, + ID3303 = 3303, + ID3304 = 3304, + ID3520 = 3520, ID3600 = 3600, + ID3610 = 3610, ID3620 = 3620, ID3666 = 3666, + ID3667 = 3667, + ID3700 = 3700, ID3702 = 3702, ID3800 = 3800, ID3801 = 3801, @@ -1723,6 +1482,8 @@ Storage = { ID3980 = 3980, ID4055 = 4055, ID4502 = 4502, + ID4601 = 4601, + ID4603 = 4603, ID5010 = 5010, ID6010 = 6010, }, @@ -1730,38 +1491,9 @@ Storage = { -- Use the reserved storage keys accordingly KeysUpdate = 40000, PreU6_0 = { -- update pre-6.0 - Reserved Storages 40001 - 40020 - DeeperFibula = { - Rewards = { - TowerShield = 40001, - WarriorHelmet = 40002, - DwarvenRing = 40003, - ElvenAmulet = 40004, - KnightAxe = 40005, - }, - }, OrnamentedShield = { Rewards = { OrnamentedShield = 40006, - TimeRing = 40007, - }, - }, - ShortSword = { - Rewards = { - Book = 40008, - }, - }, - ThaisLighthouse = { - Rewards = { - BattleHammer = 40009, - DarkShield = 40010, - }, - }, - }, - U6_0 = { -- update 6.0 - Reserved Storages 40021 - 40030 - StuddedShield = { - Rewards = { - BananaFree = 40021, - BananaPremium = 40022, }, }, }, @@ -1771,9 +1503,6 @@ Storage = { Cookies = 40031, }, }, - ExplorerBrooch = { - Brooch = 40032, - }, OrcFortress = { Rewards = { KnightAxe = 40033, @@ -1796,27 +1525,11 @@ Storage = { }, }, U6_4 = { -- update 6.4 - Reserved Storages 40071 - 40110 - AdornedUHRune = { - Rewards = { - SilverRuneEmblem = 40071, - }, - }, - BarbarianAxe = { - Rewards = { - BarbarianAxe = 40072, - Scimitar = 40073, - }, - }, BerserkerTreasure = { Rewards = { WhitePearls = 40074, }, }, - DarkArmor = { - Rewards = { - Armor = 40075, - }, - }, DemonHelmet = { Rewards = { SteelBoots = 40076, @@ -1824,88 +1537,14 @@ Storage = { DemonShield = 40078, }, }, - DoubleHero = { - Rewards = { - RedGem = 40079, - ClubRing = 40080, - }, - }, - EdronGoblin = { - Rewards = { - SilverAmulet = 40081, - SteelShield = 40082, - }, - }, - FireAxe = { - Rewards = { - Bag = 40083, - FireAxe = 40084, - }, - }, - PoisonDaggers = { - Rewards = { - BackpackReward = 40085, - }, - }, - ShamanTreasure = { - Rewards = { - BlankRunes = 40086, - }, - }, - TrollCave = { - Rewards = { - GarlicNecklace = 40087, - BrassLegs = 40088, - }, - }, - VampireShield = { - Rewards = { - StrangeSymbol = 40089, - DragonLance = 40090, - VampireShield = 40091, - }, - }, - WeddingRing = { - Rewards = { - DragonNecklace = 40092, - WeedingRing = 40093, - }, - }, - }, - U6_5 = { -- update 6.5 - Reserved Storages 40111 - 40120 - AlawarsVault = { - Rewards = { - WhitePearl = 40111, - Broadsword = 40112, - }, - }, }, U7_1 = { -- update 7.1 - Reserved Storages 40121 - 40140 - BlackKnight = { - Rewards = { - CrownArmor = 40121, - CrownShield = 40122, - }, - }, DragonTower = { Rewards = { Backpack1 = 40123, Backpack2 = 40124, }, }, - Ring = { - Rewards = { - TimeRing = 40125, - SwordRing = 40126, - }, - }, - TimeRing = { - Rewards = { - CrystallBall = 40127, - TimeRing = 40128, - ElvenAmulet = 40129, - }, - }, }, U7_2 = { -- update 7.2 - Reserved Storages 40141 - 40200 Behemoth = { @@ -1951,22 +1590,9 @@ Storage = { FamilyBrooch = { Brooch = 9000, }, - GiantSmithhammer = { - QuestLine = 10091, - Talon = 10092, - Hammer = 10093, - GoldCoin = 10094, - }, MadMageRoom = { QuestLine = 10095, APrisoner = 10096, - StarAmulet = 10097, - Hat = 10098, - StoneSkinAmulet = 10099, - }, - SkullOfRatha = { - Bag1 = 10100, - Bag2 = 10101, }, TheAnnihilator = { Reward = 10102, @@ -1989,54 +1615,322 @@ Storage = { VoodooDoll = {}, }, U7_3 = { -- update 7.3 - Reserved Storages 40351 - 40400 - MedusaShield = {}, - SerpentineTower = {}, - WhitePearl = {}, + TheMedusaQuest = 40351, + SerpentineTower = { + WhitePearl = 40352, + }, }, U7_4 = { -- update 7.4 - Reserved Storages 40401 - 40600 - TheAncientTombs = {}, - TheDjinnWarEfreetFaction = {}, - TheDjinnWarMaridFaction = {}, + TheAncientTombs = { + DefaultStart = 40401, + VashresamunInstruments = 40402, + VashresamunsDoor = 40403, + MorguthisBlueFlameStorage1 = 40404, + MorguthisBlueFlameStorage2 = 40405, + MorguthisBlueFlameStorage3 = 40406, + MorguthisBlueFlameStorage4 = 40407, + MorguthisBlueFlameStorage5 = 40408, + MorguthisBlueFlameStorage6 = 40409, + MorguthisBlueFlameStorage7 = 40410, + OmrucsTreasure = 40411, + ThalasTreasure = 40412, + DiphtrahsTreasure = 40413, + MahrdisTreasure = 40414, + VashresamunsTreasure = 40415, + MorguthisTreasure = 40416, + RahemosTreasure = 40417, + ThalasSwitchesGlobalStorage = 40418, + DiprathSwitchesGlobalStorage = 40419, + AshmunrahSwitchesGlobalStorage = 40420, + Diprath_sign1 = 40421, + Diprath_sign2 = 40422, + Diprath_sign3 = 40423, + Diprath_sign4 = 40424, + Diprath_sign5 = 40425, + Diprath_sign6 = 40426, + Diprath_sign7 = 40427, + Diprath_sign8 = 40428, + }, + DjinnWar = { + Factions = 40429, + -- Reserved storage from 50620 - 50649 + Faction = { + Greeting = 40430, + MaridDoor = 40431, + EfreetDoor = 40432, + }, + RecievedLamp = 40433, + -- Blue djinn + MaridFaction = { + Start = 40434, + Mission01 = 40435, + Mission02 = 40436, + RataMari = 40437, + Mission03 = 40438, + DoorToLamp = 40439, + DoorToEfreetTerritory = 40440, + }, + -- Green djinn + EfreetFaction = { + Start = 40441, + Mission01 = 40442, + Mission02 = 40443, + Mission03 = 40444, + DoorToLamp = 40445, + DoorToMaridTerritory = 40446, + }, + }, }, U7_5 = { -- update 7.5 - Reserved Storages 40601 - 40610 - ElephantTusk = {}, - SamsOldBackpack = {}, + ElephantTusk = 40601, + SamsOldBackpack = { + SamsOldBackpackNpc = 40602, + SamsOldBackpackDoor = 40603, + }, }, U7_6 = { -- update 7.6 - Reserved Storages 40611 - 40760 - HydraEgg = {}, - TheApeCity = {}, - TheExplorerSociety = {}, + HydraEggQuest = 40611, + TheApeCity = { + Started = 40612, + Questline = 40613, + DworcDoor = 40614, + ChorDoor = 40615, + ParchmentDecyphering = 40616, + FibulaDoor = 40617, + WitchesCapSpot = 40618, + CasksDoor = 40619, + Casks = 40620, + HolyApeHair = 40621, + SnakeDestroyer = 40622, + ShamanOufit = 40623, + TheLargeAmphoras1 = 40624, + TheLargeAmphoras2 = 40625, + TheLargeAmphoras3 = 40626, + TheLargeAmphoras4 = 40627, + TheLargeAmphorasCooldown = 40628, + }, + ExplorerSociety = { + QuestLine = 40629, + SpectralStone = 40630, + JoiningTheExplorers = 40631, + TheIceDelivery = 40632, + TheButterflyHunt = 40633, + ThePlantCollection = 40634, + TheLizardUrn = 40635, + TheBonelordSecret = 40636, + TheOrcPowder = 40637, + CalassaQuest = 40638, + TheMemoryStone = 40639, + TheRuneWritings = 40640, + TheEctoplasm = 40641, + TheSpectralDress = 40642, + TheSpectralStone = 40643, + TheAstralPortals = 40644, + TheIslandofDragons = 40645, + TheIceMusic = 40646, + BansheeDoor = 40647, + BonelordsDoor = 40648, + CalassaDoor = 40649, + MemoryStoneDoor = 40650, + ElvenDoor = 40651, + OrcDoor = 40652, + ChorurnDoor = 40653, + DwacatraDoor = 40654, + FamilyBroochDoor = 40655, + TheElvenPoetry = 40656, + SpectralStoneDoor = 40657, + IceMusicDoor = 40658, + ExplorerBrooch = 40659, + SkullOfRatha = { + Bag1 = 40660, + Bag2 = 40661, + }, + GiantSmithHammer = { + Talon = 40662, + Hammer = 40663, + GoldCoin = 40664, + }, + Books = { + Cyclops = 40665, + Hengis = 40666, + }, + }, }, U7_8 = { -- update 7.8 - Reserved Storages 40761 - 41000 - AssassinOutfits = {}, - BarbarianOutfits = {}, - BeggarOutfits = {}, - CitizenOutfits = {}, - CitizenOutfitsRook = {}, - DruidOutfits = {}, - DruidOutfitsRook = {}, - HunterOutfits = {}, - KnightOutfits = {}, - MageOutfits = {}, - MarlinTrophy = {}, - Meriana = {}, - NoblemanOutfits = {}, - ObsidianKnife = {}, - OrientalOutfits = {}, - PirateOutfits = {}, - ShamanOutfits = {}, - SummonerOutfits = {}, - TheBlessedStake = {}, - TheMermaidMarina = {}, - TheShatteredIsles = {}, - TheSweatyCyclops = {}, - TreasureIsland = {}, - WarriorOutfits = {}, - WizardOutfits = {}, + AssassinOutfits = { + AssassinBaseOutfit = 40761, + AssassinFirstAddon = 40762, + AssassinSecondAddon = 40763, + }, + BarbarianOutfits = { + BarbarianAddon = 40764, + BarbarianAddonWaitTimer = 40765, + }, + BeggarOutfits = { + BeggarOutfit = 40766, + BeggarOutfitTimer = 40767, + BeggarFirstAddonDoor = 40768, + BeggarSecondAddon = 40769, + BeggarOutfitTimerAddon = 40770, + }, + CitizenOutfitsRook = { + MissionHatRook = 40771, + AddonHatRook = 40772, + MissionBackpackRook = 40773, + AddonBackpackRook = 40774, + AddonBackpackRookTimer = 40775, + }, + CitizenOutfits = { + MissionHat = 40776, + AddonHat = 40777, + MissionBackpack = 40778, + AddonBackpack = 40779, + AddonBackpackTimer = 40780, + }, + DruidOutfitsRook = { + DruidBodyAddonRook = 40781, + }, + DruidOutfits = { + DruidHatAddon = 40782, + DruidBodyAddon = 40783, + DruidAmuletDoor = 40784, + GriffinclawFlower = 40785, + CeironsWaterskin = 40786, + WolfToothChain = 40787, + }, + HunterOutfits = { + HunterMusicSheet01 = 40788, + HunterMusicSheet02 = 40789, + HunterMusicSheet03 = 40790, + HunterMusicSheet04 = 40791, + HunterBodyAddon = 40792, + HunterHatAddon = 40793, + Hunter = { + AddonGlove = 40794, + AddonHat = 40795, + }, + ElaneCrossbow = 40796, + }, + KnightOutfits = { + AddonSword = 40797, + MissionHelmet = 40798, + AddonHelmet = 40799, + AddonHelmetTimer = 40800, + RamsaysHelmetDoor = 40801, + RamsaysHelmetChest = 40802, + }, + MageAndSummonerOutfits = { + AddonWand = 40803, + AddonBelt = 40804, + MissionHatCloak = 40805, + AddonHatCloak = 40806, + AddonWandTimer = 40807, + }, + MarlinTrophy = 40808, + NoblemanOutfits = { + NoblemanFirstAddon = 40809, + NoblemanSecondAddon = 40810, + }, + ObsidianKnife = 40811, + OrientalOutfits = { + FirstOrientalAddon = 40812, + SecondOrientalAddon = 40813, + OrientalDoor = 40814, + CoralComb = 40815, + }, + PirateOutfits = { + PirateBaseOutfit = 40816, + PirateSabreAddon = 40817, + PirateHatAddon = 40818, + }, + ShamanOutfits = { + AddonStaffMask = 40819, + MissionStaff = 40820, + MissionMask = 40821, + }, + FriendsAndTraders = { + DefaultStart = 40822, + TheSweatyCyclops = 40823, + TheMermaidMarina = 40824, + TheBlessedStake = 40825, + TheBlessedStakeWaitTime = 40826, + }, + TheShatteredIsles = { + DefaultStart = 40827, + TheGovernorDaughter = 40828, + TheErrand = 40829, + AccessToMeriana = 40830, + APoemForTheMermaid = 40831, + ADjinnInLove = 40832, + AccessToLagunaIsland = 40833, + AccessToGoroma = 40834, + Shipwrecked = 40835, + DragahsSpellbook = 40836, + TheCounterspell = 40837, + ReputationInSabrehaven = 40838, + RaysMission1 = 40839, + RaysMission2 = 40840, + RaysMission3 = 40841, + RaysMission4 = 40842, + AccessToNargor = 40843, + TortoiseEggNargorDoor = 40844, + TortoiseEggNargorTime = 40845, + YavernDoor = 40846, + TavernMap1 = 40847, + TavernMap2 = 40848, + TavernMap3 = 40849, + }, + WarriorOutfits = { + WarriorShoulderAddon = 40850, + WarriorSwordAddon = 40851, + WarriorShoulderTimer = 40852, + }, + WizardOutfits = 40853, }, U7_9 = { -- update 7.9 - Reserved Storages 41001 - 41150 - DreamersChallenge = {}, - ThePitsOfInferno = {}, + DreamersChallenge = { + LeverNightmare1 = 41001, + LeverNightmare2 = 41002, + LeverNightmare3 = 41003, + LeverBrotherhood1 = 41004, + LeverBrotherhood2 = 41005, + LeverBrotherhood3 = 41006, + TicTac = 41007, + BPLongSword = 41008, + ChestBook = 41009, + ChestsWine = 41010, + Chests3SmallDiamond = 41011, + }, + NightmareOutfits = { + Outfits = 41012, + Door = 41013, + KnightwatchTowerDoor = 41014, + }, + BrotherhoodOutfits = { + Outfits = 41015, + Door = 41016, + }, + ThePitsOfInferno = { + ShortcutHubDoor = 41017, + ShortcutLeverDoor = 41018, + Pumin = 41019, + ThroneInfernatil = 41020, + ThroneTafariel = 41021, + ThroneVerminor = 41022, + ThroneApocalypse = 41023, + ThroneBazir = 41024, + ThroneAshfalor = 41025, + ThronePumin = 41026, + ChestTible = 41027, + CorpseBook = 41028, + CorpsePirateBP = 41029, + RewardChestBP = 41030, + RewardChestPlatinumCoins = 41031, + RewardChestFrozenStarlight = 41032, + RewardChestStuffed = 41033, + RewardChestSoftBoots = 41034, + RewardChestStaffAvengerArbalest = 41035, + }, }, U8_0 = { -- update 8.0 - Reserved Storages 41151 - 41350 BarbarianArena = {}, @@ -2058,12 +1952,10 @@ Storage = { U8_1 = { -- update 8.1 - Reserved Storages 41351 - 41650 AgainstTheSpiderCult = {}, AritosTask = {}, - BrotherhoodOutfits = {}, OutfitBrotherhoodMaleAddon = {}, IntoTheBonePit = {}, KissingAPig = {}, KosheiTheDeathless = {}, - NightmareOutfits = {}, OutfitNightmareMaleAddon = {}, NomadsLand = {}, RestInHallowedGround = {}, @@ -2509,10 +2401,6 @@ Storage = { MorrisMinos = 20014, MorrisMinosCount = 20015, }, - SanctuaryOfTheLizardGod = { - LizardGodTeleport = 20020, - LegionHelmet = 20021, - }, }, U10_70 = { -- update 10.70 - Reserved Storages 44801 - 44950 HeroOfRathleton = {}, @@ -2829,91 +2717,6 @@ Storage = { TibiorasBox = 63977, }, - -- Reserved storage from 64000 - 64099 - TibiaDrome = { - -- General Upgrades - BestiaryBetterment = { - TimeLeft = 64000, - LastActivatedAt = 64001, - }, - CharmUpgrade = { - TimeLeft = 64002, - LastActivatedAt = 64003, - }, - KooldownAid = { - LastActivatedAt = 64005, - }, - StaminaExtension = { - LastActivatedAt = 64007, - }, - StrikeEnhancement = { - TimeLeft = 64008, - LastActivatedAt = 64009, - }, - WealthDuplex = { - TimeLeft = 64010, - LastActivatedAt = 64011, - }, - -- Resilience - FireResilience = { - TimeLeft = 64012, - LastActivatedAt = 64013, - }, - IceResilience = { - TimeLeft = 64014, - LastActivatedAt = 64015, - }, - EarthResilience = { - TimeLeft = 64016, - LastActivatedAt = 64017, - }, - EnergyResilience = { - TimeLeft = 64018, - LastActivatedAt = 64019, - }, - HolyResilience = { - TimeLeft = 64020, - LastActivatedAt = 64021, - }, - DeathResilience = { - TimeLeft = 64022, - LastActivatedAt = 64023, - }, - PhysicalResilience = { - TimeLeft = 64024, - LastActivatedAt = 64025, - }, - -- Amplifications - FireAmplification = { - TimeLeft = 64026, - LastActivatedAt = 64027, - }, - IceAmplification = { - TimeLeft = 64028, - LastActivatedAt = 64029, - }, - EarthAmplification = { - TimeLeft = 64030, - LastActivatedAt = 64031, - }, - EnergyAmplification = { - TimeLeft = 64032, - LastActivatedAt = 64033, - }, - HolyAmplification = { - TimeLeft = 64034, - LastActivatedAt = 64035, - }, - DeathAmplification = { - TimeLeft = 64036, - LastActivatedAt = 64037, - }, - PhysicalAmplification = { - TimeLeft = 64038, - LastActivatedAt = 64039, - }, - }, - VipSystem = { OnlineCoinsGain = 150002, OnlineTokensGain = 150003, @@ -3044,12 +2847,6 @@ GlobalStorage = { Machine3 = 60147, Machine4 = 60148, }, - TheAncientTombs = { - -- Reserved storage from 60160 - 60169 - ThalasSwitchesGlobalStorage = 60160, - DiprathSwitchesGlobalStorage = 60161, - AshmunrahSwitchesGlobalStorage = 60162, - }, TheOrderOfTheLion = { -- Reserved storage from 60170 - 60171 Drume = { @@ -3108,9 +2905,9 @@ GlobalStorage = { } startupGlobalStorages = { - GlobalStorage.TheAncientTombs.AshmunrahSwitchesGlobalStorage, - GlobalStorage.TheAncientTombs.DiprathSwitchesGlobalStorage, - GlobalStorage.TheAncientTombs.ThalasSwitchesGlobalStorage, + Storage.Quest.U7_4.TheAncientTombs.AshmunrahSwitchesGlobalStorage, + Storage.Quest.U7_4.TheAncientTombs.DiprathSwitchesGlobalStorage, + Storage.Quest.U7_4.TheAncientTombs.ThalasSwitchesGlobalStorage, GlobalStorage.HeroRathleton.FirstMachines, GlobalStorage.HeroRathleton.SecondMachines, GlobalStorage.HeroRathleton.ThirdMachines, diff --git a/data-otxserver/lib/quests/killing_in_the_name_of.lua b/data-otxserver/lib/quests/killing_in_the_name_of.lua index 154bf6d42..1e051f206 100644 --- a/data-otxserver/lib/quests/killing_in_the_name_of.lua +++ b/data-otxserver/lib/quests/killing_in_the_name_of.lua @@ -28,13 +28,13 @@ tasks = { Extra = { [1] = { killsRequired = 20, - raceName = "Mountain Trolls", + raceName = "Mountain Troll", level = { 1, 9999 }, storage = { 12701, 1 }, norepeatable = true, premium = false, creatures = { - "mountain trolls", + "mountain troll", }, rewards = { { type = "storage", value = { 17524, 1 } }, diff --git a/data-otxserver/monster/mammals/husky.lua b/data-otxserver/monster/mammals/husky.lua index dae58bcc6..cb4398fc9 100644 --- a/data-otxserver/monster/mammals/husky.lua +++ b/data-otxserver/monster/mammals/husky.lua @@ -26,7 +26,7 @@ monster.Bestiary = { SecondUnlock = 10, CharmsPoints = 1, Stars = 0, - Occurence = 1, + Occurrence = 1, Locations = "Svargrond and Nibelor.", } diff --git a/data-otxserver/monster/undeads/iks_ahpututu.lua b/data-otxserver/monster/undeads/iks_ahpututu.lua index 06e8d0612..d1f44cd61 100644 --- a/data-otxserver/monster/undeads/iks_ahpututu.lua +++ b/data-otxserver/monster/undeads/iks_ahpututu.lua @@ -15,7 +15,7 @@ monster.outfit = { monster.raceId = 2349 monster.Bestiary = { - class = "Iks", + class = "Undead", race = BESTY_RACE_UNDEAD, toKill = 5, FirstUnlock = 1, diff --git a/data-otxserver/monster/undeads/iks_aucar.lua b/data-otxserver/monster/undeads/iks_aucar.lua index 26bfc867d..efd711a01 100644 --- a/data-otxserver/monster/undeads/iks_aucar.lua +++ b/data-otxserver/monster/undeads/iks_aucar.lua @@ -15,7 +15,7 @@ monster.outfit = { monster.raceId = 2344 monster.Bestiary = { - class = "Iks", + class = "Undead", race = BESTY_RACE_UNDEAD, toKill = 1000, FirstUnlock = 50, diff --git a/data-otxserver/monster/undeads/iks_chuka.lua b/data-otxserver/monster/undeads/iks_chuka.lua index 85f0cd77c..514011c9b 100644 --- a/data-otxserver/monster/undeads/iks_chuka.lua +++ b/data-otxserver/monster/undeads/iks_chuka.lua @@ -15,7 +15,7 @@ monster.outfit = { monster.raceId = 2345 monster.Bestiary = { - class = "Iks", + class = "Undead", race = BESTY_RACE_UNDEAD, toKill = 1000, FirstUnlock = 50, diff --git a/data-otxserver/monster/undeads/iks_churrascan.lua b/data-otxserver/monster/undeads/iks_churrascan.lua index 704e40a53..fd44b36f6 100644 --- a/data-otxserver/monster/undeads/iks_churrascan.lua +++ b/data-otxserver/monster/undeads/iks_churrascan.lua @@ -15,7 +15,7 @@ monster.outfit = { monster.raceId = 2350 monster.Bestiary = { - class = "Iks", + class = "Undead", race = BESTY_RACE_UNDEAD, toKill = 1000, FirstUnlock = 50, diff --git a/data-otxserver/monster/undeads/iks_pututu.lua b/data-otxserver/monster/undeads/iks_pututu.lua index 460aa7eb5..bbf16a43d 100644 --- a/data-otxserver/monster/undeads/iks_pututu.lua +++ b/data-otxserver/monster/undeads/iks_pututu.lua @@ -15,7 +15,7 @@ monster.outfit = { monster.raceId = 2343 monster.Bestiary = { - class = "Iks", + class = "Undead", race = BESTY_RACE_UNDEAD, toKill = 1000, FirstUnlock = 50, diff --git a/data-otxserver/scripts/actions/tools/skinning.lua b/data-otxserver/scripts/actions/tools/skinning.lua index 71481d3c0..f17952ee7 100644 --- a/data-otxserver/scripts/actions/tools/skinning.lua +++ b/data-otxserver/scripts/actions/tools/skinning.lua @@ -147,22 +147,6 @@ function skinning.onUse(player, item, fromPosition, target, toPosition, isHotkey end end - if target:getId() == 12816 then - if player:getStorageValue(Storage.Quest.U8_2.TheMutatedPumpkin.Skinned) > os.time() then - player:sendCancelMessage("You already used your knife on the corpse.") - return true - end - - player:setStorageValue(Storage.Quest.U8_2.TheMutatedPumpkin.Skinned, os.time() + 4 * 60 * 60) - player:say("Happy Halloween!", TALKTYPE_MONSTER_SAY) - player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) - player:addAchievement("Mutated Presents") - local reward = math.random(1, #skin) - player:addItem(skin[reward].newItem, skin[reward].amount or 1) - effect = CONST_ME_HITAREA - return true - end - if not skin then player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) return true diff --git a/data-otxserver/scripts/creaturescripts/customs/freequests.lua b/data-otxserver/scripts/creaturescripts/customs/freequests.lua index 152b1ace7..3a429715a 100644 --- a/data-otxserver/scripts/creaturescripts/customs/freequests.lua +++ b/data-otxserver/scripts/creaturescripts/customs/freequests.lua @@ -4,8 +4,6 @@ local questTable = { -- } --- from Position: (33201, 31762, 1) --- to Position: (33356, 31309, 4) local function playerFreeQuestStart(playerId, index) local player = Player(playerId) if not player then diff --git a/data-otxserver/scripts/quests/the_order_of_lion/action-bounac_entrance.lua b/data-otxserver/scripts/quests/the_order_of_lion/action-bounac_entrance.lua index 5aeabb5b1..ceca50883 100644 --- a/data-otxserver/scripts/quests/the_order_of_lion/action-bounac_entrance.lua +++ b/data-otxserver/scripts/quests/the_order_of_lion/action-bounac_entrance.lua @@ -1,19 +1,5 @@ local bounacEntrance = Action() function bounacEntrance.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item:getActionId() == 59602 then - if player:getLevel() < 250 then - player:sendCancelMessage("You need at least level 250.") - toPosition:sendMagicEffect(CONST_ME_POFF) - else - player:teleportTo({ x = 32423, y = 32448, z = 7 }) - toPosition:sendMagicEffect(CONST_ME_WATERSPLASH) - Position({ x = 32423, y = 32448, z = 7 }):sendMagicEffect(CONST_ME_WATERSPLASH) - end - elseif item:getActionId() == 59603 then - player:teleportTo({ x = 33183, y = 31756, z = 7 }) - Position({ x = 33183, y = 31756, z = 7 }):sendMagicEffect(CONST_ME_WATERSPLASH) - toPosition:sendMagicEffect(CONST_ME_WATERSPLASH) - end return true end diff --git a/data-otxserver/startup/tables/chest.lua b/data-otxserver/startup/tables/chest.lua index de07d7c80..e8a40604c 100644 --- a/data-otxserver/startup/tables/chest.lua +++ b/data-otxserver/startup/tables/chest.lua @@ -21,6 +21,16 @@ storage = xxxxx }, + Example using KV: + [xxxx] = { + useKV = true, + itemId = xxxx, + itemPos = {x = xxxxx, y = xxxxx, z = x}, + container = xxxx, (it's for use reward in a container, only put the id of the container here) + reward = {{xxxx, x}}, + questName = "testkv", + } + Note: The "for use of the map" variables are only used to create the action or unique on the map during startup If the reward is an key, do not need to use "keyAction", only set the storage as same action id diff --git a/data-otxserver/startup/tables/storage_keys_update.lua b/data-otxserver/startup/tables/storage_keys_update.lua index 933842e55..14645ab72 100644 --- a/data-otxserver/startup/tables/storage_keys_update.lua +++ b/data-otxserver/startup/tables/storage_keys_update.lua @@ -1,5 +1,5 @@ QuestKeysUpdate = { - [0] = { latest = 1 }, -- Increase +1 every time this below table suffer a modification + [0] = { latest = 0 }, -- Increase +1 every time this below table suffer a modification -- Add a new table to the bottow of this array with the following number versioning. --[[ [1] = { -- New table version, allows the updated servers apply the changes to the only new revised quest. @@ -10,5 +10,6 @@ QuestKeysUpdate = { {old = 10004, new = 80004}, -- Example {old = 10005, new = 80005}, -- Example }, - ]] +]] + -- } diff --git a/data/libs/core/global_storage.lua b/data/libs/core/global_storage.lua index cfca535dc..9c69322c6 100644 --- a/data/libs/core/global_storage.lua +++ b/data/libs/core/global_storage.lua @@ -26,5 +26,90 @@ Global = { FamiliarSummonEvent10 = 30054, FamiliarSummonEvent60 = 30055, CobraFlask = 30056, + + -- Reserved storage from 64000 - 64099 + TibiaDrome = { + -- General Upgrades + BestiaryBetterment = { + TimeLeft = 64000, + LastActivatedAt = 64001, + }, + CharmUpgrade = { + TimeLeft = 64002, + LastActivatedAt = 64003, + }, + KooldownAid = { + LastActivatedAt = 64005, + }, + StaminaExtension = { + LastActivatedAt = 64007, + }, + StrikeEnhancement = { + TimeLeft = 64008, + LastActivatedAt = 64009, + }, + WealthDuplex = { + TimeLeft = 64010, + LastActivatedAt = 64011, + }, + -- Resilience + FireResilience = { + TimeLeft = 64012, + LastActivatedAt = 64013, + }, + IceResilience = { + TimeLeft = 64014, + LastActivatedAt = 64015, + }, + EarthResilience = { + TimeLeft = 64016, + LastActivatedAt = 64017, + }, + EnergyResilience = { + TimeLeft = 64018, + LastActivatedAt = 64019, + }, + HolyResilience = { + TimeLeft = 64020, + LastActivatedAt = 64021, + }, + DeathResilience = { + TimeLeft = 64022, + LastActivatedAt = 64023, + }, + PhysicalResilience = { + TimeLeft = 64024, + LastActivatedAt = 64025, + }, + -- Amplifications + FireAmplification = { + TimeLeft = 64026, + LastActivatedAt = 64027, + }, + IceAmplification = { + TimeLeft = 64028, + LastActivatedAt = 64029, + }, + EarthAmplification = { + TimeLeft = 64030, + LastActivatedAt = 64031, + }, + EnergyAmplification = { + TimeLeft = 64032, + LastActivatedAt = 64033, + }, + HolyAmplification = { + TimeLeft = 64034, + LastActivatedAt = 64035, + }, + DeathAmplification = { + TimeLeft = 64036, + LastActivatedAt = 64037, + }, + PhysicalAmplification = { + TimeLeft = 64038, + LastActivatedAt = 64039, + }, + }, }, } diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 3a5e4eeab..383633196 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -905,7 +905,7 @@ end function Player:canGetReward(rewardId, questName) if self:questKV(questName):get("completed") then - self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.") + self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is empty.") return false end diff --git a/data/libs/systems/hireling.lua b/data/libs/systems/hireling.lua index 30134cd7c..75005a1ad 100644 --- a/data/libs/systems/hireling.lua +++ b/data/libs/systems/hireling.lua @@ -312,7 +312,7 @@ function Hireling:save() sql = sql .. " WHERE `id`=" .. tostring(self.id) - db.query(sql) + return db.query(sql) end function Hireling:spawn() @@ -390,7 +390,7 @@ function SaveHirelings() local failedCount = 0 for _, hireling in ipairs(HIRELINGS) do - local success = hireling:save() + local success = hireling:save() or false if not success then failedCount = failedCount + 1 diff --git a/data/npclib/npc_system/npc_handler.lua b/data/npclib/npc_system/npc_handler.lua index 31aaa88fa..7de4172fa 100644 --- a/data/npclib/npc_system/npc_handler.lua +++ b/data/npclib/npc_system/npc_handler.lua @@ -595,6 +595,7 @@ if NpcHandler == nil then events = nil end + -- From now on, when you have several messages and inside brackets, use the tag |PLAYERNAME| recognition will be possible. function NpcHandler:doNPCTalkALot(msgs, delay, npc, player) local playerId = player:getId() if self:getEventDelayedSay(playerId) then @@ -613,13 +614,18 @@ if NpcHandler == nil then self.eventDelayedSay[playerId] = {} local ret = {} + local parseInfo = { + [TAG_PLAYERNAME] = player:getName(), + } + for messagesTable, messageString in pairs(msgs) do self.eventDelayedSay[playerId][messagesTable] = {} if delay ~= nil and delay > 1 then self.talkDelay = delay end -- The "self.talkDelayTimeForOutgoingMessages * 1000" = Interval for sending subsequent messages from the first - npc:sayWithDelay(npcUniqueId, msgs[messagesTable], TALKTYPE_PRIVATE_NP, ((messagesTable - 1) * self.talkDelay + self.talkDelayTimeForOutgoingMessages * 1000), self.eventDelayedSay[playerId][messagesTable], playerUniqueId) + local parsedMessage = self:parseMessage(msgs[messagesTable], parseInfo, player, messageString) + npc:sayWithDelay(npcUniqueId, parsedMessage, TALKTYPE_PRIVATE_NP, ((messagesTable - 1) * self.talkDelay + self.talkDelayTimeForOutgoingMessages * 1000), self.eventDelayedSay[playerId][messagesTable], playerUniqueId) ret[#ret + 1] = self.eventDelayedSay[playerId][messagesTable] end return ret diff --git a/data/scripts/creaturescripts/player/login.lua b/data/scripts/creaturescripts/player/login.lua index 416760669..5f9f0e695 100644 --- a/data/scripts/creaturescripts/player/login.lua +++ b/data/scripts/creaturescripts/player/login.lua @@ -169,6 +169,14 @@ function playerLoginGlobal.onLogin(player) onMovementRemoveProtection(playerId, player:getPosition(), 10) end + -- Change support outfit to a normal outfit to open customize character without crashes + local playerOutfit = player:getOutfit() + if table.contains({ 75, 266, 302 }, playerOutfit.lookType) then + playerOutfit.lookType = 136 + playerOutfit.lookAddons = 0 + player:setOutfit(playerOutfit) + end + player:initializeLoyaltySystem() player:registerEvent("PlayerDeath") player:registerEvent("DropLoot") diff --git a/data/scripts/globalevents/server_initialization.lua b/data/scripts/globalevents/server_initialization.lua index 97478582f..df29660d3 100644 --- a/data/scripts/globalevents/server_initialization.lua +++ b/data/scripts/globalevents/server_initialization.lua @@ -39,7 +39,7 @@ local function processHouseAuctions() local lastBid = Result.getNumber(resultId, "last_bid") if balance >= lastBid then db.query("UPDATE `players` SET `balance` = " .. (balance - lastBid) .. " WHERE `id` = " .. highestBidder) - house:setOwnerGuid(highestBidder) + house:setHouseOwner(highestBidder) end db.asyncQuery("UPDATE `houses` SET `last_bid` = 0, `bid_end` = 0, `highest_bidder` = 0, `bid` = 0 " .. "WHERE `id` = " .. house:getId()) diff --git a/data/scripts/lib/register_actions.lua b/data/scripts/lib/register_actions.lua index 25d23f192..cd65ea74e 100644 --- a/data/scripts/lib/register_actions.lua +++ b/data/scripts/lib/register_actions.lua @@ -307,32 +307,6 @@ local cutItems = { [25800] = 0, } --- Ferumbras ascendant ring reward -local function addFerumbrasAscendantReward(player, target, toPosition) - local stonePos = Position(32648, 32134, 10) - if toPosition == stonePos then - local tile = Tile(stonePos) - local stone = tile:getItemById(1772) - if stone then - stone:remove(1) - toPosition:sendMagicEffect(CONST_ME_POFF) - addEvent(function() - Game.createItem(1772, 1, stonePos) - end, 20000) - return true - end - end - - if target.itemid == 22872 and target.actionid == 53803 then - if player:getStorageValue(Storage.FerumbrasAscension.Ring) >= 1 then - return false - end - - player:addItem(22170, 1) - player:setStorageValue(Storage.FerumbrasAscension.Ring, 1) - end -end - function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey) if not target or target == nil or type(target) ~= "userdata" or not target:isItem() then return false @@ -356,16 +330,6 @@ function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey) local watt = ItemType(item.itemid):getAttack() if math.random(1, 80) <= (watt and watt > 10 and watt or 10) then - -- Against The Spider Cult (Spider Eggs) - if target.itemid == 233 then - local eggStorage = player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) - if eggStorage >= 1 and eggStorage < 5 then - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) - end - - Game.createMonster("Giant Spider", Position(33181, 31869, 12)) - end - -- Move items outside the container if target:isContainer() then for i = target:getSize() - 1, 0, -1 do @@ -390,11 +354,6 @@ function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey) if itemDestroy ~= nil then itemDestroy:decay() end - - -- Energy barrier na threatned dreams quest (feyrist) - if target.itemid == 25798 or target.itemid == 25800 then - addEvent(Game.createItem, math.random(13000, 17000), target.itemid, 1, toPosition) - end end toPosition:sendMagicEffect(CONST_ME_POFF) @@ -406,15 +365,7 @@ function onUseRope(player, item, fromPosition, target, toPosition, isHotkey) return false end - local tile = Tile(toPosition) - if tile and tile:isRopeSpot() then - player:teleportTo(toPosition:moveUpstairs()) - if target.itemid == 7762 then - if player:getStorageValue(Storage.RookgaardTutorialIsland.TutorialHintsStorage) < 22 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully used your rope to climb out of the hole. Congratulations! Now continue to the east.") - end - end - elseif table.contains(holeId, target.itemid) then + if table.contains(holeId, target.itemid) then toPosition.z = toPosition.z + 1 tile = Tile(toPosition) if tile then @@ -434,34 +385,6 @@ function onUseRope(player, item, fromPosition, target, toPosition, isHotkey) end function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) - addFerumbrasAscendantReward(player, target, toPosition) - --Dawnport quest (Morris amulet task) - local sandPosition = Position(32099, 31933, 7) - if toPosition == sandPosition then - local sandTile = Tile(sandPosition) - local amuletId = sandTile:getItemById(19401) - if amuletId then - if player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheLostAmulet) == 1 then - local rand = math.random(100) - if rand <= 10 then - player:addItem(21379, 1) - player:setStorageValue(Storage.Quest.U10_55.Dawnport.TheLostAmulet, 2) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found an ancient amulet. Strange engravings cover it. Maybe Morris can make them out.") - elseif rand <= 80 then - player:addItem(21395, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dig up sand and sea shells.") - elseif rand > 95 then - player:addItem(3976, math.random(1, 10)) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dig up some worms. But you are confident that you'll find the amulet here, somewhere.") - end - toPosition:sendMagicEffect(CONST_ME_POFF) - else - return false - end - end - return true - end - if table.contains(holes, target.itemid) then target:transform(target.itemid + 1) target:decay() @@ -472,8 +395,6 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) end player:teleportTo(toPosition, false) player:addAchievementProgress("The Undertaker", 500) - elseif target.itemid == 1822 and target:getPosition() == Position(33222, 31100, 7) then - player:teleportTo(Position(33223, 31100, 8)) elseif table.contains({ 231, 231 }, target.itemid) then local rand = math.random(100) if target.actionid == 100 and rand <= 20 then @@ -486,82 +407,6 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) Game.createMonster("Scarab", toPosition) end toPosition:sendMagicEffect(CONST_ME_POFF) - -- Rookgaard tutorial island - elseif target.itemid == 351 and target.actionid == 8024 then - player:addItem(11341, 1) - player:say("You dig out a handful of earth from this sacred place.", TALKTYPE_MONSTER_SAY) - elseif target.itemid == 7749 and player:getStorageValue(Storage.RookgaardTutorialIsland.TutorialHintsStorage) < 20 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dug a hole! Walk onto it as long as it is open to jump down into the forest cave.") - player:setStorageValue(Storage.RookgaardTutorialIsland.TutorialHintsStorage, 19) - Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALARROW) - Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALSQUARE) - target:transform(594) - addEvent(revertItem, 30 * 1000, toPosition, 594, 7749) - elseif target.actionid == 4654 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) < 1 then - -- Gravedigger Quest - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a piece of the scroll. You pocket it quickly.") - player:getPosition():sendMagicEffect(CONST_ME_POFF) - player:addItem(18933, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission50, 1) - elseif target.actionid == 4668 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) < 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A torn scroll piece emerges. Probably gnawed off by rats.") - player:getPosition():sendMagicEffect(CONST_ME_POFF) - player:addItem(18933, 1) - player:setStorageValue(Storage.GravediggerOfDrefia.Mission70, 1) - elseif target.actionid == 50118 then - local wagonItem = Tile(Position(32717, 31492, 11)):getItemById(7131) - if wagonItem then - if Tile(Position(32717, 31492, 11)):getItemById(7921) then - return true - end - Game.createItem(7921, 1, wagonItem:getPosition()):setActionId(40023) - toPosition:sendMagicEffect(CONST_ME_POFF) - end - elseif target.itemid == 7921 then - local coalItem = Tile(Position(32699, 31492, 11)):getItemById(7921) - if coalItem then - coalItem:remove(1) - toPosition:sendMagicEffect(CONST_ME_POFF) - Tile(Position(32699, 31492, 11)):getItemById(7131):setActionId(40023) - local crucibleItem = Tile(Position(32699, 31494, 11)):getItemById(7814) - if crucibleItem then - crucibleItem:setActionId(50119) - end - end - elseif table.contains({ 8716, 17950, 15047, 16306, 16300 }, target.itemid) then - if player:getStorageValue(Storage.SwampDiggingTimeout) >= os.time() then - toPosition:sendMagicEffect(CONST_ME_POFF) - return false - end - - local config = { - { from = 1, to = 39, itemId = 3998 }, - { from = 40, to = 79, itemId = 3028 }, - { from = 80, to = 100, itemId = 17858 }, - } - - local chance = math.random(100) - for i = 1, #config do - local randItem = config[i] - if chance >= randItem.from and chance <= randItem.to then - player:addItem(randItem.itemId, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dug up a " .. ItemType(randItem.itemId):getName() .. ".") - player:setStorageValue(Storage.SwampDiggingTimeout, os.time() + 604800) - toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - break - end - end - elseif target.itemid == 103 and target.actionid == 4205 then - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then - return false - end - - local remains = Game.createItem(3133, 1, toPosition) - if remains then - remains:setActionId(4206) - end - toPosition:sendMagicEffect(CONST_ME_HITAREA) - addEvent(removeRemains, 60000, toPosition) elseif target.itemid == 5730 then if not player:removeItem(5090, 1) then return false @@ -577,39 +422,6 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) end function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) - local stonePos = Position(32648, 32134, 10) - if toPosition == stonePos then - local tile = Tile(stonePos) - local stone = tile:getItemById(1772) - if stone then - stone:remove(1) - toPosition:sendMagicEffect(CONST_ME_POFF) - addEvent(function() - Game.createItem(1772, 1, stonePos) - end, 20000) - return true - end - end - - -- The Rookie Guard Quest - Mission 09: Rock 'n Troll - -- Path: data\scripts\actions\quests\the_rookie_guard\mission09_rock_troll.lua - -- Damage tunnel pillars - if player:getStorageValue(Storage.TheRookieGuard.Mission09) ~= -1 and target.itemid == 1600 then - return onUsePickAtTunnelPillar(player, item, fromPosition, target, toPosition) - end - - --Dawnport some cracks down - local crackPosition = Position(32099, 31930, 7) - if toPosition == crackPosition then - local tile = Tile(crackPosition) - local crack = tile:getItemById(6298) - if crack then - player:teleportTo({ x = 32099, y = 31930, z = 8 }) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true - end - end - if table.contains({ 354, 355 }, target.itemid) and target.actionid == 101 then target:transform(394) target:decay() @@ -656,213 +468,9 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) target:transform(868) target:decay() toPosition:sendMagicEffect(CONST_ME_HITAREA) - elseif target.itemid == 7806 then - -- Sea of light quest - if player:getStorageValue(Storage.SeaOfLight.Questline) ~= 4 then - return false - end - - if toPosition == Position(33031, 31758, 8) then - if math.random(100) <= 30 then - if player:getStorageValue(Storage.SeaOfLight.Questline) == 4 then - player:addItem(9697, 1) - player:setStorageValue(Storage.SeaOfLight.Questline, player:getStorageValue(Storage.SeaOfLight.Questline) + 1) - player:say("*crush*", TALKTYPE_MONSTER_SAY) - end - else - player:getPosition():sendMagicEffect(CONST_ME_POFF) - end - end - elseif target.itemid == 22075 then - -- Grimvale quest - if player:getStorageValue(Storage.Grimvale.SilverVein) < os.time() then - local chance = math.random(1, 10) - if chance >= 5 then - player:sendTextMessage( - MESSAGE_EVENT_ADVANCE, - "Even after a thorough and frustrating \z - search you could not find enough liquified silver in this vein to fill a flask." - ) - elseif chance <= 4 then - player:sendTextMessage( - MESSAGE_EVENT_ADVANCE, - "Carefully you gather some of the liquified \z - silver from this vein in a small flask. You now feel strangely affected to the moon." - ) - player:addItem(22058) - target:transform(4464) - addEvent(revertItem, 10 * 60 * 1000, toPosition, 4464, 22075) - end - player:setStorageValue(Storage.Grimvale.SilverVein, os.time() + 2 * 60) - else - player:sendTextMessage( - MESSAGE_EVENT_ADVANCE, - "You are still exhausted from earlier attempts. \z - Getting liquid silver out of the mountain needs concentration and a steady hand." - ) - end - elseif target.itemid == 7185 then - --The Ice Islands Quest, Nibelor 1: Breaking the Ice - local missionProgress = player:getStorageValue(Storage.TheIceIslands.Mission02) - local pickAmount = player:getStorageValue(Storage.TheIceIslands.PickAmount) - if missionProgress < 1 or pickAmount >= 3 or player:getStorageValue(Storage.TheIceIslands.Questline) ~= 3 then - return false - end - - player:setStorageValue(Storage.TheIceIslands.PickAmount, math.max(0, pickAmount) + 1) - -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice - player:setStorageValue(Storage.TheIceIslands.Mission02, missionProgress + 1) - - if pickAmount >= 2 then - player:setStorageValue(Storage.TheIceIslands.Questline, 4) - -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice - player:setStorageValue(Storage.TheIceIslands.Mission02, 4) - end - - local crackItem = Tile(toPosition):getItemById(7185) - if crackItem then - crackItem:transform(7186) - toPosition:sendMagicEffect(CONST_ME_POFF) - addEvent(revertItem, 60 * 1000, toPosition, 7186, 7185) - end - local chakoyas = { "chakoya toolshaper", "chakoya tribewarden", "chakoya windcaller" } - if toPosition == Position(32399, 31051, 7) then - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32397, 31048, 7)) - Position(32397, 31048, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32399, 31048, 7)) - Position(32399, 31048, 7):sendMagicEffect(CONST_ME_TELEPORT) - elseif toPosition == Position(32394, 31062, 7) then - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32388, 31059, 7)) - Position(32388, 31059, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32390, 31062, 7)) - Position(32390, 31062, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32389, 31062, 7)) - Position(32389, 31062, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32387, 31064, 7)) - Position(32387, 31064, 7):sendMagicEffect(CONST_ME_TELEPORT) - elseif toPosition == Position(32393, 31072, 7) then - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32391, 31071, 7)) - Position(32391, 31071, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32390, 31069, 7)) - Position(32390, 31069, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32389, 31069, 7)) - Position(32389, 31069, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32388, 31074, 7)) - Position(32388, 31074, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32386, 31073, 7)) - Position(32386, 31073, 7):sendMagicEffect(CONST_ME_TELEPORT) - Game.createMonster(chakoyas[math.random(#chakoyas)], Position(32387, 31072, 7)) - Position(32387, 31072, 7):sendMagicEffect(CONST_ME_TELEPORT) - end - elseif target.itemid == 1791 then - -- The Pits of Inferno Quest - if toPosition == Position(32808, 32334, 11) then - for i = 1, #lava do - Game.createItem(5815, 1, lava[i]) - end - target:transform(3141) - toPosition:sendMagicEffect(CONST_ME_SMOKE) - elseif target.actionid == 50058 then - -- naginata quest - local stoneStorage = Game.getStorageValue(GlobalStorage.NaginataStone) - if stoneStorage ~= 5 then - Game.setStorageValue(GlobalStorage.NaginataStone, math.max(0, stoneStorage) + 1) - elseif stoneStorage == 5 then - target:remove(1) - Game.setStorageValue(GlobalStorage.NaginataStone) - end - toPosition:sendMagicEffect(CONST_ME_POFF) - doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -31, -39, CONST_ME_NONE) - end - elseif target.itemid == 355 and target.actionid == 101 then - -- The Banshee Quest - target:transform(394) - target:decay() - toPosition:sendMagicEffect(CONST_ME_POFF) - elseif target.actionid == 50090 then - -- The Hidden City of Beregar Quest - if player:getStorageValue(Storage.hiddenCityOfBeregar.WayToBeregar) == 1 then - player:teleportTo(Position(32566, 31338, 10)) - end - elseif target.actionid == 40028 then - if Tile(Position(32617, 31513, 9)):getItemById(1272) and Tile(Position(32617, 31514, 9)):getItemById(1624) then - local rubbleItem = Tile(Position(32619, 31514, 9)):getItemById(5709) - if rubbleItem then - rubbleItem:remove(1) - end - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can't remove this pile since it's currently holding up the tunnel.") - end - elseif target.actionid == 50127 then - -- Pythius The Rotten (Firewalker Boots) - if player:getStorageValue(Storage.QuestChests.FirewalkerBoots) == 1 then - return false - end - target:remove(1) - - local stoneItem = Tile(toPosition):getItemById(1791) - if stoneItem then - stoneItem:remove(1) - end - - iterateArea(function(position) - local groundItem = Tile(position):getGround() - if groundItem and groundItem.itemid == 21477 then - groundItem:transform(5815) - end - end, Position(32550, 31373, 15), Position(32551, 31379, 15)) - - iterateArea(function(position) - position:sendMagicEffect(CONST_ME_POFF) - end, Position(32551, 31374, 15), Position(32551, 31379, 15)) - - local portal = Game.createItem(1949, 1, Position(32551, 31376, 15)) - if portal then - portal:setActionId(50126) - end - elseif target.actionid == 50091 then - -- The Asure - player:teleportTo(Position(32960, 32676, 4)) - elseif target.itemid == 11340 then - -- Wrath of the emperor quest - player:addItem(11339, 1) - player:say("The cracked part of the table lets you cut out a large chunk of wood with your pick.", TALKTYPE_MONSTER_SAY) - elseif target.itemid == 372 then - target:transform(394) - target:decay() - elseif target.itemid == 2071 then - -- Jack to the Future Quest - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) ~= 1 then - return false - end - - if toPosition == Position(33277, 31754, 7) then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) == 1 then - target:transform(2066) - toPosition:sendMagicEffect(CONST_ME_POFF) - player:addItem(10426, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 2) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) + 1) - addEvent(revertItem, 2 * 60 * 1000, { x = 33277, y = 31754, z = 7 }, 2066, 2071) - end - end else return false end - if (target ~= nil) and target:isItem() and (target:getId() == 20135) then - --Lower Roshamuul - if math.random(100) > 50 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone produces some fine gravel.") - target:transform(20133) - target:decay() - else - Game.createMonster("Frazzlemaw", toPosition) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone yields nothing but slightly finer, yet still unusable rubber.") - target:transform(20134) - target:decay() - end - return true - end return true end @@ -890,142 +498,14 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) if not table.contains({ 3304, 9598 }, item.itemid) then return false end - - if target.uid == 3071 then - -- In service of yalahar quest - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe01) < 1 then - doSetMonsterOutfit(player, "skeleton", 3 * 1000) - fromPosition:sendMagicEffect(CONST_ME_ENERGYHIT) - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe01, 1) - -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) - local position = player:getPosition() - for x = -1, 1 do - for y = -1, 1 do - position = position + Position(x, y, 0) - position:sendMagicEffect(CONST_ME_YELLOWENERGY) - end - end - end - elseif target.uid == 3072 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe02) < 1 then - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe02, 1) - -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) - local position = player:getPosition() - for x = -1, 1 do - for y = -1, 1 do - if math.random(2) == 2 then - position = position + Position(x, y, 0) - Game.createMonster("rat", position) - position:sendMagicEffect(CONST_ME_TELEPORT) - end - end - end - end - elseif target.uid == 3073 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe03) < 1 then - player:say("You have used the crowbar on a grate.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe03, 1) - -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) - end - elseif target.uid == 3074 then - if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe04) < 1 then - doSetMonsterOutfit(player, "bog raider", 5 * 1000) - player:say("You have used the crowbar on a knot.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.InServiceofYalahar.SewerPipe04, 1) - -- StorageValue for Questlog "Mission 01: Something Rotten" - player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) - end - elseif target.actionid == 100 then - if target.itemid == 3501 then - -- Postman quest - if player:getStorageValue(Storage.Postman.Mission02) == 1 then - player:setStorageValue(Storage.Postman.Mission02, 2) - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - end - elseif target.itemid == 4848 then - -- The ape city - mission 7 - local apeCityStorage = player:getStorageValue(Storage.TheApeCity.Casks) - if apeCityStorage < 3 then - player:setStorageValue(Storage.TheApeCity.Casks, math.max(0, apeCityStorage) + 1) - target:transform(3134) - toPosition:sendMagicEffect(CONST_ME_EXPLOSIONAREA) - addEvent(revertCask, 3 * 60 * 1000, toPosition) - end - end - elseif target.actionid == 12566 and player:getStorageValue(Storage.SecretService.TBIMission06) == 1 then - -- Secret service quest - local yellPosition = Position(32204, 31157, 8) - -- Amazon lookType - if player:getOutfit().lookType == 137 then - player:setStorageValue(Storage.SecretService.TBIMission06, 2) - Game.createMonster("barbarian skullhunter", yellPosition) - player:say("Nooooo! What have you done??", TALKTYPE_MONSTER_SAY, false, 0, yellPosition) - yellPosition.y = yellPosition.y - 1 - Game.createMonster("barbarian skullhunter", yellPosition) - end - else - return false - end return true end function onUseSpoon(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 390 then - --The ice islands quest - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.SulphurLava) < 1 then - -- Fine sulphur - player:addItem(7247, 1) - player:setStorageValue(Storage.TheIceIslands.SulphurLava, 1) - toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) - player:say("You retrive a fine sulphur from a lava hole.", TALKTYPE_MONSTER_SAY) - end - end - elseif target.itemid == 3920 then - --The ice islands quest - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.SporesMushroom) < 1 then - player:addItem(7251, 1) - player:setStorageValue(Storage.TheIceIslands.SporesMushroom, 1) - toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) - player:say("You retrive spores from a mushroom.", TALKTYPE_MONSTER_SAY) - end - end - elseif target.itemid == 7743 or target.itemid == 390 then - -- What a foolish quest - mission 8 (sulphur) - if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) ~= 21 or player:getStorageValue(Storage.WhatAFoolishQuest.InflammableSulphur) == 1 then - return false - end - - player:setStorageValue(Storage.WhatAFoolishQuest.InflammableSulphur, 1) - -- Easily inflammable sulphur - player:addItem(124, 1) - toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) - else - return false - end return true end function onUseSpikedSquelcher(player, item, fromPosition, target, toPosition, isHotkey) - if target.itemid == 19068 and toPosition == Position(33276, 31797, 6) then -- mysterious ornate chest at Telas' house - item:remove(1) - - local rand = math.random(100) - if rand <= 10 then - toPosition:sendMagicEffect(CONST_ME_BLUE_FIREWORKS) - player:say("Success! Within the chest, you discover the fabled golem grench.", TALKTYPE_MONSTER_SAY) - player:addItem(16251, 1) - else - toPosition:sendMagicEffect(CONST_ME_WHITE_SMOKES) - player:say("The spiked squelcher vanishes into the chest's abyss.", TALKTYPE_MONSTER_SAY) - end - else - return false - end return true end @@ -1046,9 +526,6 @@ function onUseScythe(player, item, fromPosition, target, toPosition, isHotkey) target:transform(30624) target:decay() Game.createItem(30975, 1, toPosition) - -- The secret library - elseif toPosition == Position(32177, 31925, 7) then - player:teleportTo({ x = 32515, y = 32535, z = 12 }) else return false end @@ -1060,68 +537,7 @@ function onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHot return false end - -- The ice islands quest - if target.itemid == 7261 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.FrostbiteHerb) < 1 then - player:addItem(7248, 1) - player:setStorageValue(Storage.TheIceIslands.FrostbiteHerb, 1) - toPosition:sendMagicEffect(CONST_ME_HITBYPOISON) - player:say("You cut a leaf from a frostbite herb.", TALKTYPE_MONSTER_SAY) - end - end - elseif target.itemid == 3647 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.FlowerCactus) < 1 then - player:addItem(7245, 1) - player:setStorageValue(Storage.TheIceIslands.FlowerCactus, 1) - target:transform(3637) - addEvent(revertItem, 60 * 1000, toPosition, 3637, 3647) - toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) - player:say("You cut a flower from a cactus.", TALKTYPE_MONSTER_SAY) - end - end - elseif target.itemid == 3753 then - if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then - if player:getStorageValue(Storage.TheIceIslands.FlowerBush) < 1 then - player:addItem(7249, 1) - player:setStorageValue(Storage.TheIceIslands.FlowerBush, 1) - target:transform(3750) - addEvent(revertItem, 60 * 1000, toPosition, 3750, 3753) - toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) - player:say("You cut a flower from a bush.", TALKTYPE_MONSTER_SAY) - end - end - -- What a foolish Quest (Mission 1) - elseif target.actionid == 4200 then - if toPosition.x == 32349 and toPosition.y == 32361 and toPosition.z == 7 then - player:addItem(102, 1) - player:say("The stubborn flower has ruined your knife but at least you got it.", TALKTYPE_MONSTER_SAY, false, player, toPosition) - item:remove(1) - else - player:say("This flower is too pathetic.", TALKTYPE_MONSTER_SAY, false, player, toPosition) - end - -- What a foolish quest (mission 5) - elseif target.itemid == 114 then - if player:getStorageValue(Storage.WhatAFoolishQuest.EmperorBeardShave) == 1 then - player:say("God shave the emperor. Some fool already did it.", TALKTYPE_MONSTER_SAY) - return true - end - - player:setStorageValue(Storage.WhatAFoolishQuest.EmperorBeardShave, 1) - player:say("This is probably the most foolish thing you've ever done!", TALKTYPE_MONSTER_SAY) - player:addItem(113, 1) - Game.createMonster("dwarf guard", Position(32656, 31853, 13)) - -- What a foolish quest (mission 8) - elseif target.itemid == 3744 then - if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) ~= 22 or player:getStorageValue(Storage.WhatAFoolishQuest.SpecialLeaves) == 1 then - return false - end - - player:setStorageValue(Storage.WhatAFoolishQuest.SpecialLeaves, 1) - player:addItem(3129, 1) - toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) - elseif table.contains(fruits, target.itemid) and player:removeItem(6277, 1) then + if table.contains(fruits, target.itemid) and player:removeItem(6277, 1) then target:remove(1) player:addItem(6278, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) diff --git a/data/scripts/systems/concoctions.lua b/data/scripts/systems/concoctions.lua new file mode 100644 index 000000000..6449df997 --- /dev/null +++ b/data/scripts/systems/concoctions.lua @@ -0,0 +1,56 @@ +local configs = { + -- Override examples + --- durationOverride = 30, + --- cooldownOverride = 60, + --- tickTypeOverride = ConcoctionTickType.Experience, + + [Concoction.Ids.StaminaExtension] = { + amount = 60, -- minutes + callback = function(player, config) + player:setStamina(player:getStamina() + config.amount) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been granted " .. config.amount .. " minutes of stamina.") + end, + }, + [Concoction.Ids.KooldownAid] = { + callback = function(player) + player:clearSpellCooldowns() + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your spells are no longer on cooldown.") + end, + }, + [Concoction.Ids.StrikeEnhancement] = { condition = { CONDITION_PARAM_SKILL_CRITICAL_HIT_CHANCE, 500 } }, + [Concoction.Ids.CharmUpgrade] = { condition = { CONDITION_PARAM_CHARM_CHANCE_MODIFIER, 5 } }, + [Concoction.Ids.WealthDuplex] = { rate = 100 }, + [Concoction.Ids.BestiaryBetterment] = { multiplier = 2.0 }, + [Concoction.Ids.FireResilience] = { condition = { CONDITION_PARAM_ABSORB_FIREPERCENT, 8 } }, + [Concoction.Ids.IceResilience] = { condition = { CONDITION_PARAM_ABSORB_ICEPERCENT, 8 } }, + [Concoction.Ids.EarthResilience] = { condition = { CONDITION_PARAM_ABSORB_EARTHPERCENT, 8 } }, + [Concoction.Ids.EnergyResilience] = { condition = { CONDITION_PARAM_ABSORB_ENERGYPERCENT, 8 } }, + [Concoction.Ids.HolyResilience] = { condition = { CONDITION_PARAM_ABSORB_HOLYPERCENT, 8 } }, + [Concoction.Ids.DeathResilience] = { condition = { CONDITION_PARAM_ABSORB_DEATHPERCENT, 8 } }, + [Concoction.Ids.PhysicalResilience] = { condition = { CONDITION_PARAM_ABSORB_PHYSICALPERCENT, 8 } }, + [Concoction.Ids.FireAmplification] = { condition = { CONDITION_PARAM_INCREASE_FIREPERCENT, 8 } }, + [Concoction.Ids.IceAmplification] = { condition = { CONDITION_PARAM_INCREASE_ICEPERCENT, 8 } }, + [Concoction.Ids.EarthAmplification] = { condition = { CONDITION_PARAM_INCREASE_EARTHPERCENT, 8 } }, + [Concoction.Ids.EnergyAmplification] = { condition = { CONDITION_PARAM_INCREASE_ENERGYPERCENT, 8 } }, + [Concoction.Ids.HolyAmplification] = { condition = { CONDITION_PARAM_INCREASE_HOLYPERCENT, 8 } }, + [Concoction.Ids.DeathAmplification] = { condition = { CONDITION_PARAM_INCREASE_DEATHPERCENT, 8 } }, + [Concoction.Ids.PhysicalAmplification] = { condition = { CONDITION_PARAM_INCREASE_PHYSICALPERCENT, 8 } }, +} + +for concoctionKey, concoctionId in pairs(Concoction.Ids) do + Concoction.new({ + id = concoctionId, + timeLeftStorage = Global.Storage.TibiaDrome[concoctionKey].TimeLeft, + lastActivatedAtStorage = Global.Storage.TibiaDrome[concoctionKey].LastActivatedAt, + config = configs[concoctionId] or {}, + }):register() +end + +local concoctionsOnLogin = CreatureEvent("ConcoctionsOnLogin") + +function concoctionsOnLogin.onLogin(player) + Concoction.initAll(player, true) + return true +end + +concoctionsOnLogin:register() diff --git a/data/scripts/talkactions/gm/looktype.lua b/data/scripts/talkactions/gm/looktype.lua index 28662a54f..30a9957ee 100644 --- a/data/scripts/talkactions/gm/looktype.lua +++ b/data/scripts/talkactions/gm/looktype.lua @@ -373,15 +373,22 @@ function looktype.onSay(player, words, param) return true end - local lookType = tonumber(param) - if lookType >= 0 and lookType < 1469 and not table.contains(invalidTypes, lookType) then - local playerOutfit = player:getOutfit() - playerOutfit.lookType = lookType - player:setOutfit(playerOutfit) + -- Test if supplied parameter is actually a numerical value to ensure there is no nil value passed. + if param:match("%d") then + local lookType = tonumber(param) + if lookType >= 0 and lookType < 1469 and not table.contains(invalidTypes, lookType) then + local playerOutfit = player:getOutfit() + playerOutfit.lookType = lookType + player:setOutfit(playerOutfit) + else + player:sendCancelMessage("A look type with that id does not exist.") + end + return true else - player:sendCancelMessage("A look type with that id does not exist.") + -- return message if supplied param is not numerical. + player:sendCancelMessage("Looktype must be a numerical value.") + return true end - return true end looktype:separator(" ") diff --git a/data/scripts/talkactions/god/inbox_command.lua b/data/scripts/talkactions/god/inbox_command.lua index a080a2370..e4de2af4a 100644 --- a/data/scripts/talkactions/god/inbox_command.lua +++ b/data/scripts/talkactions/god/inbox_command.lua @@ -32,5 +32,6 @@ function inboxCommand.onSay(player, words, param) end inboxCommand:separator(" ") +inboxCommand:setDescription("[Usage]: /inbox {PlayerName},{add|remove},{itemId}") inboxCommand:groupType("god") inboxCommand:register() diff --git a/data/scripts/talkactions/god/manage_kv.lua b/data/scripts/talkactions/god/manage_kv.lua index d4c7f104c..4d11a32d9 100644 --- a/data/scripts/talkactions/god/manage_kv.lua +++ b/data/scripts/talkactions/god/manage_kv.lua @@ -16,7 +16,7 @@ get:register() local set = TalkAction("/setkv") function set.onSay(player, words, param) - local key, value = string.splitFirst(param, " ") + local key, value = string.splitFirst(param, ",") -- With a space some KV's are not able to be edited due to spaces within the key names, changed to a comma (,) to overcome this issue value = load("return " .. value)() kv.set(key, value) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "kv[" .. key .. "] = " .. PrettyString(value)) diff --git a/data/scripts/talkactions/player/commands.lua b/data/scripts/talkactions/player/commands.lua index 8d374f477..2ad2ec23b 100644 --- a/data/scripts/talkactions/player/commands.lua +++ b/data/scripts/talkactions/player/commands.lua @@ -4,12 +4,20 @@ function commands.onSay(player, words, param) local allTalkActions = Game.getTalkActions() local playerGroupId = player:getGroup():getId() - local text = "Available commands:\n" + local text = "Available commands:\n\n" for _, talkaction in pairs(allTalkActions) do if talkaction:getGroupType() ~= 0 then if talkaction:getGroupType() <= playerGroupId then - text = text .. talkaction:getName() .. "\n" + text = text .. talkaction:getName() + + description = talkaction:getDescription() + + if description ~= "" then + text = text .. " " .. talkaction:getDescription() + end + + text = text .. "\n\n" end end end @@ -19,5 +27,6 @@ function commands.onSay(player, words, param) return true end +commands:setDescription("[Usage]: !commands to see each command with its description") commands:groupType("normal") commands:register() diff --git a/src/canary_server.cpp b/src/canary_server.cpp index 28a2053b4..ef1be1b1f 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -212,9 +212,9 @@ void CanaryServer::logInfos() { #endif logger.info("A server developed by: {}", ProtocolStatus::SERVER_DEVELOPERS); - logger.info("Visit our website for updates, support, and resources:\n" - "https://docs.opentibiabr.com/home/welcome/ \n" - "https://github.com/mattyx14/otxserver/\n"); + logger.info("Visit our website for updates, support, and resources: \n" + "https://docs.opentibiabr.com/home/welcome/ \n" + "https://github.com/mattyx14/otxserver/\n"); } /** diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index 0e53c9754..bf4805050 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -14,7 +14,6 @@ enum ConfigKey_t : uint16_t { ACTIONS_DELAY_INTERVAL, ADVENTURERSBLESSING_LEVEL, AIMBOT_HOTKEY_ENABLED, - ALLOW_BLOCK_SPAWN, ALLOW_CHANGEOUTFIT, ALLOW_RELOAD, AUGMENT_INCREASED_DAMAGE_PERCENT, @@ -63,11 +62,11 @@ enum ConfigKey_t : uint16_t { DISCORD_WEBHOOK_URL, EMOTE_SPELLS, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, + ENABLE_SUPPORT_OUTFIT, EX_ACTIONS_DELAY_INTERVAL, EXP_FROM_PLAYERS_LEVEL_RANGE, EXPERIENCE_FROM_PLAYERS, FAMILIAR_TIME, - FORCE_MONSTERTYPE_LOAD, FORGE_AMOUNT_MULTIPLIER, FORGE_BASE_SUCCESS_RATE, FORGE_BONUS_SUCCESS_RATE, @@ -135,8 +134,6 @@ enum ConfigKey_t : uint16_t { M_CONST, MAINTAIN_MODE_MESSAGE, MAP_AUTHOR, - MAP_CUSTOM_AUTHOR, - MAP_CUSTOM_NAME, MAP_DOWNLOAD_URL, MAP_NAME, MARKET_OFFER_DURATION, @@ -221,8 +218,6 @@ enum ConfigKey_t : uint16_t { RATE_MONSTER_ATTACK, RATE_MONSTER_DEFENSE, RATE_MONSTER_HEALTH, - RATE_NPC_ATTACK, - RATE_NPC_DEFENSE, RATE_NPC_HEALTH, RATE_OFFLINE_TRAINING_SPEED, RATE_SKILL, diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 35d2cf3b1..6390d0699 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -72,8 +72,6 @@ bool ConfigManager::load() { loadStringConfig(L, IP, "ip", "127.0.0.1"); loadStringConfig(L, MAINTAIN_MODE_MESSAGE, "maintainModeMessage", ""); loadStringConfig(L, MAP_AUTHOR, "mapAuthor", "Eduardo Dantas"); - loadStringConfig(L, MAP_CUSTOM_AUTHOR, "mapCustomAuthor", "OTServBR"); - loadStringConfig(L, MAP_CUSTOM_NAME, "mapCustomName", ""); loadStringConfig(L, MAP_DOWNLOAD_URL, "mapDownloadUrl", ""); loadStringConfig(L, MAP_NAME, "mapName", "canary"); loadStringConfig(L, MYSQL_DB, "mysqlDatabase", "canary"); @@ -84,7 +82,6 @@ bool ConfigManager::load() { } loadBoolConfig(L, AIMBOT_HOTKEY_ENABLED, "hotkeyAimbotEnabled", true); - loadBoolConfig(L, ALLOW_BLOCK_SPAWN, "allowBlockSpawn", true); loadBoolConfig(L, ALLOW_CHANGEOUTFIT, "allowChangeOutfit", true); loadBoolConfig(L, ALLOW_RELOAD, "allowReload", false); loadBoolConfig(L, AUTOBANK, "autoBank", false); @@ -97,8 +94,8 @@ bool ConfigManager::load() { loadBoolConfig(L, DISCORD_SEND_FOOTER, "discordSendFooter", true); loadBoolConfig(L, EMOTE_SPELLS, "emoteSpells", false); loadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, "enablePlayerPutItemInAmmoSlot", false); + loadBoolConfig(L, ENABLE_SUPPORT_OUTFIT, "enableSupportOutfit", true); loadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, "experienceByKillingPlayers", false); - loadBoolConfig(L, FORCE_MONSTERTYPE_LOAD, "forceMonsterTypesOnLoad", true); loadBoolConfig(L, FREE_PREMIUM, "freePremium", false); loadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, "globalServerSaveCleanMap", false); loadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, "globalServerSaveClose", false); @@ -193,8 +190,6 @@ bool ConfigManager::load() { loadFloatConfig(L, RATE_MONSTER_ATTACK, "rateMonsterAttack", 1.0); loadFloatConfig(L, RATE_MONSTER_DEFENSE, "rateMonsterDefense", 1.0); loadFloatConfig(L, RATE_MONSTER_HEALTH, "rateMonsterHealth", 1.0); - loadFloatConfig(L, RATE_NPC_ATTACK, "rateNpcAttack", 1.0); - loadFloatConfig(L, RATE_NPC_DEFENSE, "rateNpcDefense", 1.0); loadFloatConfig(L, RATE_NPC_HEALTH, "rateNpcHealth", 1.0); loadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, "rateOfflineTrainingSpeed", 1.0); loadFloatConfig(L, RATE_SOUL_REGEN_SPEED, "rateSoulRegenSpeed", 1.0); @@ -235,7 +230,7 @@ bool ConfigManager::load() { loadIntConfig(L, FAMILIAR_TIME, "familiarTime", 30); loadIntConfig(L, FORGE_BASE_SUCCESS_RATE, "forgeBaseSuccessRate", 50); loadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, "forgeBonusSuccessRate", 15); - loadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, "forgeConvergenceFusionCost", 130); + loadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, "forgeConvergenceFusionDustCost", 130); loadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, "forgeConvergenceTransferCost", 160); loadIntConfig(L, FORGE_CORE_COST, "forgeCoreCost", 50); loadIntConfig(L, FORGE_COST_ONE_SLIVER, "forgeCostOneSliver", 20); @@ -383,11 +378,17 @@ bool ConfigManager::reload() { return result; } +void ConfigManager::missingConfigWarning(const char* identifier) { + g_logger().warn("[{}]: Missing configuration for identifier: {}", __FUNCTION__, identifier); +} + std::string ConfigManager::loadStringConfig(lua_State* L, const ConfigKey_t &key, const char* identifier, const std::string &defaultValue) { std::string value = defaultValue; lua_getglobal(L, identifier); if (lua_isstring(L, -1)) { value = lua_tostring(L, -1); + } else { + missingConfigWarning(identifier); } configs[key] = value; lua_pop(L, 1); @@ -399,6 +400,8 @@ int32_t ConfigManager::loadIntConfig(lua_State* L, const ConfigKey_t &key, const lua_getglobal(L, identifier); if (lua_isnumber(L, -1)) { value = static_cast(lua_tointeger(L, -1)); + } else { + missingConfigWarning(identifier); } configs[key] = value; lua_pop(L, 1); @@ -410,6 +413,8 @@ bool ConfigManager::loadBoolConfig(lua_State* L, const ConfigKey_t &key, const c lua_getglobal(L, identifier); if (lua_isboolean(L, -1)) { value = static_cast(lua_toboolean(L, -1)); + } else { + missingConfigWarning(identifier); } configs[key] = value; lua_pop(L, 1); @@ -421,6 +426,8 @@ float ConfigManager::loadFloatConfig(lua_State* L, const ConfigKey_t &key, const lua_getglobal(L, identifier); if (lua_isnumber(L, -1)) { value = static_cast(lua_tonumber(L, -1)); + } else { + missingConfigWarning(identifier); } configs[key] = value; lua_pop(L, 1); diff --git a/src/config/configmanager.hpp b/src/config/configmanager.hpp index 406ff6989..2a0c08619 100644 --- a/src/config/configmanager.hpp +++ b/src/config/configmanager.hpp @@ -26,6 +26,8 @@ class ConfigManager { bool load(); bool reload(); + void missingConfigWarning(const char* identifier); + const std::string &setConfigFileLua(const std::string &what) { configFileLua = { what }; return configFileLua; diff --git a/src/creatures/creature.hpp b/src/creatures/creature.hpp index 670d5f3d6..edf2fa55b 100644 --- a/src/creatures/creature.hpp +++ b/src/creatures/creature.hpp @@ -281,6 +281,10 @@ class Creature : virtual public Thing, public SharedObject { const Outfit_t getDefaultOutfit() const { return defaultOutfit; } + bool isWearingSupportOutfit() const { + auto outfit = currentOutfit.lookType; + return outfit == 75 || outfit == 266 || outfit == 302; + } bool isInvisible() const; ZoneType_t getZoneType() { if (getTile()) { diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 2660c0391..a6db39f58 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -5826,6 +5826,10 @@ bool Player::toggleMount(bool mount) { return false; } + if (isWearingSupportOutfit()) { + return false; + } + if (mount) { if (isMounted()) { return false; diff --git a/src/creatures/players/wheel/player_wheel.cpp b/src/creatures/players/wheel/player_wheel.cpp index 4c7a3dc52..2a3e13664 100644 --- a/src/creatures/players/wheel/player_wheel.cpp +++ b/src/creatures/players/wheel/player_wheel.cpp @@ -1031,7 +1031,7 @@ void PlayerWheel::sendOpenWheelWindow(NetworkMessage &msg, uint32_t ownerId) con // TODO: read items from inventory auto voc = m_player.getVocation(); m_player.client->sendResourceBalance(RESOURCE_BANK, m_player.getBankBalance()); - m_player.client->sendResourceBalance(RESOURCE_INVENTORY, m_player.getMoney()); + m_player.client->sendResourceBalance(RESOURCE_INVENTORY_MONEY, m_player.getMoney()); m_player.client->sendResourceBalance(RESOURCE_LESSER_GEMS, m_player.getItemTypeCount(voc->getWheelGemId(WheelGemQuality_t::Lesser))); m_player.client->sendResourceBalance(RESOURCE_REGULAR_GEMS, m_player.getItemTypeCount(voc->getWheelGemId(WheelGemQuality_t::Regular))); m_player.client->sendResourceBalance(RESOURCE_GREATER_GEMS, m_player.getItemTypeCount(voc->getWheelGemId(WheelGemQuality_t::Greater))); diff --git a/src/game/game.cpp b/src/game/game.cpp index 2348d3845..b353537cf 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1543,10 +1543,6 @@ ReturnValue Game::internalMoveCreature(const std::shared_ptr &creature return ret; } - if (creature->hasCondition(CONDITION_ROOTED)) { - return RETURNVALUE_NOTPOSSIBLE; - } - if (creature->hasCondition(CONDITION_FEARED)) { std::shared_ptr field = toTile->getFieldItem(); if (field && !field->isBlocking() && field->getDamage() != 0) { @@ -2362,7 +2358,7 @@ std::tuple Game::addItemBatch(const std::shared if (item->getContainer()) { containersCreated++; } - totalAdded++; + totalAdded += item->getItemCount(); } ret = returnError; @@ -4266,7 +4262,7 @@ void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Pos } const auto mount = mounts.getMountByClientID(outfit.lookMount); - if (!mount || !player->hasMount(mount)) { + if (!mount || !player->hasMount(mount) || player->isWearingSupportOutfit()) { outfit.lookMount = 0; } @@ -5963,6 +5959,11 @@ void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit, uint8_t isMoun return; } + if (player->isWearingSupportOutfit()) { + outfit.lookMount = 0; + isMountRandomized = 0; + } + player->setRandomMount(isMountRandomized); if (isMountRandomized && outfit.lookMount != 0 && player->hasAnyMount()) { diff --git a/src/lua/creature/talkaction.hpp b/src/lua/creature/talkaction.hpp index ec6853985..d4fd61654 100644 --- a/src/lua/creature/talkaction.hpp +++ b/src/lua/creature/talkaction.hpp @@ -36,6 +36,14 @@ class TalkAction : public Script { } } + const std::string &getDescription() const { + return m_description; + } + + void setDescription(const std::string &stringDescription) { + m_description = stringDescription; + } + std::string getSeparator() const { return separator; } @@ -56,6 +64,7 @@ class TalkAction : public Script { } std::string m_word; + std::string m_description; std::string separator = "\""; uint8_t m_groupType = 0; }; diff --git a/src/lua/functions/events/talk_action_functions.cpp b/src/lua/functions/events/talk_action_functions.cpp index 8618cc3c4..559e251eb 100644 --- a/src/lua/functions/events/talk_action_functions.cpp +++ b/src/lua/functions/events/talk_action_functions.cpp @@ -144,6 +144,33 @@ int TalkActionFunctions::luaTalkActionGetName(lua_State* L) { return 1; } +int TalkActionFunctions::luaTalkActionGetDescription(lua_State* L) { + // local description = talkAction:getDescription() + const auto talkactionSharedPtr = getUserdataShared(L, 1); + if (!talkactionSharedPtr) { + reportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND)); + pushBoolean(L, false); + return 1; + } + + pushString(L, talkactionSharedPtr->getDescription()); + return 1; +} + +int TalkActionFunctions::luaTalkActionSetDescription(lua_State* L) { + // local description = talkAction:setDescription() + auto talkactionSharedPtr = getUserdataShared(L, 1); + if (!talkactionSharedPtr) { + reportErrorFunc(getErrorDesc(LUA_ERROR_TALK_ACTION_NOT_FOUND)); + pushBoolean(L, false); + return 1; + } + + talkactionSharedPtr->setDescription(getString(L, 2)); + pushBoolean(L, true); + return 1; +} + int TalkActionFunctions::luaTalkActionGetGroupType(lua_State* L) { // local groupType = talkAction:getGroupType() const auto talkactionSharedPtr = getUserdataShared(L, 1); diff --git a/src/lua/functions/events/talk_action_functions.hpp b/src/lua/functions/events/talk_action_functions.hpp index 6b2bc9b7a..384688b47 100644 --- a/src/lua/functions/events/talk_action_functions.hpp +++ b/src/lua/functions/events/talk_action_functions.hpp @@ -20,6 +20,8 @@ class TalkActionFunctions final : LuaScriptInterface { registerMethod(L, "TalkAction", "register", TalkActionFunctions::luaTalkActionRegister); registerMethod(L, "TalkAction", "separator", TalkActionFunctions::luaTalkActionSeparator); registerMethod(L, "TalkAction", "getName", TalkActionFunctions::luaTalkActionGetName); + registerMethod(L, "TalkAction", "getDescription", TalkActionFunctions::luaTalkActionGetDescription); + registerMethod(L, "TalkAction", "setDescription", TalkActionFunctions::luaTalkActionSetDescription); registerMethod(L, "TalkAction", "getGroupType", TalkActionFunctions::luaTalkActionGetGroupType); } @@ -30,5 +32,7 @@ class TalkActionFunctions final : LuaScriptInterface { static int luaTalkActionRegister(lua_State* L); static int luaTalkActionSeparator(lua_State* L); static int luaTalkActionGetName(lua_State* L); + static int luaTalkActionGetDescription(lua_State* L); + static int luaTalkActionSetDescription(lua_State* L); static int luaTalkActionGetGroupType(lua_State* L); }; diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index f3a4bcef3..4c17b2096 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -2962,6 +2962,7 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { newmsg.add(raceid_); uint8_t progress = 0; + uint8_t occurrence = 0; for (const auto &_it : creaturesKilled) { if (_it.first == raceid_) { const auto tmpType = g_monsters().getMonsterType(it_.second); @@ -2969,11 +2970,13 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { return; } progress = g_iobestiary().getKillStatus(tmpType, _it.second); + occurrence = tmpType->info.bestiaryOccurrence; } } if (progress > 0) { - newmsg.add(static_cast(progress)); + newmsg.addByte(progress); + newmsg.addByte(occurrence); } else { newmsg.addByte(0); } @@ -3203,15 +3206,22 @@ void ProtocolGame::sendCreatureOutfit(std::shared_ptr creature, const return; } + Outfit_t newOutfit = outfit; + if (player->isWearingSupportOutfit()) { + player->setCurrentMount(0); + newOutfit.lookMount = 0; + } + NetworkMessage msg; msg.addByte(0x8E); msg.add(creature->getID()); - AddOutfit(msg, outfit); - if (!oldProtocol && outfit.lookMount != 0) { - msg.addByte(outfit.lookMountHead); - msg.addByte(outfit.lookMountBody); - msg.addByte(outfit.lookMountLegs); - msg.addByte(outfit.lookMountFeet); + AddOutfit(msg, newOutfit); + + if (!oldProtocol && newOutfit.lookMount != 0) { + msg.addByte(newOutfit.lookMountHead); + msg.addByte(newOutfit.lookMountBody); + msg.addByte(newOutfit.lookMountLegs); + msg.addByte(newOutfit.lookMountFeet); } writeToOutputBuffer(msg); } @@ -4252,10 +4262,12 @@ void ProtocolGame::sendBasicData() { msg.addByte(player->getVocation()->getClientId()); // Prey window - if (player->getVocation()->getId() == 0 && player->getGroup()->id < GROUP_TYPE_GAMEMASTER) { - msg.addByte(0); - } else { - msg.addByte(1); // has reached Main (allow player to open Prey window) + if (!oldProtocol) { + if (player->getVocation()->getId() == 0 && player->getGroup()->id < GROUP_TYPE_GAMEMASTER) { + msg.addByte(0); + } else { + msg.addByte(1); // has reached Main (allow player to open Prey window) + } } // Filter only valid ids @@ -4795,7 +4807,7 @@ void ProtocolGame::sendGameNews() { void ProtocolGame::sendResourcesBalance(uint64_t money /*= 0*/, uint64_t bank /*= 0*/, uint64_t preyCards /*= 0*/, uint64_t taskHunting /*= 0*/, uint64_t forgeDust /*= 0*/, uint64_t forgeSliver /*= 0*/, uint64_t forgeCores /*= 0*/) { sendResourceBalance(RESOURCE_BANK, bank); - sendResourceBalance(RESOURCE_INVENTORY, money); + sendResourceBalance(RESOURCE_INVENTORY_MONEY, money); sendResourceBalance(RESOURCE_PREY_CARDS, preyCards); sendResourceBalance(RESOURCE_TASK_HUNTING, taskHunting); sendResourceBalance(RESOURCE_FORGE_DUST, forgeDust); @@ -4816,40 +4828,35 @@ void ProtocolGame::sendResourceBalance(Resource_t resourceType, uint64_t value) } void ProtocolGame::sendSaleItemList(const std::vector &shopVector, const std::map &inventoryMap) { - // Since we already have full inventory map we shouldn't call getMoney here - it is simply wasting cpu power - uint64_t playerMoney = 0; - auto it = inventoryMap.find(ITEM_CRYSTAL_COIN); - if (it != inventoryMap.end()) { - playerMoney += static_cast(it->second) * 10000; - } - it = inventoryMap.find(ITEM_PLATINUM_COIN); - if (it != inventoryMap.end()) { - playerMoney += static_cast(it->second) * 100; - } - it = inventoryMap.find(ITEM_GOLD_COIN); - if (it != inventoryMap.end()) { - playerMoney += static_cast(it->second); - } + sendResourceBalance(RESOURCE_BANK, player->getBankBalance()); - NetworkMessage msg; - msg.addByte(0xEE); - msg.addByte(0x00); - msg.add(player->getBankBalance()); uint16_t currency = player->getShopOwner() ? player->getShopOwner()->getCurrency() : static_cast(ITEM_GOLD_COIN); - msg.addByte(0xEE); if (currency == ITEM_GOLD_COIN) { - msg.addByte(0x01); - msg.add(playerMoney); + // Since we already have full inventory map we shouldn't call getMoney here - it is simply wasting cpu power + uint64_t playerMoney = 0; + auto it = inventoryMap.find(ITEM_CRYSTAL_COIN); + if (it != inventoryMap.end()) { + playerMoney += static_cast(it->second) * 10000; + } + it = inventoryMap.find(ITEM_PLATINUM_COIN); + if (it != inventoryMap.end()) { + playerMoney += static_cast(it->second) * 100; + } + it = inventoryMap.find(ITEM_GOLD_COIN); + if (it != inventoryMap.end()) { + playerMoney += static_cast(it->second); + } + sendResourceBalance(RESOURCE_INVENTORY_MONEY, playerMoney); } else { - msg.addByte(oldProtocol ? 0x01 : 0x02); - uint64_t newCurrency = 0; + uint64_t customCurrencyValue = 0; auto search = inventoryMap.find(currency); if (search != inventoryMap.end()) { - newCurrency += static_cast(search->second); + customCurrencyValue += static_cast(search->second); } - msg.add(newCurrency); + sendResourceBalance(oldProtocol ? RESOURCE_INVENTORY_MONEY : RESOURCE_INVENTORY_CURRENCY_CUSTOM, customCurrencyValue); } + NetworkMessage msg; msg.addByte(0x7B); if (oldProtocol) { @@ -4865,7 +4872,7 @@ void ProtocolGame::sendSaleItemList(const std::vector &shopVector, co continue; } - it = inventoryMap.find(shopBlock.itemId); + auto it = inventoryMap.find(shopBlock.itemId); if (it != inventoryMap.end()) { msg.add(shopBlock.itemId); if (oldProtocol) { @@ -6949,15 +6956,23 @@ void ProtocolGame::sendOutfitWindow() { NetworkMessage msg; msg.addByte(0xC8); - if (oldProtocol) { - Outfit_t currentOutfit = player->getDefaultOutfit(); + Outfit_t currentOutfit = player->getDefaultOutfit(); + auto isSupportOutfit = player->isWearingSupportOutfit(); + bool mounted = false; + + if (!isSupportOutfit) { const auto currentMount = g_game().mounts.getMountByID(player->getLastMount()); if (currentMount) { + mounted = (currentOutfit.lookMount == currentMount->clientId); currentOutfit.lookMount = currentMount->clientId; } + } else { + currentOutfit.lookMount = 0; + } - AddOutfit(msg, currentOutfit); + AddOutfit(msg, currentOutfit); + if (oldProtocol) { std::vector protocolOutfits; const auto outfits = Outfits::getInstance().getOutfits(player->getSex()); protocolOutfits.reserve(outfits.size()); @@ -6998,20 +7013,10 @@ void ProtocolGame::sendOutfitWindow() { return; } - bool mounted = false; - Outfit_t currentOutfit = player->getDefaultOutfit(); - const auto currentMount = g_game().mounts.getMountByID(player->getLastMount()); - if (currentMount) { - mounted = (currentOutfit.lookMount == currentMount->clientId); - currentOutfit.lookMount = currentMount->clientId; - } - - AddOutfit(msg, currentOutfit); - - msg.addByte(currentOutfit.lookMountHead); - msg.addByte(currentOutfit.lookMountBody); - msg.addByte(currentOutfit.lookMountLegs); - msg.addByte(currentOutfit.lookMountFeet); + msg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountHead); + msg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountBody); + msg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountLegs); + msg.addByte(isSupportOutfit ? 0 : currentOutfit.lookMountFeet); msg.add(currentOutfit.lookFamiliarsType); auto startOutfits = msg.getBufferPosition(); @@ -7020,7 +7025,7 @@ void ProtocolGame::sendOutfitWindow() { uint16_t outfitSize = 0; msg.skipBytes(2); - if (player->isAccessPlayer()) { + if (player->isAccessPlayer() && g_configManager().getBoolean(ENABLE_SUPPORT_OUTFIT, __FUNCTION__)) { msg.add(75); msg.addString("Gamemaster", "ProtocolGame::sendOutfitWindow - Gamemaster"); msg.addByte(0); @@ -7144,7 +7149,7 @@ void ProtocolGame::sendOutfitWindow() { msg.addByte(mounted ? 0x01 : 0x00); // Version 12.81 - Random mount 'bool' - msg.addByte(player->isRandomMounted() ? 0x01 : 0x00); + msg.addByte(isSupportOutfit ? 0x00 : (player->isRandomMounted() ? 0x01 : 0x00)); writeToOutputBuffer(msg); } diff --git a/src/server/server_definitions.hpp b/src/server/server_definitions.hpp index 1d5ed5b62..b957292b5 100644 --- a/src/server/server_definitions.hpp +++ b/src/server/server_definitions.hpp @@ -55,7 +55,8 @@ enum SessionEndInformations : uint8_t { enum Resource_t : uint8_t { RESOURCE_BANK = 0x00, - RESOURCE_INVENTORY = 0x01, + RESOURCE_INVENTORY_MONEY = 0x01, + RESOURCE_INVENTORY_CURRENCY_CUSTOM = 0x02, RESOURCE_PREY_CARDS = 0x0A, RESOURCE_TASK_HUNTING = 0x32, RESOURCE_FORGE_DUST = 0x46,