mirror of
https://github.com/ChocoTaco1/zDiscord-Map-Pack.git
synced 2026-02-13 03:33:36 +00:00
Initial 4.5 commit
This commit is contained in:
commit
96f73b3aef
1166 changed files with 107707 additions and 0 deletions
157
scripts/CreativityGame.cs
Normal file
157
scripts/CreativityGame.cs
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
// Red Shifter's Creativity Limiters for Tribes 2
|
||||
// "With constraints come creativity." -HiRezTodd
|
||||
// The reverse is also true. If you limit creativity, you limit constraints. So here's a bunch of stupid shit.
|
||||
|
||||
// Version 0.1.1 contains these Creativity Limiters:
|
||||
// 1. Creativity Pad (T:V style jump pad)
|
||||
|
||||
//-------------------------------
|
||||
// EXTENSION 1: CREATIVITY PAD
|
||||
//-------------------------------
|
||||
// teamCheck - Only the team that controls the pad can use it
|
||||
// powerCheck - Power will be required to use the pad
|
||||
// minSpeed - Minimum horizontal speed that you will have upon using the pad
|
||||
// maxSpeed - Maximum horizontal speed that you will have upon using the pad (you will not lose speed if you're going over the limit)
|
||||
// factor - The horizontal multipler you gain upon hitting the pad (default: 1.3)
|
||||
// jumpPower - The amount of vertical speed applied by the pad (default: 50)
|
||||
// this isn't clearly ripped from TR2
|
||||
|
||||
package jumpPad{
|
||||
function Armor::onImpact(%data, %playerObject, %collidedObject, %vec, %vecLen){
|
||||
if(%collidedObject.getDataBlock().getName() !$= "CreativityPad"){
|
||||
parent::onImpact(%data, %playerObject, %collidedObject, %vec, %vecLen);
|
||||
}
|
||||
}
|
||||
};
|
||||
if(!isActivePackage(jumpPad))
|
||||
activatePackage(jumpPad);
|
||||
|
||||
datablock AudioProfile(CreativityPadSound)
|
||||
{
|
||||
volume = 1.0;
|
||||
filename = "fx/misc/launcher.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock StaticShapeData(CreativityPad)
|
||||
{
|
||||
catagory = "Creativity Limiters";
|
||||
className = "Creativity Pad";
|
||||
isInvincible = true;
|
||||
needsNoPower = true;
|
||||
alwaysAmbient = true;
|
||||
shapeFile = "station_teleport.dts";
|
||||
soundEffect = CreativityPadSound;
|
||||
};
|
||||
|
||||
function CreativityPad::onCollision(%this, %obj, %col) {
|
||||
// make sure a living player hit the pad
|
||||
if( %col.getClassName() !$= "Player" ) return;
|
||||
if( %col.getState() $= "Dead" ) return;
|
||||
|
||||
// make sure we're the right team, if this a team-based object
|
||||
if( %obj.teamCheck == 1 && %obj.team != %col.team ) {
|
||||
messageClient(%col.client, 'msgStationDenied', '\c2Access Denied -- Wrong team.~wfx/powered/station_denied.wav');
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure we have power, if this a power-based object
|
||||
if( %obj.powerCheck == 1 && !%obj.isPowered() ) {
|
||||
messageClient(%col.client, 'msgStationNoPower', '\c2Station is not powered.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// get player velocity
|
||||
%oldVel = %col.getVelocity();
|
||||
%x = getWord(%oldVel,0);
|
||||
%y = getWord(%oldVel,1);
|
||||
%z = getWord(%oldVel,2);
|
||||
|
||||
// test change
|
||||
//%col.setVelocity(VectorScale(VectorNormalize(%horizonVector), 1000 / 3.6));
|
||||
|
||||
// see if we customized the factor value
|
||||
if( %obj.factor !$= "" ) {
|
||||
%defaultFactor = %obj.factor;
|
||||
}
|
||||
else {
|
||||
%defaultFactor = 1.3;
|
||||
}
|
||||
|
||||
// see if we have a maximum horizontal boost
|
||||
if( %obj.maxSpeed !$= "" ) {
|
||||
%originalSpeed = VectorLen(%x SPC %y SPC "0");
|
||||
%newSpeed = %originalSpeed * %defaultFactor;
|
||||
%maxSpeed = %obj.maxSpeed / 3.6;
|
||||
|
||||
if( %originalSpeed > %maxSpeed ) {
|
||||
// don't reduce the player's speed
|
||||
%factor = 1.0;
|
||||
}
|
||||
else if( %newSpeed > %maxSpeed ) {
|
||||
// speed up the player to the listed max speed
|
||||
%factor = %maxSpeed / %originalSpeed;
|
||||
}
|
||||
else {
|
||||
// apply the maximum boost
|
||||
%factor = %defaultFactor;
|
||||
}
|
||||
}
|
||||
else {
|
||||
%factor = %defaultFactor;
|
||||
}
|
||||
|
||||
// make the changes to player velocity
|
||||
%x *= %factor;
|
||||
%y *= %factor;
|
||||
|
||||
// see if we have a minimum speed off the pad
|
||||
%currentSpeed = VectorLen(%x SPC %y SPC "0");
|
||||
if( %obj.minSpeed !$= "" && %currentSpeed < %obj.minSpeed / 3.6 ) {
|
||||
%newSpeed = VectorScale(VectorNormalize(%x SPC %y SPC "0"), %obj.minSpeed / 3.6);
|
||||
%x = getWord(%newSpeed,0);
|
||||
%y = getWord(%newSpeed,1);
|
||||
}
|
||||
|
||||
// add the jump power
|
||||
if( %obj.jumpPower !$= "" ) {
|
||||
%z = %obj.jumpPower;
|
||||
}
|
||||
else {
|
||||
%z = 50;
|
||||
}
|
||||
|
||||
// set the velocity
|
||||
%col.setVelocity(%x SPC %y SPC %z);
|
||||
|
||||
// play the effects
|
||||
%obj.playAudio(0, %this.soundEffect);
|
||||
|
||||
if( !%obj.activatedThread ) {
|
||||
%obj.activatedThread = 1;
|
||||
%obj.playThread($ActivateThread, "Activate");
|
||||
%obj.schedule(750, stopThread, $ActivateThread);
|
||||
schedule(800, 0, eval, %obj @ ".activatedThread = \"\";");
|
||||
}
|
||||
}
|
||||
|
||||
function CreativityPad::losePower(%this, %obj) {
|
||||
if( %obj.powerCheck == 1 && %obj.disabledThread == 0 ) {
|
||||
%obj.disabledThread = 1;
|
||||
%obj.playThread($PowerThread, "DAMAGE");
|
||||
}
|
||||
}
|
||||
function CreativityPad::gainPower(%this, %obj) {
|
||||
if( %obj.powerCheck == 1 && %obj.disabledThread == 1 ) {
|
||||
%obj.disabledThread = "";
|
||||
%obj.stopThread($PowerThread);
|
||||
}
|
||||
}
|
||||
|
||||
// anthem4admin
|
||||
function CreativityPad::onAdd(%this, %obj) {
|
||||
%obj.disabledThread = "";
|
||||
%obj.activatedThread = "";
|
||||
}
|
||||
254
scripts/HothFFsGame.cs
Normal file
254
scripts/HothFFsGame.cs
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
//These are the special screens used in the Hoth base
|
||||
|
||||
datablock ForceFieldBareData(display01)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/display04.png";
|
||||
texture[1] = "lush/special/display04.png";
|
||||
|
||||
framesPerSec = 0.0;
|
||||
numFrames = 1;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.125;
|
||||
vmapping = 0.24;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(display02)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/display05.png";
|
||||
texture[1] = "lush/special/display05.png";
|
||||
|
||||
framesPerSec = 0.0;
|
||||
numFrames = 1;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.125;
|
||||
vmapping = 0.24;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(display03)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/display06.png";
|
||||
texture[1] = "lush/special/display06.png";
|
||||
|
||||
framesPerSec = 0.0;
|
||||
numFrames = 1;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.125;
|
||||
vmapping = 0.24;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay04)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
|
||||
texture[0] = "lush/special/shot06.png";
|
||||
texture[1] = "lush/special/shot07.png";
|
||||
texture[2] = "lush/special/shot08.png";
|
||||
texture[3] = "lush/special/shot09.png";
|
||||
texture[4] = "lush/special/shot11.png";
|
||||
|
||||
framesPerSec = 1;
|
||||
numFrames = 5;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.4;
|
||||
vmapping = 0.6;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay05)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/shot01.png";
|
||||
texture[1] = "lush/special/shot02.png";
|
||||
texture[2] = "lush/special/shot03.png";
|
||||
texture[3] = "lush/special/shot04.png";
|
||||
texture[4] = "lush/special/shot05.png";
|
||||
|
||||
framesPerSec = 1;
|
||||
numFrames = 5;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.4;
|
||||
vmapping = 0.6;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay06)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/alien-01.png";
|
||||
texture[1] = "lush/special/alien-01.png";
|
||||
|
||||
framesPerSec = 0.0;
|
||||
numFrames = 1;
|
||||
scrollSpeed = 0.9;
|
||||
umapping = 0.12;
|
||||
vmapping = 0.24;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay07)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/shot01.png";
|
||||
texture[1] = "lush/special/shot02.png";
|
||||
texture[2] = "lush/special/shot03.png";
|
||||
texture[3] = "lush/special/shot11.png";
|
||||
texture[4] = "lush/special/shot09.png";
|
||||
|
||||
framesPerSec = 1;
|
||||
numFrames = 5;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.9;
|
||||
vmapping = 1.4;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay08)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/display07.png";
|
||||
texture[1] = "lush/special/display07.png";
|
||||
|
||||
framesPerSec = 0;
|
||||
numFrames = 2;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.127;
|
||||
vmapping = 0.26;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay09)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/display08.png";
|
||||
texture[1] = "lush/special/display08.png";
|
||||
|
||||
framesPerSec = 0;
|
||||
numFrames =2;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.127;
|
||||
vmapping = 0.26;
|
||||
};
|
||||
|
||||
datablock ForceFieldBareData(ffdisplay10)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "lush/special/display10.png";
|
||||
texture[1] = "lush/special/display10.png";
|
||||
|
||||
framesPerSec = 0;
|
||||
numFrames = 1;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.124;
|
||||
vmapping = 0.24;
|
||||
};
|
||||
|
||||
//Special
|
||||
datablock ForceFieldBareData(taco)
|
||||
{
|
||||
fadeMS = 3000;
|
||||
baseTranslucency = 1;
|
||||
powerOffTranslucency = 0.0;
|
||||
teamPermiable = false;
|
||||
otherPermiable = false;
|
||||
color = "1 1 1";
|
||||
powerOffColor = "0.0 0.0 0.0";
|
||||
targetNameTag = 'Force Field';
|
||||
targetTypeTag = 'ForceField';
|
||||
|
||||
texture[0] = "taco/taco.png";
|
||||
texture[1] = "taco/taco.png";
|
||||
|
||||
framesPerSec = 0.0;
|
||||
numFrames = 1;
|
||||
scrollSpeed = 0.0;
|
||||
umapping = 0.125;
|
||||
vmapping = 0.24;
|
||||
};
|
||||
370
scripts/TeleportGame.cs
Normal file
370
scripts/TeleportGame.cs
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
//teleport code by sparky
|
||||
//Reworked by DarkTiger
|
||||
datablock AudioProfile(TeleporterStart)
|
||||
{
|
||||
filename = "fx/misc/nexus_cap.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
|
||||
datablock StaticShapeData(Teleporter)
|
||||
{
|
||||
catagory = "Teleporters";
|
||||
shapefile = "nexusbase.dts";
|
||||
mass = 10;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
targetNameTag = '';
|
||||
targetTypeTag = 'Teleporter';
|
||||
//----------------------------------
|
||||
maxDamage = 1.00;
|
||||
destroyedLevel = 1.00;
|
||||
disabledLevel = 0.70;
|
||||
explosion = ShapeExplosion;
|
||||
expDmgRadius = 8.0;
|
||||
expDamage = 0.4;
|
||||
expImpulse = 1500.0;
|
||||
// don't allow this object to be damaged in non-team-based
|
||||
// mission types (DM, Rabbit, Bounty, Hunters)
|
||||
noIndividualDamage = true;
|
||||
|
||||
dynamicType = $TypeMasks::StationObjectType;
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 75;
|
||||
maxEnergy = 50;
|
||||
rechargeRate = 0.35;
|
||||
doesRepair = true;
|
||||
humSound = StationInventoryHumSound;
|
||||
|
||||
cmdCategory = "Support";
|
||||
cmdIcon = CMDStationIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_inventory_grey";
|
||||
|
||||
debrisShapeName = "debris_generic.dts";
|
||||
debris = StationDebris;
|
||||
//----------------------------------------
|
||||
};
|
||||
|
||||
//datablock Staticshapedata(teledestroyed) : teleporter
|
||||
//{
|
||||
//shapefile = "station_teleport.dts";
|
||||
//};
|
||||
|
||||
$playerreject = 6;
|
||||
function Teleporter::onDestroyed(%data, %obj, %prevState)
|
||||
{
|
||||
//set the animations
|
||||
%obj.playThread(1, "transition");
|
||||
%obj.setThreadDir(1, true);
|
||||
%obj.setDamageState(Destroyed);
|
||||
//%obj.setDatablock(teledestroyed);
|
||||
%obj.getDataBlock().onLosePowerDisabled(%obj);
|
||||
}
|
||||
|
||||
//---this is where I create the triggers and put them right over the nexus base's
|
||||
function teleporter::onEnabled(%data, %obj, %prevState)
|
||||
{
|
||||
%level = %obj.getdamagelevel();
|
||||
%obj.setdamagelevel(%level);
|
||||
if(%obj.ispowered())
|
||||
{
|
||||
%obj.playthread(1, "transition");
|
||||
%obj.setThreadDir(1, false);
|
||||
%obj.playThread(0, "ambient");
|
||||
%obj.setThreadDir(0, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
%obj.playThread(0, "transition");
|
||||
%obj.setThreadDir(0, false);
|
||||
}
|
||||
Parent::onEnabled(%data, %obj, %prevState);
|
||||
}
|
||||
|
||||
function Teleporter::gainPower(%data, %obj)
|
||||
{
|
||||
%obj.setDatablock(teleporter);
|
||||
Parent::gainPower(%data, %obj);
|
||||
%obj.playthread(1, "transition");
|
||||
%obj.setThreadDir(1, false);
|
||||
%obj.playThread(0, "ambient");
|
||||
%obj.setThreadDir(0, true);
|
||||
}
|
||||
|
||||
function Teleporter::losePower(%data, %obj)
|
||||
{
|
||||
%obj.playThread(0, "transition");
|
||||
%obj.setThreadDir(0, false);
|
||||
Parent::losePower(%data, %obj);
|
||||
}
|
||||
|
||||
//---this is where I create the triggers and put them right over the nexus base's
|
||||
function Teleporter::onAdd(%this, %tp)
|
||||
{
|
||||
Parent::onAdd(%this, %tp);
|
||||
if(!isObject(tpSimSet)){
|
||||
new simSet(tpSimSet);
|
||||
MissionCleanup.add(tpSimSet);
|
||||
}
|
||||
tpSimSet.add(%tp);
|
||||
|
||||
%trigger = new Trigger()
|
||||
{
|
||||
dataBlock = NewTeleportTrigger;
|
||||
polyhedron = "-0.75 0.75 0.1 1.5 0.0 0.0 0.0 -1.5 0.0 0.0 0.0 2.3";
|
||||
};
|
||||
|
||||
MissionCleanup.add(%trigger);
|
||||
if(%tp.noflag $= "")
|
||||
%tp.noflag = "0";
|
||||
if(%tp.oneway $= "")
|
||||
%tp.oneway = "0";
|
||||
if(%tp.linkID $= "")
|
||||
%tp.linkID = "0";
|
||||
if(%tp.linkTo $= "")
|
||||
%tp.linkTo = "0";
|
||||
%trigger.setTransform(%tp.getTransform());
|
||||
|
||||
%trigger.sourcebase = %tp;
|
||||
%tp.trigger = %trigger;
|
||||
|
||||
//--------------do we need power?-----------------------
|
||||
%tp.playThread(1, "ambient");
|
||||
%tp.playThread(0, "transition");
|
||||
%tp.playThread(0, "ambient");
|
||||
|
||||
%pos = %trigger.position;
|
||||
|
||||
if(%tp.waypoint !$= "")
|
||||
{
|
||||
%wp = new WayPoint()
|
||||
{
|
||||
scale = "1 1 1";
|
||||
nameTag = %tp.waypoint;
|
||||
dataBlock = "WayPointMarker";
|
||||
name = %tp.waypoint;
|
||||
};
|
||||
MissionCleanup.add(%wp);
|
||||
%wp.setTransform(%tp.getTransform());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
datablock TriggerData(NewTeleportTrigger)
|
||||
{
|
||||
tickPeriodMS = 100;
|
||||
};
|
||||
|
||||
//--------------teleporter code here------------------
|
||||
|
||||
function NewTeleportTrigger::onEnterTrigger(%data, %trigger, %player)
|
||||
{
|
||||
%colObj = %player;
|
||||
%client = %player.client;
|
||||
|
||||
if(%player.transported $= "1") // if this player was just transported
|
||||
{
|
||||
%player.transported = "0";
|
||||
%colObj.setMoveState(false);
|
||||
%trigger.player = %player;
|
||||
return; // then get out or it will never stop
|
||||
}
|
||||
|
||||
//--------------do we have power?-----------------------
|
||||
if(%trigger.sourcebase.ispowered() == 0){
|
||||
messageClient(%player.client, 'MsgClient', '\c0Teleporter is not powered.~wfx/powered/station_denied.wav');
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------disabled?-----------------------
|
||||
if(%trigger.sourcebase.isDisabled()){
|
||||
messageClient(%colObj.client, 'msgStationDisabled', '\c2Teleporter is disabled.~wfx/powered/station_denied.wav');
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------are we on the right team?-----------------------
|
||||
if(%player.team != %trigger.sourcebase.team){
|
||||
messageClient(%player.client, 'MsgClient', '\c0Wrong team.~wfx/powered/station_denied.wav');
|
||||
return;
|
||||
}
|
||||
|
||||
//------------are we teleporting?-----------------------
|
||||
if(isObject(%trigger.player)){
|
||||
messageClient(%player.client, 'MsgClient', '\c0Teleporter in use.~wfx/powered/station_denied.wav');
|
||||
return;
|
||||
}
|
||||
//-------------is this a oneway teleporter?------------------------
|
||||
if(%trigger.sourcebase.oneway == "1"){
|
||||
messageClient(%player.client, 'MsgLeaveMissionArea', '\c1This teleporter is oneway only.~wfx/powered/station_denied.wav');
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------are we teleporting with flag?----------------------------------------
|
||||
%flag = %player.holdingflag;
|
||||
if(%player.holdingFlag > 0){
|
||||
if(%trigger.sourcebase.noflag $= "1"){
|
||||
if(%flag.team == 1)
|
||||
%otherTeam = 2;
|
||||
else
|
||||
%otherTeam = 1;
|
||||
|
||||
game.flagReset(%player.holdingflag);
|
||||
messageTeam(%otherTeam, 'MsgCTFFlagReturned', '\c2 %1 tried to teleport with the %2 flag.~wfx/misc/flag_return.wav', %client.name, $teamName[%flag.team], %flag.team);
|
||||
messageTeam(%flag.team, 'MsgCTFFlagReturned', '\c2Your flag was returned.~wfx/misc/flag_return.wav', 0, 0, %flag.team);
|
||||
messageTeam(0, 'MsgCTFFlagReturned', '\c2The %2 flag was returned to base.~wfx/misc/flag_return.wav', 0, $teamName[%flag.team], %flag.team);
|
||||
}
|
||||
}
|
||||
%destList = getDestTele(%trigger.sourcebase,%player.client);
|
||||
|
||||
if(%destList != -1){
|
||||
%vc = 0;
|
||||
for(%x = 0; %x < getFieldCount(%destList); %x++){
|
||||
%targetObj = getField(%destList,%x);
|
||||
// make sure its not in use and its not destroyed and it has power
|
||||
if(!isObject(%targetObj.trigger.player) && %targetObj.isEnabled() && %targetObj.isPowered())
|
||||
%validTarget[%vc++] = %targetObj;
|
||||
else
|
||||
%inValidTarget[%ivc++] = %targetObj;
|
||||
|
||||
}
|
||||
if(!%vc){
|
||||
if(isObject(%inValidTarget[1].trigger.player))
|
||||
messageClient(%player.client, 'MsgClient', '\c0Destination teleporter in use.~wfx/powered/station_denied.wav');
|
||||
else if(!%inValidTarget[1].isEnabled())
|
||||
messageClient(%player.client, 'MsgClient', '\c0Destination teleporter is destroyed.~wfx/powered/station_denied.wav');
|
||||
else if(!%inValidTarget[1].isPowered())
|
||||
messageClient(%player.client, 'MsgClient', '\c0Destination teleporter lost power.~wfx/powered/station_denied.wav');
|
||||
else
|
||||
messageClient(%player.client, 'MsgClient', '\c0Destination teleporter in use, destroyed, or loss power.~wfx/powered/station_denied.wav');
|
||||
}
|
||||
else{
|
||||
%dest = %validTarget[getRandom(1,%vc)];
|
||||
serverPlay3D(TeleporterStart, %trigger.getTransform());
|
||||
messageClient(%player.client, 'MsgClient', '~wfx/misc/nexus_cap.wav');
|
||||
%player.transported = 1;
|
||||
%teleDest = vectorAdd(%dest.getPosition(),"0 0 0.5");
|
||||
teleporteffect(vectorAdd(%trigger.sourcebase.getPosition(),"0 0 0.5"));
|
||||
teleporteffect(%teleDest);
|
||||
%player.setmovestate(true);
|
||||
%player.setTransform(vectorAdd(%trigger.sourcebase.getPosition(),"0 0 0.5") SPC getWords(%player.getTransform(),3,6));
|
||||
%player.startfade(500,0,true);
|
||||
%player.schedule(500, "settransform", %teleDest SPC getWords(%player.getTransform(),3,6));
|
||||
%player.schedule(500, "startfade", 500, 0, false);
|
||||
%player.schedule(500, "setmovestate", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
messageClient(%player.client, 'MsgLeaveMissionArea', '\c1This teleporter has no destination.~wfx/misc/warning_beep.wav');
|
||||
}
|
||||
function getDestTele(%obj,%client){
|
||||
%idCount = getFieldCount(%obj.linkTo);
|
||||
if(!%idCount || %obj.team != %client.team)
|
||||
return -1;
|
||||
%count = 0;
|
||||
for(%i = 0; %i < tpSimSet.getCount(); %i++){
|
||||
%dest = tpSimSet.getObject(%i);
|
||||
if(%dest.team == %client.team && %dest != %obj){
|
||||
for(%a = 0; %a < getFieldCount(%dest.linkTo); %a++){
|
||||
%destID = getField(%dest.linkTo,%a);
|
||||
if(%obj.linkID == %destID){// see if it links back to us
|
||||
if(%count++ == 1)
|
||||
%teleList = %dest;
|
||||
else
|
||||
%teleList = %teleList TAB %dest;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(%count > 0){
|
||||
return %teleList;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
function NewTeleportTrigger::onleaveTrigger(%data, %trigger, %player){
|
||||
if(%player == %trigger.player){
|
||||
%trigger.player = 0;
|
||||
}
|
||||
if(!%player.transported){
|
||||
%player.tpWarn = 0;
|
||||
%player.tpTime = 0;
|
||||
%player.tpDmgTime = 0;
|
||||
}
|
||||
}
|
||||
function NewTeleportTrigger::onTickTrigger(%data, %trig){
|
||||
%player = %trig.player;
|
||||
if(isObject(%player)){
|
||||
if(%player.getState() $= "Dead"){
|
||||
%player.blowUp();
|
||||
%trig.player = 0;
|
||||
}
|
||||
else{
|
||||
if(%player.tpTime > 3000 && !%player.tpWarn){
|
||||
messageClient(%player.client, 'MsgLeaveMissionArea', '\c1Move off the teleporter or take damage.~wfx/misc/warning_beep.wav');
|
||||
%player.tpWarn = 1;
|
||||
}
|
||||
%player.tpTime += %data.tickPeriodMS;
|
||||
if(%player.tpTime > 3000){
|
||||
%player.tpDmgTime += %data.tickPeriodMS;
|
||||
if(%player.tpDmgTime > 1000){
|
||||
%player.setdamageflash(0.3);
|
||||
%player.damage(0, %player.getPosition(), 0.04, $DamageType::radiation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
%trig.player = 0;
|
||||
}
|
||||
|
||||
function teleporteffect(%position)
|
||||
{ %effect1 = new ParticleEmissionDummy()
|
||||
{
|
||||
position = %position;
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "doubleTimeEmissionDummy";
|
||||
emitter = "AABulletExplosionEmitter2";
|
||||
velocity = "1";
|
||||
};
|
||||
|
||||
%effect2 = new ParticleEmissionDummy()
|
||||
{
|
||||
position = getWord(%position,0) @ " " @ getWord(%position,1) @ " " @ getWord(%position,2) + 0.5;
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "doubleTimeEmissionDummy";
|
||||
emitter = "AABulletExplosionEmitter2";
|
||||
velocity = "1";
|
||||
};
|
||||
|
||||
%effect3 = new ParticleEmissionDummy()
|
||||
{
|
||||
position = getWord(%position,0) @ " " @ getWord(%position,1) @ " " @ getWord(%position,2) + 1;
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "doubleTimeEmissionDummy";
|
||||
emitter = "AABulletExplosionEmitter2";
|
||||
velocity = "1";
|
||||
};
|
||||
|
||||
%effect4 = new ParticleEmissionDummy()
|
||||
{
|
||||
position = getWord(%position,0) @ " " @ getWord(%position,1) @ " " @ getWord(%position,2) + 1.5;
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "doubleTimeEmissionDummy";
|
||||
emitter = "AABulletExplosionEmitter2";
|
||||
velocity = "1";
|
||||
};
|
||||
MissionCleanup.add(%effect1);
|
||||
MissionCleanup.add(%effect2);
|
||||
MissionCleanup.add(%effect3);
|
||||
MissionCleanup.add(%effect4);
|
||||
%effect1.schedule(2000, "delete");
|
||||
%effect2.schedule(2000, "delete");
|
||||
%effect3.schedule(2000, "delete");
|
||||
%effect4.schedule(2000, "delete");
|
||||
}
|
||||
30
scripts/autoexec/DefaultTurrets.cs
Normal file
30
scripts/autoexec/DefaultTurrets.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// DefaultTurrets.cs
|
||||
// Restore Default Turret count at the end of the match + MPB
|
||||
// Some maps in this map use non-default turret numbers
|
||||
|
||||
$DMP::indoorMinDef = $TeamDeployableMin[TurretIndoorDeployable];
|
||||
$DMP::outdoorMinDef = $TeamDeployableMin[TurretOutdoorDeployable];
|
||||
$DMP::indoorMaxDef = $TeamDeployableMax[TurretIndoorDeployable];
|
||||
$DMP::outdoorMaxDef = $TeamDeployableMax[TurretOutdoorDeployable];
|
||||
|
||||
$DMP::vehicleMPBMax = $VehicleMax[MobileBaseVehicle];
|
||||
|
||||
package turretDefaults
|
||||
{
|
||||
|
||||
function DefaultGame::gameOver( %game )
|
||||
{
|
||||
parent::gameOver(%game);
|
||||
|
||||
$TeamDeployableMin[TurretIndoorDeployable] = $DMP::indoorMinDef;
|
||||
$TeamDeployableMin[TurretOutdoorDeployable] = $DMP::outdoorMinDef;
|
||||
$TeamDeployableMax[TurretIndoorDeployable] = $DMP::indoorMaxDef;
|
||||
$TeamDeployableMax[TurretOutdoorDeployable] = $DMP::outdoorMaxDef;
|
||||
|
||||
$VehicleMax[MobileBaseVehicle] = $DMP::vehicleMPBMax;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if(!isActivePackage(turretDefaults))
|
||||
activatePackage(turretDefaults);
|
||||
22
scripts/autoexec/InvincibleInv.cs
Normal file
22
scripts/autoexec/InvincibleInv.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// For Small Crossing Inventorys
|
||||
// SimpleFlagArena also uses this
|
||||
// Grants Invinciblity
|
||||
|
||||
package InvincibleInv
|
||||
{
|
||||
|
||||
function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
|
||||
{
|
||||
%targetname = %targetObject.getDataBlock().getName();
|
||||
//Used on some maps to make invs invincible
|
||||
if( %targetObject.invincible && %targetname $= "StationInventory" )
|
||||
return;
|
||||
|
||||
parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//Prevent package from being activated if it is already
|
||||
if (!isActivePackage(InvincibleInv))
|
||||
activatePackage(InvincibleInv);
|
||||
32
scripts/autoexec/RegisterShapes.cs
Normal file
32
scripts/autoexec/RegisterShapes.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//Adds Custom Sjapesto the editor
|
||||
|
||||
package AddShapes
|
||||
{
|
||||
function Creator::init(%this){
|
||||
parent::init(%this);
|
||||
%staticBase = %this.addGroup(0, "Custom Objects");
|
||||
for (%i = 1; %i <= $CSObjCount; %i++) {
|
||||
echo("This: " SPC $CSObjects[%i]);
|
||||
echo(getWord($CSObjects[%i], 2));
|
||||
|
||||
%grp = %this.addGroup(%staticBase, getWord($CSObjects[%i], 0));
|
||||
echo("TSStatic::create(" @ getWord($CSObjects[%i], 2) @");");
|
||||
%this.addItem(%grp, getWord($CSObjects[%i], 1), "TSStatic::create(\"" @ getWord($CSObjects[%i], 2) @"\");");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!isActivePackage(AddShapes))
|
||||
activatePackage(AddShapes);
|
||||
|
||||
$CSObjects[$CSObjCount++] = "Organics BELgTree16Autumn borg16-autumn.dts 20 -3.0 0 0.8 1.5";
|
||||
$CSObjects[$CSObjCount++] = "Organics BELgTree19Autumn borg19-autumn.dts 20 -3.0 0 0.8 1.5";
|
||||
$CSObjects[$CSObjCount++] = "Organics PhoenixPlant1Dark porg1-dark.dts";
|
||||
|
||||
$CSObjects[$CSObjCount++] = "Misc VendingMachine vend.dts";
|
||||
|
||||
$CSObjects[$CSObjCount++] = "Misc GoonFlag rst-goonflag.dts";
|
||||
$CSObjects[$CSObjCount++] = "Misc TaoBook rst-taobook.dts";
|
||||
$CSObjects[$CSObjCount++] = "Misc TCMug rst-TCmug.dts";
|
||||
$CSObjects[$CSObjCount++] = "Misc TNMug rst-TNmug.dts";
|
||||
$CSObjects[$CSObjCount++] = "Misc Turtle rst-turtle.dts";
|
||||
39
scripts/autoexec/dmpVersionCheck.cs
Normal file
39
scripts/autoexec/dmpVersionCheck.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// Tells the server what version of the DMP pack the client is using
|
||||
// This is used primarily for the server logo on the loading screen
|
||||
// As the server will skip showing the server logo image if a
|
||||
// Version isnt detected
|
||||
// Alternatively, this can also be used to debug aspects as the Pack version
|
||||
// will be known to the server
|
||||
|
||||
$DMP::Version = 4.5;
|
||||
|
||||
// Client Only
|
||||
addMessageCallback('MsgDMPVer', DMPReturn);
|
||||
|
||||
function DMPReturn()
|
||||
{
|
||||
commandToServer('ClientDMPVersion',$DMP::Version);
|
||||
}
|
||||
|
||||
// Server Only
|
||||
function serverCmdClientDMPVersion(%client, %version)
|
||||
{
|
||||
if(!%client.dmpVersion)
|
||||
%client.dmpVersion = %version;
|
||||
}
|
||||
|
||||
package dmpVersionCheck
|
||||
{
|
||||
|
||||
function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch )
|
||||
{
|
||||
parent::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch );
|
||||
|
||||
messageClient(%client, 'MsgDMPVer');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(dmpVersionCheck))
|
||||
activatePackage(dmpVersionCheck);
|
||||
Loading…
Add table
Add a link
Reference in a new issue