211 lines
6.9 KiB
Plaintext
211 lines
6.9 KiB
Plaintext
void main()
|
|
{
|
|
if(GetTag(OBJECT_SELF) == "haq_smci1")
|
|
{
|
|
if(GetLocalInt(OBJECT_SELF, "Quit"))
|
|
{
|
|
return;
|
|
}
|
|
|
|
object oWay;
|
|
effect eLightning = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
effect eSonic = EffectDamage(50, DAMAGE_TYPE_SONIC);
|
|
effect eElec = EffectDamage(250, DAMAGE_TYPE_ELECTRICAL);
|
|
effect eLink = EffectLinkEffects(eSonic, eElec);
|
|
|
|
switch(Random(5))
|
|
{
|
|
case 0: oWay = GetWaypointByTag("haq_p1thup1");
|
|
break;
|
|
|
|
case 1: oWay = GetWaypointByTag("haq_p1thup2");
|
|
break;
|
|
|
|
case 2: oWay = GetWaypointByTag("haq_p1thup3");
|
|
break;
|
|
|
|
case 3: oWay = GetWaypointByTag("haq_p1thup4");
|
|
break;
|
|
|
|
case 4: oWay = GetWaypointByTag("haq_p1thup5");
|
|
break;
|
|
|
|
default: oWay = GetWaypointByTag("haq_p1thup1");
|
|
break;
|
|
}
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLightning, GetLocation(oWay));
|
|
|
|
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
while(GetIsObjectValid(oTarget))
|
|
{
|
|
if(GetLocalInt(oTarget, "Has_Been_Hit") != 1)
|
|
{
|
|
DelayCommand(0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, oTarget));
|
|
SetLocalInt(oTarget, "Has_Been_Hit", 1);
|
|
DelayCommand(0.5f, SetLocalInt(oTarget, "Has_Been_Hit", 0));
|
|
}
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
}
|
|
|
|
DelayCommand(20.0f, ExecuteScript("hal_cilisc", GetArea(oWay)));
|
|
}
|
|
|
|
else if(GetTag(OBJECT_SELF) == "haq_smci2")
|
|
{
|
|
if(GetLocalInt(OBJECT_SELF, "Quit"))
|
|
{
|
|
return;
|
|
}
|
|
|
|
object oWay;
|
|
effect eLightning = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
effect eSonic = EffectDamage(50, DAMAGE_TYPE_SONIC);
|
|
effect eElec = EffectDamage(250, DAMAGE_TYPE_ELECTRICAL);
|
|
effect eLink = EffectLinkEffects(eSonic, eElec);
|
|
|
|
switch(Random(5))
|
|
{
|
|
case 0: oWay = GetWaypointByTag("haq_p2thup1");
|
|
break;
|
|
|
|
case 1: oWay = GetWaypointByTag("haq_p2thup2");
|
|
break;
|
|
|
|
case 2: oWay = GetWaypointByTag("haq_p2thup3");
|
|
break;
|
|
|
|
case 3: oWay = GetWaypointByTag("haq_p2thup4");
|
|
break;
|
|
|
|
case 4: oWay = GetWaypointByTag("haq_p2thup5");
|
|
break;
|
|
|
|
default: oWay = GetWaypointByTag("haq_p2thup1");
|
|
break;
|
|
}
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLightning, GetLocation(oWay));
|
|
|
|
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
while(GetIsObjectValid(oTarget))
|
|
{
|
|
if(GetLocalInt(oTarget, "Has_Been_Hit") != 1)
|
|
{
|
|
DelayCommand(0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, oTarget));
|
|
SetLocalInt(oTarget, "Has_Been_Hit", 1);
|
|
DelayCommand(0.5f, SetLocalInt(oTarget, "Has_Been_Hit", 0));
|
|
}
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
}
|
|
|
|
DelayCommand(20.0f, ExecuteScript("hal_cilisc", GetArea(oWay)));
|
|
}
|
|
|
|
else if(GetTag(OBJECT_SELF) == "haq_smci3")
|
|
{
|
|
if(GetLocalInt(OBJECT_SELF, "Quit"))
|
|
{
|
|
return;
|
|
}
|
|
|
|
object oWay;
|
|
effect eLightning = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
effect eSonic = EffectDamage(50, DAMAGE_TYPE_SONIC);
|
|
effect eElec = EffectDamage(250, DAMAGE_TYPE_ELECTRICAL);
|
|
effect eLink = EffectLinkEffects(eSonic, eElec);
|
|
|
|
switch(Random(5))
|
|
{
|
|
case 0: oWay = GetWaypointByTag("haq_p3thup1");
|
|
break;
|
|
|
|
case 1: oWay = GetWaypointByTag("haq_p3thup2");
|
|
break;
|
|
|
|
case 2: oWay = GetWaypointByTag("haq_p3thup3");
|
|
break;
|
|
|
|
case 3: oWay = GetWaypointByTag("haq_p3thup4");
|
|
break;
|
|
|
|
case 4: oWay = GetWaypointByTag("haq_p3thup5");
|
|
break;
|
|
|
|
default: oWay = GetWaypointByTag("haq_p3thup1");
|
|
break;
|
|
}
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLightning, GetLocation(oWay));
|
|
|
|
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
while(GetIsObjectValid(oTarget))
|
|
{
|
|
if(GetLocalInt(oTarget, "Has_Been_Hit") != 1)
|
|
{
|
|
DelayCommand(0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, oTarget));
|
|
SetLocalInt(oTarget, "Has_Been_Hit", 1);
|
|
DelayCommand(0.5f, SetLocalInt(oTarget, "Has_Been_Hit", 0));
|
|
}
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
}
|
|
|
|
DelayCommand(20.0f, ExecuteScript("hal_cilisc", GetArea(oWay)));
|
|
}
|
|
|
|
else if(GetTag(OBJECT_SELF) == "haq_smci4")
|
|
{
|
|
if(GetLocalInt(OBJECT_SELF, "Quit"))
|
|
{
|
|
return;
|
|
}
|
|
|
|
object oWay;
|
|
effect eLightning = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
effect eSonic = EffectDamage(50, DAMAGE_TYPE_SONIC);
|
|
effect eElec = EffectDamage(250, DAMAGE_TYPE_ELECTRICAL);
|
|
effect eLink = EffectLinkEffects(eSonic, eElec);
|
|
|
|
switch(Random(5))
|
|
{
|
|
case 0: oWay = GetWaypointByTag("haq_p4thup1");
|
|
break;
|
|
|
|
case 1: oWay = GetWaypointByTag("haq_p4thup2");
|
|
break;
|
|
|
|
case 2: oWay = GetWaypointByTag("haq_p4thup3");
|
|
break;
|
|
|
|
case 3: oWay = GetWaypointByTag("haq_p4thup4");
|
|
break;
|
|
|
|
case 4: oWay = GetWaypointByTag("haq_p4thup5");
|
|
break;
|
|
|
|
default: oWay = GetWaypointByTag("haq_p4thup1");
|
|
break;
|
|
}
|
|
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eLightning, GetLocation(oWay));
|
|
|
|
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
while(GetIsObjectValid(oTarget))
|
|
{
|
|
if(GetLocalInt(oTarget, "Has_Been_Hit") != 1)
|
|
{
|
|
DelayCommand(0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, oTarget));
|
|
SetLocalInt(oTarget, "Has_Been_Hit", 1);
|
|
DelayCommand(0.5f, SetLocalInt(oTarget, "Has_Been_Hit", 0));
|
|
}
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 2.5f, GetLocation(oWay));
|
|
}
|
|
|
|
DelayCommand(20.0f, ExecuteScript("hal_cilisc", GetArea(oWay)));
|
|
}
|
|
}
|