Skip to content

Commit

Permalink
other big update for team otservbr this change save much memory usage :D
Browse files Browse the repository at this point in the history
... no completed only for testings
  • Loading branch information
mattyx14 committed Aug 19, 2023
1 parent 46a574c commit eca05df
Show file tree
Hide file tree
Showing 289 changed files with 6,237 additions and 4,803 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-windows-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [windows-2022]
buildtype: [Release]
buildtype: [Debug]
include:
- os: windows-2022
triplet: x64-windows
Expand All @@ -42,7 +42,7 @@ jobs:
./vcpkg integrate install
- name: Build project
run: msbuild.exe /p:VcpkgEnableManifest=true /p:Configuration=Release /p:Platform=x64 /p:VcpkgRoot=$env:GITHUB_WORKSPACE/vcpkg vcproj/otxserver.sln
run: msbuild.exe /p:VcpkgEnableManifest=true /p:Configuration=Debug /p:Platform=x64 /p:VcpkgRoot=$env:GITHUB_WORKSPACE/vcpkg vcproj/otxserver.sln

- name: Upload artifacts
uses: actions/upload-artifact@main
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(VCPKG_FEATURE_FLAGS "versions")
set(VCPKG_BUILD_TYPE "release")

# *****************************************************************************
# Project OTX Server
# Project canary
# *****************************************************************************
project(otxserver)

Expand Down
21 changes: 21 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@
"strategy": "external"
}
},
{
"name": "windows-debug",
"inherits": "windows-release",
"displayName": "Windows - Debug",
"description": "Build Debug Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"DEBUG_LOG": "ON",
"ASAN_ENABLED": "OFF",
"BUILD_STATIC_LIBRARY": "OFF",
"VCPKG_TARGET_TRIPLET": "x64-windows"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
"name": "linux-debug",
"inherits": "linux-release",
Expand Down Expand Up @@ -101,6 +118,10 @@
{
"name": "windows-release-asan",
"configurePreset": "windows-release-asan"
},
{
"name": "windows-Xdebug",
"configurePreset": "windows-debug"
}
]
}
13 changes: 9 additions & 4 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ useAnyDatapackFolder = true
dataPackDirectory = "data-otxserver"
-- Don't change this unless you know what you're doing
coreDirectory = "data"
-- Enable/disable development mode
-- NOTE: In development mode, additional logs will be enabled, for deputation and testing purposes.
developmentMode = false

-- 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.
logLevel = debug

-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 0
protectionLevel = 7
pzLocked = 60 * 1000
removeChargesFromRunes = true
removeChargesFromPotions = true
Expand Down Expand Up @@ -393,6 +395,9 @@ rateBossHealth = 1.0
rateBossAttack = 1.0
rateBossDefense = 1.0

bossDefaultTimeToFightAgain = 20 * 60 * 60 -- 20 hours
bossDefaultTimeToDefeat = 20 * 60 -- 20 minutes

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
Expand Down
8 changes: 8 additions & 0 deletions data-otxserver/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,11 @@ Storage = {
AccessDoor = 47601,
MegasylvanYseldaTimer = 47602,
},
CitizenOfIssaviOutfits = {},
RoyalBounaceanAdvisorOutfits = {},
TooHotToHandle = {
BrainstealerTimer = 47611,
}
},
U12_90 = { -- update 12.90 - Reserved Storages 47851 - 47900
PrimalOrdeal = {
Expand All @@ -807,6 +812,9 @@ Storage = {
ThePrimalMenaceKilled = 47855,
},
},
WithinTheTides = {
TimiraTimer = 47858,
}
},
},

Expand Down
95 changes: 95 additions & 0 deletions data-otxserver/monster/bosses/brain_parasite.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
local mType = Game.createMonsterType("Brain Parasite")
local monster = {}

monster.description = "a brain parasite"
monster.experience = 0
monster.outfit = {
lookType = 82,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0
}

monster.health = 7500
monster.maxHealth = 7500
monster.race = "venom"
monster.corpse = 6023
monster.speed = 200
monster.manaCost = 0

monster.changeTarget = {
interval = 5000,
chance = 20
}

monster.strategiesTarget = {
nearest = 100,
}

monster.flags = {
summonable = false,
attackable = true,
hostile = true,
convinceable = false,
pushable = false,
rewardBoss = false,
illusionable = false,
canPushItems = true,
canPushCreatures = false,
staticAttackChance = 90,
targetDistance = 1,
runHealth = 0,
healthHidden = false,
isBlockable = false,
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
}

monster.light = {
level = 0,
color = 0,
}

monster.voices = {
interval = 5000,
chance = 10,
}

monster.loot = {}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500 },
}

monster.defenses = {
defense = 78,
armor = 78,
mitigation = 3.27,
{ name = "combat", type = COMBAT_HEALING, chance = 15, interval = 2000, minDamage = 450, maxDamage = 550, effect = CONST_ME_MAGIC_BLUE },
}

monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 0 },
{ type = COMBAT_ENERGYDAMAGE, percent = 10 },
{ type = COMBAT_EARTHDAMAGE, percent = 0 },
{ type = COMBAT_FIREDAMAGE, percent = -10 },
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = -5 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 0 },
}

monster.immunities = {
{ type = "paralyze", condition = true },
{ type = "outfit", condition = false },
{ type = "invisible", condition = true },
{ type = "bleed", condition = false },
}

mType:register(monster)
10 changes: 9 additions & 1 deletion data-otxserver/monster/bosses/custodian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ monster.voices = {
}

