Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
70 lines
1.4 KiB
Plaintext
70 lines
1.4 KiB
Plaintext
void main()
|
|
{
|
|
object oMachine=OBJECT_SELF;
|
|
int nStatus=GetLocalInt(oMachine,"nStatus");
|
|
|
|
if (nStatus<1)
|
|
{
|
|
SpeakString("Error - please report to DM");
|
|
return;
|
|
}
|
|
|
|
int nHP=GetCurrentHitPoints(OBJECT_SELF);
|
|
|
|
|
|
object oMob;
|
|
int nMobsexist=0;
|
|
string sMob="sMob";
|
|
string sCheckstring;
|
|
int nRandom;
|
|
string sMobtype;
|
|
int nMobnumber=1;
|
|
string sWP="jw_machine_sp_wp";
|
|
int nIdx;
|
|
object oBox;
|
|
|
|
|
|
|
|
|
|
|
|
// check to see if our mob already exists
|
|
|
|
oMob=GetLocalObject(OBJECT_SELF,"oMob");
|
|
|
|
if (GetIsObjectValid(oMob))
|
|
|
|
{
|
|
// if one is valid, kill it
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(TRUE,FALSE),oMob);
|
|
}
|
|
|
|
|
|
|
|
// destroy our boxes
|
|
|
|
for(nIdx = 0; nIdx <= 3; nIdx++)
|
|
{
|
|
|
|
oBox=GetObjectByTag("jw_br_dun_box",nIdx);
|
|
SetPlotFlag(oBox,0);
|
|
DestroyObject(oBox);
|
|
}
|
|
|
|
|
|
SoundObjectStop(GetObjectByTag("jw_br_dun4_snd"));
|
|
|
|
CreateObject(OBJECT_TYPE_PLACEABLE,"jw_br_dun_port",GetLocation(GetWaypointByTag("jw_machine_sp_wp1")));
|
|
|
|
nIdx=Random(6)+1;
|
|
|
|
location lLoc=GetLocation(OBJECT_SELF);
|
|
|
|
CreateObject(OBJECT_TYPE_ITEM,"jw_mys_item"+IntToString(nIdx),lLoc);
|
|
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SCREEN_SHAKE),lLoc);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_LOS_EVIL_30),lLoc);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_DESTRUCTION),lLoc);
|
|
|
|
}
|