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

43 lines
1.1 KiB
Plaintext

// throne command - all RAID ATTACK - 10 mana
#include "rtsh_multiplay"
void fnRaid(string sTag,int nNum,string sRaid,string sID)
{ // raid command
object oCR=GetObjectByTag(sTag,nNum-1);
if (oCR!=OBJECT_INVALID)
{
DelayCommand(0.1,fnRaid(sTag,nNum+1,sRaid,sID));
if (GetLocalString(oCR,"sTeamID")==sID)
{
SetLocalString(oCR,"sTeamToRaid",sRaid);
SetLocalInt(oCR,"nMState",17);
SetLocalInt(oCR,"nParm",1);
SetLocalInt(oCR,"nSState",0);
SetLocalInt(oCR,"nRun",TRUE);
}
}
} // fnRaid()
void main()
{
object oPC=GetPCSpeaker();
string sID=GetLocalString(oPC,"sTeamID");
string sTeamToRaid=GetLocalString(oPC,"sTeamToRaid");
int nNum=0;
while(nNum<30)
{ // order units
DelayCommand(0.1,fnRaid(sID+IntToString(nNum),1,sTeamToRaid,sID));
nNum++;
} // order units
// check mercenaries
nNum=0;
while(nNum<25)
{ // order mercenaries
DelayCommand(0.4,fnRaid("MER"+IntToString(nNum),1,sTeamToRaid,sID));
nNum++;
} // order mercenaries
nNum=fnGetTeamMana(oPC);
nNum=nNum-100;
fnSetTeamMana(oPC,nNum);
}