Skip to content

Commit

Permalink
Merge branch 'main' into improve-events
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires authored Oct 29, 2024
2 parents b34c3cb + d6c5ec3 commit 98f8f62
Show file tree
Hide file tree
Showing 97 changed files with 1,697 additions and 1,122 deletions.
1 change: 1 addition & 0 deletions cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ endif()
# cmake -DDEBUG_LOG=ON ..
if(DEBUG_LOG)
add_definitions(-DDEBUG_LOG=ON)
add_definitions(-DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE)
log_option_enabled("DEBUG LOG")
else()
log_option_disabled("DEBUG LOG")
Expand Down
7 changes: 4 additions & 3 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ coreDirectory = "data"

-- Set log level
-- It can be trace, debug, info, warning, error, critical, off (default: info).
-- NOTE: Will only display logs with level higher or equal the one set.
-- NOTE: It will only be valid after the server starts up and only display logs with level higher or equal the one set.
-- NOTE: Debug and trace logs are only available if compiled in debug mode.
logLevel = "info"

--- Toggles the server's maintenance mode.
Expand Down Expand Up @@ -52,7 +53,7 @@ cleanProtectionZones = false
-- Connection Config
-- NOTE: allowOldProtocol can allow login on 10x protocol. (11.00)
-- NOTE: maxPlayers set to 0 means no limit
-- NOTE: MaxPacketsPerSeconds if you change you will be subject to bugs by WPE, keep the default value of 25,
-- NOTE: MaxPacketsPerSeconds if you change you will be subject to bugs by WPE, keep the default value of 25,
-- It's recommended to use a range like min 50 in this function, otherwise you will be disconnected after equipping two-handed distance weapons.
ip = "127.0.0.1"
allowOldProtocol = false
Expand Down Expand Up @@ -145,7 +146,7 @@ forgeAmountMultiplier = 3
forgeMinSlivers = 3
forgeMaxSlivers = 7
forgeInfluencedLimit = 300
forgeFiendishLimit = 3
forgeFiendishLimit = 4
forgeFiendishIntervalType = "hour"
forgeFiendishIntervalTime = "1"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ monster.raceId = 1946
monster.Bestiary = {
class = "Undead",
race = BESTY_RACE_UNDEAD,
toKill = 5000,
FirstUnlock = 200,
SecondUnlock = 2000,
CharmsPoints = 100,
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/ahmet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ npcConfig.shop = { -- Sellable items
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 2 },
{ itemName = "deed of ownership", clientId = 7866, buy = 1000 },
{ itemName = "document", clientId = 2818, buy = 12 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/asphota.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
{ itemName = "hand auger", clientId = 31334, buy = 25 },
{ itemName = "inkwell", clientId = 3509, sell = 8 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/bashira.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 2 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/beatrice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
{ itemName = "hand auger", clientId = 31334, buy = 25 },
{ itemName = "inkwell", clientId = 3509, sell = 8 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/bertha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2884, buy = 2 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/bezil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 40, sell = 40 },
{ itemName = "grey backpack", clientId = 2870, buy = 10 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/gladys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
{ itemName = "fox paw", clientId = 27462, sell = 100 },
{ itemName = "fur armor", clientId = 22085, sell = 5000 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/gorn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2884, buy = 2 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/gree_dee.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 2 },
{ itemName = "deed of ownership", clientId = 7866, buy = 1000 },
{ itemName = "document", clientId = 2818, buy = 12 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/halif.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 2 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 40, sell = 40 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/lubo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
{ itemName = "hand auger", clientId = 31334, buy = 25 },
{ itemName = "machete", clientId = 3308, buy = 35, sell = 6 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/maro.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ npcConfig.shop = {
{ itemName = "cleaver", clientId = 3471, buy = 15 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 2 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
{ itemName = "fork", clientId = 3467, buy = 10 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/maun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ npcConfig.shop = {
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crossbow", clientId = 3349, buy = 500, sell = 120 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "crystalline arrow", clientId = 15793, buy = 20 },
{ itemName = "desintegrate rune", clientId = 3197, buy = 26 },
{ itemName = "diamond arrow", clientId = 35901, buy = 100 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/nezil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 40, sell = 40 },
{ itemName = "grey backpack", clientId = 2870, buy = 10 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/perod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ npcConfig.shop = {
{ itemName = "closed trap", clientId = 3481, buy = 280 },
{ itemName = "crossbow", clientId = 3349, buy = 500, sell = 500 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "crystalline arrow", clientId = 15793, buy = 20 },
{ itemName = "cup", clientId = 2884, buy = 2 },
{ itemName = "diamond arrow", clientId = 35901, buy = 100 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/red_lilly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 2 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/rock_in_a_hard_place.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ local itemsTable = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "deepling axe", clientId = 13991, sell = 40000 },
{ itemName = "deepling squelcher", clientId = 14250, sell = 7000 },
{ itemName = "deepling staff", clientId = 13987, sell = 4000 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/sarina.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2881, buy = 3 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/shiantis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ npcConfig.shop = {
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "coal basin kit", clientId = 3513, buy = 25 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cuckoo clock", clientId = 2664, buy = 40 },
{ itemName = "document", clientId = 2834, buy = 12 },
{ itemName = "empty goldfish bowl", clientId = 5928, buy = 50 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/timur.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ npcConfig.shop = {
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crossbow", clientId = 3349, sell = 160 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
{ itemName = "hand auger", clientId = 31334, buy = 25 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/zora.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ npcConfig.shop = {
{ itemName = "candlestick", clientId = 2917, buy = 2 },
{ itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 },
{ itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 },
{ itemName = "crusher", clientId = 46627, buy = 500 },
{ itemName = "cup", clientId = 2884, buy = 2 },
{ itemName = "document", clientId = 2818, buy = 12 },
{ itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local config = {
{ position = { x = 32728, y = 32875, z = 7 }, destination = { x = 34015, y = 31890, z = 8 } },
{ position = { x = 32728, y = 32878, z = 7 }, destination = { x = 34015, y = 31890, z = 8 } },
}

local entrance = Action()
Expand Down
10 changes: 10 additions & 0 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76351,5 +76351,15 @@ Granted by TibiaGoals.com"/>
<attribute key="containersize" value="10"/>
<attribute key="decayTo" value="0"/>
</item>
<item id="46627" article="a" name="crusher">
<attribute key="loottype" value="tools"/>
<attribute key="showCharges" value="1"/>
<attribute key="charges" value="10"/>
<attribute key="weight" value="30"/>
</item>
<item id="46628" article="a" name="amber crusher">
<attribute key="loottype" value="tools"/>
<attribute key="weight" value="30"/>
</item>
</items>

2 changes: 1 addition & 1 deletion data/libs/functions/monster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function Monster.setFiendish(self, position, player)
if fiendishMonster then
Game.removeFiendishMonster(fiendishMonster:getId())
end
if Game.makeFiendishMonster(self:getId(), true) ~= 0 then
if Game.makeFiendishMonster(self:getId(), false) ~= 0 then
success = "set sucessfully a new fiendish monster"
else
success = "have error to set fiendish monster"
Expand Down
8 changes: 1 addition & 7 deletions data/npclib/npc_system/npc_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,7 @@ if NpcHandler == nil then
local callback = self:getCallback(CALLBACK_ON_MOVE)
if callback == nil or callback(npc, player, fromPosition, toPosition) then
if self:processModuleCallback(CALLBACK_ON_MOVE, npc, player, fromPosition, toPosition) then
if self:checkInteraction(npc, player) then
if not self:isInRange(npc, player) then
self:onWalkAway(npc, player)
else
self:updateInteraction(npc, player)
end
end
return true
end
end
end
Expand Down
74 changes: 25 additions & 49 deletions data/scripts/systems/item_tiers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,110 +6,86 @@ local itemTierClassifications = {
regular = 25000,
core = 1,
},
[2] = {
regular = 50000,
core = 1,
},
[3] = {
regular = 100000,
core = 1,
},
},
-- Upgrade classification 2
[2] = {
-- Update tier 0
[1] = {
regular = 50000,
regular = 750000,
core = 1,
},
-- Update tier 1
[2] = {
regular = 100000,
regular = 5000000,
core = 1,
},
[3] = {
regular = 200000,
core = 2,
},
[4] = {
regular = 400000,
core = 2,
},
},
-- Upgrade classification 3
[3] = {
[1] = {
regular = 200000,
regular = 4000000,
core = 1,
},
[2] = {
regular = 400000,
regular = 10000000,
core = 2,
},
[3] = {
regular = 800000,
regular = 20000000,
core = 3,
},
[4] = {
regular = 1600000,
core = 4,
},
[5] = {
regular = 3200000,
core = 5,
},
},
-- Upgrade classification 4
[4] = {
[1] = {
regular = 1500000,
regular = 8000000,
core = 1,
convergence = { fusion = { price = 6000000 }, transfer = { price = 12000000 } },
convergence = { fusion = { price = 55000000 }, transfer = { price = 65000000 } },
},
[2] = {
regular = 3000000,
regular = 20000000,
core = 2,
convergence = { fusion = { price = 12000000 }, transfer = { price = 24000000 } },
convergence = { fusion = { price = 110000000 }, transfer = { price = 165000000 } },
},
[3] = {
regular = 6000000,
regular = 40000000,
core = 5,
convergence = { fusion = { price = 24000000 }, transfer = { price = 48000000 } },
convergence = { fusion = { price = 170000000 }, transfer = { price = 375000000 } },
},
[4] = {
regular = 15000000,
regular = 65000000,
core = 10,
convergence = { fusion = { price = 48000000 }, transfer = { price = 100000000 } },
convergence = { fusion = { price = 300000000 }, transfer = { price = 800000000 } },
},
[5] = {
regular = 30000000,
regular = 100000000,
core = 15,
convergence = { fusion = { price = 100000000 }, transfer = { price = 200000000 } },
convergence = { fusion = { price = 875000000 }, transfer = { price = 2000000000 } },
},
[6] = {
regular = 80000000,
regular = 250000000,
core = 25,
convergence = { fusion = { price = 200000000 }, transfer = { price = 400000000 } },
convergence = { fusion = { price = 2350000000 }, transfer = { price = 5250000000 } },
},
[7] = {
regular = 200000000,
regular = 750000000,
core = 35,
convergence = { fusion = { price = 400000000 }, transfer = { price = 800000000 } },
convergence = { fusion = { price = 6950000000 }, transfer = { price = 14500000000 } },
},
[8] = {
regular = 400000000,
regular = 2500000000,
core = 50,
convergence = { fusion = { price = 800000000 }, transfer = { price = 1600000000 } },
convergence = { fusion = { price = 21250000000 }, transfer = { price = 42500000000 } },
},
[9] = {
regular = 800000000,
regular = 8000000000,
core = 60,
convergence = { fusion = { price = 1600000000 }, transfer = { price = 3200000000 } },
convergence = { fusion = { price = 50000000000 }, transfer = { price = 100000000000 } },
},
[10] = {
regular = 1600000000,
regular = 15000000000,
core = 85,
convergence = { fusion = { price = 3200000000 }, transfer = { price = 6400000000 } },
convergence = { fusion = { price = 125000000000 }, transfer = { price = 300000000000 } },
},
},
}
Expand Down
Loading

0 comments on commit 98f8f62

Please sign in to comment.