// squadl_squad_msg - Squad Leader sends messages to members of his squad #include "color_header" void main() { object oPC=GetPCSpeaker(); string sID=GetLocalString(oPC,"sTeamID"); int nNum=GetLocalInt(oPC,"nSquadNum"); object oMod=GetModule(); object oPerson; string sMsg; string sMe=GetName(oPC); int nParm=GetLocalInt(oPC,"nParm"); if (nParm==1) sMsg="Meet "+sMe+" back at the lair right now."; else if (nParm==2) sMsg="Meet "+sMe+" in the city now."; else if (nParm==3) sMsg="Meet "+sMe+" in the sewers now."; else if (nParm==4) sMsg="Meet "+sMe+" at the woodmans trading post now."; else if (nParm==5) sMsg="Meet "+sMe+" at the inn in the city now."; else if (nParm==6) sMsg="Meet "+sMe+" at the nearest inn now."; else if (nParm==7) sMsg="Follow "+sMe+" and stick close."; else if (nParm==8) sMsg="Heal up now you'll need your health. Heal other players near you too."; else if (nParm==9) sMsg="Buff yourself up with defensive spells and buff up nearby squad members too."; else if (nParm==10) sMsg="Meet "+sMe+" at the South West control point now."; else if (nParm==11) sMsg="Meet "+sMe+" at the South East control point now."; else if (nParm==12) sMsg="Meet "+sMe+" at the North West control point now."; else if (nParm==13) sMsg="Meet "+sMe+" at the North East control point now."; else if (nParm==14) sMsg="Get some water. We're going to the desert."; else if (nParm==15) sMsg="Get some warm clothes. We're going to the frozen north."; sMsg=ColorRGBString(sMsg,0,4,1); oPerson=GetFirstPC(); while(GetIsObjectValid(oPerson)) { // find squad members and give them the message if (GetLocalString(oPerson,"sTeamID")==sID) { // same team if (GetLocalInt(oPerson,"nSquadNum")==nNum) { // same squad if (oPerson!=oPC) SendMessageToPC(oPerson,sMsg); } // same squad } // same team oPerson=GetNextPC(); } // find squad members and give them the message }