-
I am trying to figure out if it is possible to impose my own custom level cap to a certain zone. I have looked through the files to see if i could reverse engineer something but I am stuck. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We have a field per zone called Otherwise, look at how the level-sync effect works: https://github.com/LandSandBoat/server/blob/094ec9f022916bc86b8d0efee166b626ec560c2c/scripts/globals/effects/level_sync.lua target:levelRestriction(effect:getPower()) -- Probably level?
target:levelRestriction(0) -- Probably removing restriction You could apply the effect in your zone scripts There aren't bindings for onZoneOut, but you can look in core for when it handles level sync stuff and put something custom there: Line 949 in db7d27f Update from Teo: zone_object.afterZoneIn = function(player)
if ENABLE_COP_ZONE_CAP == 1 then
player:addStatusEffect(xi.effect.LEVEL_RESTRICTION, 30, 0, 0)
end
end Presumably, that effect wears naturally when you zone out |
Beta Was this translation helpful? Give feedback.
We have a field per zone called
restrictions
, but that doesn't appear to be used, maybe Teo can shine some wisdom on that:https://github.com/LandSandBoat/server/blob/base/sql/zone_settings.sql#L29
Otherwise, look at how the level-sync effect works: https://github.com/LandSandBoat/server/blob/094ec9f022916bc86b8d0efee166b626ec560c2c/scripts/globals/effects/level_sync.lua
You could apply the effect in your zone scripts
onZoneIn
call.There aren't bindings for onZoneOut, but you can look in core for when it handles level sync stuff and put something custom there:
serv…