Initial commit

Initial commit
This commit is contained in:
Jaysyn904
2024-09-13 09:10:39 -04:00
parent 09dc8aec92
commit d1c309ae63
8437 changed files with 8727659 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
//: Place RO_LIGHTNINGX wp<77>s in the area where you want lightning, the X should be an identifying number //:: (1-6 in this case).
void main()
{
object oPc= GetFirstPC();
int oRandom =d6();//How many random "strikepoints" do you have d4(), d6(), d10(), d100()?
string oWhich =IntToString(oRandom);
object oLightning = GetObjectByTag("RO_LIGHTNING" + oWhich);//Gets one of the "strikepoints".
location oStrike=GetLocation(oLightning);
if (d6()==1)//How often will the lightning strike?
{
int iDirection=d4();
float fX;
float fY;
switch(iDirection)
{
case 1:
fX=0.0;
fY=15.0;
break;
case 2:
fX=15.0;
fY=0.0;
break;
case 3:
fX=0.0;
fY=-15.0;
break;
case 4:
fX=-15.0;
fY=0.0;
break;
}
vector vStart = GetPosition(oLightning);
vector vOffset = Vector(fX,fY);
vector vEndvector=vStart+vOffset;
location lEnd=Location(GetArea(oLightning),vEndvector,GetFacing(GetFirstPC()));
effect eGate=EffectVisualEffect(VFX_IMP_LIGHTNING_M);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, lEnd, 1.0);
}
}