From 7de41977ef2c8972dddc834d16c92e3a87145c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Paix=C3=A3o?= Date: Tue, 28 Jan 2020 13:15:49 -0300 Subject: [PATCH 1/2] Fix version adjustments - Removed incorrect IDs from higher versions (checked all lua files) - Fixed items.xml. - Added Skinning & Dusting systems. - Added all special foods from 8.6 version. - Fixed fluids (life fluid and blood), thanks to Celohere (otland) --- data/actions/actions.xml | 15 +- data/actions/lib/actions.lua | 5 + .../scripts/other/bed_modification_kits.lua | 7 +- .../scripts/other/constructionkits.lua | 3 +- data/actions/scripts/other/decayto.lua | 3 +- data/actions/scripts/other/die.lua | 15 - data/actions/scripts/other/enchanting.lua | 24 - data/actions/scripts/other/fluids.lua | 8 +- data/actions/scripts/other/food.lua | 11 +- data/actions/scripts/other/music.lua | 3 +- data/actions/scripts/other/potions.lua | 5 +- data/actions/scripts/other/windows.lua | 7 +- data/actions/scripts/tools/fishing.lua | 14 +- data/actions/scripts/tools/rope.lua | 4 +- data/global.lua | 14 +- data/items/items.xml | 10661 +--------------- data/movements/movements.xml | 336 - data/movements/scripts/walkback.lua | 15 +- data/scripts/actions/spellbook.lua | 19 +- src/const.h | 10 +- 20 files changed, 76 insertions(+), 11103 deletions(-) delete mode 100644 data/actions/scripts/other/die.lua diff --git a/data/actions/actions.xml b/data/actions/actions.xml index cbfb7d09a5..154ce321fa 100644 --- a/data/actions/actions.xml +++ b/data/actions/actions.xml @@ -19,6 +19,8 @@ + + @@ -80,6 +82,17 @@ + + + + + + + + + + + @@ -137,7 +150,7 @@ - + diff --git a/data/actions/lib/actions.lua b/data/actions/lib/actions.lua index 70c48479aa..a6afa11ca7 100644 --- a/data/actions/lib/actions.lua +++ b/data/actions/lib/actions.lua @@ -1,3 +1,8 @@ +SPECIAL_FOODS = { + [9992] = {"Gulp."}, [9993] = {"Chomp."}, [9994] = {"Chomp."}, [9995] = {"Chomp."}, [9997] = {"Yum."}, + [9998] = {"Munch."}, [9999] = {"Chomp."}, [10000] = {"Mmmm."}, [10001] = {"Smack."} +} + function destroyItem(player, target, toPosition) if type(target) ~= "userdata" or not target:isItem() then return false diff --git a/data/actions/scripts/other/bed_modification_kits.lua b/data/actions/scripts/other/bed_modification_kits.lua index 4b1f0a99ec..9d2185c6c6 100644 --- a/data/actions/scripts/other/bed_modification_kits.lua +++ b/data/actions/scripts/other/bed_modification_kits.lua @@ -2,8 +2,7 @@ local beds = { [7904] = {{7811, 7812}, {7813, 7814}}, -- green kit [7905] = {{7819, 7820}, {7821, 7822}}, -- yellow kit [7906] = {{7815, 7816}, {7817, 7818}}, -- red kit - [7907] = {{1754, 1755}, {1760, 1761}}, -- removal kit - [20252] = {{20197, 20198}, {20199, 20200}} -- canopy kit + [7907] = {{1754, 1755}, {1760, 1761}} -- removal kit } local function internalBedTransform(item, targetItem, toPosition, itemArray) @@ -34,12 +33,12 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) end for _, bed in pairs(beds) do - if bed[1][1] == targetItemId or table.contains({1758, 5502, 18027}, targetItemId) then + if bed[1][1] == targetItemId then toPosition:sendMagicEffect(CONST_ME_POFF) toPosition.y = toPosition.y + 1 internalBedTransform(item, target, toPosition, newBed[1]) break - elseif bed[2][1] == targetItemId or table.contains({1756, 5500, 18029}, targetItemId) then + elseif bed[2][1] == targetItemId then toPosition:sendMagicEffect(CONST_ME_POFF) toPosition.x = toPosition.x + 1 internalBedTransform(item, target, toPosition, newBed[2]) diff --git a/data/actions/scripts/other/constructionkits.lua b/data/actions/scripts/other/constructionkits.lua index 1e12d56876..f39a6502de 100644 --- a/data/actions/scripts/other/constructionkits.lua +++ b/data/actions/scripts/other/constructionkits.lua @@ -9,8 +9,7 @@ local constructionKits = { [3936] = 3811, [3937] = 2101, [3938] = 3812, [5086] = 5046, [5087] = 5055, [5088] = 5056, [6114] = 6111, [6115] = 6109, [6372] = 6356, [6373] = 6371, [8692] = 8688, [9974] = 9975, [11126] = 11127, [11133] = 11129, [11124] = 11125, - [11205] = 11203, [14328] = 1616, [14329] = 1615, [16075] = 16020, [16099] = 16098, - [20254] = 20295, [20255] = 20297, [20257] = 20299 + [11205] = 11203 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/other/decayto.lua b/data/actions/scripts/other/decayto.lua index 02b2699e65..7eddd1e4e2 100644 --- a/data/actions/scripts/other/decayto.lua +++ b/data/actions/scripts/other/decayto.lua @@ -16,8 +16,7 @@ local decayItems = { [8686] = 8687, [8687] = 8686, [8688] = 8689, [8689] = 8688, [8690] = 8691, [8691] = 8690, [9575] = 9576, [9576] = 9575, [9577] = 9578, [9578] = 9577, [9579] = 9580, [9580] = 9579, [9581] = 9582, [9582] = 9581, [9747] = 9748, - [9748] = 9747, [9749] = 9750, [9750] = 9749, [19691] = 19692, - [19692] = 19691, + [9748] = 9747, [9749] = 9750, [9750] = 9749 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/other/die.lua b/data/actions/scripts/other/die.lua deleted file mode 100644 index 86505a5dc5..0000000000 --- a/data/actions/scripts/other/die.lua +++ /dev/null @@ -1,15 +0,0 @@ -function onUse(player, item, fromPosition, target, toPosition, isHotkey) - local position = item:getPosition() - local value = math.random(1, 6) - local isInGhostMode = player:isInGhostMode() - - position:sendMagicEffect(CONST_ME_CRAPS, isInGhostMode and player) - - local spectators = Game.getSpectators(position, false, true, 3, 3) - for _, spectator in ipairs(spectators) do - player:say(player:getName() .. " rolled a " .. value .. ".", TALKTYPE_MONSTER_SAY, isInGhostMode, spectator, position) - end - - item:transform(5791 + value) - return true -end diff --git a/data/actions/scripts/other/enchanting.lua b/data/actions/scripts/other/enchanting.lua index 5ea484470c..70a1093a39 100644 --- a/data/actions/scripts/other/enchanting.lua +++ b/data/actions/scripts/other/enchanting.lua @@ -71,29 +71,6 @@ local items = { [COMBAT_FIREDAMAGE] = {id = 9933, say = {text = "Take the boots off first."}}, slot = {type = CONST_SLOT_FEET, check = true} }, - [24716] = { -- werewolf amulet - [COMBAT_NONE] = { - id = 24717, - effects = {failure = CONST_ME_POFF, success = CONST_ME_THUNDER}, - message = {text = "The amulet cannot be enchanted while worn."} - }, - slot = {type = CONST_SLOT_NECKLACE, check = true} - }, - [24718] = { -- werewolf helmet - [COMBAT_NONE] = { - id = { - [SKILL_CLUB] = {id = 24783}, - [SKILL_SWORD] = {id = 24783}, - [SKILL_AXE] = {id = 24783}, - [SKILL_DISTANCE] = {id = 24783}, - [SKILL_MAGLEVEL] = {id = 24783} - }, - effects = {failure = CONST_ME_POFF, success = CONST_ME_THUNDER}, - message = {text = "The helmet cannot be enchanted while worn."}, - usesStorage = true - }, - slot = {type = CONST_SLOT_HEAD, check = true} - }, charges = 1000, effect = CONST_ME_MAGIC_RED }, @@ -110,7 +87,6 @@ local items = { [7760] = {combatType = COMBAT_FIREDAMAGE}, -- small enchanted ruby [7761] = {combatType = COMBAT_EARTHDAMAGE}, -- small enchanted emerald [7762] = {combatType = COMBAT_ENERGYDAMAGE}, -- small enchanted amethyst - [24739] = {combatType = COMBAT_NONE} -- moonlight crystals } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/other/fluids.lua b/data/actions/scripts/other/fluids.lua index 7ea9f270d3..0e99408e89 100644 --- a/data/actions/scripts/other/fluids.lua +++ b/data/actions/scripts/other/fluids.lua @@ -10,6 +10,7 @@ poison:setParameter(CONDITION_PARAM_TICKINTERVAL, 4000) poison:setParameter(CONDITION_PARAM_FORCEUPDATE, true) local fluidMessage = { + [2] = "Aaaah...", [3] = "Aah...", [4] = "Urgh!", [5] = "Mmmh.", @@ -18,8 +19,7 @@ local fluidMessage = { [11] = "Urgh!", [13] = "Urgh!", [15] = "Aah...", - [19] = "Urgh!", - [43] = "Aaaah..." + [19] = "Urgh!" } function onUse(player, item, fromPosition, target, toPosition, isHotkey) @@ -40,14 +40,14 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.type == 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, "It is empty.") elseif target.uid == player.uid then - if table.contains({3, 15, 43}, item.type) then + if table.contains({3, 15}, item.type) then player:addCondition(drunk) elseif item.type == 4 then player:addCondition(poison) elseif item.type == 7 then player:addMana(math.random(50, 150)) fromPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - elseif item.type == 10 then + elseif item.type == 2 then player:addHealth(60) fromPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) end diff --git a/data/actions/scripts/other/food.lua b/data/actions/scripts/other/food.lua index 8c3b7d14fd..d3096d68eb 100644 --- a/data/actions/scripts/other/food.lua +++ b/data/actions/scripts/other/food.lua @@ -86,16 +86,7 @@ local foods = { [12418] = {9, "Crunch."}, -- cauliflower [12637] = {55, "Gulp."}, -- ectoplasmic sushi [12638] = {18, "Yum."}, -- dragonfruit - [12639] = {2, "Munch."}, -- peas - [13297] = {20, "Crunch."}, -- haunch of boar - [15405] = {55, "Munch."}, -- sandfish - [15487] = {14, "Urgh."}, -- larvae - [15488] = {15, "Munch."}, -- deepling filet - [16014] = {60, "Mmmm."}, -- anniversary cake - [18397] = {33, "Munch."}, -- mushroom pie - [19737] = {10, "Urgh."}, -- insectoid eggs - [20100] = {15, "Smack."}, -- soft cheese - [20101] = {12, "Smack."} -- rat cheese + [12639] = {2, "Munch."} -- peas } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/other/music.lua b/data/actions/scripts/other/music.lua index 5410fa9b07..cd2920a7f5 100644 --- a/data/actions/scripts/other/music.lua +++ b/data/actions/scripts/other/music.lua @@ -29,8 +29,7 @@ local instruments = { [3957] = {effect = CONST_ME_SOUND_YELLOW, itemId = 2681, itemCount = 10, chance = 80, remove = true}, -- cornucopia [5786] = {effects = {failure = CONST_ME_SOUND_RED, success = CONST_ME_SOUND_YELLOW}, monster = "war wolf", chance = 60, remove = true}, -- wooden whistle [6572] = {effect = CONST_ME_SOUND_GREEN, text = "TOOOOOOT", transformId = 13578, decayId = 6572}, -- party trumpet - [6573] = {effect = CONST_ME_SOUND_GREEN, text = "TOOOOOOT", transformId = 13578, decayId = 6573}, -- party trumpet - [13759] = {effect = CONST_ME_SOUND_BLUE} -- small whistle (actual effect is unknown) + [6573] = {effect = CONST_ME_SOUND_GREEN, text = "TOOOOOOT", transformId = 13578, decayId = 6573} -- party trumpet } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/other/potions.lua b/data/actions/scripts/other/potions.lua index 7883da5af8..29f668c4b2 100644 --- a/data/actions/scripts/other/potions.lua +++ b/data/actions/scripts/other/potions.lua @@ -29,10 +29,7 @@ local potions = { [8472] = {health = {250, 350}, mana = {100, 200}, vocations = {3, 7}, level = 80, flask = 7635, description = "Only paladins of level 80 or above may drink this fluid."}, [8473] = {health = {650, 850}, vocations = {4, 8}, level = 130, flask = 7635, description = "Only knights of level 130 or above may drink this fluid."}, [8474] = {antidote = true, flask = 7636}, - [8704] = {health = {60, 90}, flask = 7636}, - [26029] = {mana = {425, 575}, vocations = {1, 2, 5, 6}, level = 130, flask = 7635, description = "Only druids and sorcerers of level 130 or above may drink this fluid."}, - [26030] = {health = {420, 580}, mana = {200, 350}, vocations = {3, 7}, level = 130, flask = 7635, description = "Only paladins of level 130 or above may drink this fluid."}, - [26031] = {health = {875, 1125}, vocations = {4, 8}, level = 200, flask = 7635, description = "Only knights of level 200 or above may drink this fluid."} + [8704] = {health = {60, 90}, flask = 7636} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/other/windows.lua b/data/actions/scripts/other/windows.lua index 6d3fa49f97..18b9af6c6e 100644 --- a/data/actions/scripts/other/windows.lua +++ b/data/actions/scripts/other/windows.lua @@ -13,12 +13,7 @@ local windows = { [7027] = 7025, [7025] = 7027, [7028] = 7026, [7026] = 7028, [7031] = 7029, [7029] = 7031, [7032] = 7030, [7030] = 7032, [10264] = 10266, [10266] = 10264, [10265] = 10267, [10267] = 10265, - [10488] = 10490, [10490] = 10488, [10489] = 10491, [10491] = 10489, - [19427] = 19447, [19428] = 19448, [19441] = 19450, [19440] = 19449, - [19443] = 20180, [19444] = 20181, [19445] = 20183, [19446] = 20184, - [19447] = 19427, [19448] = 19428, [19449] = 19440, [19450] = 19441, - [19974] = 20182, [19975] = 20185, [20180] = 19443, [20181] = 19444, - [20182] = 19974, [20183] = 19445, [20184] = 19446, [20185] = 19975 + [10488] = 10490, [10490] = 10488, [10489] = 10491, [10491] = 10489 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) diff --git a/data/actions/scripts/tools/fishing.lua b/data/actions/scripts/tools/fishing.lua index cd5827144f..3e670b6b6c 100644 --- a/data/actions/scripts/tools/fishing.lua +++ b/data/actions/scripts/tools/fishing.lua @@ -1,4 +1,4 @@ -local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 7236, 10499, 15401, 15402} +local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 7236, 10499} local lootTrash = {2234, 2238, 2376, 2509, 2667} local lootCommon = {2152, 2167, 2168, 2669, 7588, 7589} local lootRare = {2143, 2146, 2149, 7158, 7159} @@ -38,7 +38,7 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) toPosition:sendMagicEffect(CONST_ME_LOSEENERGY) end - if targetId == 493 or targetId == 15402 then + if targetId == 493 then return true end @@ -48,15 +48,7 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) return true end - if targetId == 15401 then - target:transform(targetId + 1) - target:decay() - - if math.random(1, 100) >= 97 then - player:addItem(15405, 1) - return true - end - elseif targetId == 7236 then + if targetId == 7236 then target:transform(targetId + 1) target:decay() diff --git a/data/actions/scripts/tools/rope.lua b/data/actions/scripts/tools/rope.lua index 6e71c4c56f..f8e8c1b472 100644 --- a/data/actions/scripts/tools/rope.lua +++ b/data/actions/scripts/tools/rope.lua @@ -2,7 +2,7 @@ local holeId = { 294, 369, 370, 383, 392, 408, 409, 410, 427, 428, 429, 430, 462, 469, 470, 482, 484, 485, 489, 924, 1369, 3135, 3136, 4835, 4837, 7933, 7938, 8170, 8249, 8250, 8251, 8252, 8254, 8255, 8256, 8276, 8277, 8279, 8281, 8284, 8285, 8286, 8323, - 8567, 8585, 8595, 8596, 8972, 9606, 9625, 13190, 14461, 19519, 21536 + 8567, 8585, 8595, 8596, 8972, 9606, 9625 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) @@ -11,7 +11,7 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) return false end - if table.contains(ropeSpots, tile:getGround():getId()) or tile:getItemById(14435) then + if table.contains(ropeSpots, tile:getGround():getId()) then if Tile(toPosition:moveUpstairs()):hasFlag(TILESTATE_PROTECTIONZONE) and player:isPzLocked() then player:sendCancelMessage(RETURNVALUE_PLAYERISPZLOCKED) return true diff --git a/data/global.lua b/data/global.lua index 3319e7b963..35b6531092 100644 --- a/data/global.lua +++ b/data/global.lua @@ -3,14 +3,14 @@ dofile('data/lib/lib.lua') STORAGEVALUE_PROMOTION = 30018 -ropeSpots = {384, 418, 8278, 8592, 13189, 14435, 14436, 15635, 19518} +ropeSpots = {384, 418, 8278, 8592} -doors = {[1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236, [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542, [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918, [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111, [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139, [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283, [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194, [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254, [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895, [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046, [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167, [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272, [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472, [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10775] = 10777, [10776] = 10777, [12092] = 12094, [12093] = 12094, [12188] = 12190, [12189] = 12190, [19840] = 19842, [19841] = 19842, [19843] = 19844, [19980] = 19982, [19981] = 19982, [19983] = 19984, [20273] = 20275, [20274] = 20275, [20276] = 20277, [17235] = 17236, [18208] = 18209, [13022] = 13023, [10784] = 10786, [10785] = 10786, [12099] = 12101, [12100] = 12101, [12197] = 12199, [12198] = 12199, [19849] = 19851, [19850] = 19851, [19852] = 19853, [19989] = 19991, [19990] = 19991, [19992] = 19993, [20282] = 20284, [20283] = 20284, [20285] = 20286, [17237] = 17238, [13020] = 13021, [10780] = 10781, [12095] = 12096, [12195] = 12196, [19845] = 19846, [19985] = 19986, [20278] = 20279, [10789] = 10790, [12102] = 12103, [12204] = 12205, [19854] = 19855, [19994] = 19995, [20287] = 20288, [10782] = 10783, [12097] = 12098, [12193] = 12194, [19847] = 19848, [19987] = 19988, [20280] = 20281, [10791] = 10792, [12104] = 12105, [12202] = 12203, [19856] = 19857, [19996] = 19997, [20289] = 20290} -verticalOpenDoors = {1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131, 5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044, 7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9274, 9269, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10485, 10483, 10786, 12101, 12199, 19851, 19853, 19991, 19993, 20284, 20286, 17238, 13021, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997, 20290} -horizontalOpenDoors = {1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118, 5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893, 6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285, 10470, 10472, 10476, 10474, 10777, 12094, 12190, 19842, 19844, 19982, 19984, 20275, 20277, 17236, 18209, 13023, 10781, 12096, 12196, 19846, 19986, 20279, 10783, 12098, 12194, 19848, 19988, 20281} -openSpecialDoors = {1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133, 5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558, 9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10781, 12096, 12196, 19846, 19986, 20279, 10783, 12098, 12194, 19848, 19988, 20281, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997, 20290} -questDoors = {1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049, 8551, 8553, 9175, 9177, 9277, 9279, 10278, 10280, 10475, 10484, 10782, 10791, 12097, 12104, 12193, 12202, 19847, 19856, 19987, 19996, 20280, 20289} -levelDoors = {1227, 1229, 1245, 1247, 1259, 1261, 3540, 3549, 5103, 5112, 5121, 5130, 5292, 5294, 6206, 6208, 6263, 6265, 6896, 6905, 7038, 7047, 8555, 8557, 9179, 9181, 9281, 9283, 10282, 10284, 10473, 10482, 10780, 10789, 10780, 12095, 12102, 12204, 12195, 19845, 19854, 19985, 19994, 20278, 20287} +doors = {[1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236, [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542, [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918, [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111, [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139, [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283, [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194, [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254, [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895, [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046, [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167, [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272, [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472, [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10775] = 10777, [10776] = 10777, [12092] = 12094, [12093] = 12094, [12188] = 12190, [12189] = 12190, [10784] = 10786, [10785] = 10786, [12099] = 12101, [12100] = 12101, [12197] = 12199, [12198] = 12199, [13020] = 13021, [10780] = 10781, [12095] = 12096, [12195] = 12196, [10789] = 10790, [12102] = 12103, [12204] = 12205, [10782] = 10783, [12097] = 12098, [12193] = 12194, [10791] = 10792, [12104] = 12105, [12202] = 12203} +verticalOpenDoors = {1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131, 5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044, 7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9274, 9269, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10485, 10483, 10786, 12101, 12199, 10790, 12103, 12205, 10792, 12105, 12203} +horizontalOpenDoors = {1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118, 5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893, 6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285, 10470, 10472, 10476, 10474, 10777, 12094, 12190, 10781, 12096, 12196} +openSpecialDoors = {1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133, 5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558, 9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10781, 12096, 12196, 10783, 12098, 12194, 10790, 12103, 12205} +questDoors = {1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049, 8551, 8553, 9175, 9177, 9277, 9279, 10278, 10280, 10475, 10484, 10782, 10791, 12097, 12104, 12193, 12202} +levelDoors = {1227, 1229, 1245, 1247, 1259, 1261, 3540, 3549, 5103, 5112, 5121, 5130, 5292, 5294, 6206, 6208, 6263, 6265, 6896, 6905, 7038, 7047, 8555, 8557, 9179, 9181, 9281, 9283, 10282, 10284, 10473, 10482, 10780, 10789, 10780, 12095, 12102, 12204, 12195} keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032} function getDistanceBetween(firstPosition, secondPosition) diff --git a/data/items/items.xml b/data/items/items.xml index 0ffe9794c4..14efac3b16 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -21340,10667 +21340,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + @@ -32012,4 +21361,4 @@ - + \ No newline at end of file diff --git a/data/movements/movements.xml b/data/movements/movements.xml index dc9b28ce40..58d22e643a 100644 --- a/data/movements/movements.xml +++ b/data/movements/movements.xml @@ -190,30 +190,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -349,23 +325,6 @@ - - - - - - - - - - - - - - - - - @@ -406,23 +365,6 @@ - - - - - - - - - - - - - - - - - @@ -460,11 +402,6 @@ - - - - - @@ -571,36 +508,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -860,60 +767,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -979,138 +832,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1199,61 +920,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data/movements/scripts/walkback.lua b/data/movements/scripts/walkback.lua index 30b00f21f2..bcf274f380 100644 --- a/data/movements/scripts/walkback.lua +++ b/data/movements/scripts/walkback.lua @@ -1,6 +1,15 @@ function onStepIn(creature, item, position, fromPosition) if item.uid > 0 and item.uid <= 65535 then - creature:teleportTo(fromPosition, false) - end + if position == fromPosition then + if creature:isPlayer() then + local temple = creature:getTown():getTemplePosition() + creature:teleportTo(temple, false) + else + creature:remove() + end + else + creature:teleportTo(fromPosition, false) + end + end return true -end +end \ No newline at end of file diff --git a/data/scripts/actions/spellbook.lua b/data/scripts/actions/spellbook.lua index 2774d5aedb..f2ffb1549f 100644 --- a/data/scripts/actions/spellbook.lua +++ b/data/scripts/actions/spellbook.lua @@ -4,9 +4,9 @@ function spellbook.onUse(player, item, fromPosition, target, toPosition, isHotke local text = {} local spells = {} for _, spell in ipairs(player:getInstantSpells()) do - if spell.level ~= 0 then - if spell.manapercent > 0 then - spell.mana = spell.manapercent .. "%" + if spell:level() ~= 0 then + if spell:manaPercent() > 0 then + spell.mana = spell:manaPercent() .. "%" end spells[#spells + 1] = spell end @@ -16,21 +16,22 @@ function spellbook.onUse(player, item, fromPosition, target, toPosition, isHotke local prevLevel = -1 for i, spell in ipairs(spells) do - if prevLevel ~= spell.level then + if prevLevel ~= spell:level() then if i == 1 then text[#text == nil and 1 or #text+1] = "Spells for Level " else text[#text+1] = "\nSpells for Level " end - text[#text+1] = spell.level .. "\n" - prevLevel = spell.level + text[#text+1] = spell:level() .. "\n" + prevLevel = spell:level() end - text[#text+1] = spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" + local words, wordsSeparator = spell:words() + text[#text+1] = words .. " - " .. spell:name() .. " : " .. spell:mana() .. "\n" end player:showTextDialog(item:getId(), table.concat(text)) return true end -spellbook:id(2175, 6120, 8900, 8901, 8902, 8903, 8904, 8918, 23771) -spellbook:register() +spellbook:id(2175, 6120, 8900, 8901, 8902, 8903, 8904, 8918) +spellbook:register() \ No newline at end of file diff --git a/src/const.h b/src/const.h index 78ec995f19..5b7ab68ed0 100644 --- a/src/const.h +++ b/src/const.h @@ -194,14 +194,14 @@ enum FluidColors_t : uint8_t { enum FluidTypes_t : uint8_t { FLUID_NONE = FLUID_EMPTY, FLUID_WATER = FLUID_BLUE, - FLUID_BLOOD = FLUID_RED, + FLUID_LIFE = FLUID_RED, FLUID_BEER = FLUID_BROWN, FLUID_SLIME = FLUID_GREEN, FLUID_LEMONADE = FLUID_YELLOW, FLUID_MILK = FLUID_WHITE, FLUID_MANA = FLUID_PURPLE, - FLUID_LIFE = FLUID_RED + 8, + FLUID_BLOOD = FLUID_RED + 8, FLUID_OIL = FLUID_BROWN + 8, FLUID_URINE = FLUID_YELLOW + 8, FLUID_COCONUTMILK = FLUID_WHITE + 8, @@ -225,7 +225,7 @@ const uint8_t reverseFluidMap[] = { FLUID_MANA, FLUID_BEER, FLUID_EMPTY, - FLUID_BLOOD, + FLUID_LIFE, FLUID_SLIME, FLUID_EMPTY, FLUID_LEMONADE, @@ -238,13 +238,13 @@ const uint8_t clientToServerFluidMap[] = { FLUID_MANA, FLUID_BEER, FLUID_MUD, - FLUID_BLOOD, + FLUID_LIFE, FLUID_SLIME, FLUID_RUM, FLUID_LEMONADE, FLUID_MILK, FLUID_WINE, - FLUID_LIFE, + FLUID_BLOOD, FLUID_URINE, FLUID_OIL, FLUID_FRUITJUICE, From 740715e246d0028370cf0123f7a32c43da6b91bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Paix=C3=A3o?= Date: Tue, 28 Jan 2020 14:25:07 -0300 Subject: [PATCH 2/2] More fixes - Fixed potion counting bug - Fix bed modification kit --- data/actions/scripts/other/bed_modification_kits.lua | 4 ++-- src/actions.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/actions/scripts/other/bed_modification_kits.lua b/data/actions/scripts/other/bed_modification_kits.lua index 9d2185c6c6..4be13504a9 100644 --- a/data/actions/scripts/other/bed_modification_kits.lua +++ b/data/actions/scripts/other/bed_modification_kits.lua @@ -33,12 +33,12 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) end for _, bed in pairs(beds) do - if bed[1][1] == targetItemId then + if bed[1][1] == targetItemId or table.contains({1758, 5502}, targetItemId) then toPosition:sendMagicEffect(CONST_ME_POFF) toPosition.y = toPosition.y + 1 internalBedTransform(item, target, toPosition, newBed[1]) break - elseif bed[2][1] == targetItemId then + elseif bed[2][1] == targetItemId or table.contains({1756, 5500}, targetItemId) then toPosition:sendMagicEffect(CONST_ME_POFF) toPosition.x = toPosition.x + 1 internalBedTransform(item, target, toPosition, newBed[2]) diff --git a/src/actions.cpp b/src/actions.cpp index 05b8c9c40e..42e56bf95f 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -417,7 +417,8 @@ bool Actions::useItem(Player* player, const Position& pos, uint8_t index, Item* player->stopWalk(); if (isHotkey) { - showUseHotkeyMessage(player, item, player->getItemTypeCount(item->getID(), item->getSubType())); + uint16_t subType = item->getSubType(); + showUseHotkeyMessage(player, item, player->getItemTypeCount(item->getID(), subType != item->getItemCount() ? subType : -1)); } ReturnValue ret = internalUseItem(player, pos, index, item, isHotkey); @@ -447,7 +448,8 @@ bool Actions::useItemEx(Player* player, const Position& fromPos, const Position& } if (isHotkey) { - showUseHotkeyMessage(player, item, player->getItemTypeCount(item->getID(), item->getSubType())); + uint16_t subType = item->getSubType(); + showUseHotkeyMessage(player, item, player->getItemTypeCount(item->getID(), subType != item->getItemCount() ? subType : -1)); } if (!action->executeUse(player, item, fromPos, action->getTarget(player, creature, toPos, toStackPos), toPos, isHotkey)) {