Skip to content

Commit

Permalink
Update antibot.lua
Browse files Browse the repository at this point in the history
- I put an option that activates/deactivates the antibot in the players that are in protection zone.
  • Loading branch information
moviebr committed Mar 2, 2021
1 parent 24e37e2 commit d4dd1d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/lib/custom/antibot.lua
Expand Up @@ -32,6 +32,7 @@ ANTIBOT = {
},
},
notUseOnTrainers = true, -- True = training players will not be checked
notUseOnPz = true, -- True = players on pz will not be checked
verification = {40, 60}, -- in minutes
}

Expand Down Expand Up @@ -67,6 +68,11 @@ function ANTIBOT:time(playerId)

playerId = player:getId()

if (ANTIBOT.notUseOnPz) and (Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE)) then
ANTIBOT:reset(playerId)
return false
end

if ANTIBOT.notUseOnTrainers and staminaBonus.events[player:getName()] then
ANTIBOT:reset(playerId)
return false
Expand Down

0 comments on commit d4dd1d1

Please sign in to comment.