diff --git a/Classic/scripts/dtChatCmdGame.cs b/Classic/scripts/dtChatCmdGame.cs index 2641882..533dbf3 100644 --- a/Classic/scripts/dtChatCmdGame.cs +++ b/Classic/scripts/dtChatCmdGame.cs @@ -1,7 +1,7 @@ -//----------------DarkTiger's Chat Commands---------------- +//----------------------------------DarkTiger's Chat Commands---------------------------------- -//To install and use put the following if statement at the top of chatMessageAll -//if your useing evo the override is in evoPackage.cs otherwise messages.cs +// To install and use put the following if statement at the top of chatMessageAll +// if your useing evo the override is in evoPackage.cs otherwise messages.cs package dtChatCmd { @@ -42,6 +42,7 @@ function chatCmd(%client, %message) //%client is sender messageClient(%client, 'msgChatCmd', '\c2/sandsky - changes the sky to a sand sky.'); messageClient(%client, 'msgChatCmd', '\c2/nicesky - changes the sky to a variation of four nice skies.'); messageClient(%client, 'msgChatCmd', '\c2/normalsky - changes the sky to a fallback sky.'); + messageClient(%client, 'msgChatCmd', '\c2/fireworks - look at some fireworks.'); messageClient(%client, 'msgChatCmd', '\c2/disableAI - as it sounds.'); messageClient(%client, 'msgChatCmd', '\c2/enableAI - as it sounds.'); } @@ -53,6 +54,7 @@ function chatCmd(%client, %message) //%client is sender messageClient(%client, 'msgChatCmd', '\c2/sandsky - changes the sky to a sand sky.'); messageClient(%client, 'msgChatCmd', '\c2/nicesky - changes the sky to a variation of four nice skies.'); messageClient(%client, 'msgChatCmd', '\c2/normalsky - changes the sky to a fallback sky.'); + messageClient(%client, 'msgChatCmd', '\c2/fireworks - look at some fireworks.'); messageClient(%client, 'msgChatCmd', '\c2/AIQ 1 or 0 - to enable tor disable ai chat.'); messageClient(%client, 'msgChatCmd', '\c2/idInfo - get id resources.'); } @@ -78,6 +80,13 @@ function chatCmd(%client, %message) //%client is sender %obj.setTransform(%pos SPC getWords(%obj.getTransform(), 3, 6)); } + case "/fireworks": + if(%client.isAdmin || %client.isSuperAdmin ) + { + fireworksSky(1);// only one sky for right now + $CurrentSky = "fireworks"; + } + case "/normalsky": if(%client.isAdmin || %client.isSuperAdmin ) { @@ -235,447 +244,451 @@ function removeSky(%sky) function normalSky(%sky) { - if($CurrentSky !$= "normal") - { - MessageAll('Msg', "\c2Looks like the weather is clearing up."); + if($CurrentSky $= "normal") + return; - removeSky(%sky); + MessageAll('Msg', "\c2Looks like the weather is clearing up."); + + removeSky(%sky); + + new Sky(Sky) + { + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + cloudHeightPer[0] = "0.349971"; + cloudHeightPer[1] = "0.25"; + cloudHeightPer[2] = "0.199973"; + cloudSpeed1 = "0.0001"; + cloudSpeed2 = "0.0002"; + cloudSpeed3 = "0.0003"; + visibleDistance = "425"; + useSkyTextures = "1"; + renderBottomTexture = "0"; + SkySolidColor = "0.420000 0.420000 0.420000 0.000000"; + fogDistance = "350"; + high_visibleDistance = "-1"; + high_fogDistance = "-1"; + fogColor = "0.420000 0.420000 0.420000 1.000000"; + fogVolume1 = "0 0 0"; + fogVolume2 = "0 0 0"; + fogVolume3 = "0 0 0"; + materialList = "sky_lush_blue.dml"; + windVelocity = "1 1 0"; + windEffectPrecipitation = "1"; + fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569861000000000000000000000.000000"; + fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; + fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160049000000000000000000000.000000"; + }; - new Sky(Sky) - { - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - cloudHeightPer[0] = "0.349971"; - cloudHeightPer[1] = "0.25"; - cloudHeightPer[2] = "0.199973"; - cloudSpeed1 = "0.0001"; - cloudSpeed2 = "0.0002"; - cloudSpeed3 = "0.0003"; - visibleDistance = "425"; - useSkyTextures = "1"; - renderBottomTexture = "0"; - SkySolidColor = "0.420000 0.420000 0.420000 0.000000"; - fogDistance = "350"; - high_visibleDistance = "-1"; - high_fogDistance = "-1"; - fogColor = "0.420000 0.420000 0.420000 1.000000"; - fogVolume1 = "0 0 0"; - fogVolume2 = "0 0 0"; - fogVolume3 = "0 0 0"; - materialList = "sky_lush_blue.dml"; - windVelocity = "1 1 0"; - windEffectPrecipitation = "1"; - fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569861000000000000000000000.000000"; - fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; - fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160049000000000000000000000.000000"; - }; - } } function fireSky(%sky) { - if($CurrentSky !$= "fire") - { - MessageAll('Msg', "\c2Is it getting hot outside?"); - - removeSky(%sky); - - new Sky(Sky) - { - position = "-1216 -1336 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - cloudHeightPer[0] = "0.249971"; - cloudHeightPer[1] = "0.25"; - cloudHeightPer[2] = "0.05"; - cloudSpeed1 = "0.003"; - cloudSpeed2 = "0.001"; - cloudSpeed3 = "0.0008"; - visibleDistance = "630"; - useSkyTextures = "1"; - renderBottomTexture = "0"; - SkySolidColor = "0.000000 0.000000 0.000000 0.000000"; - fogDistance = "300"; - fogColor = "0.500000 0.200000 0.000000 1.000000"; - fogVolume1 = "0 0 0"; - fogVolume2 = "0 0 0"; - fogVolume3 = "0 0 0"; - materialList = "RedPlanet.dml"; - windVelocity = "1 0 0"; - windEffectPrecipitation = "0"; - fogVolumeColor1 = "128.000000 128.000000 128.000000 -1037713472.000000"; - fogVolumeColor2 = "128.000000 128.000000 128.000000 -1037713472.000000"; - fogVolumeColor3 = "128.000000 128.000000 128.000000 -1037713472.000000"; - high_visibleDistance = "-1"; - high_fogDistance = "-1"; - high_fogVolume1 = "-1 3.22439e-42 1.04486e-40"; - high_fogVolume2 = "-1 1.04845e-40 3.26643e-42"; - high_fogVolume3 = "-1 3.28324e-42 1.05581e-40"; - - cloudSpeed0 = "0.000000 0.000000"; - }; - - MissionCleanup.add(Sky); - - %fireball = new FireballAtmosphere(FireballAtmosphere) - { - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "fireball"; - lockCount = "1"; - homingCount = "1"; - dropRadius = 100; - dropsPerMinute = 200; - minDropAngle = "0"; - maxDropAngle = "50"; - startVelocity = "300"; - dropHeight = "2000"; - dropDir = "0.212 0.212 -0.953998"; - }; - %embers = new Precipitation(Precipitation) - { - position = "116.059 -26.7731 156.557"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "Snow"; - lockCount = "0"; - homingCount = "0"; - percentage = "1"; - color1 = "0.000000 0.000000 0.000000 1.000000"; - color2 = "-1.000000 0.000000 0.000000 1.000000"; - color3 = "-1.000000 0.000000 0.000000 1.000000"; - offsetSpeed = "0"; - minVelocity = "0.02"; - maxVelocity = "0.06"; - maxNumDrops = "500"; - maxRadius = "125"; - }; - %firewind = new AudioEmitter(PlanetSoundEmitter) - { - position = "289.762 209.214 173.677"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - fileName = "fx/environment/drywind.wav"; - useProfileDescription = "0"; - outsideAmbient = "1"; - volume = "1"; - isLooping = "1"; - is3D = "0"; - minDistance = "20"; - maxDistance = "1280"; - coneInsideAngle = "360"; - coneOutsideAngle = "360"; - coneOutsideVolume = "1"; - coneVector = "0 0 1"; - loopCount = "-1"; - minLoopGap = "0"; - maxLoopGap = "0"; - type = "EffectAudioType"; - }; + if($CurrentSky $= "fire") + return; + + MessageAll('Msg', "\c2Is it getting hot outside?"); + + removeSky(%sky); + + new Sky(Sky) + { + position = "-1216 -1336 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + cloudHeightPer[0] = "0.249971"; + cloudHeightPer[1] = "0.25"; + cloudHeightPer[2] = "0.05"; + cloudSpeed1 = "0.003"; + cloudSpeed2 = "0.001"; + cloudSpeed3 = "0.0008"; + visibleDistance = "630"; + useSkyTextures = "1"; + renderBottomTexture = "0"; + SkySolidColor = "0.000000 0.000000 0.000000 0.000000"; + fogDistance = "300"; + fogColor = "0.500000 0.200000 0.000000 1.000000"; + fogVolume1 = "0 0 0"; + fogVolume2 = "0 0 0"; + fogVolume3 = "0 0 0"; + materialList = "RedPlanet.dml"; + windVelocity = "1 0 0"; + windEffectPrecipitation = "0"; + fogVolumeColor1 = "128.000000 128.000000 128.000000 -1037713472.000000"; + fogVolumeColor2 = "128.000000 128.000000 128.000000 -1037713472.000000"; + fogVolumeColor3 = "128.000000 128.000000 128.000000 -1037713472.000000"; + high_visibleDistance = "-1"; + high_fogDistance = "-1"; + high_fogVolume1 = "-1 3.22439e-42 1.04486e-40"; + high_fogVolume2 = "-1 1.04845e-40 3.26643e-42"; + high_fogVolume3 = "-1 3.28324e-42 1.05581e-40"; + + cloudSpeed0 = "0.000000 0.000000"; + }; + + MissionCleanup.add(Sky); + + %fireball = new FireballAtmosphere(FireballAtmosphere) + { + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + dataBlock = "fireball"; + lockCount = "1"; + homingCount = "1"; + dropRadius = 100; + dropsPerMinute = 200; + minDropAngle = "0"; + maxDropAngle = "50"; + startVelocity = "300"; + dropHeight = "2000"; + dropDir = "0.212 0.212 -0.953998"; + }; + %embers = new Precipitation(Precipitation) + { + position = "116.059 -26.7731 156.557"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + dataBlock = "Snow"; + lockCount = "0"; + homingCount = "0"; + percentage = "1"; + color1 = "0.000000 0.000000 0.000000 1.000000"; + color2 = "-1.000000 0.000000 0.000000 1.000000"; + color3 = "-1.000000 0.000000 0.000000 1.000000"; + offsetSpeed = "0"; + minVelocity = "0.02"; + maxVelocity = "0.06"; + maxNumDrops = "500"; + maxRadius = "125"; + }; + %firewind = new AudioEmitter(PlanetSoundEmitter) + { + position = "289.762 209.214 173.677"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + fileName = "fx/environment/drywind.wav"; + useProfileDescription = "0"; + outsideAmbient = "1"; + volume = "1"; + isLooping = "1"; + is3D = "0"; + minDistance = "20"; + maxDistance = "1280"; + coneInsideAngle = "360"; + coneOutsideAngle = "360"; + coneOutsideVolume = "1"; + coneVector = "0 0 1"; + loopCount = "-1"; + minLoopGap = "0"; + maxLoopGap = "0"; + type = "EffectAudioType"; + }; + + MissionCleanup.add(%fireball); + MissionCleanup.add(%embers2); + MissionCleanup.add(%firewind); - MissionCleanup.add(%fireball); - MissionCleanup.add(%embers2); - MissionCleanup.add(%firewind); - } } function rainSky(%sky) { - if($CurrentSky !$= "rain") + if($CurrentSky $= "rain") + return; + + MessageAll('Msg', "\c2Looks like a storm is brewing."); + + removeSky(%sky); + + new Sky(Sky) { - MessageAll('Msg', "\c2Looks like a storm is brewing."); + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + cloudHeightPer[0] = "0.249971"; + cloudHeightPer[1] = "0.25"; + cloudHeightPer[2] = "0.05"; + cloudSpeed1 = "0.003"; + cloudSpeed2 = "0.001"; + cloudSpeed3 = "0.0008"; + visibleDistance = "650"; + useSkyTextures = "1"; + renderBottomTexture = "0"; + SkySolidColor = "0.520000 0.520000 0.520000 1.000000"; + fogDistance = "300"; + fogColor = "0.520000 0.520000 0.520000 1.000000"; + fogVolume1 = "0 0 0"; + fogVolume2 = "0 0 0"; + fogVolume3 = "0 0 0"; + materialList = "lush_dusk.dml"; + windVelocity = "1 0 0"; + windEffectPrecipitation = "1"; + fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569861000000000000000000000.000000"; + fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; + fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160049000000000000000000000.000000"; + high_visibleDistance = "-1"; + high_fogDistance = "-1"; + high_fogVolume1 = "-1 107 1.07457e-38"; + high_fogVolume2 = "-1 9.69184e-34 8.26766e-44"; + high_fogVolume3 = "-1 0 3.2509e-38"; - removeSky(%sky); + cloudSpeed0 = "0.000000 0.000400"; + }; + + MissionCleanup.add(Sky); + + //Requires RainNoSound Datablock in weather.cs + %rain = new Precipitation(Precipitation) + { + position = "-336.859 -631.623 191.648"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + dataBlock = "RainNoSound"; + lockCount = "0"; + homingCount = "0"; + percentage = "1"; + color1 = "0.600000 0.650000 0.680000 1.000000"; + color2 = "-1.000000 0.000000 0.000000 1.000000"; + color3 = "-1.000000 0.000000 0.000000 1.000000"; + offsetSpeed = "0.25"; + minVelocity = "1.25"; + maxVelocity = "4"; + maxNumDrops = "1000"; + maxRadius = "80"; + }; + %lightning = new Lightning(Lightning) + { + position = "-274.935 -143.111 353.049"; + rotation = "1 0 0 0"; + scale = "512 512 300"; + dataBlock = "DefaultStorm"; + lockCount = "0"; + homingCount = "0"; + strikesPerMinute = "12"; + strikeWidth = "2.5"; + chanceToHitTarget = "0.5"; + strikeRadius = "20"; + boltStartRadius = "20"; + color = "1.000000 1.000000 1.000000 1.000000"; + fadeColor = "0.100000 0.100000 1.000000 1.000000"; + useFog = "0"; + }; + %rainthunder = new AudioEmitter(PlanetSoundEmitter) + { + position = "289.762 209.214 173.677"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + fileName = "fx/environment/rumblingthunder.wav"; + useProfileDescription = "0"; + outsideAmbient = "1"; + volume = "1"; + isLooping = "1"; + is3D = "0"; + minDistance = "20"; + maxDistance = "1280"; + coneInsideAngle = "360"; + coneOutsideAngle = "360"; + coneOutsideVolume = "1"; + coneVector = "0 0 1"; + loopCount = "-1"; + minLoopGap = "0"; + maxLoopGap = "0"; + type = "EffectAudioType"; + }; + %rainsound = new AudioEmitter(PlanetSoundEmitter) + { + position = "-361.683 451 83.9062"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + profile = "Universal_Rain_Light_1"; + description = "AudioLooping2D"; + useProfileDescription = "1"; + outsideAmbient = "1"; + volume = "1"; + isLooping = "1"; + is3D = "1"; + minDistance = "20"; + maxDistance = "100"; + coneInsideAngle = "360"; + coneOutsideAngle = "360"; + coneOutsideVolume = "1"; + coneVector = "0 0 1"; + loopCount = "-1"; + minLoopGap = "0"; + maxLoopGap = "0"; + type = "EffectAudioType"; + }; - new Sky(Sky) - { - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - cloudHeightPer[0] = "0.249971"; - cloudHeightPer[1] = "0.25"; - cloudHeightPer[2] = "0.05"; - cloudSpeed1 = "0.003"; - cloudSpeed2 = "0.001"; - cloudSpeed3 = "0.0008"; - visibleDistance = "650"; - useSkyTextures = "1"; - renderBottomTexture = "0"; - SkySolidColor = "0.520000 0.520000 0.520000 1.000000"; - fogDistance = "300"; - fogColor = "0.520000 0.520000 0.520000 1.000000"; - fogVolume1 = "0 0 0"; - fogVolume2 = "0 0 0"; - fogVolume3 = "0 0 0"; - materialList = "lush_dusk.dml"; - windVelocity = "1 0 0"; - windEffectPrecipitation = "1"; - fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569861000000000000000000000.000000"; - fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; - fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160049000000000000000000000.000000"; - high_visibleDistance = "-1"; - high_fogDistance = "-1"; - high_fogVolume1 = "-1 107 1.07457e-38"; - high_fogVolume2 = "-1 9.69184e-34 8.26766e-44"; - high_fogVolume3 = "-1 0 3.2509e-38"; - - cloudSpeed0 = "0.000000 0.000400"; - }; - - MissionCleanup.add(Sky); - - //Requires RainNoSound Datablock in weather.cs - %rain = new Precipitation(Precipitation) - { - position = "-336.859 -631.623 191.648"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "RainNoSound"; - lockCount = "0"; - homingCount = "0"; - percentage = "1"; - color1 = "0.600000 0.650000 0.680000 1.000000"; - color2 = "-1.000000 0.000000 0.000000 1.000000"; - color3 = "-1.000000 0.000000 0.000000 1.000000"; - offsetSpeed = "0.25"; - minVelocity = "1.25"; - maxVelocity = "4"; - maxNumDrops = "1000"; - maxRadius = "80"; - }; - %lightning = new Lightning(Lightning) - { - position = "-274.935 -143.111 353.049"; - rotation = "1 0 0 0"; - scale = "512 512 300"; - dataBlock = "DefaultStorm"; - lockCount = "0"; - homingCount = "0"; - strikesPerMinute = "12"; - strikeWidth = "2.5"; - chanceToHitTarget = "0.5"; - strikeRadius = "20"; - boltStartRadius = "20"; - color = "1.000000 1.000000 1.000000 1.000000"; - fadeColor = "0.100000 0.100000 1.000000 1.000000"; - useFog = "0"; - }; - %rainthunder = new AudioEmitter(PlanetSoundEmitter) - { - position = "289.762 209.214 173.677"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - fileName = "fx/environment/rumblingthunder.wav"; - useProfileDescription = "0"; - outsideAmbient = "1"; - volume = "1"; - isLooping = "1"; - is3D = "0"; - minDistance = "20"; - maxDistance = "1280"; - coneInsideAngle = "360"; - coneOutsideAngle = "360"; - coneOutsideVolume = "1"; - coneVector = "0 0 1"; - loopCount = "-1"; - minLoopGap = "0"; - maxLoopGap = "0"; - type = "EffectAudioType"; - }; - %rainsound = new AudioEmitter(PlanetSoundEmitter) - { - position = "-361.683 451 83.9062"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - profile = "Universal_Rain_Light_1"; - description = "AudioLooping2D"; - useProfileDescription = "1"; - outsideAmbient = "1"; - volume = "1"; - isLooping = "1"; - is3D = "1"; - minDistance = "20"; - maxDistance = "100"; - coneInsideAngle = "360"; - coneOutsideAngle = "360"; - coneOutsideVolume = "1"; - coneVector = "0 0 1"; - loopCount = "-1"; - minLoopGap = "0"; - maxLoopGap = "0"; - type = "EffectAudioType"; - }; - - MissionCleanup.add(%rain); - MissionCleanup.add(%lightning); - MissionCleanup.add(%rainthunder); - MissionCleanup.add(%rainsound); - } + MissionCleanup.add(%rain); + MissionCleanup.add(%lightning); + MissionCleanup.add(%rainthunder); + MissionCleanup.add(%rainsound); } + function snowSky(%sky) { - if($CurrentSky !$= "snow") - { - MessageAll('Msg', "\c2The temperature seems to be dropping."); + if($CurrentSky $= "snow") + return; - removeSky(%sky); - removeSky(%sky); + MessageAll('Msg', "\c2The temperature seems to be dropping."); + + removeSky(%sky); + removeSky(%sky); - new Sky(Sky) - { - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - cloudHeightPer[0] = "0.349971"; - cloudHeightPer[1] = "0.25"; - cloudHeightPer[2] = "0.199973"; - cloudSpeed1 = "0.0001"; - cloudSpeed2 = "0.0002"; - cloudSpeed3 = "0.0003"; - visibleDistance = "450"; - useSkyTextures = "1"; - SkySolidColor = "0.365000 0.390000 0.420000 0.000000"; - fogDistance = "150"; - fogColor = "0.650000 0.650000 0.700000 1.000000"; - fogVolume1 = "0 0 0"; - fogVolume2 = "0 0 0"; - fogVolume3 = "0 0 0"; - materialList = "sky_ice_blue.dml"; - windVelocity = "1 0 0"; - windEffectPrecipitation = "0"; - fogVolumeColor1 = "128.000000 128.000000 128.000000 -0.000000"; - fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; - fogVolumeColor3 = "128.000000 128.000000 128.000000 0.000000"; - - cloudSpeed0 = "0.000000 0.000400"; - }; - - MissionCleanup.add(Sky); + new Sky(Sky) + { + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + cloudHeightPer[0] = "0.349971"; + cloudHeightPer[1] = "0.25"; + cloudHeightPer[2] = "0.199973"; + cloudSpeed1 = "0.0001"; + cloudSpeed2 = "0.0002"; + cloudSpeed3 = "0.0003"; + visibleDistance = "450"; + useSkyTextures = "1"; + SkySolidColor = "0.365000 0.390000 0.420000 0.000000"; + fogDistance = "150"; + fogColor = "0.650000 0.650000 0.700000 1.000000"; + fogVolume1 = "0 0 0"; + fogVolume2 = "0 0 0"; + fogVolume3 = "0 0 0"; + materialList = "sky_ice_blue.dml"; + windVelocity = "1 0 0"; + windEffectPrecipitation = "0"; + fogVolumeColor1 = "128.000000 128.000000 128.000000 -0.000000"; + fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; + fogVolumeColor3 = "128.000000 128.000000 128.000000 0.000000"; - %snow = new Precipitation(Precipitation) - { - position = "0 0 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "Snow"; - percentage = "1"; - color1 = "1.000000 1.000000 1.000000 1.000000"; - color2 = "-1.000000 0.000000 0.000000 1.000000"; - color3 = "-1.000000 0.000000 0.000000 1.000000"; - offsetSpeed = "0.25"; - minVelocity = "0.25"; - maxVelocity = "1.5"; - maxNumDrops = "2000"; - maxRadius = "125"; - }; - %snowwind = new AudioEmitter(PlanetSoundEmitter) - { - position = "289.762 209.214 173.677"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - fileName = "fx/environment/coldwind1.wav"; - useProfileDescription = "0"; - outsideAmbient = "1"; - volume = "1"; - isLooping = "1"; - is3D = "0"; - minDistance = "20"; - maxDistance = "1280"; - coneInsideAngle = "360"; - coneOutsideAngle = "360"; - coneOutsideVolume = "1"; - coneVector = "0 0 1"; - loopCount = "-1"; - minLoopGap = "0"; - maxLoopGap = "0"; - type = "EffectAudioType"; - }; - - MissionCleanup.add(%snow); - MissionCleanup.add(%snowwind); - } + cloudSpeed0 = "0.000000 0.000400"; + }; + + MissionCleanup.add(Sky); + + %snow = new Precipitation(Precipitation) + { + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + dataBlock = "Snow"; + percentage = "1"; + color1 = "1.000000 1.000000 1.000000 1.000000"; + color2 = "-1.000000 0.000000 0.000000 1.000000"; + color3 = "-1.000000 0.000000 0.000000 1.000000"; + offsetSpeed = "0.25"; + minVelocity = "0.25"; + maxVelocity = "1.5"; + maxNumDrops = "2000"; + maxRadius = "125"; + }; + %snowwind = new AudioEmitter(PlanetSoundEmitter) + { + position = "289.762 209.214 173.677"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + fileName = "fx/environment/coldwind1.wav"; + useProfileDescription = "0"; + outsideAmbient = "1"; + volume = "1"; + isLooping = "1"; + is3D = "0"; + minDistance = "20"; + maxDistance = "1280"; + coneInsideAngle = "360"; + coneOutsideAngle = "360"; + coneOutsideVolume = "1"; + coneVector = "0 0 1"; + loopCount = "-1"; + minLoopGap = "0"; + maxLoopGap = "0"; + type = "EffectAudioType"; + }; + + MissionCleanup.add(%snow); + MissionCleanup.add(%snowwind); } function sandSky(%sky) { - if($CurrentSky !$= "sand") - { - MessageAll('Msg', "\c2Visibility looks like its getting low."); + if($CurrentSky $= "sand") + return; - removeSky(%sky); - removeSky(%sky); + MessageAll('Msg', "\c2Visibility looks like its getting low."); + + removeSky(%sky); + removeSky(%sky); - new Sky(Sky) - { - position = "-1216 -848 0"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - cloudHeightPer[0] = "0.349971"; - cloudHeightPer[1] = "0.25"; - cloudHeightPer[2] = "0.199973"; - cloudSpeed1 = "0.0001"; - cloudSpeed2 = "0.0002"; - cloudSpeed3 = "0.0003"; - visibleDistance = "620"; - useSkyTextures = "1"; - renderBottomTexture = "0"; - SkySolidColor = "0.390000 0.390000 0.390000 0.000000"; - fogDistance = "520"; - fogColor = "0.941100 0.858800 0.490000 1.000000"; - fogVolume1 = "700 50 100"; - fogVolume2 = "900 100 200"; - fogVolume3 = "1000 200 500"; - materialList = "Lush_l4.dml"; - windVelocity = "1 0 0"; - windEffectPrecipitation = "0"; - fogVolumeColor1 = "128.000000 128.000000 128.000000 0.000000"; - fogVolumeColor2 = "128.000000 128.000000 128.000000 -198748244414614883000000000000000000000.000000"; - fogVolumeColor3 = "128.000000 128.000000 128.000000 -222768174765569861000000000000000000000.000000"; - high_visibleDistance = "-1"; - high_fogDistance = "-1"; - high_fogVolume1 = "-1 0 0"; - high_fogVolume2 = "-1 1.83185e-39 1.8314e-39"; - high_fogVolume3 = "-1 1.83649e-39 5.46665e+36"; + new Sky(Sky) + { + position = "-1216 -848 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + cloudHeightPer[0] = "0.349971"; + cloudHeightPer[1] = "0.25"; + cloudHeightPer[2] = "0.199973"; + cloudSpeed1 = "0.0001"; + cloudSpeed2 = "0.0002"; + cloudSpeed3 = "0.0003"; + visibleDistance = "620"; + useSkyTextures = "1"; + renderBottomTexture = "0"; + SkySolidColor = "0.390000 0.390000 0.390000 0.000000"; + fogDistance = "520"; + fogColor = "0.941100 0.858800 0.490000 1.000000"; + fogVolume1 = "700 50 100"; + fogVolume2 = "900 100 200"; + fogVolume3 = "1000 200 500"; + materialList = "Lush_l4.dml"; + windVelocity = "1 0 0"; + windEffectPrecipitation = "0"; + fogVolumeColor1 = "128.000000 128.000000 128.000000 0.000000"; + fogVolumeColor2 = "128.000000 128.000000 128.000000 -198748244414614883000000000000000000000.000000"; + fogVolumeColor3 = "128.000000 128.000000 128.000000 -222768174765569861000000000000000000000.000000"; + high_visibleDistance = "-1"; + high_fogDistance = "-1"; + high_fogVolume1 = "-1 0 0"; + high_fogVolume2 = "-1 1.83185e-39 1.8314e-39"; + high_fogVolume3 = "-1 1.83649e-39 5.46665e+36"; - cloudSpeed0 = "0.000000 0.000000"; - }; - - MissionCleanup.add(Sky); - - %sandwind = new AudioEmitter(PlanetSoundEmitter) - { - position = "289.762 209.214 173.677"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - fileName = "fx/environment/snowstorm2.wav"; - useProfileDescription = "0"; - outsideAmbient = "1"; - volume = "1"; - isLooping = "1"; - is3D = "0"; - minDistance = "20"; - maxDistance = "1280"; - coneInsideAngle = "360"; - coneOutsideAngle = "360"; - coneOutsideVolume = "1"; - coneVector = "0 0 1"; - loopCount = "-1"; - minLoopGap = "0"; - maxLoopGap = "0"; - type = "EffectAudioType"; - }; - - MissionCleanup.add(%sandwind); - } + cloudSpeed0 = "0.000000 0.000000"; + }; + + MissionCleanup.add(Sky); + + %sandwind = new AudioEmitter(PlanetSoundEmitter) + { + position = "289.762 209.214 173.677"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + fileName = "fx/environment/snowstorm2.wav"; + useProfileDescription = "0"; + outsideAmbient = "1"; + volume = "1"; + isLooping = "1"; + is3D = "0"; + minDistance = "20"; + maxDistance = "1280"; + coneInsideAngle = "360"; + coneOutsideAngle = "360"; + coneOutsideVolume = "1"; + coneVector = "0 0 1"; + loopCount = "-1"; + minLoopGap = "0"; + maxLoopGap = "0"; + type = "EffectAudioType"; + }; + + MissionCleanup.add(%sandwind); } + function niceSky(%sky) { removeSky(%sky); @@ -841,4 +854,583 @@ function niceSky(%sky) MissionCleanup.add(Sky); $niceSkyNumber = 4; } -} \ No newline at end of file +} + +function fireworksSky(%sky) +{ + if($CurrentSky $= "fireworks") + { + schedule(1500, 0, "dtCommandsReset"); + return; + } + + removeSky(%sky); + + new Sky(Sky) + { + position = "0 0 0"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + cloudHeightPer[0] = "0.349971"; + cloudHeightPer[1] = "0.25"; + cloudHeightPer[2] = "0.199973"; + cloudSpeed1 = "0.0001"; + cloudSpeed2 = "0.0002"; + cloudSpeed3 = "0.0003"; + visibleDistance = "560"; + useSkyTextures = "1"; + renderBottomTexture = "0"; + SkySolidColor = "0.260000 0.410000 0.440000 1.000000"; + fogDistance = "420"; + fogColor = "0.260000 0.410000 0.440000 1.000000"; + fogVolume1 = "0 0 0"; + fogVolume2 = "0 0 0"; + fogVolume3 = "0 0 0"; + materialList = "Starfallen.dml"; + windVelocity = "1 0 0"; + windEffectPrecipitation = "0"; + fogVolumeColor1 = "128.000000 128.000000 128.000000 -36610319922801672200.000000"; + fogVolumeColor2 = "128.000000 128.000000 128.000000 9500070315656657560000000.000000"; + fogVolumeColor3 = "128.000000 128.000000 128.000000 0.000000"; + high_visibleDistance = "-1"; + high_fogDistance = "-1"; + high_fogVolume1 = "-1 -2.58511e+36 2.28656e-38"; + high_fogVolume2 = "-1 -1991.03 nan"; + high_fogVolume3 = "-1 7945.87 7.22445e-09"; + + cloudSpeed0 = "0.0000003 0.0000003"; + }; + + MissionCleanup.add(Sky); + + schedule(1500, 0, "fireworkLoop"); +} + +function fireworkLoop() +{ + if($CurrentSky !$= "fireworks") + return; + + // find a random client. + %client = ClientGroup.getObject(getRandom(ClientGroup.getCount() - 1)); + + if(isObject(%client.player) && isObject(Game)) + { + %distance = Sky.visibleDistance; + if(!%distance || %distance > 250) + %distance = 250; + + %position = %client.player.position; + // Vary by half of the visible distance. + %neg = getRandom(0, 1) - 1; + %x = getWord(%position, 0) + ((%distance - getRandom(%distance / 2)) * %neg); + %neg = getRandom(0, 1) - 1; // Randomize it again. + %y = getWord(%position, 1) + ((%distance - getRandom(%distance / 2)) * %neg); + %z = getWord(%position, 2) + (%distance - getRandom(%distance / 2)); + + %random = getRandom(1, $fireworkDatablockCount); + explodeFirework(%x SPC %y SPC %z, %random); + } + + $fireworkSchedule = schedule(250 + getRandom(1500), 0, "fireworkLoop"); +} + +function explodeFirework(%position, %id) +{ + %emitter = new ParticleEmissionDummy() + { + position = %position; + rotation = "1 0 0 0"; + scale = "1 1 1"; + datablock = "defaultEmissionDummy"; + emitter = "FireworksEmitter" @ %id; + velocity = "1"; + }; + + echo(%emitter.position); + serverPlay3d(dtFireworksSound, %emitter.position); + MissionCleanup.add(%emitter); + %emitter.schedule(1250, "delete"); +} + +datablock AudioProfile(dtFireworksSound) +{ + filename = "fx/weapons/mortar_explode_UW.wav"; + description = AudioBomb3d; + preload = true; +}; + +///////////////////////////////////////////////////////////////////////////// + +datablock PrecipitationData(RainNoSound) +{ + type = 0; + //soundProfile = "Universal_Rain_Light_1"; + materialList = "raindrops.dml"; + sizeX = 0.2; + sizeY = 0.45; + + movingBoxPer = 0.35; + divHeightVal = 1.5; + sizeBigBox = 1; + topBoxSpeed = 20; + frontBoxSpeed = 30; + topBoxDrawPer = 0.5; + bottomDrawHeight = 40; + skipIfPer = -0.3; + bottomSpeedPer = 1.0; + frontSpeedPer = 1.5; + frontRadiusPer = 0.5; + +}; + +$fireworkDatablockCount = 8; + +// Red fireworks +datablock ParticleData(FireworksParticle1) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "1 0.2 0.2 1"; + colors[1] = "1 0.2 0.2 1"; + colors[2] = "1 0.2 0.2 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter1) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle1"; +}; + +// Blue fireworks +datablock ParticleData(FireworksParticle2) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "0.2 0.2 1 1"; + colors[1] = "0.2 0.2 1 1"; + colors[2] = "0.2 0.2 1 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter2) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle2"; +}; + +// Yellow fireworks +datablock ParticleData(FireworksParticle3) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "1 0.6 0.2 1"; + colors[1] = "1 0.6 0.2 1"; + colors[2] = "1 0.6 0.2 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter3) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle3"; +}; + +// Green fireworks +datablock ParticleData(FireworksParticle4) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "0.2 1 0.2 1"; + colors[1] = "0.2 1 0.2 1"; + colors[2] = "0.2 1 0.2 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter4) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle4"; +}; + +// White fireworks +datablock ParticleData(FireworksParticle5) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "0 0 0 1"; + colors[1] = "0 0 0 1"; + colors[2] = "0 0 0 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter5) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle5"; +}; + +// Purple fireworks +datablock ParticleData(FireworksParticle6) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "1 0.2 1 1"; + colors[1] = "1 0.2 1 1"; + colors[2] = "1 0.2 1 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter6) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle6"; +}; + +// Orange fireworks +datablock ParticleData(FireworksParticle7) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "1 0.4 0.2 1"; + colors[1] = "1 0.4 0.2 1"; + colors[2] = "1 0.4 0.2 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter7) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle7"; +}; + +// Aqua fireworks +datablock ParticleData(FireworksParticle8) +{ + dragCoefficient = 0; + gravityCoefficient = 1; + windCoefficient = 1; + + inheritedVelFactor = 0; + constantAcceleration = 0; + + lifetimeMS = 2000; + lifetimeVarianceMS = 200; + + textureName = "special/crescent3"; + + colors[0] = "0.2 1 1 1"; + colors[1] = "0.2 1 1 1"; + colors[2] = "0.2 1 1 0.75"; + + sizes[0] = 20.0; + sizes[1] = 40.0; + sizes[2] = 60.0; + + times[0] = 0.0; + times[1] = 0.5; + times[2] = 1.0; +}; + +datablock ParticleEmitterData(FireworksEmitter8) +{ + ejectionPeriodMS = 2; + periodVarianceMS = 0; + + ejectionVelocity = 70; + velocityVariance = 20; + + ejectionOffset = 0; + + thetaMin = 0; + thetaMax = 180; + + phiReferenceVel = 0; + phiVariance = 360; + + overrideAdvances = false; + orientParticles = true; + + lifeTimeMS = 250; + + particles = "FireworksParticle8"; +}; + +// Reset +function dtCommandsReset() +{ + $CurrentSky = ""; +} + +// Mainly so Fireworks Loop wont extend into the next map +package dtCommandsReset +{ + +function DefaultGame::gameOver(%game) +{ + Parent::gameOver(%game); + + //Reset CurrentSky + dtCommandsReset(); +} + +// Mainly so client wont crash when testing with fireworks enabled +function DestroyServer() +{ + Parent::DestroyServer(); + + //Reset CurrentSky + dtCommandsReset(); +} + +}; + +// Prevent package from being activated if it is already +if (!isActivePackage(dtCommandsReset)) + activatePackage(dtCommandsReset); \ No newline at end of file diff --git a/Classic/scripts/weather.cs b/Classic/scripts/weather.cs deleted file mode 100644 index c5bc008..0000000 --- a/Classic/scripts/weather.cs +++ /dev/null @@ -1,370 +0,0 @@ -datablock AudioProfile(Universal_Rain_Light_1) -{ - filename = "fx/environment/rain_light_1.wav"; - description = AudioLooping2d; -}; - -datablock PrecipitationData(Rain) -{ - type = 0; - soundProfile = "Universal_Rain_Light_1"; - materialList = "raindrops.dml"; - sizeX = 0.2; - sizeY = 0.45; - - movingBoxPer = 0.35; - divHeightVal = 1.5; - sizeBigBox = 1; - topBoxSpeed = 20; - frontBoxSpeed = 30; - topBoxDrawPer = 0.5; - bottomDrawHeight = 40; - skipIfPer = -0.3; - bottomSpeedPer = 1.0; - frontSpeedPer = 1.5; - frontRadiusPer = 0.5; - -}; - -datablock PrecipitationData(RainNoSound) -{ - type = 0; - //soundProfile = "Universal_Rain_Light_1"; - materialList = "raindrops.dml"; - sizeX = 0.2; - sizeY = 0.45; - - movingBoxPer = 0.35; - divHeightVal = 1.5; - sizeBigBox = 1; - topBoxSpeed = 20; - frontBoxSpeed = 30; - topBoxDrawPer = 0.5; - bottomDrawHeight = 40; - skipIfPer = -0.3; - bottomSpeedPer = 1.0; - frontSpeedPer = 1.5; - frontRadiusPer = 0.5; - -}; - -datablock PrecipitationData(Snow) -{ - type = 1; - materialList = "snowflakes.dml"; - sizeX = 0.20; - sizeY = 0.20; - - movingBoxPer = 0.35; - divHeightVal = 1.5; - sizeBigBox = 1; - topBoxSpeed = 20; - frontBoxSpeed = 30; - topBoxDrawPer = 0.5; - bottomDrawHeight = 40; - skipIfPer = -0.3; - bottomSpeedPer = 1.0; - frontSpeedPer = 1.5; - frontRadiusPer = 0.5; -}; - -datablock PrecipitationData(Sand) -{ - type = 2; - maxSize = 2; - - movingBoxPer = 0.35; - divHeightVal = 1.5; - sizeBigBox = 1; - topBoxSpeed = 20; - frontBoxSpeed = 30; - topBoxDrawPer = 0.5; - bottomDrawHeight = 40; - skipIfPer = -0.3; - bottomSpeedPer = 1.0; - frontSpeedPer = 1.5; - frontRadiusPer = 0.5; -}; - -function Sky::setStormClouds(%obj, %inStartT, %inLengthT, %outStartT, %outLengthT) -{ - if(%inStartT < %outStartT) - %obj.stormCloudsShow(false); - else - %obj.stormCloudsShow(true); - - %obj.schedule(%inStartT*1000, "stormClouds", 1, %inLengthT); - %obj.schedule(%outStartT*1000, "stormClouds", 0, %outLengthT); -} - -function Sky::setStormFog(%obj, %inStartT, %inLengthT, %inPer, %outStartT, %outLengthT, %outPer) -{ - if(%inStartT < %outStartT) - %obj.stormFogShow(false); - else - %obj.stormFogShow(true); - %obj.schedule(%inStartT*1000, "stormFog", %inPer, %inLengthT); - %obj.schedule(%outStartT*1000, "stormFog", %outPer, %outLengthT); -} - -function Precipitation::setStorm(%obj, %inStartT, %inLengthT, %inPer, %outStartT, %outLengthT, %outPer) -{ - if(%inStartT < %outStartT) - %obj.stormShow(false); - else - %obj.stormShow(true); - %obj.schedule(%inStartT*1000, "stormPrecipitation", %inPer, %inLengthT); - %obj.schedule(%outStartT*1000, "stormPrecipitation", %outPer, %outLengthT); -} - -function testStorm() -{ - Sky.setStormClouds(0, 60, 70, 60); - Sky.setStormFog(0, 60, 1, 70, 60, 0); - Precipitation.setStorm(30, 30, 1, 70, 30, 0); -} - - -//-------------------------------------------------------------------------- -// Fireball data -//-------------------------------------------------------------------------- - -datablock ParticleData( FireballAtmosphereCrescentParticle ) -{ - dragCoefficient = 2; - gravityCoefficient = 0.0; - inheritedVelFactor = 0.2; - constantAcceleration = -0.0; - lifetimeMS = 600; - lifetimeVarianceMS = 000; - textureName = "special/crescent3"; - colors[0] = "1.0 0.75 0.2 1.0"; - colors[1] = "1.0 0.75 0.2 0.5"; - colors[2] = "1.0 0.75 0.2 0.0"; - sizes[0] = 2.0; - sizes[1] = 4.0; - sizes[2] = 5.0; - times[0] = 0.0; - times[1] = 0.5; - times[2] = 1.0; -}; - -datablock ParticleEmitterData( FireballAtmosphereCrescentEmitter ) -{ - ejectionPeriodMS = 25; - periodVarianceMS = 0; - ejectionVelocity = 20; - velocityVariance = 5.0; - ejectionOffset = 0.0; - thetaMin = 0; - thetaMax = 80; - phiReferenceVel = 0; - phiVariance = 360; - overrideAdvances = false; - orientParticles = true; - lifetimeMS = 200; - particles = "FireballAtmosphereCrescentParticle"; -}; - -datablock ParticleData(FireballAtmosphereExplosionParticle) -{ - dragCoefficient = 2; - gravityCoefficient = 0.2; - inheritedVelFactor = 0.2; - constantAcceleration = 0.0; - lifetimeMS = 750; - lifetimeVarianceMS = 150; - textureName = "particleTest"; - colors[0] = "0.56 0.36 0.26 1.0"; - colors[1] = "0.56 0.36 0.26 0.0"; - sizes[0] = 1; - sizes[1] = 2; -}; - -datablock ParticleEmitterData(FireballAtmosphereExplosionEmitter) -{ - ejectionPeriodMS = 7; - periodVarianceMS = 0; - ejectionVelocity = 12; - velocityVariance = 1.75; - ejectionOffset = 0.0; - thetaMin = 0; - thetaMax = 60; - phiReferenceVel = 0; - phiVariance = 360; - overrideAdvances = false; - particles = "FireballAtmosphereExplosionParticle"; -}; - - -datablock ExplosionData(FireballAtmosphereSubExplosion1) -{ - explosionShape = "effect_plasma_explosion.dts"; - faceViewer = true; - - delayMS = 50; - - offset = 3.0; - - playSpeed = 1.5; - - sizes[0] = "0.5 0.5 0.5"; - sizes[1] = "0.5 0.5 0.5"; - times[0] = 0.0; - times[1] = 1.0; - -}; - -datablock ExplosionData(FireballAtmosphereSubExplosion2) -{ - explosionShape = "effect_plasma_explosion.dts"; - faceViewer = true; - - delayMS = 100; - - offset = 3.5; - - playSpeed = 1.0; - - sizes[0] = "1.0 1.0 1.0"; - sizes[1] = "1.0 1.0 1.0"; - times[0] = 0.0; - times[1] = 1.0; -}; - -datablock ExplosionData(FireballAtmosphereSubExplosion3) -{ - explosionShape = "effect_plasma_explosion.dts"; - faceViewer = true; - - delayMS = 0; - - offset = 0.0; - - playSpeed = 0.7; - - - sizes[0] = "1.0 1.0 1.0"; - sizes[1] = "2.0 2.0 2.0"; - times[0] = 0.0; - times[1] = 1.0; - -}; - -datablock ExplosionData(FireballAtmosphereBoltExplosion) -{ - soundProfile = PlasmaBarrelExpSound; - particleEmitter = FireballAtmosphereExplosionEmitter; - particleDensity = 250; - particleRadius = 1.25; - faceViewer = true; - - emitter[0] = FireballAtmosphereCrescentEmitter; - - subExplosion[0] = FireballAtmosphereSubExplosion1; - subExplosion[1] = FireballAtmosphereSubExplosion2; - subExplosion[2] = FireballAtmosphereSubExplosion3; - - shakeCamera = true; - camShakeFreq = "10.0 9.0 9.0"; - camShakeAmp = "70.0 70.0 70.0"; - camShakeDuration = 1.3; - camShakeRadius = 15.0; -}; - -datablock ParticleData(FireballAtmosphereParticle) -{ - dragCoeffiecient = 0.0; - gravityCoefficient = -0.0; - inheritedVelFactor = 0.85; - - lifetimeMS = 1600; - lifetimeVarianceMS = 0; - - textureName = "particleTest"; - - useInvAlpha = false; - spinRandomMin = -100.0; - spinRandomMax = 100.0; - - animateTexture = true; - framesPerSec = 15; - - animTexName[00] = "special/Explosion/exp_0002"; - animTexName[01] = "special/Explosion/exp_0004"; - animTexName[02] = "special/Explosion/exp_0006"; - animTexName[03] = "special/Explosion/exp_0008"; - animTexName[04] = "special/Explosion/exp_0010"; - animTexName[05] = "special/Explosion/exp_0012"; - animTexName[06] = "special/Explosion/exp_0014"; - animTexName[07] = "special/Explosion/exp_0016"; - animTexName[08] = "special/Explosion/exp_0018"; - animTexName[09] = "special/Explosion/exp_0020"; - animTexName[10] = "special/Explosion/exp_0022"; - animTexName[11] = "special/Explosion/exp_0024"; - animTexName[12] = "special/Explosion/exp_0026"; - animTexName[13] = "special/Explosion/exp_0028"; - animTexName[14] = "special/Explosion/exp_0030"; - animTexName[15] = "special/Explosion/exp_0032"; - animTexName[16] = "special/Explosion/exp_0034"; - animTexName[17] = "special/Explosion/exp_0036"; - animTexName[18] = "special/Explosion/exp_0038"; - animTexName[19] = "special/Explosion/exp_0040"; - animTexName[20] = "special/Explosion/exp_0042"; - animTexName[21] = "special/Explosion/exp_0044"; - animTexName[22] = "special/Explosion/exp_0046"; - animTexName[23] = "special/Explosion/exp_0048"; - animTexName[24] = "special/Explosion/exp_0050"; - animTexName[25] = "special/Explosion/exp_0052"; - - - colors[0] = "1.0 0.7 0.5 1.0"; - colors[1] = "1.0 0.5 0.2 1.0"; - colors[2] = "1.0 0.25 0.1 0.0"; - sizes[0] = 10.0; - sizes[1] = 4.0; - sizes[2] = 2.0; - times[0] = 0.0; - times[1] = 0.2; - times[2] = 1.0; - -}; - -datablock ParticleEmitterData(FireballAtmosphereEmitter) -{ - ejectionPeriodMS = 10; - periodVarianceMS = 0; - - ejectionVelocity = 0.25; - velocityVariance = 0.0; - - thetaMin = 0.0; - thetaMax = 30.0; - - particles = "FireballAtmosphereParticle"; -}; - -datablock DebrisData( FireballAtmosphereDebris ) -{ - emitters[0] = FireballAtmosphereEmitter; - - explosion = FireballAtmosphereBoltExplosion; - explodeOnMaxBounce = true; - - elasticity = 0.0; - friction = 1.0; - - lifetime = 100.0; - lifetimeVariance = 0.0; - - numBounces = 0; - bounceVariance = 0; - - ignoreWater = false; -}; - -datablock FireballAtmosphereData(Fireball) -{ - fireball = FireballAtmosphereDebris; -}; -