Skip to content

Level Capping An Area #304

Answered by zach2good
colivah asked this question in Q&A
Jun 12, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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

target:levelRestriction(effect:getPower()) -- Probably level?
target:levelRestriction(0) -- Probably removing restriction

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:

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@colivah
Comment options

@TeoTwawki
Comment options

Answer selected by colivah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants