function Creature:onChangeOutfit(outfit)
return true
end
function Creature:onAreaCombat(tile, isAggressive)
return RETURNVALUE_NOERROR
end
function Creature:onTargetCombat(target)
target:registerEvent("ItemSetsHealth")
target:registerEvent("UpgradeSystemHealth")
target:registerEvent("UpgradeSystemDeath")
if self:getStorageValue(STORAGEVALUE_WAR_GREENPLAYER_BOOL) == 1 then
if target:getStorageValue(STORAGEVALUE_WAR_REDPLAYER_BOOL) == 1 then
return RETURNVALUE_NOERROR
elseif target:getStorageValue(STORAGEVALUE_WAR_REDPLAYER_BOOL) == 0 then
self:sendCancelMessage("You cannot attack someone that is on your team.")
return false
end
elseif self:getStorageValue(STORAGEVALUE_WAR_REDPLAYER_BOOL) == 1 then
if target:getStorageValue(STORAGEVALUE_WAR_GREENPLAYER_BOOL) == 1 then
return RETURNVALUE_NOERROR
elseif target:getStorageValue(STORAGEVALUE_WAR_GREENPLAYER_BOOL) == 0 then
self:sendCancelMessage("You cannot attack someone that is on your team.")
return false
end
end
end
Alguém que posso me ajudar?
Estou com erro que não permite que personagem apanhe, sempre que a criatura vai bater o personagem não toma dano e lota o console de erro.
Question
Starliks 2
Alguém que posso me ajudar?
Estou com erro que não permite que personagem apanhe, sempre que a criatura vai bater o personagem não toma dano e lota o console de erro.
abaixo a print do console.
Link to post
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now