Post by Drake~{DWR}-;) on Apr 8, 2009 10:38:40 GMT -5
Uber Math Scripty
Ever wonder who would take the time to write 360 $sin and $cos variables? Well, bored Drake found a way to let Starsiege do that for someone.
First, execute Trigonometrystdlib.cs for the sin(); and other functions to run:
Then use the following command:
Simply input in console:
This will write all variables from 0-360 to whichever you choose - sin, cos or tan.
- End Math Boredom -
Console K-Sat
Ever wanted to nuke something or someone in another gametype aside from C&D? Well this'll fix that urge.
Simply copy and paste the above into a text editor of your choice and save it as "consoleksat.cs" in your main Starsiege directory.
The above .cs will allow you to execute it in single player campaigns or multiplayer and is pre-scripted for LTADS use. Simply target a structure or vehicle and spot it. There is also a safety global variable so the K-Sat can not be spammed.
Note: The blast radius of a K-Sat has been reduced in this .cs to save possible spamming of the chat box and possible lag.
Enjoy nuking random things you deviant thing you!
Got a script idea? Think no one can make it? Get the extremely bored Drake to look at it and figure it out for ya..?
^ Literally, until I can get internet back onto my computer so I can own everyone in my Olympian..scripting and mapping is all I can do currently o.O...
Ever wonder who would take the time to write 360 $sin and $cos variables? Well, bored Drake found a way to let Starsiege do that for someone.
First, execute Trigonometrystdlib.cs for the sin(); and other functions to run:
exec("Trigonometrystdlib.cs");
Then use the following command:
function mathThingy(%op)
{
if(%op != "")
{
for(%i=0; %i < 361; %i++)
{
if(%op == "sin")
{
%sin[%i] = sin(%i);
fileWrite("FancyNameHere.cs", append, "$sin" @ %i @ " = \"" @%sin[%i]@ "\";");
}
else if(%op == "cos")
{
%cos[%i] = cos(%i);
fileWrite("FancyNameHere.cs", append, "$cos" @ %i @ " = \"" @%cos[%i]@ "\";");
}
else if(%op == "tan")
{
%tan[%i] = tan(%i);
fileWrite("FancyNameHere.cs", append, "$tan" @ %i @ " = \"" @%tan[%i]@ "\";");
}
else
{
echo("Invalid parameter. Only sin, cos or tan are acceptable.");
return;
}
}
}
else
{
echo("Input a parameter. Acceptable parameters: sin, cos, tan");
}
}
Simply input in console:
focusserver();mathThingy("sin");focusclient(); -or- focusserver();mathThingy("cos");focusclient(); -or- focusserver();mathThingy("tan");focusclient();
This will write all variables from 0-360 to whichever you choose - sin, cos or tan.
- End Math Boredom -
Console K-Sat
Ever wanted to nuke something or someone in another gametype aside from C&D? Well this'll fix that urge.
//---------------------------------------------------------------------
// Filename: Console K-Sat
// Compiler: Drake~{DWR}-;)
// Source: C&;D Script File by Gen. Raven [M.I.B.]
// for the K-Sat, slightly modified by Drake~{DWR}-;)
//---------------------------------------------------------------------
//
// Instructions:
// - Open Console in a game and type:
// exec("consoleksat.cs");
// - Afterwards, use playerList(); to find a player.
// - Use the following command for console use:
// focusserver();ksat(2049, "player");focusclient();
// - For function use, use the "other" input:
// ksat(%playervar, "other");
// - It is possible to make a different style input,
// but the "other" input works universally for
// scanning, LTADS or whatever other means possible.
// Examples provided.
//---------------------------------------------------------------------
$satsafe = true;
echo("function ksat(%player, %style) {}");
echo("Command Line: focusserver(); ksat(player#, \"player\"); focusclient();");
function ksat(%player, %style)
{
if(%style == "player")
{
if(%player != "")
{
if($satsafe == true)
{
$satsafe = false;
%vehicleId = playerManager::playerNumToVehicleId(%player);
%target = getHudName(%vehicleId);
%x = getPosition(%vehicleId, x);
%y = getPosition(%vehicleId, y);
%z = getTerrainHeight(%x, %y);
say(0,83,"<F5>WARNING: K-SAT Target Lock: " @ %target @ "<F5>.","warn_missl_lock.wav");
schedule("flushChannel(83);", 0.65);
// Creates a new beam object where in the C&;D Files
// a beam on the map was teleported to an area of a
// strike. Simple and easy to adjust when/if wanted.
%beam = newObject("beam", StaticShape, "fx_orbeam.DTS");
setPosition(%beam, 0, 0, getTerrainHeight(0, 0) - 10000);
setHudTimer(10,-1,"K-SAT Aligning:", 2);
playSound(0, "sfx_quake.wav", IDPRF_2D);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",3);
schedule("setPosition(" @ %beam @ ", " @ %x @ ", " @ %y @ ", " @ %z @ "-100);",5);
schedule("playSound(0, \"plasma3.wav\", IDPRF_2D);",5);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",6);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",7);
schedule("dropPod(" @ %x @ ", " @ %y @ ", " @ %z+800 @ ", " @ %x @ ", " @ %y @ ", " @ %z @ ");",8);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",8);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",9);
schedule("playSound(0, \"sfx_prob.wav\", IDPRF_2D);",10);
schedule("playSound(0, \"sfx_fog.wav\", IDPRF_2D);",10);
schedule("playSound(0, \"sfx_thunder1.wav\", IDPRF_2D);",10);
schedule("playSound(0, \"sfx_thunder2.wav\", IDPRF_2D);",10);
// I have lowered the damage radius to reduce
// spamming of deaths in the message area.
// - Drake
schedule("damageArea("@ %vehicleId @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %vehicleId @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %vehicleId @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %vehicleId @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %vehicleId @", 0, 0, 0, 100, 999999999);",10.5);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",12);
schedule("playSound(0, \"sfx_thunder1.wav\", IDPRF_2D);",12);
schedule("deleteObject(" @ %beam @ ");",14);
schedule("echo(\"Beam deleted.\");", 14);
schedule("$satsafe = true;", 16);
}
else
{
echo("Anti K-Sat Spam Script enabled.");
}
}
else if(%player == "")
{
echo("Please input a valid player number.");
}
}
else if(%style == "other")
{
if($satsafe == true)
{
$satsafe = false;
%target = getHudName(%player);
%x = getPosition(%player, x);
%y = getPosition(%player, y);
%z = getTerrainHeight(%x, %y);
say(0,83,"<F5>WARNING: K-SAT Target Lock: " @ %target @ "<F5>.","warn_missl_lock.wav");
schedule("flushChannel(83);", 0.65);
// Creates a new beam object where in the C&;D Files
// a beam on the map was teleported to an area of a
// strike. Simple and easy to adjust when/if wanted.
%beam = newObject("beam", StaticShape, "fx_orbeam.DTS");
setPosition(%beam, 0, 0, getTerrainHeight(0, 0) - 10000);
setHudTimer(10,-1,"K-SAT Aligning:", 2);
playSound(0, "sfx_quake.wav", IDPRF_2D);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",3);
schedule("setPosition(" @ %beam @ ", " @ %x @ ", " @ %y @ ", " @ %z @ "-100);",5);
schedule("playSound(0, \"plasma3.wav\", IDPRF_2D);",5);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",6);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",7);
schedule("dropPod(" @ %x @ ", " @ %y @ ", " @ %z+800 @ ", " @ %x @ ", " @ %y @ ", " @ %z @ ");",8);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",8);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",9);
schedule("playSound(0, \"sfx_prob.wav\", IDPRF_2D);",10);
schedule("playSound(0, \"sfx_fog.wav\", IDPRF_2D);",10);
schedule("playSound(0, \"sfx_thunder1.wav\", IDPRF_2D);",10);
schedule("playSound(0, \"sfx_thunder2.wav\", IDPRF_2D);",10);
// I have lowered the damage radius to reduce
// spamming of deaths in the message area.
// - Drake
schedule("damageArea("@ %player @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %player @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %player @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %player @", 0, 0, 0, 100, 999999999);",10.5);
schedule("damageArea("@ %player @", 0, 0, 0, 100, 999999999);",10.5);
schedule("playSound(0, \"sfx_quake.wav\", IDPRF_2D);",12);
schedule("playSound(0, \"sfx_thunder1.wav\", IDPRF_2D);",12);
schedule("deleteObject(" @ %beam @ ");",14);
schedule("echo(\"Beam deleted.\");", 14);
schedule("$satsafe = true;", 16);
}
else
{
echo("Anti K-Sat Spam Script enabled.");
}
}
else
{
echo("Style not supported.");
}
}
//---------------------------------------------------------------------
//
// Possible Examples...
//
//---------------------------------------------------------------------
function vehicle::onSpot(%spotter, %target)
{
if(getTeam(%target) != getTeam(%spotter))
{
// "other" allows the command to be used
// in a function that calls on variables.
ksat(%target, "other");
echo("Vehicle Spot K-Sat Target: " @ getVehicleName(%target) @ " operated by: " @ getHudName(%target) @ ".");
}
else
{
%player = playerManager::vehicleIdToPlayerNum(%spotter);
say(%player, 1, "<F5>You cannot spot your own teammate for a K-Sat strike!");
}
}
function structure::onSpot(%spotter, %target)
{
if(getTeam(%target) != getTeam(%spotter))
{
// "other" also allows for the spotting of
// structures. "False" in the message shown
// in-game after a K-Sat is spotted is for
// an object not given a name.
// Note: This also works on Turrets.
ksat(%target, "other");
echo("Structure Spot K-Sat Target: " @ getHudName(%target) @ ".");
}
else
{
%player = playerManager::vehicleIdToPlayerNum(%spotter);
say(%player, 1, "<F5>You cannot spot your own team's buildings for a K-Sat strike!");
}
}
Simply copy and paste the above into a text editor of your choice and save it as "consoleksat.cs" in your main Starsiege directory.
The above .cs will allow you to execute it in single player campaigns or multiplayer and is pre-scripted for LTADS use. Simply target a structure or vehicle and spot it. There is also a safety global variable so the K-Sat can not be spammed.
Note: The blast radius of a K-Sat has been reduced in this .cs to save possible spamming of the chat box and possible lag.
Enjoy nuking random things you deviant thing you!
Got a script idea? Think no one can make it? Get the extremely bored Drake to look at it and figure it out for ya..?
^ Literally, until I can get internet back onto my computer so I can own everyone in my Olympian..scripting and mapping is all I can do currently o.O...