Skip to content

Commit

Permalink
Merge branch 'main' into custom-pvp-system
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbesiren authored Oct 1, 2023
2 parents 47109b6 + b9b3d88 commit dba1462
Show file tree
Hide file tree
Showing 326 changed files with 8,858 additions and 8,253 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,17 @@ See our [donate page](https://docs.opentibiabr.com/home/donate)
We extend our heartfelt gratitude to Jetbrains for generously granting us licenses to collaborate on this and various
other open-source initiatives.

[![JetBrains](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://jb.gg/OpenSourceSupport/?from=https://github.com/opentibiabr/canary)
<a href="https://jb.gg/OpenSourceSupport/?from=https://github.com/opentibiabr/canary/">
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains" width="150" />
</a>

## Project supported by [TNT Cloud](https://tntcloudbr.com.br/)

Thanks for supporting our open-source project with your game cloud hosting services.

<a href="https://tntcloudbr.com.br/">
<img src="https://tntcloudbr.com.br/logo.png" alt="TNT Cloud - Game Hosting" width="300" />
</a>

### Partners

Expand Down
7 changes: 7 additions & 0 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ deathLosePercent = -1
-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
-- NOTE: set houseBuyLevel to 0 to disable the min level purchase functionality.
--[[ NOTE: The togglehouseTransferOnRestart setting controls whether house transfers/leave are true/false upon server restart.
• When set to true, the transfers will only occur during a server restart.
Setting this to false may pose risks; if a house is abandoned and contains a large number of items on the floor, those items will be transferred to the player's depot instantly.
• This could potentially freeze the server due to the heavy operation. It's advised to keep this setting enabled (true) to minimize risks.
]]
-- Periods: daily/weekly/monthly/yearly/never
-- Base: sqm,rent,sqm+rent
housePriceRentMultiplier = 0.0
Expand All @@ -271,6 +276,7 @@ houseOwnedByAccount = false
houseBuyLevel = 100
housePurchasedShowPrice = false
onlyInvitedCanMoveHouseItems = true
togglehouseTransferOnRestart = true

-- Item Usage
timeBetweenActions = 200
Expand Down Expand Up @@ -335,6 +341,7 @@ resetSessionsOnStartup = false
-- Misc.
-- NOTE: experienceDisplayRates: set to false to ignore exp rate or true to include exp rate
allowChangeOutfit = true
toggleMountInProtectionZone = false
freePremium = false
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
Expand Down
4 changes: 3 additions & 1 deletion data-canary/scripts/actions/other/construction_kits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function constructionKits.onUse(player, item, fromPosition, target, toPosition,
elseif not Tile(fromPosition):getHouse() then
player:sendTextMessage(MESSAGE_FAILURE, "You may construct this only inside a house.")
else
item:transform(kit)
item:transform(ITEM_DECORATION_KIT)
item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Unwrap it in your own house to create a <" .. ItemType(kit):getName() .. ">.")
item:setCustomAttribute("unWrapId", kit)
fromPosition:sendMagicEffect(CONST_ME_POFF)
player:addAchievementProgress("Interior Decorator", 1000)
end
Expand Down
3 changes: 3 additions & 0 deletions data-canary/scripts/actions/other/potions.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
local berserk = Condition(CONDITION_ATTRIBUTES)
berserk:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)
berserk:setParameter(CONDITION_PARAM_SUBID, AttrSubId_JeanPierreMelee)
berserk:setParameter(CONDITION_PARAM_SKILL_MELEE, 5)
berserk:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)
berserk:setParameter(CONDITION_PARAM_BUFF_SPELL, true)

local mastermind = Condition(CONDITION_ATTRIBUTES)
mastermind:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)
mastermind:setParameter(CONDITION_PARAM_SUBID, AttrSubId_JeanPierreMagic)
mastermind:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 3)
mastermind:setParameter(CONDITION_PARAM_BUFF_SPELL, true)

local bullseye = Condition(CONDITION_ATTRIBUTES)
bullseye:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)
bullseye:setParameter(CONDITION_PARAM_SUBID, AttrSubId_JeanPierreDistance)
bullseye:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 5)
bullseye:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)
bullseye:setParameter(CONDITION_PARAM_BUFF_SPELL, true)
Expand Down
101 changes: 0 additions & 101 deletions data-canary/scripts/reward_chest/boss_death.lua

This file was deleted.

2 changes: 1 addition & 1 deletion data-otservbr-global/lib/compat/compat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ end

function setHouseOwner(id, guid)
local h = House(id)
return h and h:setOwnerGuid(guid) or false
return h and h:setHouseOwner(guid) or false
end

