#include "rtsh_multiplay" void main() { object oPC=GetPCSpeaker(); object oTarget=GetLocalObject(oPC,"oTarget"); location lLoc=GetLocation(oTarget); int nParm=GetLocalInt(oPC,"nParm"); object oCreate; int nCost; string sRes=""; int nMana=fnGetTeamMana(oPC); string sID; object oProxy; object oWP; int nType=0; if (nParm==1) { // minor ward nCost=25; sRes="lightward25"; } // minor ward else if (nParm==2) { // ward nCost=50; sRes="lightward50"; } // ward else if (nParm==3) { // major ward nCost=100; sRes="lightward100"; } // major ward else if (nParm==4) { // minor creature nCost=10; nType=1; sRes="lighteminor"; } // minor creature else if (nParm==5) { // creature nCost=50; nType=1; sRes="lightemed"; } // creature else if (nParm==6) { // major creature nCost=100; int nType=1; sRes="lightemajor"; } // major creature nMana=nMana-nCost; fnSetTeamMana(oPC,nMana); if (nType==1) { // creature sID=GetLocalString(oPC,"sTeamID"); oWP=GetWaypointByTag(sID+"_RESOURCES"); oProxy=GetObjectByTag(sID+"_PROXY"); oCreate=CreateObject(OBJECT_TYPE_CREATURE,sRes,lLoc); SetLocalString(oCreate,"sTeamID",sID); ChangeFaction(oCreate,oProxy); } // creature else { // placeable oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,sRes,lLoc); SetLocalObject(oCreate,"oMaster",oPC); } // placeable }