Pedrook
Advanced OT User
- Joined
- May 24, 2009
- Messages
- 442
- Solutions
- 3
- Reaction score
- 183
- Location
- Brazil
- GitHub
- pedrogiampietro
I'm trying to put it to when the player has the ip null, 0.0.0.0 it stops attacking the bixos, because when you exit the beat it continues to beat. I was told I would have a way to add events / creatures
src font: flaviiojr/otxserver-new-1
Lua:
if target:getIp() == 0 then -- If player is disconnected, monster shall ignore to attack the player
if protectionStorage <= 0 then
addEvent(removeCombatProtection, 30 * 1000, target.uid)
target:setStorageValue(Storage.combatProtectionStorage, 1)
elseif protectionStorage == 1 then
self:searchTarget()
return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
end
src font: flaviiojr/otxserver-new-1
Last edited: