• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Is there a way to stop player/monster from attacking

poe6man3

Member
Joined
Aug 6, 2020
Messages
87
Solutions
1
Reaction score
12
Like in title lets say for example i want to create a spell and during that spell i want to prevent player from attacking is there a way to do it ?
 
You want the caster to stop attacking during the spell or caster can't be attacked during spell? Found this, maybe you can start something.

 
Let me give some more examples that i have in my head:

  • Player/caster during spell cant attack
  • Player/caster using spell on other player/monster prevent them from attacking for a couple of sek
  • Monster during some attacks animation also cant attack other players
im thinkink like a condition maybe would be useful for that one but im pretty sure there is no such condition that stop somebody from attacking
 
So in events/creature.lua there is the combat.

Lua:
function Creature:onAreaCombat(tile, isAggressive)
    return RETURNVALUE_NOERROR
end

function Creature:onTargetCombat(target)
    return RETURNVALUE_NOERROR
end

Add your code there.
 
Back
Top