monster.loot = {
{name = "small sapphire", chance = 33500}
{name = "throwing star", chance = 65000, maxCount = 6},
{name = "hunting spear", chance = 62000},
{name = "gold ingot", chance = 48000},
{name = "blue gem", chance = 31000},
{name = "yellow gem", chance = 31000},
{name = "green crystal shard", chance = 8600},
{id = 281, chance = 28000}, -- giant shimmering pearl (green)
{name = "cobra crest", chance = 11000},
{name = "skull helmet", chance = 7500},
}

monster.attacks = {
Expand Down
151 changes: 151 additions & 0 deletions data-otxserver/monster/bosses/the_brainstealer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
local mType = Game.createMonsterType("The Brainstealer")
local monster = {}

monster.description = "The Brainstealer"
monster.experience = 72000
monster.outfit = {
lookType = 1412,
lookHead = 94,
lookBody = 88,
lookLegs = 88,
lookFeet = 114,
lookAddons = 0,
lookMount = 0
}

monster.bosstiary = {
bossRaceId = 2055,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U12_70.TooHotToHandle.BrainstealerTimer,
}

monster.health = 300000
monster.maxHealth = monster.health
monster.race = "undead"
monster.corpse = 36843
monster.speed = 425

monster.summon = {
maxSummons = 2,
summons = {
{name = "brain parasite", chance = 20, interval = 4000, count = 1},
}
}

monster.changeTarget = {
interval = 4000,
chance = 10
}

monster.flags = {
summonable = false,
attackable = true,
hostile = true,
convinceable = false,
pushable = false,
rewardBoss = true,
illusionable = false,
canPushItems = true,
canPushCreatures = true,
staticAttackChance = 90,
targetDistance = 1,
runHealth = 0,
healthHidden = false,
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
}

monster.loot = {
{ name = "platinum coin", mincount = 10, maxcount = 50, chance = 100000 },
{ name = "crystal coin", mincount = 1, maxcount = 5, chance = 100000 },
{ name = "violet gem", chance = 50000 },
{ name = "mastermind potion", chance = 50000 },
{ name = "moonstone", chance = 50000 },
{ name = "ultimate spirit potion", chance = 50000 },
{ name = "white gem", chance = 50000 },
{ name = "brainstealer's tissue", chance = 6000 },
{ name = "brainstealer's brain", chance = 5000 },
{ name = "brainstealer's brainwave", chance = 2500 },
{ name = "eldritch breeches", chance = 180 },
{ name = "eldritch cowl", chance = 240 },
{ name = "eldritch hood", chance = 225 },
{ name = "eldritch bow", chance = 210 },
{ name = "eldritch quiver", chance = 250 },
{ name = "eldritch claymore", chance = 130 },
{ name = "eldritch greataxe", chance = 110 },
{ name = "eldritch warmace", chance = 320 },
{ name = "eldritch shield", chance = 180 },
{ name = "eldritch cuirass", chance = 160 },
{ name = "eldritch folio", chance = 170 },
{ name = "eldritch tome", chance = 190 },
{ name = "eldritch rod", chance = 200 },
{ name = "eldritch wand", chance = 180 },
{ name = "gilded eldritch claymore", chance = 140 },
{ name = "gilded eldritch greataxe", chance = 120 },
{ name = "gilded eldritch warmace", chance = 100 },
{ name = "gilded eldritch wand", chance = 80 },
{ name = "gilded eldritch rod", chance = 60 },
{ name = "gilded eldritch bow", chance = 50 },
{ name = "eldritch crystal", chance = 30 }
}

monster.attacks = {
{name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2000, minDamage = 0, maxDamage = -900},
{name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 20, radius = 4, minDamage = -1200, maxDamage = -1900, effect = CONST_ME_MORTAREA, shootEffect = CONST_ANI_SUDDENDEATH, target = true, range = 7},
{name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 20, radius = 4, minDamage = -700, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD},
{name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 0, minDamage = -1200, maxDamage = -1600, effect = CONST_ME_ELECTRICALSPARK},
}

monster.defenses = {
defense = 78,
armor = 78,
mitigation = 3.27,
{ name = "combat", type = COMBAT_HEALING, chance = 15, interval = 2000, minDamage = 1450, maxDamage = 5350, effect = CONST_ME_MAGIC_BLUE },
}

monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 10 },
{ type = COMBAT_ENERGYDAMAGE, percent = 3 },
{ type = COMBAT_EARTHDAMAGE, percent = 0 },
{ type = COMBAT_FIREDAMAGE, percent = 5 },
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 0 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 100 }
}

monster.immunities = {
{ type = "paralyze", condition = true },
{ type = "invisible", condition = true },
}

monster.voices = {
interval = 5000,
chance = 10,
{ text = "Feel the power of death unleashed!", yell = false },
{ text = "I will rule again and my realm of death will span the world!", yell = false },
{ text = "My lich-knights will conquer this world for me!", yell = false },
}

mType.onThink = function(monster, interval)
end

mType.onAppear = function(monster, creature)
if monster:getType():isRewardBoss() then
monster:setReward(true)
end
end

mType.onDisappear = function(monster, creature)
end

mType.onMove = function(monster, creature, fromPosition, toPosition)
end

mType.onSay = function(monster, creature, type, message)
end

mType:register(monster)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ monster.outfit = {
monster.events = {
"TentuglysHeadDeath"
}
monster.bosstiary = {
bossRaceId = 2238,
bossRace = RARITY_ARCHFOE,
storageCooldown = Storage.Quest.U12_60.APiratesTail.TentuglyTimer,
}

monster.health = 75000
monster.maxHealth = 75000
Expand Down
Loading

0 comments on commit eca05df

Please sign in to comment.