function getHouseRent(id)
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/36.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 36 (add coin_type to accounts)")
logger.info("Updating database to version 37 (add coin_type to accounts)")
db.query("ALTER TABLE `coins_transactions` ADD `coin_type` tinyint(1) UNSIGNED NOT NULL DEFAULT '1';")
return true
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/37.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 37 (add pronoun to players)")
logger.info("Updating database to version 38 (add pronoun to players)")
db.query("ALTER TABLE `players` ADD `pronoun` int(11) NOT NULL DEFAULT '0';")
return true
end
2 changes: 1 addition & 1 deletion data-otservbr-global/migrations/38.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function onUpdateDatabase()
logger.info("Updating database to version 38 (create kv store)")
logger.info("Updating database to version 39 (create kv store)")
db.query([[
CREATE TABLE IF NOT EXISTS `kv_store` (
`key_name` varchar(191) NOT NULL,
Expand Down
4 changes: 3 additions & 1 deletion data-otservbr-global/migrations/39.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
logger.info("Updating database to version 40 (house transfer ownership on startup)")
db.query("ALTER TABLE `houses` ADD `new_owner` int(11) NOT NULL DEFAULT '-1';")
return true
end
14 changes: 14 additions & 0 deletions data-otservbr-global/migrations/40.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function onUpdateDatabase()
logger.info("Updating database to version 41 (optimize house_lists)")
db.query([[
ALTER TABLE `house_lists` DROP COLUMN `id`;
]])

db.query([[
ALTER TABLE `house_lists`
ADD COLUMN `version` bigint NOT NULL DEFAULT 0 AFTER `listid`,
ADD INDEX `version` (`version`),
ADD PRIMARY KEY (`house_id`, `listid`);
]])
return true
end
3 changes: 3 additions & 0 deletions data-otservbr-global/migrations/41.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
end
13 changes: 0 additions & 13 deletions data-otservbr-global/monster/raids/spyrat_facing_east.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ monster.outfit = {
lookTypeEx = 30375,
}

monster.raceId = 2037
monster.Bestiary = {
class = "Humanoid",
race = BESTY_RACE_HUMANOID,
toKill = 1000,
FirstUnlock = 50,
SecondUnlock = 500,
CharmsPoints = 0,
Stars = 0,
Occurrence = 0,
Locations = "Raids in Darashia, Krailos, Liberty Bay.",
}

monster.health = 3000
monster.maxHealth = 3000
monster.race = "blood"
Expand Down
13 changes: 0 additions & 13 deletions data-otservbr-global/monster/raids/spyrat_facing_north.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ monster.outfit = {
lookTypeEx = 30376,
}

monster.raceId = 2037
monster.Bestiary = {
class = "Humanoid",
race = BESTY_RACE_HUMANOID,
toKill = 1000,
FirstUnlock = 50,
SecondUnlock = 500,
CharmsPoints = 0,
Stars = 0,
Occurrence = 0,
Locations = "Raids in Darashia, Krailos, Liberty Bay.",
}

monster.health = 3000
monster.maxHealth = 3000
monster.race = "blood"
Expand Down
13 changes: 0 additions & 13 deletions data-otservbr-global/monster/raids/spyrat_facing_south.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ monster.outfit = {
lookTypeEx = 30377,
}

monster.raceId = 2037
monster.Bestiary = {
class = "Humanoid",
race = BESTY_RACE_HUMANOID,
toKill = 1000,
FirstUnlock = 50,
SecondUnlock = 500,
CharmsPoints = 0,
Stars = 0,
Occurrence = 0,
Locations = "Raids in Darashia, Krailos, Liberty Bay.",
}

monster.health = 3000
monster.maxHealth = 3000
monster.race = "blood"
Expand Down
13 changes: 0 additions & 13 deletions data-otservbr-global/monster/raids/spyrat_facing_west.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ monster.outfit = {
lookTypeEx = 30378,
}

monster.raceId = 2037
monster.Bestiary = {
class = "Humanoid",
race = BESTY_RACE_HUMANOID,
toKill = 1000,
FirstUnlock = 50,
SecondUnlock = 500,
CharmsPoints = 0,
Stars = 0,
Occurrence = 0,
Locations = "Raids in Darashia, Krailos, Liberty Bay.",
}

monster.health = 3000
monster.maxHealth = 3000
monster.race = "blood"
Expand Down
16 changes: 8 additions & 8 deletions data-otservbr-global/npc/allen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,25 @@ npcConfig.shop = {
{ itemName = "canopy headboard", clientId = 32481, buy = 40 },
{ itemName = "cot footboard", clientId = 32486, buy = 40 },
{ itemName = "cot headboard", clientId = 32477, buy = 40 },
{ itemName = "green cushioned chair kit", clientId = 2776, buy = 40 },
{ itemName = "green cushioned chair kit", clientId = 2378, buy = 40 },
{ itemName = "green footboard", clientId = 32483, buy = 40 },
{ itemName = "green headboard", clientId = 32474, buy = 40 },
{ itemName = "hammock foot section", clientId = 32487, buy = 40 },
{ itemName = "hammock head section", clientId = 32478, buy = 40 },
{ itemName = "red cushioned chair kit", clientId = 2775, buy = 40 },
{ itemName = "red cushioned chair kit", clientId = 2374, buy = 40 },
{ itemName = "red footboard", clientId = 32484, buy = 40 },
{ itemName = "red headboard", clientId = 32475, buy = 40 },
{ itemName = "rocking chair kit", clientId = 2778, buy = 25 },
{ itemName = "rocking chair kit", clientId = 2382, buy = 25 },
{ itemName = "simple footboard", clientId = 32488, buy = 40 },
{ itemName = "simple headboard", clientId = 32479, buy = 40 },
{ itemName = "sofa chair kit", clientId = 2779, buy = 55 },
{ itemName = "sofa chair kit", clientId = 2366, buy = 55 },
{ itemName = "straw mat foot section", clientId = 32489, buy = 40 },
{ itemName = "straw mat head section", clientId = 32480, buy = 40 },
{ itemName = "treasure chest", clientId = 2478, buy = 1000 },
{ itemName = "venorean cabinet kit", clientId = 17974, buy = 90 },
{ itemName = "venorean drawer kit", clientId = 17977, buy = 40 },
{ itemName = "venorean wardrobe kit", clientId = 17975, buy = 50 },
{ itemName = "wooden chair kit", clientId = 2777, buy = 15 },
{ itemName = "venorean cabinet kit", clientId = 18015, buy = 90 },
{ itemName = "venorean drawer kit", clientId = 18019, buy = 40 },
{ itemName = "venorean wardrobe kit", clientId = 18017, buy = 50 },
{ itemName = "wooden chair kit", clientId = 2360, buy = 15 },
{ itemName = "yellow footboard", clientId = 32485, buy = 40 },
{ itemName = "yellow headboard", clientId = 32476, buy = 40 },
}
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/asphota.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ npcConfig.shop = {
{ itemName = "scroll", clientId = 2815, buy = 5 },
{ itemName = "scythe", clientId = 3453, buy = 50, sell = 10 },
{ itemName = "shovel", clientId = 3457, buy = 50, sell = 8 },
{ itemName = "telescope kit", clientId = 2799, buy = 70 },
{ itemName = "telescope kit", clientId = 3485, buy = 70 },
{ itemName = "torch", clientId = 2920, buy = 2 },
{ itemName = "watch", clientId = 2906, buy = 20, sell = 6 },
{ itemName = "wooden hammer", clientId = 3459, sell = 15 },
Expand Down
3 changes: 3 additions & 0 deletions data-otservbr-global/npc/baltim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ npcConfig.shop = {
{ itemName = "durable exercise axe", clientId = 35280, buy = 945000, count = 1800 },
{ itemName = "durable exercise bow", clientId = 35282, buy = 945000, count = 1800 },
{ itemName = "durable exercise club", clientId = 35281, buy = 945000, count = 1800 },
{ itemName = "durable exercise shield", clientId = 44066, buy = 945000, count = 1800 },
{ itemName = "durable exercise sword", clientId = 35279, buy = 945000, count = 1800 },
{ itemName = "dwarven shield", clientId = 3425, buy = 500, sell = 100 },
{ itemName = "exercise axe", clientId = 28553, buy = 262500, count = 500 },
{ itemName = "exercise bow", clientId = 28555, buy = 262500, count = 500 },
{ itemName = "exercise club", clientId = 28554, buy = 262500, count = 500 },
{ itemName = "exercise shield", clientId = 44065, buy = 262500, count = 500 },
{ itemName = "exercise sword", clientId = 28552, buy = 262500, count = 500 },
{ itemName = "fire sword", clientId = 3280, sell = 1000 },
{ itemName = "frost giant pelt", clientId = 9658, sell = 160 },
Expand All @@ -95,6 +97,7 @@ npcConfig.shop = {
{ itemName = "lasting exercise axe", clientId = 35286, buy = 7560000, count = 14400 },
{ itemName = "lasting exercise bow", clientId = 35288, buy = 7560000, count = 14400 },
{ itemName = "lasting exercise club", clientId = 35287, buy = 7560000, count = 14400 },
{ itemName = "lasting exercise shield", clientId = 44067, buy = 7560000, count = 14400 },
{ itemName = "lasting exercise sword", clientId = 35285, buy = 7560000, count = 14400 },
{ itemName = "leather armor", clientId = 3361, buy = 35, sell = 12 },
{ itemName = "leather boots", clientId = 3552, buy = 10, sell = 2 },
Expand Down
Loading

0 comments on commit dba1462

Please sign in to comment.