HoS_PRC8/_mod/_module/nss/ox_tegods.nss

25 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-11-25 19:36:07 -05:00
void main()
{
int nC;
object oWP;
object oPC;
object oRT;
object oExit=GetExitingObject();
oWP=GetWaypointByTag("TEGODS_LEVEL1");
oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,1);
oRT=GetNearestObjectByTag("wazoo_po_ropetd",oWP,1);
if (oPC==oExit) oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,2);
if (oPC!=OBJECT_INVALID||oRT!=OBJECT_INVALID) nC++;
oWP=GetWaypointByTag("TEGODS_LEVEL2");
oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,1);
oRT=GetNearestObjectByTag("wazoo_po_ropetd",oWP,1);
if (oPC==oExit) oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,2);
if (oPC!=OBJECT_INVALID||oRT!=OBJECT_INVALID) nC++;
oWP=GetWaypointByTag("TEGODS_LEVEL3");
oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,1);
oRT=GetNearestObjectByTag("wazoo_po_ropetd",oWP,1);
if (oPC==oExit) oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,2);
if (oPC!=OBJECT_INVALID||oRT!=OBJECT_INVALID) nC++;
if (nC==0) DeleteLocalInt(GetModule(),"bTEGodsActive");
}