AOC_PRC8/_module/nss/deactivator2.nss
Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

44 lines
1.4 KiB
Plaintext

#include "spawner"
void main()
{
object oMod = GetModule();
object oPC = GetFirstPC();
object oMonster;
int oS0 = GetLocalInt(oMod, "challenge");
int oS1 = GetLocalInt(oMod, "sw_hw");
int oS2 = GetLocalInt(oMod, "sw_dr");
int oS3 = GetLocalInt(oMod, "sw_bl");
int oS4 = GetLocalInt(oMod, "sw_pf");
int oS5 = GetLocalInt(oMod, "sw_df");
int oS6 = GetLocalInt(oMod, "sw_pm");
int oS7 = GetLocalInt(oMod, "sw_bm");
int oS8 = GetLocalInt(oMod, "sw_lm");
int oS9 = GetLocalInt(oMod, "sw_ll");
int oS10 = GetLocalInt(oMod, "sw_xx");
int iHwar = GetLocalInt(oMod, "hwar_on");
//Message(0.0, IntToString(GetLocalInt(oMod, "hwar_on")), oPC);
//if (iHwar==1){SetLocked(GetObjectByTag("arena_gate"), TRUE);}
oMonster = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oPC);
if ((oS1!=1)&&(oS2!=1)&&(oS3!=1)&&(oS4!=1)&&(oS5!=1)&&(oS6!=1)&&
/*(oS7!=1)&&*/(oS8!=1)&&(oS9!=1)&&(oS0!=1)&&(oS10!=1)&&
((!GetIsEnemy(oPC, oMonster))||(oMonster==OBJECT_INVALID)))
{
SetLocalInt(oMod, "in_progress", 0);
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
SetLocked(GetObjectByTag("arena_gate"), FALSE);
}
else
{
oMonster = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oPC);
if ((GetIsEnemy(oPC, oMonster))&&(oMonster!=OBJECT_INVALID))
{
SetLocalInt(oMod, "in_progress", 1);
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
SetLocked(GetObjectByTag("arena_gate"), TRUE);
}
}
}