Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

29 lines
920 B
Plaintext

// rts_it_op11
#include "rtsh_multiplay"
void main()
{
object oPC=GetItemActivator();
object oItem=GetItemActivated();
string sRes="merop11";
object oCr;
object oDummy;
object oWP;
int nMana=fnGetTeamMana(oPC);
string sID=GetLocalString(oPC,"sTeamID");
if (sID=="SPID"||sID=="UND")
{ // allowed team
if (nMana>199)
{ // sufficient mana
oWP=GetWaypointByTag(sID+"_RESOURCES");
oCr=CreateObject(OBJECT_TYPE_CREATURE,sRes,GetLocation(oPC));
oDummy=GetObjectByTag(sID+"_PROXY");
ChangeFaction(oCr,oDummy);
//DelayCommand(1.0,DestroyObject(oDummy));
SetLocalString(oCr,"sTeamID",sID);
} // sufficient mana
else { SendMessageToPC(oPC,"200 mana is required to activate this item."); }
} // allowed team
else { SendMessageToPC(oPC,"This item is only beneficial to the Undead or Spider Cultist teams."); }
}