diff --git a/README.md b/README.md index e7d8c226..76ca6a9e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ use the [Game Client](https://github.com/jprzimba/gameclient/releases) or [mehah You can see the complete change log for Crystal Server at [this link](https://github.com/jprzimba/crystalserver/blob/main/markdowns/CHANGELOG.md). -If you want edit the map, use the [Remere's Map Editor](https://www.mediafire.com/file/o2e06j8j2lsxmh8/RME.rar/file). +If you want edit the map, use the [Remere's Map Editor](https://github.com/jprzimba/rme-crystalserver/releases). You are subject to our code of conduct, read at [this link](https://github.com/jprzimba/crystalserver/blob/main/markdowns/CODE_OF_CONDUCT.md). @@ -35,7 +35,8 @@ Enjoy our [Discord](https://discord.gg/7AYJEHTghQ) ### Thanks - [Open Tibia](https://github.com/opentibia/server) and their [contributors](https://github.com/opentibia/server/graphs/contributors). - [The Forgotten Server](https://github.com/otland/forgottenserver) and their [contributors](https://github.com/otland/forgottenserver/graphs/contributors). -- [Canary Server](https://github.com/opentibiabr/canary) and its [contributors](https://github.com/opentibiabr/canary/graphs/contributors). +- [Crsystal Server](https://github.com/jprzimba/crystalserver) and their [contributors](https://github.com/jprzimba/crystalserver/graphs/contributors). +- [Canary Server](https://github.com/opentibiabr/canary) and their [contributors](https://github.com/opentibiabr/canary/graphs/contributors). ### Issues diff --git a/data-global/monster/1330/bosses/mitmah_vanguard.lua b/data-global/monster/1330/bosses/mitmah_vanguard.lua index 76e69972..f4ba7ad1 100644 --- a/data-global/monster/1330/bosses/mitmah_vanguard.lua +++ b/data-global/monster/1330/bosses/mitmah_vanguard.lua @@ -81,7 +81,7 @@ monster.loot = { { id = 44621, chance = 440 }, -- health potion { id = 44624, chance = 440 }, -- halberd { name = "Gold Coin", chance = 9650, maxCount = 400 }, - { name = "Crystal Coin", chance = 700, maxCount = 2 }, + { name = "Crystal Coin", chance = 700, maxCount = 2 }, { name = "Great Spirit Potion", chance = 2450 }, { name = "Ultimate Mana Potion", chance = 5450, maxCount = 15 }, { name = "Ultimate Health Potion", chance = 5450, maxCount = 15 }, @@ -103,7 +103,6 @@ monster.defenses = { armor = 45, mitigation = 3.00, { name = "combat", interval = 2000, chance = 8, type = COMBAT_HEALING, minDamage = 2500, maxDamage = 5000, effect = CONST_ME_MAGIC_GREEN, target = false }, - } monster.elements = { @@ -141,4 +140,3 @@ mType.onMove = function(monster, creature, fromPosition, toPosition) end mType.onSay = function(monster, creature, type, message) end mType:register(monster) - diff --git a/data-global/monster/1330/bulltaur_alchemist.lua b/data-global/monster/1330/bulltaur_alchemist.lua index cd5e172b..e61665b3 100644 --- a/data-global/monster/1330/bulltaur_alchemist.lua +++ b/data-global/monster/1330/bulltaur_alchemist.lua @@ -83,11 +83,11 @@ monster.loot = { { name = "platinum coin", chance = 3533, maxCount = 7 }, { id = 44736, chance = 4545 }, -- stealth ring { id = 44737, chance = 4545 }, -- stealth ring - { id = 44738, chance = 4545 }, -- stealth ring + { id = 44738, chance = 4545 }, -- stealth ring { name = "might ring", chance = 4285 }, { name = "mino shield", chance = 840 }, { name = "dragon hammer", chance = 420 }, - { id = 3041, chance = 4545 }, -- stealth ring + { id = 3041, chance = 4545 }, -- stealth ring { name = "ultimate health potion", chance = 5285 }, { name = "great mana potion", chance = 6285 }, { name = "alloy legs", chance = 1285 }, @@ -100,7 +100,6 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 90, maxDamage = -390 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -450, range = 3, radius = 4, effect = CONST_ME_ICEAREA, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -450, range = 3, radius = 4, effect = 170, target = true }, - } monster.defenses = { @@ -130,4 +129,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/1330/bulltaur_brute.lua b/data-global/monster/1330/bulltaur_brute.lua index 403a0505..2f82a12e 100644 --- a/data-global/monster/1330/bulltaur_brute.lua +++ b/data-global/monster/1330/bulltaur_brute.lua @@ -84,11 +84,11 @@ monster.loot = { { name = "platinum coin", chance = 3533, maxCount = 7 }, { id = 44736, chance = 4545 }, -- stealth ring { id = 44737, chance = 4545 }, -- stealth ring - { id = 44738, chance = 4545 }, -- stealth ring + { id = 44738, chance = 4545 }, -- stealth ring { name = "might ring", chance = 14285 }, { name = "mino shield", chance = 840 }, { name = "dragon hammer", chance = 420 }, - { id = 3041, chance = 4545 }, -- stealth ring + { id = 3041, chance = 4545 }, -- stealth ring } monster.attacks = { diff --git a/data-global/monster/1330/bulltaur_forgepriest.lua b/data-global/monster/1330/bulltaur_forgepriest.lua index 1fea126f..7058291c 100644 --- a/data-global/monster/1330/bulltaur_forgepriest.lua +++ b/data-global/monster/1330/bulltaur_forgepriest.lua @@ -83,11 +83,11 @@ monster.loot = { { name = "platinum coin", chance = 3533, maxCount = 7 }, { id = 44736, chance = 4545 }, -- stealth ring { id = 44737, chance = 4545 }, -- stealth ring - { id = 44738, chance = 4545 }, -- stealth ring + { id = 44738, chance = 4545 }, -- stealth ring { name = "might ring", chance = 14285 }, { name = "mino shield", chance = 840 }, { name = "dragon hammer", chance = 420 }, - { id = 3041, chance = 4545 }, -- stealth ring + { id = 3041, chance = 4545 }, -- stealth ring { name = "ultimate health potion", chance = 5285 }, { name = "great mana potion", chance = 6285 }, { name = "alloy legs", chance = 1285 }, @@ -108,7 +108,6 @@ monster.attacks = { { name = "speed", interval = 2000, chance = 15, speedChange = -650, range = 7, radius = 4, effect = 168, target = false, duration = 1500 }, { name = "energy wave", interval = 2000, chance = 15, minDamage = -350, maxDamage = -500, length = 1, spread = 0, effect = CONST_ME_ENERGYAREA, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -450, range = 3, radius = 4, effect = 170, target = true }, - } monster.defenses = { @@ -138,4 +137,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/1330/mitmah scout.lua b/data-global/monster/1330/mitmah scout.lua index 3f446b75..cf28460c 100644 --- a/data-global/monster/1330/mitmah scout.lua +++ b/data-global/monster/1330/mitmah scout.lua @@ -82,8 +82,8 @@ monster.loot = { { name = "platinum coin", chance = 5000, maxCount = 10 }, { name = "Strong Health Potion", chance = 1200, maxCount = 3 }, { name = "Green Crystal Splinter", chance = 1000, maxCount = 1 }, - { name = "Brown Crystal Splinter", chance = 1000, maxCount = 1 }, - { name = "Broken Mitmah Necklace", chance = 500, maxCount = 1 }, + { name = "Brown Crystal Splinter", chance = 1000, maxCount = 1 }, + { name = "Broken Mitmah Necklace", chance = 500, maxCount = 1 }, { name = "Ruby Necklace", chance = 1000, maxCount = 1 }, { name = "Yellow Gem", chance = 900, maxCount = 3 }, { name = "Gold Ingot", chance = 1000, maxCount = 1 }, @@ -91,10 +91,9 @@ monster.loot = { { name = "Onyx Chip", chance = 1000, maxCount = 1 }, { name = "Opal", chance = 1000, maxCount = 1 }, { name = "Prismatic Quartz", chance = 1000, maxCount = 1 }, - { name = "Gold-Brocaded Cloth", chance = 1000, maxCount = 1 }, - { name = "Ornate Crossbow", chance = 400, maxCount = 1 }, + { name = "Gold-Brocaded Cloth", chance = 1000, maxCount = 1 }, + { name = "Ornate Crossbow", chance = 400, maxCount = 1 }, { name = "Broken Mitmah Necklace", chance = 500, maxCount = 1 }, - } monster.attacks = { diff --git a/data-global/monster/quests/rotten_bood/ayana the crimson curse.lua b/data-global/monster/quests/rotten_bood/ayana the crimson curse.lua index 6349dfd2..2204b970 100644 --- a/data-global/monster/quests/rotten_bood/ayana the crimson curse.lua +++ b/data-global/monster/quests/rotten_bood/ayana the crimson curse.lua @@ -128,4 +128,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bloated_man-maggot.lua b/data-global/monster/quests/rotten_bood/bloated_man-maggot.lua index fabd1ddd..ee98d242 100644 --- a/data-global/monster/quests/rotten_bood/bloated_man-maggot.lua +++ b/data-global/monster/quests/rotten_bood/bloated_man-maggot.lua @@ -123,4 +123,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/bosses/bakragore.lua b/data-global/monster/quests/rotten_bood/bosses/bakragore.lua index db7e9c7b..62573a3d 100644 --- a/data-global/monster/quests/rotten_bood/bosses/bakragore.lua +++ b/data-global/monster/quests/rotten_bood/bosses/bakragore.lua @@ -31,7 +31,7 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2367, - bossRace = RARITY_NEMESIS + bossRace = RARITY_NEMESIS, } monster.strategiesTarget = { @@ -66,8 +66,7 @@ monster.light = { color = 0, } -monster.summon = { -} +monster.summon = {} monster.voices = { interval = 5000, @@ -75,10 +74,10 @@ monster.voices = { } monster.loot = { - { id = 3043, chance = 100000, maxCount = 30 }, + { id = 3043, chance = 100000, maxCount = 30 }, { id = 7643, chance = 40000, maxCount = 20 }, - { id = 238, chance = 40000, maxCount = 20 }, - { id = 7642, chance = 40000, maxCount = 20 }, + { id = 238, chance = 40000, maxCount = 20 }, + { id = 7642, chance = 40000, maxCount = 20 }, { name = "white gem", chance = 30000, maxCount = 1 }, { name = "giant sapphire", chance = 3000, maxCount = 1 }, { id = 44008, chance = 10000, maxCount = 2 }, @@ -131,23 +130,23 @@ monster.loot = { { id = 43884, chance = 420 }, { id = 43885, chance = 430 }, { id = 43887, chance = 440 }, - { id = 36478, chance = 450 } + { id = 36478, chance = 450 }, } monster.attacks = { - { name ="melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -3000 }, - { name ="combat", interval = 3000, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -900, maxDamage = -1100, range = 7, radius = 7, shootEffect = CONST_ANI_ICE, effect = 243, target = true }, - { name ="combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -1000, length = 8, spread = 3, effect = 252, target = false }, - { name ="combat", interval = 3000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -1000, maxDamage = -2000, length = 8, spread = 3, effect = 249, target = false }, - { name ="combat", interval = 2000, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -950, maxDamage = -2400, range = 7, radius = 3, shootEffect = 37, effect = 240, target = true }, - { name ="combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1000, maxDamage = -2500, length = 8, spread = 3, effect = 244, target = false }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -3000 }, + { name = "combat", interval = 3000, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -900, maxDamage = -1100, range = 7, radius = 7, shootEffect = CONST_ANI_ICE, effect = 243, target = true }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -1000, length = 8, spread = 3, effect = 252, target = false }, + { name = "combat", interval = 3000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -1000, maxDamage = -2000, length = 8, spread = 3, effect = 249, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -950, maxDamage = -2400, range = 7, radius = 3, shootEffect = 37, effect = 240, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1000, maxDamage = -2500, length = 8, spread = 3, effect = 244, target = false }, } monster.defenses = { defense = 135, armor = 135, - { name ="combat", interval = 3000, chance = 15, type = COMBAT_HEALING, minDamage = 2500, maxDamage = 3500, effect = 236, target = false }, - { name ="speed", interval = 4000, chance = 80, speedChange = 700, effect = CONST_ME_MAGIC_RED, target = false, duration = 6000 } + { name = "combat", interval = 3000, chance = 15, type = COMBAT_HEALING, minDamage = 2500, maxDamage = 3500, effect = 236, target = false }, + { name = "speed", interval = 4000, chance = 80, speedChange = 700, effect = CONST_ME_MAGIC_RED, target = false, duration = 6000 }, } monster.elements = { diff --git a/data-global/monster/quests/rotten_bood/bosses/chagorz.lua b/data-global/monster/quests/rotten_bood/bosses/chagorz.lua index ec084505..92f26711 100644 --- a/data-global/monster/quests/rotten_bood/bosses/chagorz.lua +++ b/data-global/monster/quests/rotten_bood/bosses/chagorz.lua @@ -31,7 +31,7 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2366, - bossRace = RARITY_NEMESIS + bossRace = RARITY_NEMESIS, } monster.strategiesTarget = { @@ -67,8 +67,7 @@ monster.light = { color = 0, } -monster.summon = { -} +monster.summon = {} monster.voices = { interval = 5000, @@ -76,42 +75,42 @@ monster.voices = { } monster.loot = { - { id = 43895, chance = 4996}, -- bag you covet, - { name = "berserk potion", chance = 2758, minCount = 0, maxCount = 40}, - { id = 3041, chance = 4702, minCount = 0, maxCount = 1}, -- blue gem, - { name = "bullseye potion", chance = 3972, minCount = 0, maxCount = 31}, - { name = "crystal coin", chance = 4018, minCount = 0, maxCount = 100}, - { name = "darklight figurine", chance = 3164}, - { name = "giant topaz", chance = 3744, minCount = 0, maxCount = 1}, - { name = "giant sapphire", chance = 4917, minCount = 0, maxCount = 1}, - { name = "gold ingot", chance = 2250, minCount = 0, maxCount = 1}, - { name = "green gem", chance = 4373, minCount = 0, maxCount = 1}, - { name = "mastermind potion", chance = 3945, minCount = 0, maxCount = 27}, - { name = "raw watermelon tourmaline", chance = 1876, minCount = 0, maxCount = 1}, - { id = 3039, chance = 2121, minCount = 0, maxCount = 1}, -- red gem, - { name = "supreme health potion", chance = 2303, minCount = 0, maxCount = 164}, - { name = "the essence of chagorz", chance = 4820}, - { name = "unicorn figurine", chance = 3030}, - { name = "ultimate mana potion", chance = 2519, minCount = 0, maxCount = 98}, - { name = "ultimate spirit potion", chance = 2047, minCount = 0, maxCount = 127}, - { name = "violet gem", chance = 4963, minCount = 0, maxCount = 1}, - { name = "white gem", chance = 4927, minCount = 0, maxCount = 3}, - { name = "yellow gem", chance = 1940, minCount = 0, maxCount = 1} + { id = 43895, chance = 4996 }, -- bag you covet, + { name = "berserk potion", chance = 2758, minCount = 0, maxCount = 40 }, + { id = 3041, chance = 4702, minCount = 0, maxCount = 1 }, -- blue gem, + { name = "bullseye potion", chance = 3972, minCount = 0, maxCount = 31 }, + { name = "crystal coin", chance = 4018, minCount = 0, maxCount = 100 }, + { name = "darklight figurine", chance = 3164 }, + { name = "giant topaz", chance = 3744, minCount = 0, maxCount = 1 }, + { name = "giant sapphire", chance = 4917, minCount = 0, maxCount = 1 }, + { name = "gold ingot", chance = 2250, minCount = 0, maxCount = 1 }, + { name = "green gem", chance = 4373, minCount = 0, maxCount = 1 }, + { name = "mastermind potion", chance = 3945, minCount = 0, maxCount = 27 }, + { name = "raw watermelon tourmaline", chance = 1876, minCount = 0, maxCount = 1 }, + { id = 3039, chance = 2121, minCount = 0, maxCount = 1 }, -- red gem, + { name = "supreme health potion", chance = 2303, minCount = 0, maxCount = 164 }, + { name = "the essence of chagorz", chance = 4820 }, + { name = "unicorn figurine", chance = 3030 }, + { name = "ultimate mana potion", chance = 2519, minCount = 0, maxCount = 98 }, + { name = "ultimate spirit potion", chance = 2047, minCount = 0, maxCount = 127 }, + { name = "violet gem", chance = 4963, minCount = 0, maxCount = 1 }, + { name = "white gem", chance = 4927, minCount = 0, maxCount = 3 }, + { name = "yellow gem", chance = 1940, minCount = 0, maxCount = 1 }, } monster.attacks = { - { name ="melee", interval = 2000, chance = 100, minDamage = -1300, maxDamage = -2250 }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -900, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -900, range = 4, radius = 4, effect = 241, target = true }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -1000, maxDamage = -1200, length = 10, spread = 3, effect = CONST_ME_POFF, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -1500, maxDamage = -1900, length = 10, spread = 3, effect = 225, target = false }, - { name ="speed", interval = 2000, chance = 20, speedChange = -600, radius = 7, effect = CONST_ME_MAGIC_GREEN, target = false, duration = 20000 }, + { name = "melee", interval = 2000, chance = 100, minDamage = -1300, maxDamage = -2250 }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -900, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -900, range = 4, radius = 4, effect = 241, target = true }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -1000, maxDamage = -1200, length = 10, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -1500, maxDamage = -1900, length = 10, spread = 3, effect = 225, target = false }, + { name = "speed", interval = 2000, chance = 20, speedChange = -600, radius = 7, effect = CONST_ME_MAGIC_GREEN, target = false, duration = 20000 }, } monster.defenses = { defense = 105, armor = 105, - { name ="combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 700, maxDamage = 1500, effect = 236, target = false }, + { name = "combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 700, maxDamage = 1500, effect = 236, target = false }, } monster.elements = { @@ -124,7 +123,7 @@ monster.elements = { { type = "COMBAT_EARTHDAMAGE", percent = 10 }, { type = "COMBAT_LIFEDRAIN", percent = 0 }, { type = "COMBAT_MANADRAIN", percent = 0 }, - { type = "COMBAT_DROWNDAMAGE", percent = 0 } + { type = "COMBAT_DROWNDAMAGE", percent = 0 }, } monster.immunities = { diff --git a/data-global/monster/quests/rotten_bood/bosses/echo_of_chagorz.lua b/data-global/monster/quests/rotten_bood/bosses/echo_of_chagorz.lua index cb3b911d..e0e23405 100644 --- a/data-global/monster/quests/rotten_bood/bosses/echo_of_chagorz.lua +++ b/data-global/monster/quests/rotten_bood/bosses/echo_of_chagorz.lua @@ -98,4 +98,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bosses/echo_of_ichgahal.lua b/data-global/monster/quests/rotten_bood/bosses/echo_of_ichgahal.lua index 3e164571..f35d2e13 100644 --- a/data-global/monster/quests/rotten_bood/bosses/echo_of_ichgahal.lua +++ b/data-global/monster/quests/rotten_bood/bosses/echo_of_ichgahal.lua @@ -98,4 +98,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bosses/echo_of_murcion.lua b/data-global/monster/quests/rotten_bood/bosses/echo_of_murcion.lua index 167c72e5..83a1b002 100644 --- a/data-global/monster/quests/rotten_bood/bosses/echo_of_murcion.lua +++ b/data-global/monster/quests/rotten_bood/bosses/echo_of_murcion.lua @@ -98,4 +98,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bosses/echo_of_vemiath.lua b/data-global/monster/quests/rotten_bood/bosses/echo_of_vemiath.lua index dfeb9667..d865ba9a 100644 --- a/data-global/monster/quests/rotten_bood/bosses/echo_of_vemiath.lua +++ b/data-global/monster/quests/rotten_bood/bosses/echo_of_vemiath.lua @@ -98,4 +98,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bosses/elder_bloodjaw.lua b/data-global/monster/quests/rotten_bood/bosses/elder_bloodjaw.lua index b9fbbcd2..3693a89a 100644 --- a/data-global/monster/quests/rotten_bood/bosses/elder_bloodjaw.lua +++ b/data-global/monster/quests/rotten_bood/bosses/elder_bloodjaw.lua @@ -59,7 +59,7 @@ monster.light = { monster.voices = { interval = 5000, chance = 10, - { text = "SHWAARR!", yell = true } + { text = "SHWAARR!", yell = true }, } monster.loot = {} @@ -98,4 +98,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bosses/ichgahal.lua b/data-global/monster/quests/rotten_bood/bosses/ichgahal.lua index 530f317a..e97f315c 100644 --- a/data-global/monster/quests/rotten_bood/bosses/ichgahal.lua +++ b/data-global/monster/quests/rotten_bood/bosses/ichgahal.lua @@ -31,7 +31,7 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2364, - bossRace = RARITY_NEMESIS + bossRace = RARITY_NEMESIS, } monster.strategiesTarget = { @@ -71,7 +71,6 @@ monster.summon = { maxSummons = 6, summons = { { name = "Mushroom", chance = 40, interval = 1000, count = 6 }, - }, } @@ -81,45 +80,45 @@ monster.voices = { } monster.loot = { - { name = "crystal coin", chance = 4872, minCount = 1, maxCount = 124}, - { name = "green gem", chance = 2152, minCount = 1, maxCount = 5}, - { name = "yellow gem", chance = 4094, minCount = 1, maxCount = 5}, - { name = "violet gem", chance = 2278, minCount = 1, maxCount = 4}, - { id = 3039, chance = 2066, minCount = 1, maxCount = 3}, -- red gem, - { id = 3041, chance = 4181, minCount = 1, maxCount = 4}, -- blue gem, - { name = "white gem", chance = 2254, minCount = 1, maxCount = 3}, - { name = "gold ingot", chance = 4814}, - { name = "raw watermelon tourmaline", chance = 2852, minCount = 1, maxCount = 2}, - { name = "amber with a dragonfly", chance = 3322}, - { name = "amber with a bug", chance = 2521, minCount = 1, maxCount = 2}, - { name = "berserk potion", chance = 4443, minCount = 1, maxCount = 45}, - { name = "bullseye potion", chance = 4149, minCount = 1, maxCount = 45}, - { name = "mastermind potion", chance = 3393, minCount = 1, maxCount = 45}, - { name = "supreme health potion", chance = 2239, minCount = 1, maxCount = 181}, - { name = "ultimate spirit potion", chance = 2726, minCount = 1, maxCount = 153}, - { name = "ultimate mana potion", chance = 1899, minCount = 1, maxCount = 179}, - { name = "the essence of ichgahal", chance = 3703}, - { name = "unicorn figurine", chance = 3446}, - { name = "ichgahal's fungal infestation", chance = 4352}, - { name = "putrefactive figurine", chance = 2632}, - { name = "spiritual horseshoe", chance = 2248}, - { name = "cursed wood", chance = 4739}, - { id = 43895, chance = 3403}, -- bag you covet, - { name = "royal almandine", chance = 2268} + { name = "crystal coin", chance = 4872, minCount = 1, maxCount = 124 }, + { name = "green gem", chance = 2152, minCount = 1, maxCount = 5 }, + { name = "yellow gem", chance = 4094, minCount = 1, maxCount = 5 }, + { name = "violet gem", chance = 2278, minCount = 1, maxCount = 4 }, + { id = 3039, chance = 2066, minCount = 1, maxCount = 3 }, -- red gem, + { id = 3041, chance = 4181, minCount = 1, maxCount = 4 }, -- blue gem, + { name = "white gem", chance = 2254, minCount = 1, maxCount = 3 }, + { name = "gold ingot", chance = 4814 }, + { name = "raw watermelon tourmaline", chance = 2852, minCount = 1, maxCount = 2 }, + { name = "amber with a dragonfly", chance = 3322 }, + { name = "amber with a bug", chance = 2521, minCount = 1, maxCount = 2 }, + { name = "berserk potion", chance = 4443, minCount = 1, maxCount = 45 }, + { name = "bullseye potion", chance = 4149, minCount = 1, maxCount = 45 }, + { name = "mastermind potion", chance = 3393, minCount = 1, maxCount = 45 }, + { name = "supreme health potion", chance = 2239, minCount = 1, maxCount = 181 }, + { name = "ultimate spirit potion", chance = 2726, minCount = 1, maxCount = 153 }, + { name = "ultimate mana potion", chance = 1899, minCount = 1, maxCount = 179 }, + { name = "the essence of ichgahal", chance = 3703 }, + { name = "unicorn figurine", chance = 3446 }, + { name = "ichgahal's fungal infestation", chance = 4352 }, + { name = "putrefactive figurine", chance = 2632 }, + { name = "spiritual horseshoe", chance = 2248 }, + { name = "cursed wood", chance = 4739 }, + { id = 43895, chance = 3403 }, -- bag you covet, + { name = "royal almandine", chance = 2268 }, } monster.attacks = { - { name ="melee", interval = 3000, chance = 100, minDamage = -1500, maxDamage = -2300 }, - { name ="combat", interval = 1000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1000, length = 12, spread = 3, effect = 249, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -2600, maxDamage = -2300, length = 12, spread = 3, effect = 193, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -900, maxDamage = -1500, length = 6, spread = 2, effect = CONST_ME_FIREAREA, target = false }, - { name ="speed", interval = 2000, chance = 35, speedChange = -600, radius = 8, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 } + { name = "melee", interval = 3000, chance = 100, minDamage = -1500, maxDamage = -2300 }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1000, length = 12, spread = 3, effect = 249, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -2600, maxDamage = -2300, length = 12, spread = 3, effect = 193, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -900, maxDamage = -1500, length = 6, spread = 2, effect = CONST_ME_FIREAREA, target = false }, + { name = "speed", interval = 2000, chance = 35, speedChange = -600, radius = 8, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, } monster.defenses = { defense = 105, armor = 105, - { name ="combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 800, maxDamage = 1200, effect = 236, target = false }, + { name = "combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 800, maxDamage = 1200, effect = 236, target = false }, } monster.elements = { diff --git a/data-global/monster/quests/rotten_bood/bosses/murcion.lua b/data-global/monster/quests/rotten_bood/bosses/murcion.lua index 69027cf2..84b37849 100644 --- a/data-global/monster/quests/rotten_bood/bosses/murcion.lua +++ b/data-global/monster/quests/rotten_bood/bosses/murcion.lua @@ -31,7 +31,7 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2362, - bossRace = RARITY_NEMESIS + bossRace = RARITY_NEMESIS, } monster.strategiesTarget = { @@ -67,8 +67,7 @@ monster.light = { color = 0, } -monster.summon = { -} +monster.summon = {} monster.voices = { interval = 5000, @@ -80,32 +79,32 @@ monster.loot = { { name = "supreme health potion", chance = 12500, maxCount = 156 }, { name = "ultimate mana potion", chance = 12500, maxCount = 18 }, { name = "ultimate spirit potion", chance = 2500, maxCount = 87 }, - { name = "berserk potion", chance =5500, maxCount = 16 }, - { name = "blue gem", chance = 2500}, + { name = "berserk potion", chance = 5500, maxCount = 16 }, + { name = "blue gem", chance = 2500 }, { name = "green gem", chance = 2500, maxCount = 2 }, { id = 36706, chance = 2500, maxCount = 4 }, -- red gem { name = "mastermind potion", chance = 2500, maxCount = 19 }, { name = "gold ingot", chance = 2500 }, { name = "white gem", chance = 2500 }, { name = "amber with a dragonfly", chance = 1250 }, - { name = "giant emerald", chance = 1250}, + { name = "giant emerald", chance = 1250 }, { name = "spiritual horseshoe", chance = 312 }, - { id = 43895, chance = 20 } -- bag you covet + { id = 43895, chance = 20 }, -- bag you covet } monster.attacks = { - { name ="melee", interval = 2000, chance = 100, minDamage = -1400, maxDamage = -2300 }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -900, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_HOLYDAMAGE, minDamage = -500, maxDamage = -900, range = 4, radius = 4, shootEffect = 31, effect = 248, target = true }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -1000, maxDamage = -1200, length = 10, spread = 3, effect = 53, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -1500, maxDamage = -1900, length = 10, spread = 3, effect = 158, target = false }, - { name ="speed", interval = 2000, chance = 20, speedChange = -600, radius = 7, effect = CONST_ME_POFF, target = false, duration = 20000 } + { name = "melee", interval = 2000, chance = 100, minDamage = -1400, maxDamage = -2300 }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -900, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_HOLYDAMAGE, minDamage = -500, maxDamage = -900, range = 4, radius = 4, shootEffect = 31, effect = 248, target = true }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -1000, maxDamage = -1200, length = 10, spread = 3, effect = 53, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -1500, maxDamage = -1900, length = 10, spread = 3, effect = 158, target = false }, + { name = "speed", interval = 2000, chance = 20, speedChange = -600, radius = 7, effect = CONST_ME_POFF, target = false, duration = 20000 }, } monster.defenses = { defense = 105, armor = 105, - { name ="combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 800, maxDamage = 1500, effect = 236, target = false }, + { name = "combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 800, maxDamage = 1500, effect = 236, target = false }, } monster.elements = { diff --git a/data-global/monster/quests/rotten_bood/bosses/mushroom.lua b/data-global/monster/quests/rotten_bood/bosses/mushroom.lua index 96b4be78..13d98616 100644 --- a/data-global/monster/quests/rotten_bood/bosses/mushroom.lua +++ b/data-global/monster/quests/rotten_bood/bosses/mushroom.lua @@ -14,14 +14,12 @@ monster.outfit = { } monster.raceId = 61772 -monster.Bestiary = { - -} +monster.Bestiary = {} monster.health = 10000 monster.maxHealth = 10000 monster.race = "venom" ---monster.corpse = +--monster.corpse = monster.speed = 0 monster.manaCost = 0 @@ -67,9 +65,7 @@ monster.voices = { chance = 30, } -monster.loot = { - -} +monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, @@ -104,4 +100,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/bosses/pillar of dark energy.lua b/data-global/monster/quests/rotten_bood/bosses/pillar of dark energy.lua index fe1c7c7d..a74a685f 100644 --- a/data-global/monster/quests/rotten_bood/bosses/pillar of dark energy.lua +++ b/data-global/monster/quests/rotten_bood/bosses/pillar of dark energy.lua @@ -13,11 +13,10 @@ monster.outfit = { lookMount = 0, } - monster.health = 37500 monster.maxHealth = 37500 monster.race = "venom" ---monster.corpse = +--monster.corpse = monster.speed = 0 monster.manaCost = 0 @@ -63,9 +62,7 @@ monster.voices = { chance = 30, } -monster.loot = { - -} +monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1450 }, @@ -101,4 +98,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/bosses/tamru_the_black.lua b/data-global/monster/quests/rotten_bood/bosses/tamru_the_black.lua index 1221d581..4b0f041d 100644 --- a/data-global/monster/quests/rotten_bood/bosses/tamru_the_black.lua +++ b/data-global/monster/quests/rotten_bood/bosses/tamru_the_black.lua @@ -115,4 +115,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/bosses/vemiath.lua b/data-global/monster/quests/rotten_bood/bosses/vemiath.lua index edad841b..54752edf 100644 --- a/data-global/monster/quests/rotten_bood/bosses/vemiath.lua +++ b/data-global/monster/quests/rotten_bood/bosses/vemiath.lua @@ -31,7 +31,7 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2365, - bossRace = RARITY_NEMESIS + bossRace = RARITY_NEMESIS, } monster.strategiesTarget = { @@ -70,52 +70,51 @@ monster.light = { monster.summon = { maxSummons = 8, summons = { - { name = "Pillar of Dark Energy", chance = 38, interval = 1713, count = 7 } - } + { name = "Pillar of Dark Energy", chance = 38, interval = 1713, count = 7 }, + }, } -monster.voices = { -} +monster.voices = {} monster.loot = { - { name = "crystal coin", chance = 2832, minCount = 1, maxCount = 125}, - { name = "ultimate mana potion", chance = 3676, minCount = 1, maxCount = 211}, - { name = "ultimate spirit potion", chance = 4373, minCount = 1, maxCount = 35}, - { name = "supreme health potion", chance = 3446, minCount = 1, maxCount = 179}, - { name = "bullseye potion", chance = 3542, minCount = 1, maxCount = 42}, - { name = "berserk potion", chance = 4060, minCount = 1, maxCount = 45}, - { name = "mastermind potion", chance = 2891, minCount = 1, maxCount = 44}, - { id = 3041, chance = 3992, minCount = 0, maxCount = 5}, -- blue gem, - { name = "green gem", chance = 1989, minCount = 0, maxCount = 5}, - { id = 3039, chance = 2491, minCount = 0, maxCount = 5}, -- red gem, - { name = "yellow gem", chance = 3194, minCount = 0, maxCount = 5}, - { name = "violet gem", chance = 2163, minCount = 0, maxCount = 5}, - { name = "gold ingot", chance = 2249}, - { name = "giant emerald", chance = 2434}, - { name = "giant topaz", chance = 1850}, - { name = "giant amethyst", chance = 1698}, - { name = "raw watermelon tourmaline", chance = 4768}, - { name = "vemiath's infused basalt", chance = 3249, minCount = 0, maxCount = 1}, - { name = "dragon figurine", chance = 3595}, - { name = "darklight figurine", chance = 4829}, - { name = "the essence of vemiath", chance = 4167}, - { name = "spiritual horseshoe", chance = 1813}, - { id = 43895, chance = 2280}, -- bag you covet + { name = "crystal coin", chance = 2832, minCount = 1, maxCount = 125 }, + { name = "ultimate mana potion", chance = 3676, minCount = 1, maxCount = 211 }, + { name = "ultimate spirit potion", chance = 4373, minCount = 1, maxCount = 35 }, + { name = "supreme health potion", chance = 3446, minCount = 1, maxCount = 179 }, + { name = "bullseye potion", chance = 3542, minCount = 1, maxCount = 42 }, + { name = "berserk potion", chance = 4060, minCount = 1, maxCount = 45 }, + { name = "mastermind potion", chance = 2891, minCount = 1, maxCount = 44 }, + { id = 3041, chance = 3992, minCount = 0, maxCount = 5 }, -- blue gem, + { name = "green gem", chance = 1989, minCount = 0, maxCount = 5 }, + { id = 3039, chance = 2491, minCount = 0, maxCount = 5 }, -- red gem, + { name = "yellow gem", chance = 3194, minCount = 0, maxCount = 5 }, + { name = "violet gem", chance = 2163, minCount = 0, maxCount = 5 }, + { name = "gold ingot", chance = 2249 }, + { name = "giant emerald", chance = 2434 }, + { name = "giant topaz", chance = 1850 }, + { name = "giant amethyst", chance = 1698 }, + { name = "raw watermelon tourmaline", chance = 4768 }, + { name = "vemiath's infused basalt", chance = 3249, minCount = 0, maxCount = 1 }, + { name = "dragon figurine", chance = 3595 }, + { name = "darklight figurine", chance = 4829 }, + { name = "the essence of vemiath", chance = 4167 }, + { name = "spiritual horseshoe", chance = 1813 }, + { id = 43895, chance = 2280 }, -- bag you covet } monster.attacks = { - { name ="melee", interval = 2000, chance = 100, minDamage = -1500, maxDamage = -2500 }, - { name ="combat", interval = 3000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1000, length = 10, spread = 3, effect = 244, target = false }, - { name ="speed", interval = 2000, chance = 25, speedChange = -600, radius = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, - { name ="combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -300, maxDamage = -700, radius = 5, effect = 243, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name ="combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false } + { name = "melee", interval = 2000, chance = 100, minDamage = -1500, maxDamage = -2500 }, + { name = "combat", interval = 3000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1000, length = 10, spread = 3, effect = 244, target = false }, + { name = "speed", interval = 2000, chance = 25, speedChange = -600, radius = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -300, maxDamage = -700, radius = 5, effect = 243, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { defense = 105, armor = 105, - { name ="combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 800, maxDamage = 1500, effect = 236, target = false }, + { name = "combat", interval = 3000, chance = 10, type = COMBAT_HEALING, minDamage = 800, maxDamage = 1500, effect = 236, target = false }, } monster.elements = { diff --git a/data-global/monster/quests/rotten_bood/converter.lua b/data-global/monster/quests/rotten_bood/converter.lua index 36f3743f..7b6eccb0 100644 --- a/data-global/monster/quests/rotten_bood/converter.lua +++ b/data-global/monster/quests/rotten_bood/converter.lua @@ -75,7 +75,6 @@ monster.voices = { chance = 30, } - monster.loot = { { name = "crystal coin", chance = 5230, maxCount = 1 }, { name = "darklight obsidian axe", chance = 6963, maxCount = 1 }, @@ -122,4 +121,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/darklight_construct.lua b/data-global/monster/quests/rotten_bood/darklight_construct.lua index dd0e08ea..e5362dd6 100644 --- a/data-global/monster/quests/rotten_bood/darklight_construct.lua +++ b/data-global/monster/quests/rotten_bood/darklight_construct.lua @@ -123,4 +123,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/darklight_emitter.lua b/data-global/monster/quests/rotten_bood/darklight_emitter.lua index 1ad60115..990d11dd 100644 --- a/data-global/monster/quests/rotten_bood/darklight_emitter.lua +++ b/data-global/monster/quests/rotten_bood/darklight_emitter.lua @@ -121,4 +121,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/darklight_matter.lua b/data-global/monster/quests/rotten_bood/darklight_matter.lua index fc29520c..92509349 100644 --- a/data-global/monster/quests/rotten_bood/darklight_matter.lua +++ b/data-global/monster/quests/rotten_bood/darklight_matter.lua @@ -123,4 +123,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/darklight_source.lua b/data-global/monster/quests/rotten_bood/darklight_source.lua index a3cdcbe9..da649280 100644 --- a/data-global/monster/quests/rotten_bood/darklight_source.lua +++ b/data-global/monster/quests/rotten_bood/darklight_source.lua @@ -120,4 +120,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/darklight_striker.lua b/data-global/monster/quests/rotten_bood/darklight_striker.lua index ebf70f7a..9fbedae7 100644 --- a/data-global/monster/quests/rotten_bood/darklight_striker.lua +++ b/data-global/monster/quests/rotten_bood/darklight_striker.lua @@ -123,4 +123,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/foxmouse.lua b/data-global/monster/quests/rotten_bood/foxmouse.lua index 7e3ad7b6..19498c78 100644 --- a/data-global/monster/quests/rotten_bood/foxmouse.lua +++ b/data-global/monster/quests/rotten_bood/foxmouse.lua @@ -91,4 +91,4 @@ monster.immunities = { { type = "bleed", condition = false }, } -mType:register(monster) \ No newline at end of file +mType:register(monster) diff --git a/data-global/monster/quests/rotten_bood/meandering_mushroom.lua b/data-global/monster/quests/rotten_bood/meandering_mushroom.lua index fd882a4e..e9150ebb 100644 --- a/data-global/monster/quests/rotten_bood/meandering_mushroom.lua +++ b/data-global/monster/quests/rotten_bood/meandering_mushroom.lua @@ -17,7 +17,7 @@ monster.raceId = 2376 monster.Bestiary = { class = "Vermin", race = BESTY_RACE_VERMIN, - toKill = 5000, + toKill = 5000, FirstUnlock = 200, SecondUnlock = 2000, CharmsPoints = 100, @@ -123,4 +123,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/mycobiontic_beetle.lua b/data-global/monster/quests/rotten_bood/mycobiontic_beetle.lua index c22e04c6..1c2336af 100644 --- a/data-global/monster/quests/rotten_bood/mycobiontic_beetle.lua +++ b/data-global/monster/quests/rotten_bood/mycobiontic_beetle.lua @@ -126,4 +126,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/oozing_carcass.lua b/data-global/monster/quests/rotten_bood/oozing_carcass.lua index 6a91a48e..73d91fc3 100644 --- a/data-global/monster/quests/rotten_bood/oozing_carcass.lua +++ b/data-global/monster/quests/rotten_bood/oozing_carcass.lua @@ -17,7 +17,7 @@ monster.raceId = 2377 monster.Bestiary = { class = "Undead", race = BESTY_RACE_UNDEAD, - toKill = 5000, + toKill = 5000, FirstUnlock = 200, SecondUnlock = 2000, CharmsPoints = 100, @@ -126,4 +126,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/oozing_corpus.lua b/data-global/monster/quests/rotten_bood/oozing_corpus.lua index 7617dcb0..069f0df6 100644 --- a/data-global/monster/quests/rotten_bood/oozing_corpus.lua +++ b/data-global/monster/quests/rotten_bood/oozing_corpus.lua @@ -122,4 +122,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/rotten_man-maggot.lua b/data-global/monster/quests/rotten_bood/rotten_man-maggot.lua index 617d9f93..c3bb6767 100644 --- a/data-global/monster/quests/rotten_bood/rotten_man-maggot.lua +++ b/data-global/monster/quests/rotten_bood/rotten_man-maggot.lua @@ -122,4 +122,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/sopping_carcass.lua b/data-global/monster/quests/rotten_bood/sopping_carcass.lua index 379d04e4..61e6e608 100644 --- a/data-global/monster/quests/rotten_bood/sopping_carcass.lua +++ b/data-global/monster/quests/rotten_bood/sopping_carcass.lua @@ -17,7 +17,7 @@ monster.raceId = 2396 monster.Bestiary = { class = "Undead", race = BESTY_RACE_UNDEAD, - toKill = 5000, + toKill = 5000, FirstUnlock = 200, SecondUnlock = 2000, CharmsPoints = 100, @@ -76,15 +76,15 @@ monster.voices = { } monster.loot = { - { name = "crystal coin", chance = 90305}, - { name = "soul orb", chance = 27927, minCount = 1, maxCount = 3}, - { name = "lichen gobbler", chance = 15243}, - { name = "decayed finger bone", chance = 25798}, - { name = "rotten roots", chance = 9031}, - { name = "yellow gem", chance = 3836}, - { name = "underworld rod", chance = 1525}, - { id = 3039, chance = 3537}, -- red gem, - { name = "ripper lance", chance = 4752} + { name = "crystal coin", chance = 90305 }, + { name = "soul orb", chance = 27927, minCount = 1, maxCount = 3 }, + { name = "lichen gobbler", chance = 15243 }, + { name = "decayed finger bone", chance = 25798 }, + { name = "rotten roots", chance = 9031 }, + { name = "yellow gem", chance = 3836 }, + { name = "underworld rod", chance = 1525 }, + { id = 3039, chance = 3537 }, -- red gem, + { name = "ripper lance", chance = 4752 }, } monster.attacks = { @@ -99,7 +99,7 @@ monster.attacks = { monster.defenses = { defense = 60, armor = 112, - mitigation = 3.25 + mitigation = 3.25, } monster.elements = { @@ -123,4 +123,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/sopping_corpus.lua b/data-global/monster/quests/rotten_bood/sopping_corpus.lua index b328e9ba..5b58663a 100644 --- a/data-global/monster/quests/rotten_bood/sopping_corpus.lua +++ b/data-global/monster/quests/rotten_bood/sopping_corpus.lua @@ -125,4 +125,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/walking_pillar.lua b/data-global/monster/quests/rotten_bood/walking_pillar.lua index 1adb0736..af425033 100644 --- a/data-global/monster/quests/rotten_bood/walking_pillar.lua +++ b/data-global/monster/quests/rotten_bood/walking_pillar.lua @@ -127,4 +127,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/monster/quests/rotten_bood/wandering_pillar.lua b/data-global/monster/quests/rotten_bood/wandering_pillar.lua index ad7b1ac5..9cb3795a 100644 --- a/data-global/monster/quests/rotten_bood/wandering_pillar.lua +++ b/data-global/monster/quests/rotten_bood/wandering_pillar.lua @@ -128,4 +128,3 @@ monster.immunities = { } mType:register(monster) - diff --git a/data-global/npc/hireling.lua b/data-global/npc/hireling.lua index 164245ad..6c3047f8 100644 --- a/data-global/npc/hireling.lua +++ b/data-global/npc/hireling.lua @@ -350,13 +350,13 @@ function createHirelingType(HirelingName) -- Sell all loot in loot pouch { itemName = "talon", clientId = 3034, sell = 320 }, { itemName = "all loot", clientId = 23721, sell = 1 }, - + -- Alaistar { itemName = "cowbell", clientId = 21204, sell = 210 }, { itemName = "execowtioner mask", clientId = 21201, sell = 240 }, { itemName = "giant pacifier", clientId = 21199, sell = 170 }, { itemName = "glob of glooth", clientId = 21182, sell = 125 }, - { itemName = "glooth injection tube", clientId = 21103, sell = 350 }, + { itemName = "glooth injection tube", clientId = 21103, sell = 350 }, { itemName = "metal jaw", clientId = 21193, sell = 260 }, { itemName = "metal toe", clientId = 21198, sell = 430 }, { itemName = "mooh'tah shell", clientId = 21202, sell = 110 }, @@ -391,7 +391,7 @@ function createHirelingType(HirelingName) { itemName = "tower shield", clientId = 3428, sell = 8000 }, { itemName = "vampire shield", clientId = 3434, sell = 15000 }, { itemName = "warrior helmet", clientId = 3369, sell = 5000 }, - + -- Haroun { itemName = "axe ring", clientId = 3092, sell = 100 }, { itemName = "bronze amulet", clientId = 3056, sell = 50, count = 200 }, @@ -416,7 +416,7 @@ function createHirelingType(HirelingName) { itemName = "wand of starstorm", clientId = 8092, sell = 3600 }, { itemName = "wand of voodoo", clientId = 8094, sell = 4400 }, { itemName = "wand of vortex", clientId = 3074, sell = 100 }, - + -- flint { itemName = "crest of the deep seas", clientId = 21892, sell = 10000 }, { itemName = "cowtana", clientId = 21177, sell = 2500 }, @@ -437,7 +437,7 @@ function createHirelingType(HirelingName) { itemName = "heat core", clientId = 21167, sell = 10000 }, { itemName = "alloy legs", clientId = 21168, sell = 11000 }, { itemName = "execowtioner axe", clientId = 21176, sell = 12000 }, - + -- nah'bob { itemName = "angelic axe", clientId = 7436, sell = 5000 }, { itemName = "blue robe", clientId = 3567, sell = 10000 }, @@ -464,7 +464,7 @@ function createHirelingType(HirelingName) { itemName = "shadow sceptre", clientId = 7451, sell = 10000 }, { itemName = "thaian sword", clientId = 7391, sell = 16000 }, { itemName = "war hammer", clientId = 3279, sell = 1200 }, - + -- yaman { itemName = "ankh", clientId = 3077, sell = 100 }, { itemName = "dragon necklace", clientId = 3085, sell = 100, count = 200 }, @@ -488,7 +488,7 @@ function createHirelingType(HirelingName) { itemName = "terra rod", clientId = 3065, sell = 2000 }, { itemName = "time ring", clientId = 3053, sell = 100 }, { itemName = "underworld rod", clientId = 8082, sell = 4400 }, - + -- talila { itemName = "butterfly ring", clientId = 25698, sell = 2000 }, { itemName = "heavy blossom staff", clientId = 25700, sell = 5000 }, @@ -529,7 +529,7 @@ function createHirelingType(HirelingName) { itemName = "studded armor", clientId = 3378, sell = 25 }, { itemName = "sword", clientId = 3264, sell = 25 }, { itemName = "brass helmet", clientId = 3354, sell = 30 }, - { itemName = "mace", clientId = 3286, sell = 30 }, + { itemName = "mace", clientId = 3286, sell = 30 }, { itemName = "katana", clientId = 3300, sell = 35 }, { itemName = "swampling club", clientId = 17824, sell = 40 }, { itemName = "plate shield", clientId = 3410, sell = 45 }, @@ -583,7 +583,7 @@ function createHirelingType(HirelingName) { itemName = "draken boots", clientId = 4033, sell = 40000 }, { itemName = "zaoan helmet", clientId = 10385, sell = 45000 }, { itemName = "Elite Draken Mail", clientId = 11651, sell = 50000 }, - + -- hanna { itemName = "amber", clientId = 32626, sell = 20000 }, { itemName = "amber with a bug", clientId = 32624, sell = 41000 }, @@ -647,7 +647,7 @@ function createHirelingType(HirelingName) { itemName = "wedding ring", clientId = 3004, sell = 100 }, { itemName = "white pearl", clientId = 3026, sell = 160 }, { itemName = "orichalcum pearl", clientId = 3026, sell = 80 }, - + -- lailene { itemName = "batwing hat", clientId = 9103, sell = 8000 }, { itemName = "ethno coat", clientId = 8064, sell = 200 }, @@ -662,7 +662,7 @@ function createHirelingType(HirelingName) { itemName = "spellbook of lost souls", clientId = 8075, sell = 19000 }, { itemName = "spellbook of mind control", clientId = 8074, sell = 13000 }, { itemName = "spellbook of warding", clientId = 8073, sell = 8000 }, - + -- rashid { itemName = "abyss hammer", clientId = 7414, sell = 20000 }, { itemName = "albino plate", clientId = 19358, sell = 1500 }, @@ -820,7 +820,7 @@ function createHirelingType(HirelingName) { itemName = "war horn", clientId = 2958, sell = 8000 }, { itemName = "witch hat", clientId = 9653, sell = 5000 }, { itemName = "wyvern fang", clientId = 7408, sell = 1500 }, - + -- rock in a hard place { itemName = "axe", clientId = 3274, sell = 7 }, { itemName = "battle axe", clientId = 3266, sell = 80 }, @@ -943,7 +943,7 @@ function createHirelingType(HirelingName) { itemName = "watch", clientId = 2906, sell = 6 }, { itemName = "wooden hammer", clientId = 3459, sell = 15 }, { itemName = "wooden shield", clientId = 3412, sell = 5 }, - + -- tamoril { itemName = "blue gem", clientId = 3041, sell = 5000 }, { itemName = "golden mug", clientId = 2903, sell = 250 }, @@ -987,7 +987,7 @@ function createHirelingType(HirelingName) { itemName = "collar of blue plasma", clientId = 23542, sell = 6000 }, { itemName = "collar of green plasma", clientId = 23543, sell = 6000 }, { itemName = "collar of red plasma", clientId = 23544, sell = 6000 }, - + -- yasir { itemName = "golden sun token", clientId = 43734, sell = 11000 }, { itemName = "abomination's tail", clientId = 36791, sell = 700000 }, @@ -1671,7 +1671,7 @@ function createHirelingType(HirelingName) { itemName = "zaogun flag", clientId = 10413, sell = 600 }, { itemName = "zaogun shoulderplates", clientId = 10414, sell = 150 }, { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, - + -- Valindara { itemName = "watermelon tourmaline", clientId = 33779, sell = 30000 }, { itemName = "amber with a bug", clientId = 32624, sell = 41000 }, @@ -1767,7 +1767,7 @@ function createHirelingType(HirelingName) { itemName = "white silk flower", clientId = 34008, sell = 9000 }, { itemName = "wild flowers", clientId = 25691, sell = 120 }, { itemName = "wood cape", clientId = 3575, sell = 5000 }, - { itemName = "wooden spellbook", clientId = 25699, sell = 12000 }, + { itemName = "wooden spellbook", clientId = 25699, sell = 12000 }, }, } @@ -1775,7 +1775,7 @@ function createHirelingType(HirelingName) local function addItemsToShoppingBag(npc, player) local playerId = player:getId() local playerData = playerImbuementData[playerId] - + if playerData then local moneyRequired = playerData.moneyRequired local itemList = playerData.itemList @@ -1784,31 +1784,31 @@ function createHirelingType(HirelingName) npcHandler:setTopic(player:getId(), 0) return false, "You don't have enough money." end - + local totalWeight = 0 for _, item in pairs(itemList) do local itemType = ItemType(item.itemId) totalWeight = totalWeight + (itemType:getWeight() * item.count) end - + if player:getFreeCapacity() < totalWeight then return false, "You don't have enough weight." end - + if player:getFreeBackpackSlots() == 0 then return false, "You don't have enough room." end - + local shoppingBag = player:addItem(2856, 1) -- present box for _, item in pairs(itemList) do shoppingBag:addItem(item.itemId, item.count) end - + player:removeMoneyBank(moneyRequired) - + return true end - + return false end @@ -2026,7 +2026,6 @@ function createHirelingType(HirelingName) }, } - -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) @@ -2085,7 +2084,7 @@ function createHirelingType(HirelingName) GOODS = 1400, IMBUEMENT_START = 2000, IMBUEMENT_BUY = 2001, - IMBUEMENT_END = 2002 + IMBUEMENT_END = 2002, } local TOPIC_FOOD = { @@ -2094,9 +2093,9 @@ function createHirelingType(HirelingName) local GREETINGS = { BANK = "Alright! What can I do for you and your bank business, |PLAYERNAME|?", - FOOD = [[Hmm, yes! A variety of fine food awaits! However, a small expense of 15000 gold is expected to make these delicious masterpieces happen. + FOOD = [[Hmm, yes! A variety of fine food awaits! However, a small expense of 15000 gold is expected to make these delicious masterpieces happen. For 90000 gold I will also serve you a specific dish. Just tell me what it shall be: a {specific} meal or a little {surprise}.]], - STASH = "Of course, here is your stash! Well-maintained and neatly sorted for your convenience!", + STASH = "Of course, here is your stash! Well-maintained and neatly sorted for your convenience!", } local function getHirelingSkills() @@ -2298,7 +2297,7 @@ function createHirelingType(HirelingName) -- imbuement packages local imbuementPackages = - "These are the available imbuement packages, Skill increase: {bash}, {blockade}, {chop}, {epiphany}, {precision}, {slash}. Additional attributes: {featherweight}, {strike}, {swiftness}, {vampirism}, {vibrancy}, {void}. Elemental damage: {electrify}, {frost}, {reap}, {scorch}, {venom}. Elemental protection: {cloud fabric}, {demon presence}, {dragon hide}, {lich shroud}, {quara scale}, {snake skin}." + "These are the available imbuement packages, Skill increase: {bash}, {blockade}, {chop}, {epiphany}, {precision}, {slash}. Additional attributes: {featherweight}, {strike}, {swiftness}, {vampirism}, {vibrancy}, {void}. Elemental damage: {electrify}, {frost}, {reap}, {scorch}, {venom}. Elemental protection: {cloud fabric}, {demon presence}, {dragon hide}, {lich shroud}, {quara scale}, {snake skin}." if MsgContains(message, "imbuement packages") then npcHandler:setTopic(playerId, TOPIC.IMBUEMENT_START) npcHandler:say(imbuementPackages, npc, creature) diff --git a/data-global/npc/loot_buyer.lua b/data-global/npc/loot_buyer.lua index 575d8388..cc28c505 100644 --- a/data-global/npc/loot_buyer.lua +++ b/data-global/npc/loot_buyer.lua @@ -16,11 +16,11 @@ npcConfig.outfit = { lookBody = 100, lookLegs = 119, lookFeet = 115, - lookAddons = 2 + lookAddons = 2, } npcConfig.flags = { - floorchange = false + floorchange = false, } local keywordHandler = KeywordHandler:new() @@ -1423,7 +1423,6 @@ npcType.onSellItem = function(npc, player, itemId, subtype, amount, ignore, name player:sendTextMessage(MESSAGE_TRADE, string.format("Sold %ix %s for %i gold.", amount, name, totalCost)) end -- On check npc shop message (look item) -npcType.onCheckItem = function(npc, player, clientId, subType) -end +npcType.onCheckItem = function(npc, player, clientId, subType) end -npcType:register(npcConfig) \ No newline at end of file +npcType:register(npcConfig) diff --git a/data-global/scripts/creaturescripts/customs/water_houses.lua b/data-global/scripts/creaturescripts/customs/water_houses.lua index 3c5e01a7..8df6289d 100644 --- a/data-global/scripts/creaturescripts/customs/water_houses.lua +++ b/data-global/scripts/creaturescripts/customs/water_houses.lua @@ -1,13 +1,11 @@ local positions = { { fromPos = Position(33600, 31927, 3), toPos = Position(33606, 31931, 3) }, - { fromPos = Position(32772, 31163, 8), toPos = Position(32778, 31168, 8) } + { fromPos = Position(32772, 31163, 8), toPos = Position(32778, 31168, 8) }, } local function isInRestrictedArea(position) for _, restrictedArea in ipairs(positions) do - if position.x >= restrictedArea.fromPos.x and position.x <= restrictedArea.toPos.x and - position.y >= restrictedArea.fromPos.y and position.y <= restrictedArea.toPos.y and - position.z == restrictedArea.fromPos.z then + if position.x >= restrictedArea.fromPos.x and position.x <= restrictedArea.toPos.x and position.y >= restrictedArea.fromPos.y and position.y <= restrictedArea.toPos.y and position.z == restrictedArea.fromPos.z then return true end end @@ -28,4 +26,4 @@ disableMovingItems.playerOnMoveItem = function(self, item, count, fromPosition, return true end -disableMovingItems:register() \ No newline at end of file +disableMovingItems:register() diff --git a/data-global/scripts/quests/svargrond_arena/creaturescripts_player_death.lua b/data-global/scripts/quests/svargrond_arena/creaturescripts_player_death.lua index 0e4141ac..f55c21aa 100644 --- a/data-global/scripts/quests/svargrond_arena/creaturescripts_player_death.lua +++ b/data-global/scripts/quests/svargrond_arena/creaturescripts_player_death.lua @@ -4,4 +4,4 @@ function svargrondArenaPlayerDeath.onDeath(player, corpse, killer, mostDamageKil player:setStorageValue(Storage.Quest.U8_0.BarbarianArena.PitDoor, 0) end end -svargrondArenaPlayerDeath:register() \ No newline at end of file +svargrondArenaPlayerDeath:register() diff --git a/data-global/scripts/spells/monster/large_black_ring.lua b/data-global/scripts/spells/monster/large_black_ring.lua index 9540698c..8289013c 100644 --- a/data-global/scripts/spells/monster/large_black_ring.lua +++ b/data-global/scripts/spells/monster/large_black_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_energy_ring.lua b/data-global/scripts/spells/monster/large_energy_ring.lua index 06aa5271..f0492289 100644 --- a/data-global/scripts/spells/monster/large_energy_ring.lua +++ b/data-global/scripts/spells/monster/large_energy_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_fire_ring.lua b/data-global/scripts/spells/monster/large_fire_ring.lua index 435e04da..7c14843c 100644 --- a/data-global/scripts/spells/monster/large_fire_ring.lua +++ b/data-global/scripts/spells/monster/large_fire_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_holy_ring.lua b/data-global/scripts/spells/monster/large_holy_ring.lua index d3a7b19a..50b05444 100644 --- a/data-global/scripts/spells/monster/large_holy_ring.lua +++ b/data-global/scripts/spells/monster/large_holy_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CONST_ME_HOLYAREA) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_ice_ring.lua b/data-global/scripts/spells/monster/large_ice_ring.lua index f324f279..ef1868f9 100644 --- a/data-global/scripts/spells/monster/large_ice_ring.lua +++ b/data-global/scripts/spells/monster/large_ice_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_pink_ring.lua b/data-global/scripts/spells/monster/large_pink_ring.lua index 157f9834..1bb28cef 100644 --- a/data-global/scripts/spells/monster/large_pink_ring.lua +++ b/data-global/scripts/spells/monster/large_pink_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ELECTRICALSPARK) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_poison_ring.lua b/data-global/scripts/spells/monster/large_poison_ring.lua index e1a05eee..98737e08 100644 --- a/data-global/scripts/spells/monster/large_poison_ring.lua +++ b/data-global/scripts/spells/monster/large_poison_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_purple_ring_smoke.lua b/data-global/scripts/spells/monster/large_purple_ring_smoke.lua index f1b778dc..7d7d40c2 100644 --- a/data-global/scripts/spells/monster/large_purple_ring_smoke.lua +++ b/data-global/scripts/spells/monster/large_purple_ring_smoke.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLESMOKE) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/large_red_ring.lua b/data-global/scripts/spells/monster/large_red_ring.lua index a77781ce..0103ae5c 100644 --- a/data-global/scripts/spells/monster/large_red_ring.lua +++ b/data-global/scripts/spells/monster/large_red_ring.lua @@ -21,7 +21,6 @@ combatLargeRing:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combatLargeRing:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_REDSMOKE) combatLargeRing:setArea(createCombatArea(aLarge)) - local combats = { combatLargeRing } function spell.onCastSpell(creature, var) diff --git a/data-global/scripts/spells/monster/mitmah_electrify.lua b/data-global/scripts/spells/monster/mitmah_electrify.lua index 5e480fc5..946dea5b 100644 --- a/data-global/scripts/spells/monster/mitmah_electrify.lua +++ b/data-global/scripts/spells/monster/mitmah_electrify.lua @@ -2,8 +2,6 @@ local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, 216) - - arr = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, diff --git a/data-global/scripts/spells/monster/mitmah_fire.lua b/data-global/scripts/spells/monster/mitmah_fire.lua index 599d1866..6aa4e6f3 100644 --- a/data-global/scripts/spells/monster/mitmah_fire.lua +++ b/data-global/scripts/spells/monster/mitmah_fire.lua @@ -21,7 +21,6 @@ function spell.onCastSpell(creature, var) return combat:execute(creature, var) end - spell:name("mitmah fire") spell:words("###21343") spell:isAggressive(true) diff --git a/data-global/scripts/spells/monster/mitmah_ring.lua b/data-global/scripts/spells/monster/mitmah_ring.lua index 75bf2479..a4057480 100644 --- a/data-global/scripts/spells/monster/mitmah_ring.lua +++ b/data-global/scripts/spells/monster/mitmah_ring.lua @@ -2,9 +2,6 @@ local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, 158) - - - arr = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, diff --git a/data-global/scripts/spells/monster/mitmah_soulfire.lua b/data-global/scripts/spells/monster/mitmah_soulfire.lua index 5caaa81a..9352f8cb 100644 --- a/data-global/scripts/spells/monster/mitmah_soulfire.lua +++ b/data-global/scripts/spells/monster/mitmah_soulfire.lua @@ -6,21 +6,21 @@ combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) local minDmg = -3000 -- Altere esses valores conforme necessário local maxDmg = -7000 -- Altere esses valores conforme necessário - local arr = { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, - { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, - { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, - { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, - { 0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0 }, - { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, - { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, - { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - } +local arr = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, +} local area = createCombatArea(arr) combat:setArea(area) @@ -28,17 +28,17 @@ combat:setArea(area) local spell = Spell("instant") function spell.onCastSpell(creature, var) - creature:say("NOW TREMBLE!", TALKTYPE_MONSTER_SAY) - addEvent(function() - local min = minDmg or 0 - local max = maxDmg or 0 - local randomDamage = math.random(min, max) -- Calcula o dano aleatório - local condition = Condition(CONDITION_BLEEDING) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - condition:addDamage(1, 1, randomDamage) -- Define o dano aleatório - combat:addCondition(condition) - return combat:execute(creature, var) - end, 5000) -- Executa o ataque após 5 segundos + creature:say("NOW TREMBLE!", TALKTYPE_MONSTER_SAY) + addEvent(function() + local min = minDmg or 0 + local max = maxDmg or 0 + local randomDamage = math.random(min, max) -- Calcula o dano aleatório + local condition = Condition(CONDITION_BLEEDING) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + condition:addDamage(1, 1, randomDamage) -- Define o dano aleatório + combat:addCondition(condition) + return combat:execute(creature, var) + end, 5000) -- Executa o ataque após 5 segundos end spell:name("mitmah soulfire") @@ -47,4 +47,4 @@ spell:isAggressive(true) spell:blockWalls(true) spell:needTarget(true) spell:needLearn(true) -spell:register() \ No newline at end of file +spell:register() diff --git a/data-global/scripts/spells/monster/time_guardiann.lua b/data-global/scripts/spells/monster/time_guardiann.lua index 18ff5354..26e90ad7 100644 --- a/data-global/scripts/spells/monster/time_guardiann.lua +++ b/data-global/scripts/spells/monster/time_guardiann.lua @@ -74,12 +74,12 @@ function spell.onCastSpell(creature, var) if not tile then return true end - + local form = tile:getTopCreature() if not form then return true end - + creature:teleportTo(position) local diference = form:getHealth() - creature:getHealth() @@ -99,4 +99,4 @@ spell:words("###441") spell:isAggressive(true) spell:blockWalls(true) spell:needLearn(true) -spell:register() \ No newline at end of file +spell:register() diff --git a/data/items/appearances.dat b/data/items/appearances.dat index e26d1390..8b9c47a9 100644 Binary files a/data/items/appearances.dat and b/data/items/appearances.dat differ diff --git a/data/items/items.xml b/data/items/items.xml index 58e4b74a..3aeb1f2c 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -80967,5 +80967,1130 @@ Granted by TibiaGoals.com"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/data/libs/systems/zones.lua b/data/libs/systems/zones.lua index cd519245..a232a071 100644 --- a/data/libs/systems/zones.lua +++ b/data/libs/systems/zones.lua @@ -206,4 +206,4 @@ function Zone:monsterIcon(category, icon, count) end event:register() -end \ No newline at end of file +end diff --git a/data/scripts/actions/items/ladder_up.lua b/data/scripts/actions/items/ladder_up.lua index cb1587b6..5ec5f7c5 100644 --- a/data/scripts/actions/items/ladder_up.lua +++ b/data/scripts/actions/items/ladder_up.lua @@ -19,4 +19,4 @@ function ladder.onUse(player, item, fromPosition, target, toPosition, isHotkey) end ladder:id(435, unpack(ladderTable)) -ladder:register() \ No newline at end of file +ladder:register() diff --git a/data/scripts/actions/items/usable_phantasmal_jade_items.lua b/data/scripts/actions/items/usable_phantasmal_jade_items.lua index 6723132e..8075125d 100644 --- a/data/scripts/actions/items/usable_phantasmal_jade_items.lua +++ b/data/scripts/actions/items/usable_phantasmal_jade_items.lua @@ -42,4 +42,4 @@ for itemId, _ in pairs(config.requiredItems) do usablePhantasmalJadeItems:id(itemId) end -usablePhantasmalJadeItems:register() \ No newline at end of file +usablePhantasmalJadeItems:register() diff --git a/data/scripts/creaturescripts/player/death.lua b/data/scripts/creaturescripts/player/death.lua index fdffc27c..4c0c9a8b 100644 --- a/data/scripts/creaturescripts/player/death.lua +++ b/data/scripts/creaturescripts/player/death.lua @@ -184,4 +184,4 @@ function playerDeath.onDeath(player, corpse, killer, mostDamageKiller, unjustifi handleGuildWar(player, killer, mostDamageKiller, killerName, mostDamageName) end -playerDeath:register() \ No newline at end of file +playerDeath:register() diff --git a/data/scripts/creaturescripts/player/login.lua b/data/scripts/creaturescripts/player/login.lua index 745e795d..eb9770e9 100644 --- a/data/scripts/creaturescripts/player/login.lua +++ b/data/scripts/creaturescripts/player/login.lua @@ -174,6 +174,9 @@ function playerLoginGlobal.onLogin(player) onMovementRemoveProtection(playerId, player:getPosition(), 10) end + -- fix stash + player:setSpecialContainersAvailable(true, true, true) + player:initializeLoyaltySystem() player:registerEvent("PlayerDeath") player:registerEvent("DropLoot") diff --git a/data/scripts/movements/special_tiles.lua b/data/scripts/movements/special_tiles.lua index a1ec92db..2f2aeaf2 100644 --- a/data/scripts/movements/special_tiles.lua +++ b/data/scripts/movements/special_tiles.lua @@ -38,9 +38,9 @@ function tile.onStepIn(creature, item, position, fromPosition) end local depotMessage = "Your depot contains " .. depotItems .. " item" .. (depotItems ~= 1 and "s." or ".") - local stashMessage = "Your supply stash contains " .. player:getStashCount() .. " item" .. (player:getStashCount() ~= 1 and "s." or ".") + local stashMessage = "Your stash contains " .. player:getStashCount() .. " item" .. (player:getStashCount() ~= 1 and "s." or ".") - player:sendTextMessage(MESSAGE_FAILURE, depotMessage .. "\n" .. stashMessage) + player:sendTextMessage(MESSAGE_FAILURE, depotMessage .. " " .. stashMessage) player:setSpecialContainersAvailable(true, true, true) return true end diff --git a/data/scripts/talkactions/god/icons_functions.lua b/data/scripts/talkactions/god/icons_functions.lua index 059d7ac6..b3951edb 100644 --- a/data/scripts/talkactions/god/icons_functions.lua +++ b/data/scripts/talkactions/god/icons_functions.lua @@ -13,16 +13,16 @@ end function Player:sendNormalIcons(icons) local msg = NetworkMessage() msg:addByte(0xA2) - msg:addU32(icons) + msg:addU64(icons) msg:addByte(0) msg:sendToPlayer(self) end function Player:sendIconBakragore(specialIcon) local msg = NetworkMessage() - msg:addByte(0xA3) - msg:addU32(specialIcon) - msg:addByte(0) + msg:addByte(0xA2) + msg:addU64(0) + msg:addByte(specialIcon) msg:sendToPlayer(self) end diff --git a/markdowns/CHANGELOG.md b/markdowns/CHANGELOG.md index 8a272405..3a1e77b3 100644 --- a/markdowns/CHANGELOG.md +++ b/markdowns/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog for Crystal Server + +## Version 4.1.2 + +### Features + +- Protocol 14.05 support. ([Tryller](https://github.com/jprzimba)) +- New protocol 14.05 assets. ([Tryller](https://github.com/jprzimba)) + +## Added files + +- Add all files in data/migrations + +## Modified files + +- crystalserver.exe +- config.lua +- data-global/world/world.otbm (7z file) +- data-global/world/world-house.xml +- data/items/assets.dat +- data/items/items.xml +- data/scripts/creaturescripts/player/login.lua +- data/scripts/movements/special_tiles.lua +- data/scripts/talkactions/god/icons_functions.lua + +## Added files + +- data-global/scripts/creaturescripts/customs/water_houses.lua + +### Bug Fixes + +- Fixed influenced creatures not spawning. ([Tryller](https://github.com/jprzimba)) +- Fixed houses with pool bug. ([Tryller](https://github.com/jprzimba)) +- Fixed some V.I.P list issues. ([Tryller](https://github.com/jprzimba)) + ## Version 4.1 ### Features @@ -82,5 +116,5 @@ --- -_Note: This Markdown document provides a concise overview of the changes introduced in Crystal Server version 4.0, categorized into features, bug fixes, and other updates. For a more detailed breakdown, refer to the commit history or release notes. +_Note: This Markdown document provides a concise overview of the changes introduced in Crystal Server, categorized into features, bug fixes, and other updates. For a more detailed breakdown, refer to the commit history or release notes. In the changelog when [Tryller](https://github.com/jprzimba) is mentioned, it refers to me, [jprzimba](https://github.com/jprzimba) (João Paulo)_ diff --git a/src/core.hpp b/src/core.hpp index 56604968..e324895a 100644 --- a/src/core.hpp +++ b/src/core.hpp @@ -18,15 +18,15 @@ #pragma once static constexpr auto SOFTWARE_NAME = "Crystal Server"; -static constexpr auto SOFTWARE_VERSION = "4.1"; -static constexpr auto SOFTWARE_DEVELOPERS = "Tryller"; +static constexpr auto SOFTWARE_VERSION = "4.1.2"; +static constexpr auto SOFTWARE_DEVELOPERS = "Crystal Server Contributors"; static constexpr auto AUTHENTICATOR_DIGITS = 6U; static constexpr auto AUTHENTICATOR_PERIOD = 30U; // SERVER_MAJOR_VERSION is the actual full version of the server, including minor and patch numbers. // This is intended for internal use to identify the exact state of the server (release) software. -static constexpr auto CLIENT_VERSION = 1340; +static constexpr auto CLIENT_VERSION = 1405; #define CLIENT_VERSION_UPPER (CLIENT_VERSION / 100) #define CLIENT_VERSION_LOWER (CLIENT_VERSION % 100) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index e4a353fe..44166e44 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -8079,15 +8079,25 @@ bool Player::isGuildMate(const std::shared_ptr &player) const { } bool Player::addItemFromStash(uint16_t itemId, uint32_t itemCount) { - const uint32_t stackCount = 100u; + const ItemType &itemType = Item::items[itemId]; + if (itemType.stackable) { + while (itemCount > 0) { + const auto addValue = itemCount > 100 ? 100 : itemCount; + itemCount -= addValue; + const auto &newItem = Item::CreateItem(itemId, addValue); - while (itemCount > 0) { - const auto addValue = itemCount > stackCount ? stackCount : itemCount; - itemCount -= addValue; - const auto &newItem = Item::CreateItem(itemId, addValue); + if (!g_game().tryRetrieveStashItems(static_self_cast(), newItem)) { + g_game().internalPlayerAddItem(static_self_cast(), newItem, true); + } + } + } else { + while (itemCount > 0) { + --itemCount; + const auto &newItem = Item::CreateItem(itemId); - if (!g_game().tryRetrieveStashItems(static_self_cast(), newItem)) { - g_game().internalPlayerAddItem(static_self_cast(), newItem, true); + if (!g_game().tryRetrieveStashItems(static_self_cast(), newItem)) { + g_game().internalPlayerAddItem(static_self_cast(), newItem, true); + } } } @@ -8099,20 +8109,20 @@ bool Player::addItemFromStash(uint16_t itemId, uint32_t itemCount) { return true; } -void sendStowItems(const std::shared_ptr &item, const std::shared_ptr &stowItem, StashContainerList &itemDict) { - if (stowItem->getID() == item->getID()) { - itemDict.emplace_back(stowItem, stowItem->getItemCount()); +void processContainerItems(const std::shared_ptr &item, const std::shared_ptr &container, StashContainerList &itemDict) { + if (!container) { + return; } - if (const auto &container = stowItem->getContainer()) { - std::ranges::copy_if(container->getStowableItems(), std::back_inserter(itemDict), [&item](const auto &stowable_it) { - return stowable_it.first->getID() == item->getID(); - }); + if (const auto &containerItems = container->getContainer()) { + for (const auto &subItem : containerItems->getItems(true)) { + itemDict.emplace_back(subItem, subItem->getItemCount()); + } } } void Player::stowItem(const std::shared_ptr &item, uint32_t count, bool allItems) { - if (!item || (!item->isItemStorable() && item->getID() != ITEM_GOLD_POUCH)) { + if (!item) { sendCancelMessage("This item cannot be stowed here."); return; } @@ -8122,46 +8132,35 @@ void Player::stowItem(const std::shared_ptr &item, uint32_t count, bool al if (!item->isInsideDepot(true)) { // Stow "all items" from player backpack if (const auto &backpack = getInventoryItem(CONST_SLOT_BACKPACK)) { - sendStowItems(item, backpack, itemDict); + processContainerItems(item, backpack, itemDict); } // Stow "all items" from loot pouch const auto &itemParent = item->getParent(); - const auto &lootPouch = itemParent->getItem(); - if (itemParent && lootPouch && lootPouch->getID() == ITEM_GOLD_POUCH) { - sendStowItems(item, lootPouch, itemDict); + const auto &lootPouch = itemParent ? itemParent->getItem() : nullptr; + if (lootPouch && lootPouch->getID() == ITEM_GOLD_POUCH) { + processContainerItems(item, lootPouch, itemDict); } } // Stow locker items const auto &depotLocker = getDepotLocker(getLastDepotId()); - const auto &[itemVector, itemMap] = requestLockerItems(depotLocker); - for (const auto &lockerItem : itemVector) { - if (lockerItem == nullptr) { - break; - } - - if (item->isInsideDepot(true)) { - sendStowItems(item, lockerItem, itemDict); - } + for (const auto &lockerItem : depotLocker->getItems(true)) { + processContainerItems(item, lockerItem, itemDict); } - } else if (item->getContainer()) { - itemDict = item->getContainer()->getStowableItems(); - for (const std::shared_ptr &containerItem : item->getContainer()->getItems(true)) { - uint32_t depotChest = g_configManager().getNumber(DEPOTCHEST); - bool validDepot = depotChest > 0 && depotChest < 21; - if (g_configManager().getBoolean(STASH_MOVING) && containerItem && !containerItem->isStackable() && validDepot) { - g_game().internalMoveItem(containerItem->getParent(), getDepotChest(depotChest, true), INDEX_WHEREEVER, containerItem, containerItem->getItemCount(), nullptr); - movedItems++; - moved = true; + } else { + // Process case for items inside containers + if (item->getContainer()) { + for (const auto &containerItem : item->getContainer()->getItems(true)) { + itemDict.emplace_back(containerItem, containerItem->getItemCount()); } + } else { + itemDict.emplace_back(item, count); } - } else { - itemDict.emplace_back(item, count); } if (itemDict.empty()) { - sendCancelMessage("There is no stowable items on this container."); + sendCancelMessage("There are no items to be stowed in this container."); return; } diff --git a/src/server/network/connection/connection.cpp b/src/server/network/connection/connection.cpp index 545634f3..9881d4a8 100644 --- a/src/server/network/connection/connection.cpp +++ b/src/server/network/connection/connection.cpp @@ -113,7 +113,8 @@ void Connection::closeSocket() { void Connection::accept(Protocol_ptr protocolPtr) { connectionState = CONNECTION_STATE_IDENTIFYING; protocol = std::move(protocolPtr); - g_dispatcher().addEvent([protocol = protocol] { protocol->onConnect(); }, __FUNCTION__, std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count()); + + g_dispatcher().addEvent([eventProtocol = protocol] { eventProtocol->onConnect(); }, __FUNCTION__, std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count()); acceptInternal(false); } @@ -142,7 +143,7 @@ void Connection::parseProxyIdentification(const std::error_code &error) { if (error || connectionState == CONNECTION_STATE_CLOSED) { if (error != asio::error::operation_aborted && error != asio::error::eof && error != asio::error::connection_reset) { - g_logger().error("[Connection::parseProxyIdentification] - Read error: {}", error.message()); + g_logger().debug("[Connection::parseProxyIdentification] - Read error: {}", error.message()); } close(FORCE_CLOSE); return; @@ -217,6 +218,10 @@ void Connection::parseHeader(const std::error_code &error) { } uint16_t size = m_msg.getLengthHeader(); + if (std::dynamic_pointer_cast(protocol)) { + size = (size * 8) + 4; + } + if (size == 0 || size > INPUTMESSAGE_MAXSIZE) { close(FORCE_CLOSE); return; @@ -242,7 +247,7 @@ void Connection::parsePacket(const std::error_code &error) { if (error || connectionState == CONNECTION_STATE_CLOSED) { if (error) { - g_logger().error("[Connection::parsePacket] - Read error: {}", error.message()); + g_logger().debug("[Connection::parsePacket] - Read error: {}", error.message()); } close(FORCE_CLOSE); return; @@ -280,7 +285,7 @@ void Connection::parsePacket(const std::error_code &error) { // it doesn't generate any problem because olders protocol don't use 'server sends first' feature m_msg.get(); // Skip protocol ID - m_msg.skipBytes(1); + m_msg.skipBytes(2); } protocol->onRecvFirstMessage(m_msg); diff --git a/src/server/network/connection/connection.hpp b/src/server/network/connection/connection.hpp index 520d653c..2fd53ba2 100644 --- a/src/server/network/connection/connection.hpp +++ b/src/server/network/connection/connection.hpp @@ -20,12 +20,15 @@ #include "declarations.hpp" // TODO: Remove circular includes (maybe shared_ptr?) #include "server/network/message/networkmessage.hpp" +#include "server/network/protocol/protocolgame.hpp" static constexpr int32_t CONNECTION_WRITE_TIMEOUT = 30; static constexpr int32_t CONNECTION_READ_TIMEOUT = 30; class Protocol; using Protocol_ptr = std::shared_ptr; +class ProtocolGame; +using ProtocolGame_ptr = std::shared_ptr; class OutputMessage; using OutputMessage_ptr = std::shared_ptr; class Connection; diff --git a/src/server/network/message/networkmessage.hpp b/src/server/network/message/networkmessage.hpp index aeec87b1..9bc4f429 100644 --- a/src/server/network/message/networkmessage.hpp +++ b/src/server/network/message/networkmessage.hpp @@ -32,8 +32,8 @@ class NetworkMessage { // Headers: // 2 bytes for unencrypted message size // 4 bytes for checksum - // 2 bytes for encrypted message size - static constexpr MsgSize_t INITIAL_BUFFER_POSITION = 8; + // 1 byte for padding message size + static constexpr MsgSize_t INITIAL_BUFFER_POSITION = 7; int32_t decodeHeader(); diff --git a/src/server/network/message/outputmessage.hpp b/src/server/network/message/outputmessage.hpp index 971a7d11..49f41d0e 100644 --- a/src/server/network/message/outputmessage.hpp +++ b/src/server/network/message/outputmessage.hpp @@ -34,8 +34,14 @@ class OutputMessage : public NetworkMessage { return buffer.data() + outputBufferStart; } + void writePaddingAmount() { + uint8_t paddingAmount = 8 - (info.length % 8) - 1; + addPaddingBytes(paddingAmount); + add_header(paddingAmount); + } + void writeMessageLength() { - add_header(info.length); + add_header(static_cast((info.length - 4) / 8)); } void addCryptoHeader(bool addChecksum, uint32_t checksum) { diff --git a/src/server/network/protocol/protocol.cpp b/src/server/network/protocol/protocol.cpp index 5db41ac4..96d14e6e 100644 --- a/src/server/network/protocol/protocol.cpp +++ b/src/server/network/protocol/protocol.cpp @@ -31,12 +31,13 @@ void Protocol::onSendMessage(const OutputMessage_ptr &msg) { if (!rawMessages) { const uint32_t sendMessageChecksum = msg->getLength() >= 128 && compression(*msg) ? (1U << 31) : 0; - msg->writeMessageLength(); - if (!encryptionEnabled) { + msg->writeMessageLength(); return; } + msg->writePaddingAmount(); + XTEA_encrypt(*msg); if (checksumMethod == CHECKSUM_METHOD_NONE) { msg->addCryptoHeader(false, 0); @@ -217,12 +218,12 @@ bool Protocol::XTEA_decrypt(NetworkMessage &msg) const { XTEA_transform(buffer, messageLength, false); - uint16_t innerLength = msg.get(); - if (std::cmp_greater(innerLength, msgLength - 2)) { + uint8_t paddingSize = msg.getByte(); + if (std::cmp_greater(paddingSize, msgLength - 1)) { return false; } - msg.setLength(innerLength); + msg.setLength(messageLength - paddingSize); return true; } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index d313ad0c..3ff5296f 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -881,7 +881,7 @@ void ProtocolGame::onConnect() { output->skipBytes(sizeof(uint32_t)); // Packet length & type - output->add(0x0006); + output->addByte(0x01); output->addByte(0x1F); // Add timestamp & random number @@ -890,6 +890,7 @@ void ProtocolGame::onConnect() { challengeRandom = randNumber(generator); output->addByte(challengeRandom); + output->addByte(0x71); // Go back and write checksum output->skipBytes(-12); @@ -1620,12 +1621,11 @@ void ProtocolGame::parseOpenPrivateChannel(NetworkMessage &msg) { void ProtocolGame::parseAutoWalk(NetworkMessage &msg) { uint8_t numdirs = msg.getByte(); - if (numdirs == 0 || (msg.getBufferPosition() + numdirs) != (msg.getLength() + 8)) { + if (numdirs == 0 || (msg.getBufferPosition() + numdirs) != (msg.getLength() + 6)) { return; } - std::vector path; - path.resize(numdirs, DIRECTION_NORTH); + std::vector path(numdirs, DIRECTION_NORTH); for (size_t i = numdirs; --i < numdirs;) { const uint8_t rawdir = msg.getByte(); switch (rawdir) { @@ -4663,8 +4663,8 @@ void ProtocolGame::sendIcons(const std::unordered_set &iconSet, cons // Send as uint16_t in old protocol msg.add(static_cast(icons)); } else { - // Send as uint32_t in new protocol - msg.add(icons); + // Send as uint64_t in new protocol + msg.add(icons); msg.addByte(enumToValue(iconBakragore)); // Icons Bakragore } @@ -4674,7 +4674,7 @@ void ProtocolGame::sendIcons(const std::unordered_set &iconSet, cons void ProtocolGame::sendIconBakragore(const IconBakragore icon) { NetworkMessage msg; msg.addByte(0xA2); - msg.add(0); // Send empty normal icons + msg.add(0); // Send empty normal icons msg.addByte(enumToValue(icon)); writeToOutputBuffer(msg); } @@ -8597,7 +8597,7 @@ void ProtocolGame::sendOpenStash() { msg.add(item.first); msg.add(item.second); } - msg.add(static_cast(g_configManager().getNumber(STASH_ITEMS) - getStashSize(list))); + writeToOutputBuffer(msg); } @@ -8616,9 +8616,9 @@ void ProtocolGame::parseStashWithdraw(NetworkMessage &msg) { return; } - auto action = static_cast(msg.getByte()); + auto action = static_cast(msg.getByte()); switch (action) { - case SUPPLY_STASH_ACTION_STOW_ITEM: { + case STASH_ACTION_STOW_ITEM: { Position pos = msg.getPosition(); auto itemId = msg.get(); uint8_t stackpos = msg.getByte(); @@ -8626,21 +8626,21 @@ void ProtocolGame::parseStashWithdraw(NetworkMessage &msg) { g_game().playerStowItem(player->getID(), pos, itemId, stackpos, count, false); break; } - case SUPPLY_STASH_ACTION_STOW_CONTAINER: { + case STASH_ACTION_STOW_CONTAINER: { Position pos = msg.getPosition(); auto itemId = msg.get(); uint8_t stackpos = msg.getByte(); g_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, false); break; } - case SUPPLY_STASH_ACTION_STOW_STACK: { + case STASH_ACTION_STOW_STACK: { Position pos = msg.getPosition(); auto itemId = msg.get(); uint8_t stackpos = msg.getByte(); g_game().playerStowItem(player->getID(), pos, itemId, stackpos, 0, true); break; } - case SUPPLY_STASH_ACTION_WITHDRAW: { + case STASH_ACTION_WITHDRAW: { auto itemId = msg.get(); auto count = msg.get(); uint8_t stackpos = msg.getByte(); diff --git a/src/server/server_definitions.hpp b/src/server/server_definitions.hpp index f108b85c..099f229c 100644 --- a/src/server/server_definitions.hpp +++ b/src/server/server_definitions.hpp @@ -118,11 +118,11 @@ enum ImpactAnalyzerAndTracker_t : uint8_t { ANALYZER_DAMAGE_RECEIVED = 2 }; -enum Supply_Stash_Actions_t : uint8_t { - SUPPLY_STASH_ACTION_STOW_ITEM = 0, - SUPPLY_STASH_ACTION_STOW_CONTAINER = 1, - SUPPLY_STASH_ACTION_STOW_STACK = 2, - SUPPLY_STASH_ACTION_WITHDRAW = 3 +enum Stash_Actions_t : uint8_t { + STASH_ACTION_STOW_ITEM = 0, + STASH_ACTION_STOW_CONTAINER = 1, + STASH_ACTION_STOW_STACK = 2, + STASH_ACTION_WITHDRAW = 3 }; struct HighscoreCharacter {