// rts_it_uw6 - Manual of The Clay Golem // 100 mana and slaad tounge or faerie dust #include "rtsh_multiplay" #include "components_h" void main() { object oPC=GetItemActivator(); int nMana=fnGetTeamMana(oPC); string sComponents="slaad tounge or faerie dust"; string sRes="cclaygolem"; string sID=GetLocalString(oPC,"sTeamID"); object oProxy=GetObjectByTag(sID+"_PROXY"); object oGolem; int nManaCost=100; int bCheck=FALSE; if (nMana>(nManaCost-1)) { // has sufficient mana bCheck=GetHasComponents(oPC,"NW_IT_MSMLMISC19",1); if (!bCheck) bCheck=GetHasComponents(oPC,"NW_IT_MSMLMISC10",1); if (bCheck) { // has components if (GetHasComponents(oPC,"NW_IT_MSMLMISC19",1)) ConsumeComponents(oPC,"NW_IT_MSMLMISC19",1); else { ConsumeComponents(oPC,"NW_IT_MSMLMISC10",1); } nMana=nMana-nManaCost; fnSetTeamMana(oPC,nMana); oGolem=CreateObject(OBJECT_TYPE_CREATURE,sRes,GetLocation(oPC)); SetLocalString(oGolem,"sTeamID",sID); ChangeFaction(oGolem,oProxy); if (oProxy==OBJECT_INVALID) SendMessageToPC(oPC,"ERROR: Could not find proxy "+sID+"_PROXY!!"); } // has components else { // missing components SendMessageToPC(oPC,"This book requires "+sComponents+" to create a golem."); } // missing components } // has sufficient mana else { // not enough mana SendMessageToPC(oPC,"This book requires 100 mana to create a golem."); } // not enough mana }