32 lines
1.2 KiB
Plaintext
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");
|
|
}
|