Bee King
Well-Known Member
- Joined
- May 9, 2024
- Messages
- 128
- Reaction score
- 56
Hello everyone,
My server allows MC (multi-client), but I want it to be used exclusively for progression, not for PVP...
I've seen on some servers that MC PVP is blocked — for example, if a player with the same IP has a character with a skull, other characters using the same IP cannot attack, get a skull, etc.
Does anyone have an idea how to make this work?
I’m using TFS 1.5 downgrade NekiRo 8.0...
I’ve already added a system where the player only gets a skull if they have their hand closed (similar to modern open PVP mechanics). Now I’d like to add a feature to block PVP between characters using the same IP.
Here’s my security mode — I think the change should be made here:
data/scripts/security.lua
LUA:
local ec = EventCallback
ec.onTargetCombat = function(self, target)
if self and self:isMonster() then
return true
end
if self and self:hasSecureMode() then
if target:isPlayer() then
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
end
end
return RETURNVALUE_NOERROR
end
ec:register()
LUA:
local ec = EventCallback
ec.onTargetCombat = function(self, target)
if self and self:isMonster() then
return true
end
if self and self:hasSecureMode() then
if target:isPlayer() then
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
end
end
return RETURNVALUE_NOERROR
end
ec:register()