HoS_PRC8/_mod/_module/nss/municipal_resp.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

32 lines
1.2 KiB
Plaintext

// municipal_resp
void fnCreateGuard(string sTag)
{ // create guard
object oWP=GetWaypointByTag("POST_"+sTag);
if (GetIsObjectValid(oWP))
{ // create
oWP=CreateObject(OBJECT_TYPE_CREATURE,"municipalguard",GetLocation(oWP),FALSE,sTag);
SetAILevel(oWP,AI_LEVEL_NORMAL);
} // create
} // fnCreateGuard()
void main()
{
object oGuard=GetObjectByTag("MUNICIPALG1");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG1");
oGuard=GetObjectByTag("MUNICIPALG2");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG2");
oGuard=GetObjectByTag("MUNICIPALG3");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG3");
oGuard=GetObjectByTag("MUNICIPALG4");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG4");
oGuard=GetObjectByTag("MUNICIPALG5");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG5");
oGuard=GetObjectByTag("MUNICIPALG6");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG6");
oGuard=GetObjectByTag("MUNICIPALG7");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG7");
oGuard=GetObjectByTag("MUNICIPALG8");
if (GetIsObjectValid(oGuard)==FALSE) fnCreateGuard("MUNICIPALG8");
}