Well done, everybody.
I used EffectSpellFailure() and a variable to cancell ranged attacks.
This script is on a trigger that activates only when someone enters the Coliseum
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetIsDM(oPC)) return;
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellFailure(), oPC);
SetLocalInt(oPC, "arena", TRUE);
}
this way no spells can be casted there and who attack the combatant we will use effectpetrify in the event OnDamaged. this way:
if(GetLocalInt(oPC, "arena") == TRUE) EffectPetrify(oPC) (last attacker)
//EDIT
Thanks to Shadooow I just remembered when he said to me use this code in my werewolf system
//edit2
and thanks to mad poet for help
Modifié par WhiteTiger, 24 juillet 2014 - 06:10 .