Files
HeroesStone_PRC8/_module/nss/arena_t_ac_enter.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

26 lines
946 B
Plaintext

//////////////////////////////////////////////////////////
// Arena - OnEnter Activate trigger
// By Deva Bryson Winblood
//////////////////////////////////////////////////////////
void main()
{
object oPC=GetEnteringObject();
object oOb=GetNearestObjectByTag("ARENA_EventMaster",oPC,1);
object oMaster=GetLocalObject(oOb,"oMaster");
string sRes;
if (oMaster==OBJECT_INVALID)
{ // setup the arena
sRes=GetName(oOb);
oMaster=CreateObject(OBJECT_TYPE_CREATURE,sRes,GetLocation(oOb),FALSE);
SetLocalObject(oOb,"oMaster",oMaster);
DeleteLocalObject(oOb,"oContestant");
oMaster=GetLocalObject(oOb,"oGladiator");
if (oMaster!=OBJECT_INVALID) DestroyObject(oMaster);
DeleteLocalObject(oOb,"oGladiator");
DeleteLocalInt(oOb,"nPay");
DeleteLocalInt(oOb,"nState");
DeleteLocalInt(oOb,"nType");
ExecuteScript("arena_placebar",OBJECT_SELF);
} // setup the arena
}