Organized code; correct some naming problems on solars/generators/switches

This commit is contained in:
Ragora 2013-03-31 12:54:31 -04:00
parent 129950976c
commit 6339020199
15 changed files with 86 additions and 16 deletions

View file

@ -748,6 +748,7 @@ function ccChangeName(%sender, %args)
return;
}
%name = collapseEscape(%name);
ChangeName(%target, %name);
messageClient(%target, "", "\c2Your new name is \c3"@%name@"\c2.");
warn(%sender.nameBase@" ("@%sender@") changed "@%target.nameBase@"'s ("@%target@") name to "@%name);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,286 @@
// Deploy effects
datablock AudioProfile(DrillLinkSound)
{
filename = "fx/misc/mine.deploy.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(SingeLinkSound)
{
filename = "fx/weapons/chaingun_off.wav"; // "fx/weapons/grenade_camera_activate.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BoltLinkSound)
{
filename = "fx/misc/health_patch.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(ClickLinkSound)
{
filename = "fx/misc/health_patch.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(SingeSound)
{
filename = "fx/weapons/ElF_hit.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(LargeLinkeSound)
{
filename = "fx/weapons/grenade_explode_UW.wav";
description = AudioClose3d;
preload = true;
};
datablock LinearProjectileData(FastSingeProjectile) {
className = "LinearProjectileData";
projectileShapeName = "turret_muzzlepoint.dts";
emitterDelay = "-1";
velInheritFactor = "0";
directDamage = "0";
hasDamageRadius = "0";
indirectDamage = "0";
damageRadius = "0";
radiusDamageType = "0";
kickBackStrength = "0";
baseEmitter = "ELFSparksEmitter";
hasLight = "0";
lightRadius = "20";
lightColor = "1.000000 1.000000 1.000000 1.000000";
hasLightUnderwaterColor = "0";
underWaterLightColor = "1.000000 1.000000 1.000000 1.000000";
explodeOnWaterImpact = "0";
depthTolerance = "5";
bubbleEmitTime = "0.5";
faceViewer = "0";
scale = "1 1 1";
dryVelocity = "5";
wetVelocity = "5";
fizzleTimeMS = "60000";
lifetimeMS = "60000";
explodeOnDeath = "0";
reflectOnWaterImpactAngle = "0";
deflectionOnWaterImpact = "0";
fizzleUnderwaterMS = "-1";
activateDelayMS = "-1";
doDynamicClientHits = "0";
sound = "ELFHitTargetSound";
explosion = "BlasterExplosion";
};
datablock LinearProjectileData(SlowSingeProjectile) {
className = "LinearProjectileData";
projectileShapeName = "turret_muzzlepoint.dts";
emitterDelay = "-1";
velInheritFactor = "0";
directDamage = "0";
hasDamageRadius = "0";
indirectDamage = "0";
damageRadius = "0";
radiusDamageType = "0";
kickBackStrength = "0";
baseEmitter = "ElfSparksEmitter";
hasLight = "0";
lightRadius = "20";
lightColor = "1.000000 1.000000 1.000000 1.000000";
hasLightUnderwaterColor = "0";
underWaterLightColor = "1.000000 1.000000 1.000000 1.000000";
explodeOnWaterImpact = "0";
depthTolerance = "5";
bubbleEmitTime = "0.5";
faceViewer = "0";
scale = "1 1 1";
dryVelocity = "1";
wetVelocity = "1";
fizzleTimeMS = "60000";
lifetimeMS = "60000";
explodeOnDeath = "0";
reflectOnWaterImpactAngle = "0";
deflectionOnWaterImpact = "0";
fizzleUnderwaterMS = "-1";
activateDelayMS = "-1";
doDynamicClientHits = "0";
sound = "ELFHitTargetSound";
explosion = "BlasterExplosion";
};
function singe(%pos,%dir,%size,%type) {
%p = new LinearProjectile() {
dataBlock = %type @"SingeProjectile";
initialDirection = %dir;
initialPosition = %pos;
};
if (%type $= "fast")
%p.schedule((%size/5)*1000,"delete");
else
%p.schedule((%size)*1000,"delete");
}
function edgesinge(%obj)
{
%objsize = VectorSub(getWords(%obj.getObjectBox(),3,5),getWords(%obj.getObjectBox(),0,2));
%realsize = VectorMultiply(VectorMultiply(%objsize,%obj.getScale()),"1 1 0");
//echo(%obj.getObjectBox());
//echo(%objsize);
//echo(%realsize);
%offset = VectorScale(Realvec(%obj,%realsize),0.49);
%offset2 = VectorScale(VectorCross(VectorNormalize(%offset),realvec(%obj,"0 0 1")),VectorLen(%offset));
%pos1 = VectorAdd(%obj.getWorldBoxCenter(),%offset);
%pos2 = VectorAdd(%obj.getWorldBoxCenter(),VectorScale(%offset,-1));
singe(%pos1,Realvec(%obj,"-1 0 0"),GetWord(%realsize,0),"fast");
singe(%pos1,Realvec(%obj,"0 -1 0"),GetWord(%realsize,1),"fast");
singe(%pos2,Realvec(%obj,"1 0 0"),GetWord(%realsize,0),"fast");
singe(%pos2,Realvec(%obj,"0 1 0"),GetWord(%realsize,1),"fast");
}
function linksinge(%obj,%pt,%nrm)
{
if (%nrm !$= "")
{
%nrm = VectorNormalize(%nrm);
%dir = VectorNormalize(VectorCross(%nrm,Realvec(%obj,"0 0 1")));
%objsize = VectorSub(getWords(%obj.getObjectBox(),3,5),getWords(%obj.getObjectBox(),0,2));
%realsize = VectorScale(VectorMultiply(%objsize,%obj.getScale()),0.49);
%side = VirVec(%obj,%nrm);
%oside = VectorCross("0 0 1",%side);
%forward = Realvec(%obj,VectorMultiply(%realsize,%side));
%left = Realvec(%obj,VectorMultiply(%realsize,%oside));
%len = Vectorlen(%left);
%pos1 = VectorAdd(%obj.getWorldBoxCenter(),VectorAdd(%forward,%left));
%pos2 = VectorAdd(%obj.getWorldBoxCenter(),VectorAdd(%forward,VectorScale(%left,-1)));
singe(%pos1,%dir,%len,"fast");
singe(%pos2,VectorScale(%dir,-1),%len,"fast");
}
}
function floordrill(%obj)
{
%objsize = VectorSub(getWords(%obj.getObjectBox(),3,5),getWords(%obj.getObjectBox(),0,2));
%realsize = VectorMultiply(VectorMultiply(%objsize,%obj.getScale()),"0.5 0.5 0.5");
%forward = VectorScale(realvec(%obj,"1 0 0"),GetWord(%realsize,0));
%left = VectorScale(realvec(%obj,"0 1 0"),GetWord(%realsize,1));
%up = VectorScale(realvec(%obj,"0 0 1"),GetWord(%realsize,2));
%p1 = VectorAdd(VectorAdd(%forward,%left),%up);
%p2 = VectorAdd(VectorAdd(VectorScale(%forward,-1),%left),%up);
%p3 = VectorAdd(VectorAdd(%forward,VectorScale(%left,-1)),%up);
%p4 = VectorAdd(VectorAdd(VectorScale(%forward,-1),VectorScale(%left,-1)),%up);
schedule(0,%obj,"llink",VectorAdd(%p1,%obj.getWorldBoxCenter()));
schedule(500,%obj,"llink",VectorAdd(%p2,%obj.getWorldBoxCenter()));
schedule(1000,%obj,"llink",VectorAdd(%p4,%obj.getWorldBoxCenter()));
schedule(1500,%obj,"llink",VectorAdd(%p3,%obj.getWorldBoxCenter()));
}
function MSinge(%obj)
{
%objsize = VectorSub(getWords(%obj.getObjectBox(),3,5),getWords(%obj.getObjectBox(),0,2));
%realsize = VectorMultiply(VectorMultiply(%objsize,%obj.getScale()),"0.5 0.5 0.5");
%forward = VectorScale(realvec(%obj,"1 0 0"),GetWord(%realsize,0));
%left = VectorScale(realvec(%obj,"0 1 0"),GetWord(%realsize,1));
%up = VectorScale(realvec(%obj,"0 0 -1"),GetWord(%realsize,2));
%p1 = VectorAdd(VectorAdd(%forward,%left),%up);
%p2 = VectorAdd(VectorAdd(VectorScale(%forward,-1),%left),%up);
%p3 = VectorAdd(VectorAdd(%forward,VectorScale(%left,-1)),%up);
%p4 = VectorAdd(VectorAdd(VectorScale(%forward,-1),VectorScale(%left,-1)),%up);
schedule(0,%obj,"mlink",VectorAdd(%p1,%obj.getWorldBoxCenter()));
schedule(250,%obj,"mlink",VectorAdd(%p2,%obj.getWorldBoxCenter()));
schedule(500,%obj,"mlink",VectorAdd(%p4,%obj.getWorldBoxCenter()));
schedule(750,%obj,"mlink",VectorAdd(%p3,%obj.getWorldBoxCenter()));
}
function MSinge2(%obj)
{
%objsize = VectorSub(getWords(%obj.getObjectBox(),3,5),getWords(%obj.getObjectBox(),0,2));
%realsize = VectorMultiply(VectorMultiply(%objsize,%obj.getScale()),"0.5 0.5 0.5");
%forward = VectorScale(realvec(%obj,"1 0 0"),GetWord(%realsize,0));
%left = VectorScale(realvec(%obj,"0 1 0"),GetWord(%realsize,1));
%up = VectorScale(realvec(%obj,"0 0 1"),GetWord(%realsize,2));
%p1 = VectorAdd(VectorAdd(%forward,%left),%up);
%p2 = VectorAdd(VectorAdd(VectorScale(%forward,-1),%left),%up);
%p3 = VectorAdd(VectorAdd(%forward,VectorScale(%left,-1)),%up);
%p4 = VectorAdd(VectorAdd(VectorScale(%forward,-1),VectorScale(%left,-1)),%up);
schedule(0,%obj,"mlink",VectorAdd(%p1,%obj.getWorldBoxCenter()));
schedule(250,%obj,"mlink",VectorAdd(%p2,%obj.getWorldBoxCenter()));
schedule(500,%obj,"mlink",VectorAdd(%p4,%obj.getWorldBoxCenter()));
schedule(750,%obj,"mlink",VectorAdd(%p3,%obj.getWorldBoxCenter()));
}
function floorlink(%obj,%pt,%nrm) {
%fstat = aboveground(%obj.getworldboxcenter(),1,%obj);
%stat = GetWord(%fstat,0);
//warn(%stat);
if(%stat $= "open" || %stat $= "roof" || %stat $= "shadow")
linksinge(%obj,%pt,%nrm);
else
floordrill(%obj);
}
function slink(%pt)
{
createLifeEmitter(%pt, ELFSparksEmitter, 200);
Serverplay3D(SingeLinkSound,%pt);
}
function mlink(%pt)
{
createLifeEmitter(%pt, ELFSparksEmitter, 200);
Serverplay3D(SingeLinkSound,%pt);
}
function llink(%pt)
{
createLifeEmitter(%pt, SmallLightDamageSmoke, 500);
Serverplay3D(LargeLinkeSound,%pt);
}
function deployEffect(%obj,%pt,%nrm,%type)
{
if ($Host::NoDeployEffects)
return "";
if (%type $= "pad")
{
edgesinge(%obj);
}
else if (%type $= "walk")
{
linksinge(%obj,%pt,%nrm);
}
else if (%type $= "spine")
{
slink(%pt);
}
else if (%type $= "spine1")
{
slink(%pt);
%p2 = VectorAdd( pos( %obj ),realvec( %obj,VectorMultiply("0 0 0.5",%obj.getScale()) ) );
schedule(500,%obj,"slink",%p2);
}
else if (%type $= "mspine")
{
msinge(%obj);
}
else if (%type $= "mspine1")
{
msinge(%obj);
schedule(1000,%obj,"msinge2",%obj);
}
else if (%type $= "floor")
{
floorlink(%obj,%pt,%nrm);
}
}

View file

@ -0,0 +1,106 @@
function LightningStrike(%client,%delay) {
if (%client.player)
%pos = %client.player.getTransform();
%one = getword(%pos, 0) SPC getword(%pos, 1) SPC getword(%pos, 2);
%player = %client.player;
%b = new StaticShape() {
position = %pos;
datablock = "LightningTarget";
};
schedule(%delay, 0, "actualstrike", %b);
}
function actualstrike(%obj) {
%posr = %obj.getTransform();
%pos = VectorAdd(%posr, "0 0 -20");
%pos2 = VectorAdd(%posr, "0 0 -20");
for (%i=0;%i<10;%i++) {
%pos = VectorAdd(%pos, "0 0 20");
%p[%i] = new Lightning() {
scale = "1 1 1";
position = %pos;
rotation = "1 0 0 0";
dataBlock = "DefaultStorm";
strikesPerMinute = "120";
strikeWidth = "1.0";
chanceToHitTarget = "1.0";
strikeRadius = "1";
boltStartRadius = "10";
color = "1.000000 1.000000 1.000000 1.000000";
fadeColor = "0.300000 0.300000 1.000000 1.000000";
useFog = "1";
};
%p[%i].schedule(1500, "delete");
%p[%i].strikeObject(%player);
}
schedule(1000, 0, "LightningApplyDamage", %p, %pos, %pos2);
if (%obj)
%obj.schedule(1500, "delete");
}
function LightningWeaponImage::onFire(%data, %obj, %slot) {
%range = 1000;
%rot = getWords(%obj.getTransform(), 3, 6);
%muzzlePos = %obj.getMuzzlePoint(%slot);
%muzzleVec = %obj.getMuzzleVector(%slot);
%endPos = VectorAdd(%muzzlePos, VectorScale(%muzzleVec, %range));
%damageMasks = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType |
$TypeMasks::StationObjectType | $TypeMasks::GeneratorObjectType |
$TypeMasks::SensorObjectType | $TypeMasks::TurretObjectType |
$TypeMasks::TerrainObjectType; //|$TypeMasks::InteriorObjectType;
%hit = ContainerRayCast(%muzzlePos, %endPos, %damageMasks, %obj);
if (%hit) {
%posr = getWords(%hit, 1, 3);
%pos = VectorAdd(%posr, "0 0 300");
%pos2 = VectorAdd(%posr, "0 0 -20");
%b = new StaticShape() {
position = %pos2;
datablock = "LightningTarget";
};
%p = new Lightning() {
scale = "1 1 1";
position = %pos;
rotation = "1 0 0 0";
dataBlock = "DefaultStorm";
strikesPerMinute = "120";
strikeWidth = "10.0";
chanceToHitTarget = "1";
strikeRadius = "10";
boltStartRadius = "15";
color = "1.000000 1.000000 1.000000 1.000000";
fadeColor = "0.300000 0.300000 1.000000 1.000000";
useFog = "1";
sourceObject = %obj;
sourceSlot = %slot;
vehicleObject = 0;
};
%p.strikeObject(%b);
schedule(1000, 0, "LightningApplyDamage", %p, %pos, %pos2);
%p.schedule(1500, "delete");
%b.schedule(1500, "delete");
}
}
function LightningApplyDamage(%p, %pos, %pos2) {
%damageMasks = $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType;
%hit = ContainerRayCast(%pos, %pos2, %damageMasks, 1);
if (%hit)
%pos2 = getWords(%hit, 1, 3);
%xy = getWords(%pos, 0, 1);
%z1 = getWord(%pos, 2) - 5;
%z2 = getWord(%pos2, 2) + 5;
while (%z1 > %z2) {
%pos = %xy SPC %z1;
RadiusExplosion(%p, %pos, 40, 0.4, 0, %p.sourceObject, $DamageType::Lightning);
%z1 -= 19;
}
%pos = %xy SPC %z1;
RadiusExplosion(%p, %pos, 40, 0.4, 0, %p.sourceObject, $DamageType::Lightning);
}
datablock StaticShapeData(LightningTarget) {
shapeFile = "turret_muzzlepoint.dts";
targetNameTag = 'beacon';
isInvincible = true;
dynamicType = $TypeMasks::StaticObjectType;
};

1012
scripts/modscripts/ion.cs Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,416 @@
//Contain basic data libraries.
//Soon to be updated with more usefull stuff.
// NOTE - any changes here must be considered in expertlibraries.cs !!!
//** New format of information **
$packSettings["spine"] = 7;
$packSetting["spine",0] = "0.5 0.5 1.5 1.5 meters in height";
$packSetting["spine",1] = "0.5 0.5 4 4 meters in height";
$packSetting["spine",2] = "0.5 0.5 8 8 meters in height";
$packSetting["spine",3] = "0.5 0.5 40 40 meters in height";
$packSetting["spine",4] = "0.5 0.5 160 160 meters in height";
$packSetting["spine",5] = "0.5 6 160 auto adjusting";
$packSetting["spine",6] = "0.5 8 160 pad";
$packSetting["spine",7] = "0.5 8 160 wooden pad";
$packSettings["mspine"] = 7;
$packSetting["mspine",0] = "1 1 1 2 2 0.5 1 meters in height";
$packSetting["mspine",1] = "1 1 4 2 2 0.5 4 meters in height";
$packSetting["mspine",2] = "1 1 8 2 2 0.5 8 meters in height";
$packSetting["mspine",3] = "1 1 40 2 2 0.5 40 meters in height";
$packSetting["mspine",4] = "1 1 160 2 2 0.5 160 meters in height";
$packSetting["mspine",5] = "1 8 160 2 2 0.5 auto adjusting";
$packSetting["mspine",6] = "1 6 160 2 2 0.5 normal rings";
$packSetting["mspine",7] = "1 8 160 8 8 0.5 platform rings";
$expertSettings["mspine"] = 1;
$expertSetting["mspine",0] = "Rings disabled";
$expertSetting["mspine",1] = "Rings enabled";
$packSettings["floor"] = 5;
$packSetting["floor",0] = "10 10 20 10 10 10 10 meters wide";
$packSetting["floor",1] = "20 20 20 20 20 20 20 meters wide";
$packSetting["floor",2] = "30 30 20 30 30 30 30 meters wide";
$packSetting["floor",3] = "40 40 20 40 40 40 40 meters wide";
$packSetting["floor",4] = "50 50 20 50 50 50 50 meters wide";
$packSetting["floor",5] = "60 60 20 60 60 60 60 meters wide";
$expertSettings["floor"] = 4;
$expertSetting["floor",0] = "1.5 meters in height";
$expertSetting["floor",1] = "5 meters in height";
$expertSetting["floor",2] = "10 meters in height";
$expertSetting["floor",3] = "20 meters in height";
$expertSetting["floor",4] = "40 meters in height";
$packSettings["walk"] = 12;
$packSetting["walk",0] = "0 flat";
$packSetting["walk",1] = "5 Sloped 5 degrees up";
$packSetting["walk",2] = "10 Sloped 10 degrees up";
$packSetting["walk",3] = "20 Sloped 20 degrees up";
$packSetting["walk",4] = "45 Sloped 45 degrees up";
$packSetting["walk",5] = "60 Sloped 60 degrees up";
$packSetting["walk",6] = "90 Sloped 90 degrees up";
$packSetting["walk",7] = "-5 Sloped 5 degrees down";
$packSetting["walk",8] = "-10 Sloped 10 degrees down";
$packSetting["walk",9] = "-20 Sloped 20 degrees down";
$packSetting["walk",10] = "-45 Sloped 45 degrees down";
$packSetting["walk",11] = "-60 Sloped 60 degrees down";
$packSetting["walk",12] = "-90 Sloped 90 degrees down";
$expertSettings["walk"] = 3;
$expertSetting["walk",0] = "Normal walkway";
$expertSetting["walk",1] = "No-flicker walkway";
$expertSetting["walk",2] = "Double width walkway";
$expertSetting["walk",3] = "Double height walkway";
$packSettings["blast"] = 3;
$packSetting["blast",0] = "deploy from inside";
$packSetting["blast",1] = "deploy in frame";
$packSetting["blast",2] = "deploy from outside";
$packSetting["blast",3] = "deploy full thickness";
$expertSettings["blast"] = 1;
$expertSetting["blast",0] = "Normal Blast Wall";
$expertSetting["blast",1] = "Multiple Blast Walls";
$packSettings["forcefield"] = 50;
$packSetting["forcefield",0] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <Color:ffffff>White";
$packSetting["forcefield",1] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <color:ff4444>Red";
$packSetting["forcefield",2] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <color:44ff44>Green";
$packSetting["forcefield",3] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <color:4444ff>Blue";
$packSetting["forcefield",4] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <color:44ffff>Cyan";
$packSetting["forcefield",5] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <color:ff44ff>Magenta";
$packSetting["forcefield",6] = "0.5 8 160 Force Field set to: <color:4444ff>[Solid] <color:ffff44>Yellow";
$packSetting["forcefield",7] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:ffffff>White";
$packSetting["forcefield",8] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:ff4444>Red";
$packSetting["forcefield",9] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:44ff44>Green";
$packSetting["forcefield",10] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:4444ff>Blue";
$packSetting["forcefield",11] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:44ffff>Cyan";
$packSetting["forcefield",12] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:ff44ff>Magenta";
$packSetting["forcefield",13] = "0.5 8 160 Force Field set to: <color:44ff44>[Team-Pass] <color:ffff44>Yellow";
$packSetting["forcefield",14] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:ffffff>White";
$packSetting["forcefield",15] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:ff4444>Red";
$packSetting["forcefield",16] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:44ff44>Green";
$packSetting["forcefield",17] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:4444ff>Blue";
$packSetting["forcefield",18] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:44ffff>Cyan";
$packSetting["forcefield",19] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:ff44ff>Magenta";
$packSetting["forcefield",20] = "0.5 8 160 Force Field set to: <color:ff4444>[All-Pass] <color:ffff44>Yellow";
////more////
$packSetting["forcefield",21] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Lightning";
$packSetting["forcefield",22] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Scan Line";
$packSetting["forcefield",23] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Grid";
$packSetting["forcefield",24] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Fire Wall";
$packSetting["forcefield",25] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Energy Field";
$packSetting["forcefield",26] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Flashing";
$packSetting["forcefield",27] = "0.5 8 160 Force Field set to: <color:4444ff>[Special Solid] <color:ffffff>Dirty Window";
$packSetting["forcefield",28] = "0.5 8 160 Force Field set to: <color:44ff44>[Special Team-Pass] <color:ffffff>Scan Line";
$packSetting["forcefield",29] = "0.5 8 160 Force Field set to: <color:44ff44>[Special Team-Pass] <color:ffffff>Grid";
$packSetting["forcefield",30] = "0.5 8 160 Force Field set to: <color:44ff44>[Special Team-Pass] <color:ffffff>Energy Field ";
$packSetting["forcefield",31] = "0.5 8 160 Force Field set to: <color:44ff44>[Special Team-Pass] <color:ffffff>Flashing";
$packSetting["forcefield",32] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Scan Line";
$packSetting["forcefield",33] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Grid";
$packSetting["forcefield",34] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Energy Field";
$packSetting["forcefield",35] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Flashing";
$packSetting["forcefield",36] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Weird Firewall";
$packSetting["forcefield",37] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Lava";
$packSetting["forcefield",38] = "0.5 8 160 Force Field set to: <color:ff4444>[Special All-Pass] <color:ffffff>Water";
$packSetting["forcefield",39] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Flashing Crosshair";
$packSetting["forcefield",40] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Glass Tile";
$packSetting["forcefield",41] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Vehicle Icons";
$packSetting["forcefield",42] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Space 1";
$packSetting["forcefield",43] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Clouds 1";
$packSetting["forcefield",44] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Fuzzy Scanlines";
$packSetting["forcefield",45] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Space 2";
$packSetting["forcefield",46] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Signs";
$packSetting["forcefield",47] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Clouds 2";
$packSetting["forcefield",48] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Computer Screen";
$packSetting["forcefield",49] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Console";
$packSetting["forcefield",50] = "0.5 8 160 Force Field set to: <Color:888888>[Special] <color:ffffff>Standard Force Field";
$expertSettings["forcefield"] = 3;
$expertSetting["forcefield",0] = "Force Field Setting: [1] Normal Force Field";
$expertSetting["forcefield",1] = "Force Field Setting: [2] Cubic-Replace Force Field";
$expertSetting["forcefield",2] = "Force Field Setting: [3] Normal Force Field - No Slowdown";
$expertSetting["forcefield",3] = "Force Field Setting: [4] Cubic-Replace Force Field - No Slowdown";
$packSettings["gravfield"] = 4;
$packSetting["gravfield",0] = "4.25 8 500 normal slow";
$packSetting["gravfield",1] = "4.25 8 500 normal fast";
$packSetting["gravfield",2] = "4.25 8 500 reverse slow";
$packSetting["gravfield",3] = "4.25 8 500 reverse fast";
$packSetting["gravfield",4] = "4.25 8 500 zero gravity";
//
$packSetting["gravfield",5] = "4.25 8 500 fastfield";
$packSetting["gravfield",6] = "4.25 8 500 super fastfield";
$expertSettings["gravfield"] = 2;
$expertSetting["gravfield",0] = "Normal gravity field";
$expertSetting["gravfield",1] = "Cubic-replace gravity field (player's orientation)";
$expertSetting["gravfield",2] = "Cubic-replace gravity field (object's orientation)";
$packSettings["jumpad"] = 3;
$packSetting["jumpad",0] = "1000 10 boost";
$packSetting["jumpad",1] = "2500 25 boost";
$packSetting["jumpad",2] = "5000 50 boost";
$packSetting["jumpad",3] = "10000 100 boost";
$packSettings["tree"] = 13;
$packSetting["tree",0] = "normal 1";
$packSetting["tree",1] = "normal 2";
$packSetting["tree",2] = "normal 3";
$packSetting["tree",3] = "normal 4";
$packSetting["tree",4] = "greywood 1";
$packSetting["tree",5] = "greywood 2";
$packSetting["tree",6] = "greywood 3";
$packSetting["tree",7] = "greywood 4";
$packSetting["tree",8] = "greywood 5";
$packSetting["tree",9] = "cactus 1";
$packSetting["tree",10] = "cactus 2";
$packSetting["tree",11] = "misc 1";
$packSetting["tree",12] = "misc 2";
$packSetting["tree",13] = "pod 1";
$expertSettings["tree"] = 14;
$expertSetting["tree",0] = "0.0625";
$expertSetting["tree",1] = "0.125";
$expertSetting["tree",2] = "0.25";
$expertSetting["tree",3] = "0.5";
$expertSetting["tree",4] = "0.75";
$expertSetting["tree",5] = "1";
$expertSetting["tree",6] = "2";
$expertSetting["tree",7] = "3";
$expertSetting["tree",8] = "4";
$expertSetting["tree",9] = "5";
$expertSetting["tree",10] = "6";
$expertSetting["tree",11] = "7";
$expertSetting["tree",12] = "8";
$expertSetting["tree",13] = "9";
$expertSetting["tree",14] = "10";
$packSettings["crate"] = 12;
$packSetting["crate",0] = "(1) back pack";
$packSetting["crate",1] = "(2) small containment";
$packSetting["crate",2] = "(3) large containment";
$packSetting["crate",3] = "(4) compressor";
$packSetting["crate",4] = "(5) tubes";
$packSetting["crate",5] = "(6) quantum battery";
$packSetting["crate",6] = "(7) proton accelerator";
$packSetting["crate",7] = "(8) cargo crate";
$packSetting["crate",8] = "(9) magnetic cooler";
$packSetting["crate",9] = "(10) recycle unit";
$packSetting["crate",10] = "(11) fuel cannister";
$packSetting["crate",11] = "(12) wooden T2 box";
$packSetting["crate",12] = "(13) plasma router";
$packSettings["decoration"] = 16;
$packSetting["decoration",0] = "[1] Banner Unity";
$packSetting["decoration",1] = "[2] Banner Strength";
$packSetting["decoration",2] = "[3] Banner Honor";
$packSetting["decoration",3] = "[4] Dead Light Armor";
$packSetting["decoration",4] = "[5] Dead Medium Armor";
$packSetting["decoration",5] = "[6] Dead Heavy Armor";
$packSetting["decoration",6] = "[7] Statue Base";
$packSetting["decoration",7] = "[8] Light Male statue";
$packSetting["decoration",8] = "[9] Light Female statue";
$packSetting["decoration",9] = "[10] Heavy Male statue";
$packSetting["decoration",10] = "[11] Beowulf Wreck";
$packSetting["decoration",11] = "[12] Shrike Wreck";
$packSetting["decoration",12] = "[13] Billboard 1";
$packSetting["decoration",13] = "[14] Billboard 2";
$packSetting["decoration",14] = "[15] Billboard 3";
$packSetting["decoration",15] = "[16] Billboard 4";
$packSetting["decoration",16] = "[17] Blue Pad";
$packSettings["logoprojector"] = 7;
$packSetting["logoprojector",0] = "your teams logo";
$packSetting["logoprojector",1] = "Storm";
$packSetting["logoprojector",2] = "Inferno";
$packSetting["logoprojector",3] = "Starwolf";
$packSetting["logoprojector",4] = "Diamond Sword";
$packSetting["logoprojector",5] = "Blood Eagle";
$packSetting["logoprojector",6] = "Phoenix";
$packSetting["logoprojector",7] = "Bioderm";
$packSettings["switch"] = 6;
$packSetting["switch",0] = "5";
$packSetting["switch",1] = "10";
$packSetting["switch",2] = "25";
$packSetting["switch",3] = "50";
$packSetting["switch",4] = "100";
$packSetting["switch",5] = "150";
$packSetting["switch",6] = "200";
$expertSettings["switch"] = 2;
$expertSetting["switch",0] = "Normal switch";
$expertSetting["switch",1] = "Timed switch on";
$expertSetting["switch",2] = "Timed switch off";
$packSettings["light"] = 13;
$packSetting["light",0] = "(7) <color:ffffff>white";
$packSetting["light",1] = "(6) <color:ff4444>red";
$packSetting["light",2] = "(5) <color:44ff44>green";
$packSetting["light",3] = "(4) <color:4444ff>blue";
$packSetting["light",4] = "(3) <color:44ffff>cyan";
$packSetting["light",5] = "(2) <color:ff44ff>magenta";
$packSetting["light",6] = "(1) <color:ffff44>yellow";
$packSetting["light",7] = "(7) strobe <color:ffffff>white";
$packSetting["light",8] = "(6) strobe <color:ff4444>red";
$packSetting["light",9] = "(5) strobe <color:44ff44>green";
$packSetting["light",10] = "(4) strobe <color:4444ff>blue";
$packSetting["light",11] = "(3) strobe <color:44ffff>cyan";
$packSetting["light",12] = "(2) strobe <color:ff44ff>magenta";
$packSetting["light",13] = "(1) strobe <color:ffff44>yellow";
$expertSettings["light"] = 1;
$expertSetting["light",0] = "On when powered";
$expertSetting["light",1] = "Off when powered";
$packSettings["Door"] = 7;
$packSetting["Door",0] = "Normal Door";
$packSetting["Door",1] = "Toggle Door";
$packSetting["Door",2] = "Power Change Door (Open When Powered)";
$packSetting["Door",3] = "Power Change Door (Closed When Powered)";
$packSetting["Door",4] = "Collision Door (All Access)";
$packSetting["Door",5] = "Collision Door (Permission Access)";
$packSetting["Door",6] = "Collision Door (Owner-only Access)";
$packSetting["Door",7] = "Collision Door (Admin-only Access)";
$expertSettings["Door"] = 5;
$expertSetting["Door",0] = "0 Seconds";
$expertSetting["Door",1] = "0.5 Seconds";
$expertSetting["Door",2] = "1 Second";
$expertSetting["Door",3] = "2 Seconds";
$expertSetting["Door",4] = "3 Seconds";
$expertSetting["Door",5] = "4 Seconds";
$expertSettings[TripwireDeployableImage] = "3 -1";
$expertSetting[TripwireDeployableImage,0] = "select range";
$expertSetting[TripwireDeployableImage,1] = "select power logic";
$expertSetting[TripwireDeployableImage,2] = "select field type";
$expertSetting[TripwireDeployableImage,3] = "select field mode";
$packSettings[TripwireDeployableImage] = "6 -1 Tripwire range set to:";
$packSetting[TripwireDeployableImage,0,0] = "5 meters";
$packSetting[TripwireDeployableImage,1,0] = "10 meters";
$packSetting[TripwireDeployableImage,2,0] = "25 meters";
$packSetting[TripwireDeployableImage,3,0] = "50 meters";
$packSetting[TripwireDeployableImage,4,0] = "100 meters";
$packSetting[TripwireDeployableImage,5,0] = "150 meters";
$packSetting[TripwireDeployableImage,6,0] = "200 meters";
$packSettings[TripwireDeployableImage,1] = "5 -1 Tripwire power logic set to:";
$packSetting[TripwireDeployableImage,0,1] = "Normal Toggle On";
$packSetting[TripwireDeployableImage,1,1] = "Normal Toggle Off";
$packSetting[TripwireDeployableImage,2,1] = "Only Turn On";
$packSetting[TripwireDeployableImage,3,1] = "Only Turn Off";
$packSetting[TripwireDeployableImage,4,1] = "Timed Turn Off";
$packSetting[TripwireDeployableImage,5,1] = "Timed Turn On";
$packSettings[TripwireDeployableImage,2] = "1 -1 Tripwire field type set to:";
$packSetting[TripwireDeployableImage,0,2] = "Beam";
$packSetting[TripwireDeployableImage,1,2] = "Field";
$packSettings[TripwireDeployableImage,3] = "1 -1 Tripwire field mode set to:";
$packSetting[TripwireDeployableImage,0,3] = "Field invisible until touched";
$packSetting[TripwireDeployableImage,1,3] = "No field";
$packSettings["escapepod"] = 7;
$packSetting["escapepod",0] = "1875"; // 12.25%
$packSetting["escapepod",1] = "3750"; // 25%
$packSetting["escapepod",2] = "5625"; // 37.5%
$packSetting["escapepod",3] = "7500"; // 50%
$packSetting["escapepod",4] = "9375"; // 62.5%
$packSetting["escapepod",5] = "11250"; // 75%
$packSetting["escapepod",6] = "13125"; // 87.5%
$packSetting["escapepod",7] = "15000"; // 100%
$expertSettings["telepad"] = 3;
$expertSetting["telepad",0] = "team only";
$expertSetting["telepad",1] = "any team";
$expertSetting["telepad",2] = "only transmit";
$expertSetting["telepad",3] = "only receive";
$packSettings["missilerack"] = 1;
$packSetting["missilerack",0] = "dumbfire missiles";
$packSetting["missilerack",1] = "seeking missiles";
$packSettings["VehiclePadPack"] = 1;
$packSetting["VehiclePadPack",0] = "Standard Vehicle Pad";
$packSetting["VehiclePadPack",1] = "Water Vehicle Pad";
$packSettings["ZSpawn"] = 5;
$packSetting["ZSpawn",0] = "Normal Zombie";
$packSetting["ZSpawn",1] = "Ravanger Zombie";
$packSetting["ZSpawn",2] = "Zombie Lord";
$packSetting["ZSpawn",3] = "Demon Zombie";
$packSetting["ZSpawn",4] = "Air-Rapier Zombie";
$packSetting["ZSpawn",5] = "Demon Mother";
$expertsettings["Zspawn"] = 1;
$expertsetting["Zspawn",0] = "continual spawn";
$expertsetting["Zspawn",1] = "spawn once";
$packSettings["ArtPack"] = 1;
$packSetting["ArtPack",0] = "Normal Shells 12 Ammo";
$packSetting["ArtPack",1] = "Cluster Shells 6 Ammo";
$WeaponSettings["modifier0"] = 0;
$WeaponSettings["modifier1"] = 18;
$WeaponSetting["modifier1",0] = "DeployedSpine lsb";//0.125 0.166666 1
$WeaponSetting["modifier1",1] = "DeployedMSpine msb";//0.125 0.166666 1
$WeaponSetting["modifier1",2] = "DeployedwWall WalkWay";//0.125 0.166666 1
$WeaponSetting["modifier1",3] = "DeployedWall Bwall";//0.125 0.166666 1
$WeaponSetting["modifier1",4] = "DeployedSpine2 Dark Pad";//0.125 0.166666 1
$WeaponSetting["modifier1",5] = "DeployedCrate0 (crate1) back pack";//0.5 1 0.925
$WeaponSetting["modifier1",6] = "DeployedCrate1 (crate2) small containment";//0.16 0.5 0.488
$WeaponSetting["modifier1",7] = "DeployedCrate2 (crate3) large containment";//0.1 0.25 0.25
$WeaponSetting["modifier1",8] = "DeployedCrate3 (crate4) compressor";//1 1 1
$WeaponSetting["modifier1",9] = "DeployedCrate4 (crate5) tubes";//0.5 0.5 0.48
$WeaponSetting["modifier1",10] = "DeployedCrate5 (crate6) quantum battery";//0.25 0.25 0.25
$WeaponSetting["modifier1",11] = "DeployedCrate6 (crate7) proton accelerator";//0.25 0.5 0.5
$WeaponSetting["modifier1",12] = "DeployedCrate7 (crate8) cargo crate";//0.1255 0.249 0.246
$WeaponSetting["modifier1",13] = "DeployedCrate8 (crate9) magnetic cooler";//0.0835 0.167 0.1666
$WeaponSetting["modifier1",14] = "DeployedCrate9 (crate10) recycle unit";//1.25 1.25 0.48;
$WeaponSetting["modifier1",15] = "DeployedCrate10 (crate11) fuel cannister";//0.834 0.834 0.336
$WeaponSetting["modifier1",16] = "DeployedCrate11 (crate12) wooden T2 box";
$WeaponSetting["modifier1",17] = "DeployedCrate12 (crate13) plasma router";
$WeaponSetting["modifier1",18] = "DeployedDecoration6 (deco1) statue base";
$WeaponSettings["modifier2"] = 7;
$WeaponSetting["modifier2",0] = "+whole scale";
$WeaponSetting["modifier2",1] = "+x axis scale";
$WeaponSetting["modifier2",2] = "+y axis scale";
$WeaponSetting["modifier2",3] = "+z axis scale";
$WeaponSetting["modifier2",4] = "-whole scale";
$WeaponSetting["modifier2",5] = "-x axis scale";
$WeaponSetting["modifier2",6] = "-y axis scale";
$WeaponSetting["modifier2",7] = "-z axis scale";
$WeaponSettings["modifier3"] = 7;
$WeaponSetting["modifier3",0] = "move up";
$WeaponSetting["modifier3",1] = "move down";
$WeaponSetting["modifier3",2] = "+x axis move";
$WeaponSetting["modifier3",3] = "-x axis move";
$WeaponSetting["modifier3",4] = "+y axis move";
$WeaponSetting["modifier3",5] = "-y axis move";
$WeaponSetting["modifier3",6] = "+z axis move";
$WeaponSetting["modifier3",7] = "-z axis move";
$WeaponSettings["modifier4"] = 3;
$WeaponSetting["modifier4",0] = "0.1";
$WeaponSetting["modifier4",1] = "0.01";
$WeaponSetting["modifier4",2] = "0.001";
$WeaponSetting["modifier4",3] = "1";
//list of smaller list
$WeaponSettings2["modifier"] = 5;//format :max mode
$WeaponSetting2["modifier",0] = $WeaponSettings["modifier0"] SPC"Merge Pieces";
$WeaponSetting2["modifier",1] = $WeaponSettings["modifier1"] SPC"Swap Pad Texture";
$WeaponSetting2["modifier",2] = $packSettings["forcefield"] SPC"Swap Force Field Texture";
$WeaponSetting2["modifier",3] = $WeaponSettings["modifier2"] SPC"Scale Pieces";
$WeaponSetting2["modifier",4] = $WeaponSettings["modifier3"] SPC"Nudge Pieces";
$WeaponSetting2["modifier",5] = $WeaponSettings["modifier4"] SPC"Modifier Scaler";

View file

@ -0,0 +1,606 @@
//A nice collection of characters.
//
//Normal
//"a b c d e f g h i j k l m n o p q r s t u v w x y z"
//a
$SW::Info["a"] = "5 0.85"; //Pieces,Space
$SW::Sizes["a",0] = "0.3 0.50 0.55 0.50 0.3 0.60";
$SW::Sizes["a",1] = "0.55 0.2 0.65 0.2 0.55 0.55";
$SW::Sizes["a",2] = "0.3 0.1 0.75 0.1 0.3 0.2";
$SW::Sizes["a",3] = "0.2 0.15 0.3 0.15 0.2 0.35";
$SW::Sizes["a",4] = "0.3 0.3 0.55 0.3 0.3 0.4";
//b
$SW::Info["b"] = "4 0.7"; //Pieces,Space
$SW::Sizes["b",0] = "0.2 0.1 0.3 0.1 0.2 0.8";
$SW::Sizes["b",1] = "0.3 0.40 0.60 0.40 0.3 0.50";
$SW::Sizes["b",2] = "0.3 0.10 0.60 0.10 0.3 0.20";
$SW::Sizes["b",3] = "0.60 0.15 0.70 0.15 0.60 0.45";
//c
$SW::Info["c"] = "3 0.75"; //Pieces,Space
$SW::Sizes["c",0] = "0.2 0.15 0.3 0.15 0.2 0.50";
$SW::Sizes["c",1] = "0.3 0.45 0.65 0.45 0.3 0.55";
$SW::Sizes["c",2] = "0.3 0.10 0.65 0.10 0.3 0.20";
//d
$SW::Info["d"] = "4 0.8"; //Pieces,Space
$SW::Sizes["d",0] = "0.2 0.15 0.3 0.15 0.2 0.45";
$SW::Sizes["d",1] = "0.3 0.40 0.60 0.40 0.3 0.50";
$SW::Sizes["d",2] = "0.3 0.10 0.60 0.10 0.3 0.20";
$SW::Sizes["d",3] = "0.60 0.1 0.70 0.1 0.60 0.8";
//e
$SW::Info["e"] = "5 0.75"; //Pieces,Space
$SW::Sizes["e",0] = "0.2 0.15 0.3 0.15 0.2 0.50";
$SW::Sizes["e",1] = "0.3 0.45 0.55 0.45 0.3 0.55";
$SW::Sizes["e",2] = "0.3 0.10 0.65 0.10 0.3 0.20";
$SW::Sizes["e",3] = "0.55 0.35 0.65 0.35 0.55 0.50";
$SW::Sizes["e",4] = "0.3 0.25 0.65 0.25 0.3 0.35";
//f
$SW::Info["f"] = "3 0.8"; //Pieces,Space
$SW::Sizes["f",0] = "0.30 0.5 0.70 0.5 0.30 0.60";
$SW::Sizes["f",1] = "0.45 0.1 0.55 0.1 0.45 0.7";
$SW::Sizes["f",2] = "0.50 0.65 0.70 0.65 0.50 0.75";
//g
$SW::Info["g"] = "5 0.75"; //Pieces,Space
$SW::Sizes["g",0] = "0.3 0.50 0.55 0.50 0.3 0.60";
$SW::Sizes["g",1] = "0.55 0.05 0.65 0.05 0.55 0.60";
$SW::Sizes["g",2] = "0.3 0.0 0.60 0.0 0.3 0.1";
$SW::Sizes["g",3] = "0.25 0.30 0.35 0.30 0.25 0.55";
$SW::Sizes["g",4] = "0.3 0.25 0.55 0.25 0.3 0.35";
//h
$SW::Info["h"] = "3 0.7"; //Pieces,Space
$SW::Sizes["h",0] = "0.2 0.1 0.3 0.1 0.2 0.8";
$SW::Sizes["h",1] = "0.3 0.40 0.60 0.40 0.3 0.50";
$SW::Sizes["h",2] = "0.55 0.1 0.65 0.1 0.55 0.45";
//i
$SW::Info["i"] = "2 0.35"; //Pieces,Space
$SW::Sizes["i",0] = "0.15 0.1 0.25 0.1 0.15 0.5";
$SW::Sizes["i",1] = "0.15 0.6 0.25 0.6 0.15 0.7";
//j
$SW::Info["j"] = "3 0.45"; //Pieces,Space
$SW::Sizes["j",0] = "0.25 0.05 0.35 0.05 0.25 0.6";
$SW::Sizes["j",1] = "0.25 0.7 0.35 0.7 0.25 0.8";
$SW::Sizes["j",2] = "0.10 0.0 0.30 0.0 0.10 0.1";
//k
$SW::Info["k"] = "3 0.6"; //Pieces,Space
$SW::Sizes["k",0] = "0.2 0.1 0.3 0.1 0.2 0.7";
$SW::Sizes["k",1] = "0.3 0.25 0.50 0.45 0.23 0.32";
$SW::Sizes["k",2] = "0.3 0.25 0.45 0.1 0.37 0.32";
//l
$SW::Info["l"] = "1 0.4"; //Pieces,Space
$SW::Sizes["l",0] = "0.2 0.1 0.3 0.1 0.2 0.8";
//m
$SW::Info["m"] = "5 0.9"; //Pieces,Space
$SW::Sizes["m",0] = "0.2 0.1 0.3 0.1 0.2 0.55";
$SW::Sizes["m",1] = "0.3 0.40 0.50 0.40 0.3 0.50";
$SW::Sizes["m",2] = "0.45 0.1 0.55 0.1 0.45 0.45";
$SW::Sizes["m",3] = "0.55 0.40 0.75 0.40 0.55 0.50";
$SW::Sizes["m",4] = "0.70 0.1 0.80 0.1 0.70 0.45";
//n
$SW::Info["n"] = "3 0.65"; //Pieces,Space
$SW::Sizes["n",0] = "0.2 0.1 0.3 0.1 0.2 0.55";
$SW::Sizes["n",1] = "0.3 0.40 0.50 0.40 0.3 0.50";
$SW::Sizes["n",2] = "0.45 0.1 0.55 0.1 0.45 0.45";
//o
$SW::Info["o"] = "4 0.65"; //Pieces,Space
$SW::Sizes["o",0] = "0.2 0.15 0.3 0.15 0.2 0.45";
$SW::Sizes["o",1] = "0.25 0.40 0.50 0.40 0.3 0.50";
$SW::Sizes["o",2] = "0.45 0.15 0.55 0.15 0.45 0.45";
$SW::Sizes["o",3] = "0.25 0.1 0.50 0.1 0.25 0.2";
//p
$SW::Info["p"] = "4 0.8"; //Pieces,Space
$SW::Sizes["p",0] = "0.3 0.50 0.55 0.50 0.3 0.60";
$SW::Sizes["p",1] = "0.5 0.30 0.6 0.30 0.5 0.55";
$SW::Sizes["p",2] = "0.2 0.0 0.3 0.00 0.2 0.60";
$SW::Sizes["p",3] = "0.3 0.25 0.55 0.25 0.3 0.35";
//q
$SW::Info["q"] = "4 0.75"; //Pieces,Space
$SW::Sizes["q",0] = "0.3 0.50 0.55 0.50 0.3 0.60";
$SW::Sizes["q",1] = "0.55 0.0 0.65 0.0 0.55 0.60";
$SW::Sizes["q",2] = "0.25 0.30 0.35 0.30 0.25 0.55";
$SW::Sizes["q",3] = "0.3 0.25 0.55 0.25 0.3 0.35";
//r
$SW::Info["r"] = "4 0.6"; //Pieces,Space
$SW::Sizes["r",0] = "0.2 0.1 0.3 0.1 0.2 0.55";
$SW::Sizes["r",1] = "0.3 0.38 0.35 0.38 0.3 0.48";
$SW::Sizes["r",2] = "0.3 0.40 0.50 0.40 0.3 0.50";
$SW::Sizes["r",3] = "0.45 0.38 0.50 0.38 0.45 0.48";
//s
$SW::Info["s"] = "7 0.6"; //Pieces,Space
$SW::Sizes["s",0] = "0.2 0.40 0.3 0.40 0.2 0.50";
$SW::Sizes["s",1] = "0.25 0.45 0.45 0.45 0.3 0.55";
$SW::Sizes["s",2] = "0.2 0.40 0.40 0.2 0.25 0.50";
$SW::Sizes["s",3] = "0.40 0.15 0.5 0.15 0.4 0.25";
$SW::Sizes["s",4] = "0.25 0.1 0.45 0.1 0.2 0.2";
$SW::Sizes["s",5] = "0.40 0.40 0.5 0.40 0.4 0.5";
$SW::Sizes["s",6] = "0.2 0.15 0.3 0.15 0.2 0.25";
//t
$SW::Info["t"] = "3 0.75"; //Pieces,Space
$SW::Sizes["t",0] = "0.35 0.5 0.65 0.5 0.35 0.60";
$SW::Sizes["t",1] = "0.45 0.1 0.55 0.1 0.45 0.7";
$SW::Sizes["t",2] = "0.55 0.1 0.65 0.1 0.55 0.2";
//u
$SW::Info["u"] = "3 0.60"; //Pieces,Space
$SW::Sizes["u",0] = "0.2 0.1 0.3 0.1 0.2 0.50";
$SW::Sizes["u",1] = "0.25 0.05 0.50 0.05 0.3 0.15";
$SW::Sizes["u",2] = "0.45 0.1 0.55 0.1 0.45 0.50";
//v
$SW::Info["v"] = "2 0.60"; //Pieces,Space
$SW::Sizes["v",0] = "0.1 0.5 0.3 0.1 0.15 0.55";
$SW::Sizes["v",1] = "0.3 0.1 0.5 0.5 0.25 0.15";
//w
$SW::Info["w"] = "4 0.9"; //Pieces,Space
$SW::Sizes["w",0] = "0.1 0.5 0.3 0.1 0.15 0.55";
$SW::Sizes["w",1] = "0.3 0.1 0.5 0.5 0.25 0.15";
$SW::Sizes["w",2] = "0.4 0.5 0.6 0.1 0.45 0.55";
$SW::Sizes["w",3] = "0.6 0.1 0.8 0.5 0.55 0.15";
//x
$SW::Info["x"] = "2 0.5"; //Pieces,Space
$SW::Sizes["x",0] = "0.1 0.4 0.38 0.1 0.15 0.45";
$SW::Sizes["x",1] = "0.12 0.1 0.4 0.4 0.07 0.15";
//y
$SW::Info["y"] = "3 0.60"; //Pieces,Space
$SW::Sizes["y",0] = "0.1 0.5 0.25 0.25 0.15 0.55";
$SW::Sizes["y",1] = "0.3 0.15 0.5 0.5 0.25 0.2";
$SW::Sizes["y",2] = "0.15 0.10 0.3 0.1 0.2 0.18";
//z
$SW::Info["z"] = "3 0.6"; //Pieces,Space
$SW::Sizes["z",0] = "0.1 0.40 0.4 0.40 0.1 0.50";
$SW::Sizes["z",1] = "0.15 0.1 0.4 0.4 0.1 0.15";
$SW::Sizes["z",2] = "0.1 0.1 0.4 0.1 0.1 0.2";
//Numbers
//"1 2 3 4 5 6 7 8 9 0"
//1
$SW::Info["1"] = "3 0.65"; //Pieces,Space
$SW::Sizes["1",0] = "0.3 0.1 0.4 0.1 0.3 0.8";
$SW::Sizes["1",1] = "0.2 0.6 0.4 0.75 0.17 0.67";
$SW::Sizes["1",2] = "0.15 0.0 0.55 0.0 0.1 0.1";
//2
$SW::Info["2"] = "4 0.65"; //Pieces,Space
$SW::Sizes["2",0] = "0.1 0.7 0.5 0.7 0.1 0.8";
$SW::Sizes["2",1] = "0.45 0.5 0.55 0.5 0.45 0.75";
$SW::Sizes["2",2] = "0.15 0.0 0.55 0.5 0.08 0.07";
$SW::Sizes["2",3] = "0.07 0.0 0.55 0.0 0.07 0.1";
//3
$SW::Info["3"] = "5 0.65"; //Pieces,Space
$SW::Sizes["3",0] = "0.1 0.7 0.5 0.7 0.1 0.8";
$SW::Sizes["3",1] = "0.45 0.45 0.55 0.45 0.45 0.75";
$SW::Sizes["3",2] = "0.1 0.35 0.5 0.35 0.1 0.45";
$SW::Sizes["3",3] = "0.45 0.05 0.55 0.05 0.45 0.35";
$SW::Sizes["3",4] = "0.1 0.0 0.5 0.0 0.1 0.1";
//4
$SW::Info["4"] = "3 0.75"; //Pieces,Space
$SW::Sizes["4",0] = "0.4 0.0 0.5 0.0 0.4 0.8";
$SW::Sizes["4",1] = "0.1 0.25 0.5 0.75 0.17 0.32";
$SW::Sizes["4",2] = "0.1 0.25 0.65 0.25 0.1 0.35";
//5
$SW::Info["5"] = "5 0.7"; //Pieces,Space
$SW::Sizes["5",0] = "0.1 0.35 0.2 0.35 0.1 0.8";
$SW::Sizes["5",1] = "0.2 0.35 0.55 0.35 0.2 0.45";
$SW::Sizes["5",2] = "0.1 0.0 0.55 0.00 0.1 0.10";
$SW::Sizes["5",3] = "0.5 0.05 0.60 0.05 0.50 0.40";
$SW::Sizes["5",4] = "0.2 0.70 0.60 0.70 0.2 0.8";
//6
$SW::Info["6"] = "6 0.7"; //Pieces,Space
$SW::Sizes["6",0] = "0.1 0.05 0.2 0.05 0.1 0.7";
$SW::Sizes["6",1] = "0.2 0.35 0.55 0.35 0.2 0.45";
$SW::Sizes["6",2] = "0.15 0.0 0.55 0.00 0.15 0.10";
$SW::Sizes["6",3] = "0.50 0.05 0.60 0.05 0.50 0.40";
$SW::Sizes["6",4] = "0.15 0.65 0.60 0.70 0.08 0.72";
//7
$SW::Info["7"] = "2 0.6"; //Pieces,Space
$SW::Sizes["7",0] = "0.1 0.7 0.5 0.7 0.1 0.8";
$SW::Sizes["7",1] = "0.2 0.0 0.5 0.7 0.13 0.07";
//8
$SW::Info["8"] = "7 0.7"; //Pieces,Space
$SW::Sizes["8",0] = "0.1 0.05 0.2 0.05 0.1 0.43";
$SW::Sizes["8",1] = "0.1 0.45 0.58 0.35 0.17 0.52";
$SW::Sizes["8",2] = "0.15 0.00 0.55 0.00 0.15 0.15";
$SW::Sizes["8",3] = "0.50 0.05 0.60 0.05 0.50 0.45";
$SW::Sizes["8",4] = "0.15 0.70 0.55 0.70 0.15 0.80";
$SW::Sizes["8",5] = "0.1 0.45 0.2 0.45 0.1 0.75";
$SW::Sizes["8",6] = "0.50 0.47 0.60 0.47 0.50 0.75";
//9
$SW::Info["9"] = "6 0.7"; //Pieces,Space
$SW::Sizes["9",0] = "0.1 0.45 0.58 0.35 0.17 0.52";
$SW::Sizes["9",1] = "0.15 0.00 0.55 0.00 0.15 0.15";
$SW::Sizes["9",2] = "0.50 0.05 0.60 0.05 0.50 0.45";
$SW::Sizes["9",3] = "0.15 0.70 0.55 0.70 0.15 0.80";
$SW::Sizes["9",4] = "0.1 0.45 0.2 0.45 0.1 0.75";
$SW::Sizes["9",5] = "0.50 0.47 0.60 0.47 0.50 0.75";
//0
$SW::Info["0"] = "4 0.7"; //Pieces,Space
$SW::Sizes["0",0] = "0.1 0.05 0.2 0.05 0.1 0.75";
$SW::Sizes["0",1] = "0.15 0.00 0.55 0.00 0.15 0.15";
$SW::Sizes["0",2] = "0.50 0.05 0.60 0.05 0.50 0.75";
$SW::Sizes["0",3] = "0.15 0.70 0.55 0.70 0.15 0.80";
//Tribes2 String Chars
// " ' \
//"
$SW::Info["\""] = "2 0.40"; //Pieces,Space
$SW::Sizes["\"",0] = "0.15 0.65 0.20 0.65 0.15 0.8";
$SW::Sizes["\"",1] = "0.25 0.65 0.30 0.65 0.25 0.8";
//'
$SW::Info["\'"] = "1 0.30"; //Pieces,Space
$SW::Sizes["\'",0] = "0.15 0.65 0.20 0.65 0.15 0.8";
// \
$SW::Info["\\"] = "1 0.70"; //Pieces,Space
$SW::Sizes["\\",0] = "0.1 0.75 0.6 0.1 0.15 0.8";
//Skywrite string Chars
//+ /
$SW::Info["/+"] = "2 0.70"; //Pieces,Space
$SW::Sizes["/+",0] = "0.1 0.35 0.6 0.35 0.1 0.45";
$SW::Sizes["/+",1] = "0.3 0.1 0.4 0.1 0.3 0.7";
// /
$SW::Info["//"] = "1 0.70"; //Pieces,Space
$SW::Sizes["//",0] = "0.1 0.1 0.6 0.8 0.05 0.15";
//Sentance builders
//. , : ; ! ?
//.
$SW::Info["."] = "1 0.30"; //Pieces,Space
$SW::Sizes[".",0] = "0.1 0.1 0.20 0.1 0.1 0.2";
//,
$SW::Info[","] = "2 0.30"; //Pieces,Space
$SW::Sizes[",",0] = "0.1 0.1 0.20 0.1 0.1 0.2";
$SW::Sizes[",",1] = "0.1 0.0 0.2 0.1 0.05 0.05";
//:
$SW::Info[":"] = "2 0.30"; //Pieces,Space
$SW::Sizes[":",0] = "0.1 0.2 0.20 0.2 0.1 0.3";
$SW::Sizes[":",1] = "0.1 0.5 0.20 0.5 0.1 0.6";
//;
$SW::Info[";"] = "3 0.30"; //Pieces,Space
$SW::Sizes[";",0] = "0.1 0.2 0.20 0.2 0.1 0.3";
$SW::Sizes[";",1] = "0.1 0.1 0.2 0.2 0.05 0.15";
$SW::Sizes[";",2] = "0.1 0.5 0.20 0.5 0.1 0.6";
//!
$SW::Info["!"] = "2 0.35"; //Pieces,Space
$SW::Sizes["!",0] = "0.15 0.2 0.25 0.2 0.15 0.8";
$SW::Sizes["!",1] = "0.15 0.0 0.25 0.0 0.15 0.1";
//?
$SW::Info["?"] = "6 0.65"; //Pieces,Space
$SW::Sizes["?",0] = "0.2 0.7 0.5 0.7 0.2 0.8";
$SW::Sizes["?",1] = "0.15 0.65 0.25 0.65 0.15 0.75";
$SW::Sizes["?",2] = "0.45 0.5 0.55 0.5 0.45 0.75";
$SW::Sizes["?",3] = "0.35 0.25 0.55 0.5 0.27 0.33";
$SW::Sizes["?",4] = "0.25 0.2 0.35 0.2 0.25 0.3";
$SW::Sizes["?",5] = "0.25 0.0 0.35 0.0 0.25 0.1";
//#
$SW::Info["#"] = "4 0.55"; //Pieces,Space
$SW::Sizes["#",0] = "0.15 0.15 0.20 0.15 0.15 0.7";
$SW::Sizes["#",1] = "0.25 0.15 0.30 0.15 0.25 0.7";
$SW::Sizes["#",2] = "0.05 0.30 0.40 0.30 0.05 0.35";
$SW::Sizes["#",3] = "0.05 0.50 0.40 0.50 0.05 0.55";
//$
$SW::Info["$"] = "6 0.7"; //Pieces,Space
$SW::Sizes["$",0] = "0.2 0.65 0.55 0.65 0.2 0.75";
$SW::Sizes["$",1] = "0.15 0.40 0.25 0.40 0.15 0.7";
$SW::Sizes["$",2] = "0.2 0.40 0.55 0.30 0.27 0.47";
$SW::Sizes["$",3] = "0.5 0.10 0.60 0.1 0.50 0.40";
$SW::Sizes["$",4] = "0.2 0.05 0.55 0.05 0.25 0.15";
$SW::Sizes["$",5] = "0.325 0.0 0.425 0.0 0.325 0.80";
//%
$SW::Info["%"] = "3 0.6"; //Pieces,Space
$SW::Sizes["%",0] = "0.4 0.1 0.5 0.0 0.5 0.2";
$SW::Sizes["%",1] = "0.1 0.0 0.6 0.8 0.03 0.07";
$SW::Sizes["%",2] = "0.0 0.75 0.1 0.65 0.1 0.85";
//&
$SW::Info["&"] = "6 0.7"; //Pieces,Space
$SW::Sizes["&",0] = "0.5 0.0 0.6 0.5 0.48 0.05";
$SW::Sizes["&",1] = "0.1 0.0 0.5 0.0 0.1 0.1";
$SW::Sizes["&",2] = "0.05 0.05 0.15 0.05 0.05 0.25";
$SW::Sizes["&",3] = "0.1 0.20 0.55 0.65 0.05 0.25";
$SW::Sizes["&",4] = "0.45 0.75 0.55 0.65 0.50 0.80";
$SW::Sizes["&",5] = "0.25 0.55 0.60 0.60 0.20 0.70";
//Hooks
//( ) [ ] { } < >
//(
$SW::Info["("] = "3 0.45"; //Pieces,Space
$SW::Sizes["(",0] = "0.155 0.45 0.4 0.75 0.105 0.50";
$SW::Sizes["(",1] = "0.1 0.3 0.2 0.3 0.1 0.5";
$SW::Sizes["(",2] = "0.1 0.3 0.35 0.0 0.15 0.35";
//)
$SW::Info[")"] = "3 0.4"; //Pieces,Space
$SW::Sizes[")",0] = "0.0 0.75 0.24 0.46 0.05 0.8";
$SW::Sizes[")",1] = "0.2 0.3 0.3 0.3 0.2 0.5";
$SW::Sizes[")",2] = "0.05 0.0 0.3 0.3 0.0 0.05";
//[
$SW::Info["["] = "3 0.4"; //Pieces,Space
$SW::Sizes["[",0] = "0.0 0.7 0.3 0.7 0.0 0.8";
$SW::Sizes["[",1] = "0.0 0.1 0.1 0.1 0.0 0.7";
$SW::Sizes["[",2] = "0.0 0.0 0.3 0.0 0.0 0.1";
//]
$SW::Info["]"] = "3 0.4"; //Pieces,Space
$SW::Sizes["]",0] = "0.0 0.7 0.3 0.7 0.0 0.8";
$SW::Sizes["]",1] = "0.2 0.1 0.3 0.1 0.2 0.7";
$SW::Sizes["]",2] = "0.0 0.0 0.3 0.0 0.0 0.1";
//{
$SW::Info["{"] = "4 0.4"; //Pieces,Space
$SW::Sizes["{",0] = "0.15 0.7 0.4 0.7 0.15 0.8";
$SW::Sizes["{",1] = "0.1 0.1 0.2 0.1 0.1 0.7";
$SW::Sizes["{",2] = "0.15 0.0 0.4 0.0 0.15 0.1";
$SW::Sizes["{",3] = "0.0 0.35 0.1 0.35 0.0 0.45";
//}
$SW::Info["}"] = "4 0.4"; //Pieces,Space
$SW::Sizes["}",0] = "0.0 0.7 0.25 0.7 0.0 0.8";
$SW::Sizes["}",1] = "0.2 0.1 0.3 0.1 0.2 0.7";
$SW::Sizes["}",2] = "0.0 0.0 0.25 0.0 0.0 0.1";
$SW::Sizes["}",3] = "0.3 0.35 0.4 0.35 0.3 0.45";
//<
$SW::Info["<"] = "2 0.45"; //Pieces,Space
$SW::Sizes["<",0] = "0.155 0.35 0.4 0.65 0.105 0.40";
$SW::Sizes["<",1] = "0.1 0.4 0.35 0.1 0.15 0.45";
//>
$SW::Info[">"] = "2 0.6"; //Pieces,Space
$SW::Sizes[">",0] = "0.0 0.65 0.24 0.36 0.05 0.7";
$SW::Sizes[">",1] = "0.05 0.1 0.3 0.4 0.0 0.15";
//Lines
// = _ - |
//=
$SW::Info["="] = "2 0.45"; //Pieces,Space
$SW::Sizes["=",0] = "0.05 0.25 0.40 0.25 0.05 0.35";
$SW::Sizes["=",1] = "0.05 0.50 0.40 0.50 0.05 0.60";
//-
$SW::Info["-"] = "1 0.45"; //Pieces,Space
$SW::Sizes["-",0] = "0.05 0.35 0.40 0.35 0.05 0.45";
//_
$SW::Info["_"] = "1 0.45"; //Pieces,Space
$SW::Sizes["_",0] = "0.05 0.05 0.40 0.05 0.05 0.15";
//|
$SW::Info["|"] = "1 0.40"; //Pieces,Space
$SW::Sizes["|",0] = "0.15 0.0 0.25 0.0 0.15 0.8";
//Space
$SW::Info["sp"] = "0 0.5"; //Pieces,Space
//Capital Letters
//T
$SW::Info["+t"] = "2 1"; //Pieces,Space
$SW::Sizes["+t",0] = "0 0.8 1 0.8 0 1";
$SW::Sizes["+t",1] = "0.4 0 0.6 0 0.4 0.8";
$SW::Thickness = 0.1;
function GameConnection::skyWrite(%cl,%word,%dist,%scale,%center,%upright,%angle,%mirror) {
if (%word $= "")
return;
if (%dist $= "" || %dist == 0)
%dist = 50;
if (%scale $= "" || %scale == 0)
%scale = 5;
%word = SW_goodWord(%word);
%obj = %cl.player;
%pos = %obj.getEyepoint();
%dir = %obj.getEyeVector();
%location = vectorAdd(%pos,vectorScale(%dir,%dist));
if (%upright)
%dir = vectorNormalize(getWords(%dir,0,1));
if (%mirror)
%dir = vectorScale(%dir,-1);
SW_word(%word,%location,%dir,%scale,%center,%cl,%angle);
}
function SW_word(%word,%pos,%nrm,%scale,%center,%cl,%angle) {
%cl.lastword++;
%z = vectorNormalize(%nrm);
%tx = vectorCross(%nrm,"0 0 1");
%up = vectorAdd(vectorScale("0 0 1",mCos(mDegToRad(%angle))),vectorScale(%tx,mSin(mDegToRad(%angle))));
%x = vectorCross(%nrm,%up);
if (%center) {
for (%td = 0; %td < getWordCount(%word);%td++) {
%letter = getWord(%word,%td);
%space = %space + getWord($SW::Info[%letter],1) * %scale;
}
%space = %space * -0.5;
%pos = vectorAdd(%pos,vectorScale(%up,-0.5 * %scale));
}
for (%td = 0; %td < getWordCount(%word);%td++) {
%letter = getWord(%word,%td);
SW_letter(%letter,vectorAdd(%pos,vectorScale(%x,%space)),%nrm,%scale,%cl,%angle);
%space = %space + getWord($SW::Info[%letter],1) * %scale;
}
}
function SW_letter(%letter,%pos,%nrm,%scale,%cl,%angle) {
%z = vectorNormalize(%nrm);
%tx = vectorCross(%nrm,"0 0 1");
%up = vectorAdd(vectorScale("0 0 1",mCos(mDegToRad(%angle))),vectorScale(%tx,mSin(mDegToRad(%angle))));
%x = vectorCross(%nrm,%up);
%y = vectorCross(%x,%nrm);
%matrix = %x SPC %y SPC %z;
%pieces = getWord($SW::Info[%letter],0);
for (%td = 0; %td < %pieces;%td++) {
%obj = SW_letterPart(%letter,%td,%pos,%matrix,%scale);
%obj.textGroup(%cl,%cl.lastword);
%obj.team = %cl.team;
%obj.needsFit = 1;
// commented out. Can easily remove writing with "remove orphaned pieces", even if client is no longer in game
// %obj.setOwner(0,%cl);
}
}
function SW_letterPart(%letter,%part,%pos,%matrix,%scale) {
%partInfo = $SW::Sizes[%letter,%part];
%p1 = SW_goodSquare(%partInfo);
%pos1 = vectorScale(matrixMult(getWords(%p1,0,1) SPC "0",%matrix),%scale);
%vecx1 = vectorScale(matrixMult(getWords(%p1,2,3) SPC "0",%matrix),%scale);
%vecy1 = vectorScale(matrixMult(getWords(%p1,4,5) SPC "0",%matrix),%scale);
%vecz1 = vectorScale(getWords(%matrix,6,8),%scale * $SW::Thickness);
%obj = SW_bar(vectorAdd(%pos,%pos1),%vecx1,%vecy1,%vecz1);
return %obj;
}
function SW_goodSquare(%p) {
%pos = getWords(%p,0,1);
%x = getWords(%p,2,3);
%y = getWords(%p,4,5);
return %pos SPC getWords(VectorSub(%x,%pos),0,1) SPC getWords(VectorSub(%y,%pos),0,1);
}
function SW_goodWord(%word) {
%id = 0;
while (%id < strLen(%word)) {
%letter = getSubStr(%word,%id,1);
if (%letter $= "" || %letter $= "/" || %letter $= "+") {
%letter = getSubStr(%word,%id,2);
%id++;
}
if (%letter $= " ")
%letter = "sp";
%id++;
if (%goodWord !$= "")
%goodWord = %goodWord SPC %letter;
else
%goodWord = %letter;
}
return %goodWord;
}
//Creates the actual beam
function SW_bar(%pos,%fo,%ri,%up) {
%size = vectorLen(%fo) SPC vectorLen(%ri) SPC vectorLen(%up);
%rot = fullRot(%up,%fo);
%obj = new StaticShape() {
dataBlock = DeployedSpine;
};
// %obj = new ForceFieldBare() {
// datablock = DeployedForceField1;
// };
%obj.setRealSize(%size);
%obj.setRotation(%rot);
%pos = microAdjust(%pos);
%obj.setEdge(%pos,"-1 1 -1");
return %obj;
}
///Grouping
function GameBase::textGroup(%obj,%cl,%word) {
%subGroup = %cl @ "/" @ %word;
%group = nameToID("MissionCleanup/textGroup/" @ %subgroup);
if (%group <= 0) {
%group = new SimGroup(%word);
addToClientTextGroup(%group,%cl);
}
%group.add(%obj);
}
function addToClientTextGroup(%obj,%cl) {
%group = nameToID("MissionCleanup/textGroup/"@ %cl);
if (%group <= 0) {
%group = new SimGroup(%cl);
addToTextGroup(%group);
}
%group.add(%obj);
}
function addToTextGroup(%obj) {
%group = nameToID("MissionCleanup/textGroup");
if (%group <= 0) {
%group = new SimGroup("textGroup");
MissionCleanup.add(%group);
}
%group.add(%obj);
}
function getLatestGroup(%group) {
%count = %group.getCount();
return %group.getObject(%count - 1);
}
function GameConnection::removeLastWord(%cl) {
%group = nameToID("MissionCleanup/textGroup/" @ %cl);
%lastWord = getLatestGroup(%group);
if (isObject(%lastWord))
%lastWord.delete();
}
function GameConnection::removeWords(%cl) {
%group = nameToID("MissionCleanup/textGroup/" @ %cl);
if (isObject(%group))
%group.delete();
}

View file

@ -0,0 +1,377 @@
//
// terSupport.cs
// Server support functions
$terSupport::Version = 0.98;
// ========================================================================== //
// | | //
// | CONSOLE MESSAGE HANDLERS | //
// | | //
// ========================================================================== //
//
// TS_DEBUG()
// If in debug mode, print a message to the console
function TS_DEBUG( %text )
{
%output = "Debug: " @ %text;
if ( $terSupport::Debug )
echo( %output );
}
//
// TS_INFO()
// Show a message in the console
function TS_INFO( %text )
{
echo( %text );
}
//
// TS_ERROR()
// Print an error message to the console
// If in debug mode also show the message ingame
function TS_ERROR( %text )
{
%output = "ERROR: " @ %text;
echo( %output );
if ( $terSupport::Debug && $ServerGroup !$= "" )
messageAll( 0, %output );
}
//
// tsCopyTextFile()
// Copy a text file (file copy isn't built in?)
function tsCopyTextFile( %srcFilename, %destFilename )
{
%srcFile = new FileObject();
%destFile = new FileObject();
if ( %srcFile.openForRead( %srcFilename )
&& %destFile.openForWrite( %destFilename ) )
{
while ( !%srcFile.isEOF() )
%destFile.writeLine( %srcFile.readLine() );
%srcFile.close();
%destFile.close();
}
else
return false;
return true;
}
// ========================================================================== //
// | | //
// | TEAM SUPPORT FUNCTIONS | //
// | | //
// ========================================================================== //
//
// tsTeamCount()
// Return the number of teams, not including observer (zero)
function tsTeamCount()
{
return Game.numTeams;
}
//
// tsPlayerCount()
// Return the total number of players
function tsPlayerCount()
{
return ClientGroup.getCount();
}
//
// tsPlayerCountTeam()
// Return the number of players on a team
function tsPlayerCountTeam( %teamindex )
{
%count = 0;
%lim = ClientGroup.getCount();
for ( %i = 0; %i < %lim; %i++ )
{
%client = ClientGroup.getObject( %i );
if ( %client.team == %teamindex )
%count++;
}
return %count;
}
//
// tsPlayerCountExceptTeam()
// Return the number of players except those on team %teamindex
// ( usually %teamindex = 0 )
function tsPlayerCountExceptTeam( %teamindex )
{
%count = 0;
%lim = ClientGroup.getCount();
for ( %i = 0; %i < %lim; %i++ )
{
%client = ClientGroup.getObject( %i );
if ( %client.team != %teamindex )
%count++;
}
return %count;
}
//
// tsGetLargestTeamPlayerCount()
// Return the number of players on the largest team
function tsGetLargestTeamPlayerCount()
{
%largestCount = 0;
for( %i = 1; %i < (Game.numTeams + 1); %i++ )
{
%thisCount = tsPlayerCountTeam( %i );
if ( %thisCount > %largestCount )
%largestCount = %thisCount;
}
//TS_DEBUG( "largest team player count = "@%largestCount );
return %largestCount;
}
// ========================================================================== //
// | | //
// | SERVER COMMAND SUPPORT | //
// | | //
// ========================================================================== //
//
// tsCheckCommandSpam()
// Return true if client is blocked from issuing a command because
// they have executed one too recently - else return false
function tsCheckCommandSpam( %client, %time )
{
if ( %time $= "" )
%time = 5;
// If the client executed a command in the last %time seconds they can't run another
if ( getSimTime() - %client.tsLastCommandTime < %time * 1000 )
return true;
// Record the time of this command
%client.tsLastCommandTime = getSimTime();
}
//
// serverCmdSetJoinPassword()
// Changes the password required to join the server
function serverCmdSetJoinPassword( %client, %newPassword )
{
if ( %client.isSuperAdmin )
{
messageAll( 0, "\c2"@%client.nameBase@" changed the server join password." );
TS_INFO( %client.nameBase@" changed the server join password to "@%newPassword );
$Host::Password = %newPassword;
}
else
messageClient( %client, 0, "\c2You must be a super admin to use that command." );
}
//
// serverCmdTogglePlayerMute()
// Called to mute or unmute another client
//
// Changes from base:
// Now notifies the target that they're being muted or unmuted
// Has flood protection
function serverCmdTogglePlayerMute( %client, %who )
{
%notifyTarget = true;
if ( tsCheckCommandSpam( %client, 12 ) )
%notifyTarget = false;
if (%client.muted[%who])
{
%client.muted[%who] = false;
messageClient(%client, 'MsgPlayerMuted', '%1 has been unmuted.', %who.name, %who, false);
if ( %notifyTarget )
messageClient( %who, 'MsgTSYouWereMuted', %client.nameBase@" has unmuted you.", %client.name, %client, false );
}
else
{
%client.muted[%who] = true;
messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name, %who, true);
if ( %notifyTarget )
messageClient( %who, 'MsgTSYouWereMuted', %client.nameBase@" has muted you.", %client.name, %client, true );
}
}
// ========================================================================== //
// | | //
// | MESSAGING SUPPORT | //
// | | //
// ========================================================================== //
//
// New center and bottom print routines
function tsCenterPrintTeam( %team, %message, %time, %lines )
{
if ( %lines $= "" || ((%lines > 3) || (%lines < 1)) )
%lines = 1;
%clCount = ClientGroup.getCount();
for ( %i = 0; %i < %clCount; %i++ )
{
%client = ClientGroup.getObject( %i );
if ( !%client.isAIControlled() && %client.team == %team )
commandToClient( %client, 'centerPrint', %message, %time, %lines );
}
}
function tsCenterPrintExceptTeam( %excludeTeam, %message, %time, %lines )
{
if ( %lines $= "" || ((%lines > 3) || (%lines < 1)) )
%lines = 1;
%clCount = ClientGroup.getCount();
for ( %i = 0; %i < %clCount; %i++ )
{
%client = ClientGroup.getObject( %i );
if ( !%client.isAIControlled() && %client.team != %excludeTeam )
commandToClient( %client, 'centerPrint', %message, %time, %lines );
}
}
function tsBottomPrintTeam( %team, %message, %time, %lines )
{
if( %lines $= "" || ((%lines > 3) || (%lines < 1)) )
%lines = 1;
%count = ClientGroup.getCount();
for (%i = 0; %i < %count; %i++)
{
%cl = ClientGroup.getObject(%i);
if( !%cl.isAIControlled() && %cl.team == %team )
commandToClient( %cl, 'bottomPrint', %message, %time, %lines );
}
}
function tsClearCenterPrintTeam( %team )
{
%count = ClientGroup.getCount();
for (%i = 0; %i < %count; %i++)
{
%cl = ClientGroup.getObject(%i);
if( !%cl.isAIControlled() && %cl.team == %team )
commandToClient( %cl, 'ClearCenterPrint');
}
}
function tsClearBottomPrintTeam( %team )
{
%count = ClientGroup.getCount();
for (%i = 0; %i < %count; %i++)
{
%cl = ClientGroup.getObject(%i);
if( !%cl.isAIControlled() && %cl.team == %team )
commandToClient( %cl, 'ClearBottomPrint');
}
}
function tsClearAllPrintsAll()
{
%count = ClientGroup.getCount();
for (%i = 0; %i < %count; %i++)
{
%cl = ClientGroup.getObject(%i);
if( !%cl.isAIControlled() )
{
commandToClient( %cl, 'ClearCenterPrint');
commandToClient( %cl, 'ClearBottomPrint');
}
}
}
function tsClearAllPrintsTeam( %team )
{
%count = ClientGroup.getCount();
for (%i = 0; %i < %count; %i++)
{
%cl = ClientGroup.getObject(%i);
if( !%cl.isAIControlled() && %cl.team == %team )
{
commandToClient( %cl, 'ClearCenterPrint');
commandToClient( %cl, 'ClearBottomPrint');
}
}
}
//
// New chat message routines
function tsMessageExceptTeam( %excludeTeam, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13 )
{
%clCount = ClientGroup.getCount();
for ( %i= 0; %i < %clCount; %i++ )
{
%recipient = ClientGroup.getObject( %i );
if ( %recipient.team != %excludeTeam )
messageClient( %recipient, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10, %a11, %a12, %a13 );
}
}
//
// tsMOTD()
// Show a message of the day
function tsMOTD( %client, %MOTDtext, %MOTDlines, %MOTDtime )
{
if ( %client.tsMOTD $= "" )
{
centerPrint( %client, %MOTDtext, %MOTDtime, %MOTDlines );
%client.tsMOTD = true;
}
}

View file

@ -0,0 +1,238 @@
// TruPhysics engine v0.6 - physics engine by DynaBlade
// Mainly used for vehicles but can be expanded.
// String Table
$TruPhysics::Enabled = true;
$TruPhysics::maxVelocity = 1500; // 1500 m/s or about 5400 KPH, T2's universal speed limit
function capVelocity(%vel)
{
if(velToSingle(%vel) > $TruPhysics::maxVelocity)
return $TruPhysics::maxVelocity;
else
return mFloor(%vel);
}
function VehicleData::onCollision(%data,%obj,%col,%mod,%pos,%normal)
{
if(%data.disablePhysics || !$TruPhysics::Enabled) // !enabled = default vehicle physics, local or global scope
return;
%className = %data.className;
if(%col.isPlayer()) // player is dead and wants to be run over / annihilated.
{
%mass = -0.25 * %col.getMass();
%vec = vectorScale(vectorScale(%col.getVelocity(), 0.25), %mass);
%obj.applyImpulse(%col.getPosition(), %vec);
}
else if(%col.isVehicle()) // phreakynasty!
{
if(%col.getDamageState() $= "Destroyed") // nothing to collide with here, get back to movement!
return;
%AMass = %obj.getMass();
%AiVec = vectorScale(%obj.getVelocity(), %mass);
%APos = vectorNormalize(%obj.getForwardVector());
%BMass = %obj.getMass();
%BiVec = vectorScale(%obj.getVelocity(), %mass);
%BPos = vectorNormalize(%obj.getForwardVector());
%obj.applyImpulse(%BPos, %BiVec);
%col.applyImpulse(%APos, %AiVec);
}
}
function checkWaterPhysics(%obj)
{
if(%obj.isWet)
{
// water absorbs about 75% of your velocity when you hit it.
%mass = %obj.getMass() * 0.75;
%iVec = vectorScale(%obj.getVelocity(), %mass);
%obj.applyImpulse(%obj.getTransform(), %iVec);
// speed tolerance checking (in KPH)
%mass = %obj.getMass();
%pct = %obj.getDamagePct() / 4;
%max = %pct * (%data.minDrag * 10);
%maxSpeed = %max - (%mass / getRandom(10, 12));
%vel = msToKPH(velToSingle(%obj.getVelocity()));
if(%maxSpeed > %vel)
%obj.getDatablock().damageObject(%obj, 0, "0 0 0", %maxSpeed - %vel, $DamageType::Default);
schedule(100, %obj, "checkWaterPhysics", %obj);
}
}
function VehicleData::onEnterLiquid(%data, %obj, %coverage, %type)
{
if(!%data.disableWaterPhysics && $TruPhysics::Enabled)
{
%obj.isWet = true;
checkWaterPhysics(%obj);
}
switch(%type)
{
case 0:
//Water
%obj.setHeat(0.0);
case 1:
//Ocean Water
%obj.setHeat(0.0);
case 2:
//River Water
%obj.setHeat(0.0);
case 3:
//Stagnant Water
%obj.setHeat(0.0);
case 4:
//Lava
%obj.liquidDamage(%data, $VehicleDamageLava, $DamageType::Lava);
case 5:
//Hot Lava
%obj.liquidDamage(%data, $VehicleDamageHotLava, $DamageType::Lava);
case 6:
//Crusty Lava
%obj.liquidDamage(%data, $VehicleDamageCrustyLava, $DamageType::Lava);
case 7:
//Quick Sand
}
}
function VehicleData::onLeaveLiquid(%data, %obj, %type)
{
%obj.isWet = false;
// exiting from the water becomes easier if your engines are on... speed doubles?
if(!%data.disableWaterPhysics && $TruPhysics::Enabled)
{
%mass = %obj.getMass() * 0.375;
%iVec = capVel(vectorScale(%obj.getVelocity(), %mass));
%obj.applyImpulse(%obj.getTransform(), %iVec);
}
switch(%type)
{
case 0:
//Water
%obj.setHeat(1.0);
case 1:
//Ocean Water
%obj.setHeat(1.0);
case 2:
//River Water
%obj.setHeat(1.0);
case 3:
//Stagnant Water
%obj.setHeat(1.0);
case 4:
//Lava
case 5:
//Hot Lava
case 6:
//Crusty Lava
case 7:
//Quick Sand
}
if(%obj.lDamageSchedule !$= "")
{
cancel(%obj.lDamageSchedule);
%obj.lDamageSchedule = "";
}
}
datablock AudioProfile(EngineAlertSound)
{
filename = "gui/vote_nopass.WAV";
description = AudioExplosion3d;
preload = true;
};
function VDUndo(%obj)
{
%obj.vdOverride = false;
%obj.dmgApplyImp = false;
}
function vDmgApplyImpulse(%obj)
{
if(%obj.getDatablock().forceSensitive)
return;
%obj.dmgApplyImp = true;
%lastPct = %obj.lastDmgPct;
%pct = %obj.getDamagePct();
if(%lastPct > %pct)
{
%obj.vdOverride = true;
schedule(1000, 0, "VDUndo", %obj);
}
%obj.tp_sndCnt++;
if(((%pct >= 0.5 && %pct < 1) && (%obj.vdOverride == false || %obj.vdOverride == "")) && %obj.augType !$= "Auto Repair Bot")
{
%force = (%pct * 500) * getRandom(1);
if(%force)
{
%va = getRandom(1) ? getRandom() * -1 : getRandom();
%vb = getRandom(1) ? getRandom() * -1 : getRandom();
%vc = getRandom(1) ? getRandom() * -1 : getRandom();
%vec = %va SPC %vb SPC %vc;
%nVec = vectorScale(%vec, %force);
%seed = getRandom(100);
if(%seed > 60 && %seed < 90)
%obj.playThread(0, "maintainback");
else if(%seed > 90)
%obj.playThread(0, "maintainbot");
else
%obj.playThread(0, "activateback");
%obj.applyImpulse(%obj.getTransform(), %nVec);
}
%obj.lastDmgPct = %pct;
schedule(250, %obj, "vDmgApplyImpulse", %obj);
if(%obj.tp_sndCnt >= 4)
{
%obj.tp_sndCnt = 0;
%obj.play3D(EngineAlertSound);
}
}
else
%obj.stopThread(0);
}
function VehicleData::onDamage(%this,%obj)
{
%damage = %obj.getDamageLevel();
if (%damage >= %this.destroyedLevel)
{
if(%obj.getDamageState() !$= "Destroyed")
{
if(%obj.respawnTime !$= "")
%obj.marker.schedule = %obj.marker.data.schedule(%obj.respawnTime, "respawn", %obj.marker);
%obj.setDamageState(Destroyed);
}
}
else
{
if(%obj.getDamageState() !$= "Enabled")
%obj.setDamageState(Enabled);
%pct = %obj.getDamagePct();
if(%pct >= 0.6 && !%obj.dmgApplyImp)
vDmgApplyImpulse(%obj);
}
}