// SQUADL_SET_MISS - Set the actual mission for the squad and send the message #include "color_header" void main() { object oPC=GetPCSpeaker(); string sID=GetLocalString(oPC,"sTeamID"); object oMod=GetModule(); object oSquad; int nSquadFocus=GetLocalInt(oPC,"nSquadFocus"); int nParm=GetLocalInt(oPC,"nParm"); int nSquadGoalCat=GetLocalInt(oPC,"nSquadGoalCat"); int nSquadSubCat=GetLocalInt(oPC,"nSquadSubCat"); string sMission; string sMsg="Squad Mission Updated. Please consult your squad leader badge."; //SendMessageToPC(oPC,"SET MISSION: nSQF:"+IntToString(nSquadFocus)+" nParm:"+IntToString(nParm)+" nSGC:"+IntToString(nSquadGoalCat)+" nSSC:"+IntToString(nSquadSubCat)+" sID:"+sID); if (nSquadGoalCat==0) { sMission="to do what you want. Your squad is currently in freedom from mission mode"; } else if (nSquadGoalCat==1) { // Resource Related if (nParm==1) sMission="to get as many soul tokens as you can and return them to your team soul receptacle"; else if (nParm==2) sMission="to find mana pools and mana crystals and return with the crystals to the teams mana vault"; else if (nParm==3) sMission="to get gold and return with it to your leader"; } // Resource Related else if (nSquadGoalCat==2) { // Assault Related sMission="to go to the lair of "; if (nSquadSubCat==1) sMission=sMission+"the dwarves "; else if (nSquadSubCat==2) sMission=sMission+"the unclean "; else if (nSquadSubCat==3) sMission=sMission+"the undead "; else if (nSquadSubCat==4) sMission=sMission+"the spider cultists "; sMission=sMission+"and "; if (nParm==1) sMission=sMission+"assassinate their leader"; else if (nParm==2) sMission=sMission+"steal what you can and bring it back to our lair"; else if (nParm==3) sMission=sMission+"scout and report what you find"; else if (nParm==4) sMission=sMission+"cripple their economy"; else if (nParm==5) sMission=sMission+"lay waste to them"; else if (nParm==6) sMission=sMission+"get the power reservoir"; else if (nParm==7) sMission=sMission+"hide the power reservoir somewhere in their lair"; } // Assault Related else if (nSquadGoalCat==3) { // Defense Related if (nParm==1) sMission="to defend the lair"; else if (nParm==2) { sMission="to deal with the raiders incoming!!! Return to the lair immediately!"; sMsg="[ U R G E N T ] - Squad mission update. Please consult your squad leader badge."; } else if (nParm==3) sMission="to help setup traps and design the defense for our lair"; else if (nParm==4) sMission="to return to our base and hide"; else if (nParm==5) sMission="ro return to our base and get the gold and items from the chest and hide them somewhere safe"; } // Defense Related else if (nSquadGoalCat==4) { // Miscellaneous if (nSquadSubCat==1) { // explore if (nParm==1) sMission="to explore where ever you want to"; else if (nParm==2) sMission="to explore the above ground normal areas"; else if (nParm==3) sMission="to explore the below ground normal areas"; else if (nParm==4) sMission="to explore dungeon crawl"; else if (nParm==5) sMission="to explore the hive"; else if (nParm==6) sMission="to explore the realm of fungus"; else if (nParm==7) sMission="to explore the slave lords"; else if (nParm==8) sMission="to explore above ground WEST of the dwarven lair"; else if (nParm==9) sMission="to explore above ground EAST of the spider cultists lair"; else if (nParm==10) sMission="to explore the desert to the south"; else if (nParm==11) sMission="to explore the frozen north"; else if (nParm==12) sMission="to explore the outer planes"; else if (nParm==13) { sMission="to RUSH the sewer and explore it quickly"; sMsg="[ U R G E N T ] - Squad mission update. Please consult your squad leader badge."; } } // explore else if (nSquadSubCat==2) sMission="to treat the members of your squad as newbies and teach them the techniques for playing this module"; else if (nSquadSubCat==3) sMission="to capture the south west control point and hold it until the leader says otherwise. Report when you succeed"; else if (nSquadSubCat==4) sMission="to capture the south east control point and hold it until the leader says otherwise. Report when you succeed"; else if (nSquadSubCat==5) sMission="to capture the north west control point and hold it until the leader says otherwise. Report when you succeed"; else if (nSquadSubCat==6) sMission="to capture the north east control point and hold it until the leader says otherwise. Report when you succeed"; } // Miscellaneous else { sMission="ERROR IN MISSION SETTING CODE"; } if (nSquadFocus<4) { // a specific squad was chosen SetLocalString(oMod,"sSquadMission"+sID+IntToString(nSquadFocus),sMission); oSquad=GetLocalObject(oMod,"oSquadLead"+sID+IntToString(nSquadFocus)); sMsg=ColorRGBString(sMsg,0,5,1); SendMessageToPC(oSquad,sMsg); //SendMessageToPC(oPC,"Mission set for '"+GetName(oSquad)+"' mission variable sSquadMission"+sID+IntToString(nSquadFocus)+" set to "+sMission); } // a specific squad was chosen else { // all squads was chosen nParm=1; sMsg=ColorRGBString(sMsg,0,5,1); while(nParm<4) { // set for all squads oSquad=GetLocalObject(oMod,"oSquadLead"+sID+IntToString(nParm)); if (GetIsObjectValid(oSquad)) { // squad exists SetLocalString(oMod,"sSquadMission"+sID+IntToString(nParm),sMission); SendMessageToPC(oSquad,sMsg); } // squad exists nParm++; } // set for all squads } // all squads was chosen }