• 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
52
Reaction score
9
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 ?
 

Loney

🇲🇽
Senator
Premium User
Joined
Jul 23, 2012
Messages
1,990
Solutions
23
Reaction score
203
Location
MX
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.

 
OP
OP
P

poe6man3

Member
Joined
Aug 6, 2020
Messages
52
Reaction score
9
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
 

Itutorial

Premium User
Premium User
Joined
Dec 23, 2014
Messages
1,956
Solutions
52
Reaction score
649
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.
 
Top