Aantioch_Infernum/_module/nss/asg_rul_buldsmcl.nss
Jaysyn904 22947ad4b6 Initial Upload
Initial Upload
2023-08-08 16:22:17 -04:00

113 lines
3.0 KiB
Plaintext

#include "nw_i0_plot"
void Asg_TakeItems(object oPC,string sREQ,int vNUM)
{
// Take items from player
TakeNumItems(oPC,sREQ,vNUM);
}
//
void main()
{
object oPC = GetPCSpeaker();
object oItem;
object oCreature;
int vITEMTOBUILD = GetLocalInt(oPC,"ITEMTOBUILD");
int vNUMBERGIVEN = GetLocalInt(oPC,"NUMBERGIVEN");
string sREQ1 = GetLocalString(oPC,"REQ1");
string sREQ2 = GetLocalString(oPC,"REQ2");
string sREQ3 = GetLocalString(oPC,"REQ3");
string sREQ4 = GetLocalString(oPC,"REQ4");
int vNUM1 = GetLocalInt(oPC,"NUM1");
int vNUM2 = GetLocalInt(oPC,"NUM2");
int vNUM3 = GetLocalInt(oPC,"NUM3");
int vNUM4 = GetLocalInt(oPC,"NUM4");
int vPLACE = GetLocalInt(oPC,"PLACE");
string sDIST_WHAT= GetLocalString(oPC,"PLACE");
float vDIST = GetLocalFloat(oPC,"DIST");
object oCChest = GetNearestObjectByTag("ASG_CCHEST",OBJECT_SELF);
effect eEffect;
// **
// ** Search and Destroy Componants.
// **
string sBluePrint = GetLocalString(oPC,"BLUEPRINT");
{
int vK;
for (vK=1;vK<=4;vK++)
{
switch(vK)
{
case(1):
{
if (vNUM1>0) Asg_TakeItems(oPC,sREQ1,vNUM1);
}
break;
case(2):
{
if (vNUM2>0) Asg_TakeItems(oPC,sREQ2,vNUM2);
}
break;
case(3):
{
if (vNUM3>0) Asg_TakeItems(oPC,sREQ3,vNUM3);
}
break;
case(4):
{
if (vNUM4>0) Asg_TakeItems(oPC,sREQ4,vNUM4);
}
break;
}
}
}
// **
// ** Create Item or Placeable at Location or on Person.
// **
switch (vPLACE)
{
case(1):
{
oItem = CreateItemOnObject(sBluePrint,oPC,vNUMBERGIVEN);
}
break;
case(2):
{
oItem = CreateObject(OBJECT_TYPE_PLACEABLE,sBluePrint,GetLocation(oPC),TRUE);
}
break;
case(3):
{
oItem = CreateObject(OBJECT_TYPE_PLACEABLE,sBluePrint,GetLocation(oPC),TRUE);
}
break;
case(4):
{
oCreature = CreateObject(OBJECT_TYPE_CREATURE,sBluePrint,GetLocation(oPC),TRUE);
}
break;
case(5):
{
oItem = CreateItemOnObject(sBluePrint,oPC,vNUMBERGIVEN);
}
break;
case(6):
{
eEffect = EffectVisualEffect(VFX_IMP_FLAME_M,FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eEffect,oPC,6.0);
}
break;
default:
ActionSpeakString("ERROR: Failure to Create item ["+sBluePrint+"] in asg_rul_bulditem.");
}
// **
// ** Specail Propeties that need to be assigned - assign them here.
// **
switch(vITEMTOBUILD)
{
case(001):
{
SetLocalObject(oPC,"ASG_SUMMONCIRCLE_ATTUNED_TO",OBJECT_SELF);
}
break;
}
}