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

76 lines
3.0 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
// champ_create - Create AI team champions
// By Deva B. Winblood 9/17/2006
////////////////////////////////////////////////////////////////////////////////
#include "mw_imp_h"
void main()
{
int bUNC=FALSE;
int bUND=FALSE;
int bDWF=FALSE;
int bSPID=FALSE;
object oPlayer=GetFirstPC();
string sS;
object oDest;
object oChamp;
object oItem;
PrintString("Champ_Create() called <------------");
while(GetIsObjectValid(oPlayer))
{ // find out which teams have PCs
sS=GetLocalString(oPlayer,"sTeamID");
sS=GetStringUpperCase(sS);
if (sS=="UNC") bUNC=TRUE;
else if (sS=="UND") bUND=TRUE;
else if (sS=="DWF") bDWF=TRUE;
else if (sS=="SPID") bSPID=TRUE;
oPlayer=GetNextPC();
} // find out which teams have PCs
if (!bUNC)
{ // create unclean champion
oDest=GetWaypointByTag("UNC_START");
oChamp=CreateObject(OBJECT_TYPE_CREATURE,"unc_champ",GetLocation(oDest));
SetAILevel(oChamp,AI_LEVEL_HIGH);
if (GetLocalInt(GetModule(),"nGSAdvEnabled"))
{ // starting advantage is on
oItem=GetItemPossessedBy(oChamp,"UNCastl");
DelayCommand(2.0,fnMakeMasterwork(oChamp,oItem,ITEM_TYPE_ARMOR,INVENTORY_SLOT_CHEST));
} // starting advantage is on
} // create unclean champion
if (!bUND)
{ // create undead champion
oDest=GetWaypointByTag("UND_START");
oChamp=CreateObject(OBJECT_TYPE_CREATURE,"und_champ",GetLocation(oDest));
SetAILevel(oChamp,AI_LEVEL_HIGH);
if (GetLocalInt(GetModule(),"nGSAdvEnabled"))
{ // starting advantage is on
oItem=GetItemPossessedBy(oChamp,"UNDasc");
DelayCommand(2.0,fnMakeMasterwork(oChamp,oItem,ITEM_TYPE_ARMOR,INVENTORY_SLOT_CHEST));
} // starting advantage is on
} // create undead champion
if (!bDWF)
{ // create dwarven champion
oDest=GetWaypointByTag("DWF_START");
oChamp=CreateObject(OBJECT_TYPE_CREATURE,"dwf_champ",GetLocation(oDest));
SetAILevel(oChamp,AI_LEVEL_HIGH);
if (GetLocalInt(GetModule(),"nGSAdvEnabled"))
{ // starting advantage is on
oItem=GetItemPossessedBy(oChamp,"DWFasc");
DelayCommand(2.0,fnMakeMasterwork(oChamp,oItem,ITEM_TYPE_ARMOR,INVENTORY_SLOT_CHEST));
} // starting advantage is on
} // create dwarven champion
if (!bSPID)
{ // create spider champion
oDest=GetWaypointByTag("SPID_START");
oChamp=CreateObject(OBJECT_TYPE_CREATURE,"spid_champ",GetLocation(oDest));
SetAILevel(oChamp,AI_LEVEL_HIGH);
if (GetLocalInt(GetModule(),"nGSAdvEnabled"))
{ // starting advantage is on
oItem=GetItemPossessedBy(oChamp,"SpiderChain");
DelayCommand(2.0,fnMakeMasterwork(oChamp,oItem,ITEM_TYPE_ARMOR,INVENTORY_SLOT_CHEST));
} // starting advantage is on
} // create spider champion
}