Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>

This commit is contained in:
Harry Young 2011-10-29 09:58:44 +02:00
parent 1c0613c59a
commit fbad5668f4
13 changed files with 7708 additions and 202 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,215 @@
function InitGame(levelTime, randomSeed, restart)
local ent;
local i = 17;
local x = 113;
local vec = vector.New();
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
end
ent = entity.Find("borg_munro");
entity.Remove(ent);
ent = entity.Find("borg_alexa");
entity.Remove(ent);
ent = entity.Find("deathborg");
entity.Remove(ent);
ent = entity.Find("deathborg1");
entity.Remove(ent);
ent = entity.FindBModel(127);
entity.Remove(ent);
ent = entity.FindBModel(91);
ent.SetKeyValue(ent, "spawnflags", "0");
ent.SetKeyValue(ent, "angle", "-2");
ent.SetKeyValue(ent, "count", "32");
ent.SetKeyValue(ent, "wait", "5");
entity.CallSpawn(ent);
ent = entity.FindBModel(89);
ent.SetKeyValue(ent, "spawnflags", "0");
ent.SetKeyValue(ent, "angle", "-2");
ent.SetKeyValue(ent, "count", "32");
ent.SetKeyValue(ent, "wait", "5");
entity.CallSpawn(ent);
ent = entity.FindBModel(39);
ent.SetKeyValue(ent, "classname", "func_usable");
ent.SetKeyValue(ent, "spawnflags", "8");
ent.SetKeyValue(ent, "target", "forcefield_1");
ent.SetKeyValue(ent, "targetname", "fffu1");
ent.SetKeyValue(ent, "wait", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(38);
ent.SetKeyValue(ent, "spawnflags", "8");
ent.SetKeyValue(ent, "luaEntity", "1");
ent.SetKeyValue(ent, "dmg", "1");
ent.SetKeyValue(ent, "target", "fffu1");
ent.SetKeyValue(ent, "wait", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(88);
ent.SetKeyValue(ent, "classname", "func_forcefield");
ent.SetKeyValue(ent, "targetname", "forcefield_1");
entity.CallSpawn(ent);
ent = entity.FindBModel(13);
ent.SetKeyValue(ent, "health", "20");
entity.CallSpawn(ent);
ent = entity.FindBModel(87);
entity.Remove(ent);
ent = entity.FindBModel(40);
ent.SetKeyValue(ent, "health", "20");
entity.CallSpawn(ent);
ent = entity.FindBModel(109);
ent.SetKeyValue(ent, "wait", "-1");
ent.SetKeyValue(ent, "target", "null");
ent.SetKeyValue(ent, "luaTrigger", "Grate_Fall");
entity.CallSpawn(ent);
ent = entity.FindBModel(41);
ent.SetKeyValue(ent, "classname", "func_static");
entity.CallSpawn(ent);
ent = entity.FindBModel(25);
entity.Remove(ent);
ent = entity.FindBModel(148);
ent.SetKeyValue(ent, "classname", "func_usable");
ent.SetKeyValue(ent, "spawnflags", "8");
ent.SetKeyValue(ent, "wait", "6");
ent.SetKeyValue(ent, "target", "plat1");
ent.SetKeyValue(ent, "dmg", "2");
ent.SetKeyValue(ent, "luaEntity", "1");
entity.CallSpawn(ent);
ent = entity.FindBModel(147);
ent.SetKeyValue(ent, "classname", "func_usable");
ent.SetKeyValue(ent, "spawnflags", "8");
ent.SetKeyValue(ent, "wait", "6");
ent.SetKeyValue(ent, "target", "plat1");
ent.SetKeyValue(ent, "dmg", "2");
ent.SetKeyValue(ent, "luaEntity", "1");
entity.CallSpawn(ent);
entity.RemoveSpawns();
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 171, 1090, -103);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 143, -400, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 172, -400, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 202, -400, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 232, -400, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 143, -372, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 172, -372, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 202, -372, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 232, -372, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 143, -338, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 172, -338, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 202, -338, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 232, -338, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 143, -307, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 172, -307, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 202, -307, -8);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent.SetKeyValue(ent, "classname", "info_player_deathmatch");
mover.SetPosition(ent.GetNumber(ent), 232, -307, -8);
entity.CallSpawn(ent);
ent = entity.FindBModel(125);
ent.SetKeyValue(ent, "classname", "func_forcefield");
ent.SetKeyValue(ent, "targetname", "imod_ff");
entity.CallSpawn(ent);
ent = entity.FindBModel(126);
ent.SetKeyValue(ent, "classname", "func_forcefield");
ent.SetKeyValue(ent, "targetname", "imod_ff");
entity.CallSpawn(ent);
ent = entity.FindBModel(152);
entity.Remove(ent);
ent = entity.FindBModel(146);
ent.SetKeyValue(ent, "spawnflags", "8");
ent.SetKeyValue(ent, "target", "imod_ff");
ent.SetKeyValue(ent, "targetname", "imod_fu");
ent.SetKeyValue(ent, "wait", "1");
entity.CallSpawn(ent);
ent = entity.FindBModel(17);
ent.SetKeyValue(ent, "spawnflags", "8");
ent.SetKeyValue(ent, "target", "imod_fu");
ent.SetKeyValue(ent, "wait", "1");
ent.SetKeyValue(ent, "dmg", "3");
entity.CallSpawn(ent);
end
function Grate_Fall(ent, other)
local grate = entity.FindBModel(41);
local target = entity.Find("splat4");
grate.SetKeyValue(grate, "luaReached", "Grate_Fall_Reached");
mover.ToPosition(grate.GetNumber(grate), 300, target.GetOrigin(target));
mover.ToAngles(grate.GetNumber(grate), 100, -90, 0, 0);
end
function Grate_Fall_Reached(ent)
local target = entity.Find("splat1");
local fs = entity.FindNumber(ent);
mover.Halt(ent);
fs.SetKeyValue(fs, "luaReached", "Grate_Fall_Reached2");
mover.ToPosition(ent, 300, target.GetOrigin(target));
end
function Grate_Fall_Reached2(ent)
local target = entity.Find("splat2");
local fs = entity.FindNumber(ent);
mover.Halt(ent);
fs.SetKeyValue(fs, "luaReached", "Grate_Fall_Reached3");
mover.ToPosition(ent, 300, target.GetOrigin(target));
end
function Grate_Fall_Reached3(ent)
local fs = entity.FindNumber(ent);
local cor = vector.Construct(32, 1088, 90);
mover.Halt(ent);
fs.SetKeyValue(fs, "luaReached", "Grate_Fall_Reached4");
mover.ToPosition(ent, 300, cor);
end
function Grate_Fall_Reached4(ent)
local breakable = entity.FindBModel(82);
entity.Use(breakable);
mover.Halt(ent);
end

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,568 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "borg4");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Updating and fixing Forcefields and Plasmafilters...");
game.Print("--Forcefield Section 1");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("target", "forcefield2");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("model", "models/mapobjects/borg/disnode.md3");
mover.SetPosition(ent, -1268, 53, 36);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.FindBModel(56);
ent:SetKeyValue("classname", "func_forcefield");
entity.CallSpawn(ent);
game.Print("--Plasmafilter Room 1");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("target", "t49");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("spawnflags", "9");
ent:SetKeyValue("splashDamage", "250");
ent:SetKeyValue("splashRadius", "150");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("model", "models/mapobjects/borg/tank.md3");
mover.SetPosition(ent, -68, -432, 94);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.FindBModel(8);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("material", "1");
entity.CallSpawn(ent);
game.Print("--Plasmafilter Corridor");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("target", "t50");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("spawnflags", "9");
ent:SetKeyValue("splashDamage", "250");
ent:SetKeyValue("splashRadius", "150");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("model", "models/mapobjects/borg/tank.md3");
mover.SetPosition(ent, -1340, 1056, -636);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.FindBModel(7);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("material", "1");
entity.CallSpawn(ent);
game.Print("--Forcefield last Room");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("target", "forcefield1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("model", "models/mapobjects/borg/disnode.md3");
mover.SetPosition(ent, -1616, 1909, -616);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.FindBModel(6);
ent:SetKeyValue("classname", "func_forcefield");
entity.CallSpawn(ent);
game.Print("-Some Decorative Work and fixes...");
ent = entity.Find("seven_basescreen");
ent:SetKeyValue("target", "seven_harvscreen");
ent:SetKeyValue("luaUse", "sound7base");
entity.CallSpawn(ent);
ent = entity.Find("seven_harvscreen");
ent:SetKeyValue("target", "seven_forgescreen");
ent:SetKeyValue("luaUse", "sound7harv");
entity.CallSpawn(ent);
ent = entity.Find("seven_forgescreen");
ent:SetKeyValue("target", "seven_basescreen");
ent:SetKeyValue("luaUse", "sound7forge");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 671, -262, 53);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 993, -318, 53);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 1414, -368, 53);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 994, -142, 53);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 469, 47, 40);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 13, -465, 48);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, -528, 32, 48);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -64, 328, 48);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -971, -295, 48);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, -1505, -249, 32);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -1311, -247, 32);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -1807, 521, -352);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -2089, 1401, -624);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, -1713, 1972, -624);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -2255, 1973, -624);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
game.Print("-Transfer...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "elone");
ent:SetKeyValue("target", "borg5");
ent:SetKeyValue("wait", "6");
mover.SetPosition(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.FindBModel(63);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "elone");
ent:SetKeyValue("luaUse", "sound63");
entity.CallSpawn(ent);
ent = entity.FindBModel(24);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-2");
ent:SetKeyValue("count", "-460");
ent:SetKeyValue("speed", "75");
entity.CallSpawn(ent);
game.Print("-Lift A fix...");
ent = entity.FindBModel(51);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "t7");
ent:SetKeyValue("luaUse", "sound51");
entity.CallSpawn(ent);
ent = entity.FindBModel(52);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "t7");
ent:SetKeyValue("luaUse", "sound52");
entity.CallSpawn(ent);
ent = entity.FindBModel(23);
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-2");
ent:SetKeyValue("count", "16");
entity.CallSpawn(ent);
game.Print("-Lift B fix...");
ent = entity.FindBModel(54);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "t8");
ent:SetKeyValue("luaUse", "sound54");
entity.CallSpawn(ent);
ent = entity.FindBModel(53);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "t8");
ent:SetKeyValue("luaUse", "sound53");
entity.CallSpawn(ent);
ent = entity.FindBModel(22);
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-2");
ent:SetKeyValue("count", "16");
entity.CallSpawn(ent);
game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 456, -152, 16);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 424, -120, 16);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 424, -184, 16);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 488, -120, 16);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 488, -184, 16);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
game.Print("-Breakable-Mod...");
game.Print("--misc_model_breakable...");
game.Print("---checking for local or dedicated...");
if not entity.FindNumber(236) == nil then
ent = entity.FindNumber(236);
test = ent.GetClassname(ent);
if test == "misc_model_breakable" then
game.Print("----dedicated...");
ent = entity.FindNumber(192);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(193);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(194);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(195);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(196);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(200);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(201);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(202);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(203);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(229);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(231);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(232);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(233);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(234);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(236);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
else
game.Print("----local...");
ent = entity.FindNumber(190);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(191);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(192);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(193);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(194);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(198);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(199);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(200);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(201);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(215);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(217);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(218);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(219);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(220);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(222);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
end
else
game.Print("----local...");
ent = entity.FindNumber(190);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(191);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(192);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(193);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(194);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(198);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(199);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(200);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(201);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(215);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(217);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(218);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(219);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(220);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(222);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
end
game.Print("...Done");
end
--Sounds
function sound51(ent, other, activator)
sound.PlaySound(entity.FindBModel(51), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound52(ent, other, activator)
sound.PlaySound(entity.FindBModel(52), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound53(ent, other, activator)
sound.PlaySound(entity.FindBModel(53), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound54(ent, other, activator)
sound.PlaySound(entity.FindBModel(54), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound63(ent, other, activator)
sound.PlaySound(entity.FindBModel(63), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound7base(ent, other, activator)
sound.PlaySound(entity.Find("seven_basescreen"), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound7harv(ent, other, activator)
sound.PlaySound(entity.Find("seven_harvscreen"), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound7forge(ent, other, activator)
sound.PlaySound(entity.Find("seven_forgescreen"), "sound/movers/switches/borglcarswitch.mp3", 0);
end

View file

@ -0,0 +1,600 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "borg5");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Updating and fixing Forcefields and Plasmafilters...");
game.Print("--Forcefield Corridor 2");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("target", "disfield");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("model", "models/mapobjects/borg/disnode.md3");
mover.SetPosition(ent, -184, 210, 190);
mover.SetAngles(ent, 90, 90, 90);
entity.CallSpawn(ent);
ent = entity.FindBModel(78);
ent:SetKeyValue("classname", "func_forcefield");
entity.CallSpawn(ent);
game.Print("--Plasmafilter Mid Level");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("target", "grate3");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("spawnflags", "9");
ent:SetKeyValue("splashDamage", "250");
ent:SetKeyValue("splashRadius", "150");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("model", "models/mapobjects/borg/tank.md3");
mover.SetPosition(ent, 44, -74, 178);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.FindBModel(1);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("material", "1");
entity.CallSpawn(ent);
game.Print("--Forcefield end");;
ent = entity.FindBModel(11);
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "exitfield");
ent:SetKeyValue("luaUse", "sound11");
entity.CallSpawn(ent);
ent = entity.FindBModel(29);
ent:SetKeyValue("classname", "func_forcefield");
entity.CallSpawn(ent);
game.Print("-Some Decorative Work...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -667, -830, 455);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 169, -255, 455);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 441, -113, 455);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 485, -592, 455);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent)
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 193, -202, 295);
mover.SetAngles(ent, 0, 315, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, -671, 462, 213);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, -548, 439, 244);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 135, 1053, 7);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
game.Print("-Transfer...");
ent = entity.Spawn();
ent.SetupTrigger(ent, 128, 16, 136);
ent:SetKeyValue("classname", "trigger_multiple");
ent:SetKeyValue("target", "transfercount");
ent:SetKeyValue("wait", 1);
entity.CallSpawn(ent);
mover.SetPosition(ent, -192, 1364, 36);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "transfercount");
ent:SetKeyValue("target", "transfer");
ent:SetKeyValue("count", "1");
mover.SetPosition(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "transfer");
ent:SetKeyValue("target", "borg6");
ent:SetKeyValue("wait", "-1");
mover.SetPosition(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "transfer");
ent:SetKeyValue("target", "exitfield");
mover.SetPosition(ent, 0, 0, 0);
entity.CallSpawn(ent);
game.Print("-Lift A fix...");
ent = entity.FindBModel(71);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "plat1");
ent:SetKeyValue("luaUse", "sound71");
entity.CallSpawn(ent);
ent = entity.FindBModel(72);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "plat1");
ent:SetKeyValue("luaUse", "sound72");
entity.CallSpawn(ent);
ent = entity.FindBModel(7);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("targetname", "plat1");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-2");
ent:SetKeyValue("count", "24");
entity.CallSpawn(ent);
game.Print("-Lift B fix...");
ent = entity.FindBModel(73);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "plat2");
ent:SetKeyValue("luaUse", "sound73");
entity.CallSpawn(ent);
ent = entity.FindBModel(74);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "plat2");
ent:SetKeyValue("luaUse", "sound74");
entity.CallSpawn(ent);
ent = entity.FindBModel(6);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("targetname", "plat2");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-2");
ent:SetKeyValue("count", "14");
entity.CallSpawn(ent);
game.Print("-Setting up spawnpoints and surrounding...");
ent = entity.FindBModel(9);
ent:SetKeyValue("classname", "func_static");
mover.SetPosition(ent, -896, -968, 412);
entity.CallSpawn(ent);
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -800, -928, 444);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -832, -896, 444);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -832, -960, 444);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -768, -896, 444);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -768, -960, 444);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
game.Print("-Breakable-Mod...");
game.Print("--func_breakable...");
ent = entity.FindBModel(52);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(51);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(55);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(54);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(65);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(66);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(15);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(16);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(61);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(60);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(58);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(57);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
game.Print("--misc_model_breakable...");
game.Print("---checking for local or dedicated...");
if not entity.FindNumber(242) == nil then
ent = entity.FindNumber(242);
test = ent.GetClassname(ent);
if test == "misc_model_breakable" then
game.Print("----dedicated...");
ent = entity.FindNumber(191);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(193);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(194);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(195);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(196);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(197);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(199);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(200);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(201);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(205);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(206);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(207);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(232);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(208);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(209);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(210);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(211);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(212);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(242);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
else
game.Print("----local...");
ent = entity.FindNumber(186);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(188);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(189);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(190);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(191);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(192);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(194);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(195);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(196);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(200);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(201);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(202);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(203);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(204);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(205);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(206);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(207);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(237);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(242);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent)
end
else
game.Print("----local...");
ent = entity.FindNumber(186);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(188);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(189);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(190);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(191);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(192);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(194);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(195);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(196);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(200);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(201);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(202);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(203);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(204);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(205);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(206);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(207);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("health", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(237);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(242);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent)
end
game.Print("...Done");
end
--Sounds
function sound11(ent, other, activator)
sound.PlaySound(entity.FindBModel(11), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound71(ent, other, activator)
sound.PlaySound(entity.FindBModel(71), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound72(ent, other, activator)
sound.PlaySound(entity.FindBModel(72), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound73(ent, other, activator)
sound.PlaySound(entity.FindBModel(73), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound74(ent, other, activator)
sound.PlaySound(entity.FindBModel(74), "sound/movers/switches/borglcarswitch.mp3", 0);
end

View file

@ -0,0 +1,471 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "borg6");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Some Decorative Work...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 3483, 1857, 31);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 2792, 1712, 20);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 2679, 1417, 20);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 2147, 737, 14);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 590, 191, 15);
mover.SetAngles(ent, 0, 135, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 925, 1260, 12);
mover.SetAngles(ent, 0, 180, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 231, 1693, 16);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin2.md3");
mover.SetPosition(ent, 525, 115, 259);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("model", "models/mapobjects/borg/plugin.md3");
mover.SetPosition(ent, 219, 133, 259);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
game.Print("-Lift fix...");
ent = entity.FindBModel(95);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "elevator");
ent:SetKeyValue("luaUse", "sound95");
entity.CallSpawn(ent);
ent = entity.FindBModel(15);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("target", "elevator");
ent:SetKeyValue("luaUse", "sound15");
entity.CallSpawn(ent);
ent = entity.FindBModel(41);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-1");
ent:SetKeyValue("count", "-226");
ent:SetKeyValue("speed", "75");
entity.CallSpawn(ent);
game.Print("-the final door...");
game.Print("--set up door and trigger ...");
ent = entity.Spawn();
ent.SetupTrigger(ent, 160, 100, 160);
ent:SetKeyValue("classname", "trigger_multiple");
ent:SetKeyValue("target", "enddoortrigger");
ent:SetKeyValue("wait", "1");
entity.CallSpawn(ent);
mover.SetPosition(ent, 360, 224, 272);
ent = entity.FindBModel(4);
ent:SetKeyValue("targetname", "lastdoor");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("angle", "-1");
ent:SetKeyValue("count", "8");
ent:SetKeyValue("speed", "75");
ent:SetKeyValue("spawnflags", "0");
game.Print("--set up delays ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "jeffriesswap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "11");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "lastdoor");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "10");
entity.CallSpawn(ent);
game.Print("--set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("falsetarget", "jeffriesstuff");
ent:SetKeyValue("swapname", "jeffriesswap");
ent:SetKeyValue("targetname", "enddoortrigger");
entity.CallSpawn(ent);
game.Print("--set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "lastdoor");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "jeffriesswap");
entity.CallSpawn(ent);
game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 3648, 1872, -8);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 3616, 1904, -8);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 3616, -1840, -8);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 3680, 1904, -8);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 3680, 1840, -8);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
game.Print("-Jeffries-access...");
ent = entity.FindBModel(9);
entity.Remove(ent);
ent = entity.FindBModel(10);
entity.Remove(ent);
ent = entity.FindBModel(11);
entity.Remove(ent);
game.Print("-Breakable-Mod...");
game.Print("--func_breakable...");
ent = entity.FindBModel(59);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(58);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(86);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(85);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(77);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(76);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(68);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(67);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(34);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(33);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(23);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(19);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(26);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(22);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(25);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(21);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(24);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(20);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(62);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(61);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(89);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(88);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(83);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(82);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(71);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(70);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(92);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(91);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(31);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(30);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(80);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(79);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(74);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(73);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(65);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(64);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
ent = entity.FindBModel(28);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(27);
ent:SetKeyValue("team", "2")
entity.CallSpawn(ent)
game.Print("--misc_model_breakable...");
game.Print("---checking for local or dedicated...");
if not entity.FindNumber(514) == nil then
ent = entity.FindNumber(514);
test = ent.GetClassname(ent);
if test == "misc_model_breakable" then
game.Print("----dedicated...");
ent = entity.FindNumber(229);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(310);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(431);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(432);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(493);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(513);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(514);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
else
game.Print("----local...");
ent = entity.FindNumber(225);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(287);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(408);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(409);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(463);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(483);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(484);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
end
else
game.Print("----local...");
ent = entity.FindNumber(225);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(287);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(408);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(409);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(463);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(483);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(484);
ent:SetKeyValue("material", "2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
end
game.Print("...Done");
end
--Sounds
function sound15(ent, other, activator)
sound.PlaySound(entity.FindBModel(15), "sound/movers/switches/borglcarswitch.mp3", 0);
end
function sound95(ent, other, activator)
sound.PlaySound(entity.FindBModel(95), "sound/movers/switches/borglcarswitch.mp3", 0);
end

992
lua/scripts/lua/dn1/dn1.lua Normal file
View file

@ -0,0 +1,992 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "dn1");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Shuttle Bay Script...");
game.Print("--Forcefield");;
ent = entity.Find("forcefield");
ent:SetKeyValue("classname", "func_forcefield");
entity.CallSpawn(ent);
game.Print("--switch");
ent = entity.FindBModel(83);
ent:SetKeyValue("targetname", "sbswitch");
ent:SetKeyValue("target", "forcefield");
ent:SetKeyValue("luaUse", "sound38");
ent:SetKeyValue("spawnflags", "512");
entity.CallSpawn(ent);
ent = entity.FindBModel(38);
ent:SetKeyValue("targetname", "forcefield");
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
game.Print("--gravity");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_gravity");
ent:SetKeyValue("targetname", "forcefield");
ent:SetKeyValue("targetname2", "800");
entity.CallSpawn(ent);
game.Print("--dooropener");
ent = entity.FindBModel(135);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "hangerdoorcount");
ent:SetKeyValue("luaUse", "sound135");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "1");
entity.CallSpawn(ent);
mover.SetAngles(ent, 0, 270, 0);
mover.SetPosition(ent, -1775, -680, 128);
game.Print("--elevator");
game.Print("---reconfig ...");
ent = entity.FindBModel(52);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("spawnflags", "32");
ent:SetKeyValue("targetname", "lift-a");
ent:SetKeyValue("angle", "-2");
ent:SetKeyValue("wait", "5");
ent:SetKeyValue("speed", "50");
ent:SetKeyValue("count", "-242");
entity.CallSpawn(ent);
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "lift-a-bool");
ent:SetKeyValue("falsetarget", "lift-a");
ent:SetKeyValue("swapname", "lift-a-swap");
entity.CallSpawn(ent);
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "lift-a");
ent:SetKeyValue("target", "lift-a-swap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "18");
entity.CallSpawn(ent);
game.Print("---set up relay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "lift-a");
ent:SetKeyValue("target", "lift-a-swap");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("-Lift-1-Script...");
game.Print("--set up usables ...");
ent = entity.FindBModel(21);
ent:SetKeyValue("targetname", "liftaswitch");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound21");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(22);
ent:SetKeyValue("targetname", "liftaswitch");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound22");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(117);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftaswitch");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound117");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
mover.SetPosition(ent, -955, -1994, 691)
ent = entity.FindBModel(136);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftaswitch");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound1367");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1056, -1715, 687)
mover.SetAngles(ent, 0, 180, 0)
ent = entity.FindBModel(137);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftaswitch");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound1367");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1056, -1727, 687)
mover.SetAngles(ent, 0, 180, 0)
game.Print("--set up upper doors ...");
ent = entity.FindBModel(56);
ent:SetKeyValue("targetname", "liftaupperdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(57);
ent:SetKeyValue("targetname", "liftaupperdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(58);
ent:SetKeyValue("targetname", "liftaupperdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(59);
ent:SetKeyValue("targetname", "liftaupperdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
game.Print("--set up lower doors ...");
ent = entity.FindBModel(66);
ent:SetKeyValue("targetname", "liftalowerdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(67);
ent:SetKeyValue("targetname", "liftalowerdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(68);
ent:SetKeyValue("targetname", "liftalowerdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(69);
ent:SetKeyValue("targetname", "liftalowerdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
game.Print("--set up lift and opener-relay ...");
ent = entity.FindBModel(60);
ent:SetKeyValue("classname", "func_static");
ent:SetKeyValue("luaReached", "liftareachedsound");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "opendoor");
ent:SetKeyValue("target", "newdoor");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up overwrite-savety ...");
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "liftabool");
ent:SetKeyValue("truetarget", "liftastuff");
ent:SetKeyValue("falsetarget", "liftastartup");
ent:SetKeyValue("swapname", "liftaswap");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("target", "liftaswap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "15");
entity.CallSpawn(ent);
game.Print("---set up relay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("target", "liftaswap");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up door-bool");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("falsetarget", "liftalowerdoor");
ent:SetKeyValue("truetarget", "liftaupperdoor");
ent:SetKeyValue("swapname", "newdoor");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
game.Print("--set up lift-direction-control ...");
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("target", "liftadir");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("falsetarget", "liftadownrelay");
ent:SetKeyValue("truetarget", "liftauprelay");
ent:SetKeyValue("swapname", "liftadir");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
game.Print("---set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftauprelay");
ent:SetKeyValue("luaUse", "liftaup");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftadownrelay");
ent:SetKeyValue("luaUse", "liftadown");
entity.CallSpawn(ent);
game.Print("--set up startup ...");
game.Print("---set up counter ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "liftastartup");
ent:SetKeyValue("target", "liftastartuprelays");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
game.Print("---set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftastartuprelays");
ent:SetKeyValue("target", "liftalowerdoor");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftastartuprelays");
ent:SetKeyValue("target", "liftaswap");
ent:SetKeyValue("wait", "3");
ent:SetKeyValue("spawnflags", "1");
entity.CallSpawn(ent);
game.Print("-Lift-2-Script...");
game.Print("--set up usables ...");
ent = entity.FindBModel(18);
ent:SetKeyValue("targetname", "liftbswitch");
ent:SetKeyValue("target", "liftbdoor");
ent:SetKeyValue("luaUse", "sound18");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
ent = entity.FindBModel(138);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftbswitch");
ent:SetKeyValue("target", "liftbstuff");
ent:SetKeyValue("luaUse", "sound1389");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
mover.SetPosition(ent, -949, 92, 693)
mover.SetAngles(ent, 0, 270, 0)
ent = entity.FindBModel(139);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftbswitch");
ent:SetKeyValue("target", "liftbstuff");
ent:SetKeyValue("luaUse", "sound1389");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
mover.SetPosition(ent, -961, 92, 693)
mover.SetAngles(ent, 0, 270, 0)
game.Print("--set up doors ...");
ent = entity.FindBModel(71);
ent:SetKeyValue("targetname", "liftbdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(72);
ent:SetKeyValue("targetname", "liftbdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(73);
ent:SetKeyValue("targetname", "liftbdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(74);
ent:SetKeyValue("targetname", "liftbdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
game.Print("--set up lift and transfer ...");
ent = entity.FindBModel(61);
ent:SetKeyValue("classname", "func_static");
ent:SetKeyValue("luaReached", "liftbreachedsound");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "transfer");
ent:SetKeyValue("target", "dn2");
ent:SetKeyValue("wait", "-1");
entity.CallSpawn(ent);
game.Print("--set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftbstuff");
ent:SetKeyValue("target", "liftbmove");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
game.Print("--set up relay for doors ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftbstuff");
ent:SetKeyValue("target", "liftbdoor");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up relay for move ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftbmove");
ent:SetKeyValue("luaUse", "liftbup");
entity.CallSpawn(ent);
game.Print("-Laser-Script...");
game.Print("--set up laser-model and Phasers ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "misc_model_breakable");
ent:SetKeyValue("targetname", "laser");
ent:SetKeyValue("model", "models/mapobjects/forge/probe.md3");
ent:SetKeyValue("spawnflags", "24");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1594, -1156, 764)
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "lasertgt");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1095, -1185, 670)
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_phaser");
ent:SetKeyValue("targetname", "laser1");
ent:SetKeyValue("target", "lasertgt");
ent:SetKeyValue("wait", "999999");
ent:SetKeyValue("spawnflags", "1");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1585, -1154.25, 750)
mover.SetAngles(ent, 1, 0, 0)
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_phaser");
ent:SetKeyValue("targetname", "laser2");
ent:SetKeyValue("target", "lasertgt");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1585, -1154.25, 750)
mover.SetAngles(ent, 2.5, 1000, 1)
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_phaser");
ent:SetKeyValue("targetname", "laser3");
ent:SetKeyValue("target", "lasertgt");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1585, -1154.25, 750)
mover.SetAngles(ent, 5, 1000, 1)
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_phaser");
ent:SetKeyValue("targetname", "laser4");
ent:SetKeyValue("target", "lasertgt");
entity.CallSpawn(ent);
mover.SetPosition(ent, -1585, -1154.25, 750)
mover.SetAngles(ent, 10, 1000, 1)
game.Print("--set up breakables ...");
ent = entity.FindBModel(14);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("target", "left_off");
ent:SetKeyValue("spawnflags", "272");
ent:SetKeyValue("health", "10");
entity.CallSpawn(ent);
entity.Use(ent)
ent = entity.FindBModel(13);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("target", "up_off");
ent:SetKeyValue("spawnflags", "272");
ent:SetKeyValue("health", "10");
entity.CallSpawn(ent);
entity.Use(ent)
ent = entity.FindBModel(12);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("target", "down_off");
ent:SetKeyValue("spawnflags", "272");
ent:SetKeyValue("health", "10");
entity.CallSpawn(ent);
entity.Use(ent)
ent = entity.FindBModel(140);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("target", "right_off");
ent:SetKeyValue("spawnflags", "272");
ent:SetKeyValue("health", "10");
entity.CallSpawn(ent);
entity.Use(ent)
game.Print("--set up usables ...");
ent = entity.FindBModel(8);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
entity.Use(ent)
ent = entity.FindBModel(9);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
entity.Use(ent)
ent = entity.FindBModel(10);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
entity.Use(ent)
ent = entity.FindBModel(11);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
entity.Use(ent)
game.Print("--set up relays to counters...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "left_off");
ent:SetKeyValue("target", "lasercount");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "up_off");
ent:SetKeyValue("target", "lasercount");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "down_off");
ent:SetKeyValue("target", "lasercount");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "right_off");
ent:SetKeyValue("target", "lasercount");
entity.CallSpawn(ent);
game.Print("--set up counters ...");
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "lasercount");
ent:SetKeyValue("target", "laser1");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "lasercount");
ent:SetKeyValue("target", "laser2relay");
ent:SetKeyValue("count", "2");
entity.CallSpawn(ent);
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "lasercount");
ent:SetKeyValue("target", "laser3relay");
ent:SetKeyValue("count", "3");
entity.CallSpawn(ent);
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "lasercount");
ent:SetKeyValue("target", "laser4relay");
ent:SetKeyValue("count", "4");
entity.CallSpawn(ent);
game.Print("--set up relays for boolean-swaping...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "laser2relay");
ent:SetKeyValue("target", "laserboolswap2");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "laser3relay");
ent:SetKeyValue("target", "laserboolswap3");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "laser4relay");
ent:SetKeyValue("target", "laserboolswap4");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up booleans...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "laserbool1");
ent:SetKeyValue("truetarget", "laserbool2");
ent:SetKeyValue("targetname", "laserboolswap2");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "laserbool3");
ent:SetKeyValue("falsetarget", "laser2");
ent:SetKeyValue("truetarget", "laserbool3");
ent:SetKeyValue("targetname", "laserboolswap3");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "laserbool3");
ent:SetKeyValue("falsetarget", "laser3");
ent:SetKeyValue("truetarget", "laser4");
ent:SetKeyValue("swapname", "laserboolswap4");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
game.Print("--set up usable...");
ent = entity.FindBModel(36);
ent:SetKeyValue("target", "laserbool1");
ent:SetKeyValue("targetname2", "lasercontrol");
ent:SetKeyValue("wait", "5");
ent:SetKeyValue("luause", "sound36");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--system-crash...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_deactivate");
ent:SetKeyValue("targetname", "laser4");
ent:SetKeyValue("target", "lasercontrol");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "laser4");
ent:SetKeyValue("target", "doorchair");
ent:SetKeyValue("wait", "4");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "laser4");
ent:SetKeyValue("target", "laser");
ent:SetKeyValue("wait", "4");
entity.CallSpawn(ent);
game.Print("-jeffries-door...");
game.Print("--set up doors ...");
ent = entity.FindBModel(85);
ent:SetKeyValue("classname", "func_door_rotating");
ent:SetKeyValue("targetname", "jeffriesdoor");
ent:SetKeyValue("spawnflags", "17");
ent:SetKeyValue("wait", "10");
ent:SetKeyValue("distance", "90");
ent:SetKeyValue("speed", "60");
entity.CallSpawn(ent);
ent = entity.FindBModel(29);
ent:SetKeyValue("classname", "func_door_rotating");
ent:SetKeyValue("targetname", "jeffriesdoor");
ent:SetKeyValue("spawnflags", "21");
ent:SetKeyValue("wait", "10");
ent:SetKeyValue("distance", "90");
ent:SetKeyValue("speed", "60");
entity.CallSpawn(ent);
entity.Use(entity.Find("clipfloor"));
game.Print("--set up trigger below the doors ...");
ent = entity.Spawn();
ent.SetupTrigger(ent, 128, 112, 56);
ent:SetKeyValue("classname", "trigger_multiple");
ent:SetKeyValue("target", "jeffries-bool");
ent:SetKeyValue("wait", 1);
entity.CallSpawn(ent);
mover.SetPosition(ent, -944, -464, 604);
game.Print("--set up trigger script ...");
game.Print("---set up delays ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "jeffriesswap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "15");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "clipfloor");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "12");
entity.CallSpawn(ent);
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("falsetarget", "jeffriesstuff");
ent:SetKeyValue("swapname", "jeffriesswap");
ent:SetKeyValue("targetname", "jeffries-bool");
entity.CallSpawn(ent);
game.Print("---set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "jeffriesdoor");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "jeffriesswap");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "jeffriesstuff");
ent:SetKeyValue("target", "clipfloor");
entity.CallSpawn(ent);
game.Print("-corridoors ...");
game.Print("--set up sickbay doors ...");
ent = entity.FindBModel(43);
ent:SetKeyValue("targetname", "laser");
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(39);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("targetname", "laser");
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(40);
ent:SetKeyValue("targetname", "laser");
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(44);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("targetname", "laser");
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
game.Print("--set up cargodoors ...");
ent = entity.FindBModel(79);
ent:SetKeyValue("targetname", "cargodoors");
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(78);
ent:SetKeyValue("targetname", "cargodoors");
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(76);
ent:SetKeyValue("targetname", "cargodoors");
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(77);
ent:SetKeyValue("targetname", "cargodoors");
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "bubba");
ent:SetKeyValue("target", "cargodoors");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -2192, 336, 112);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -2160, 368, 112);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -2160, 304, 112);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -2224, 368, 112);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -2224, 304, 112);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
game.Print("-Breakable-Mod...");
game.Print("--misc_model_breakable...");
game.Print("---checking for local or dedicated...");
if not entity.FindNumber(280) == nil then
ent = entity.FindNumber(280);
test = ent.GetClassname(ent);
if test == "misc_model_breakable" then
game.Print("----dedicated...");
ent = entity.FindNumber(243);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(244);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(245);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(246);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(247);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(248);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(249);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(274);
ent:SetKeyValue("spawnflags", "24");
ent:SetKeyValue("health", "0");
ent:SetTakedamage(not ent:GetTakedamage());
entity.CallSpawn(ent);
ent = entity.FindNumber(280);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("spawnflags", "24");
ent:SetTakedamage(not ent:GetTakedamage());
ent:SetKeyValue("targetname", "doorchair");
ent:SetKeyValue("health", "0");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
else
game.Print("----local...");
ent = entity.FindNumber(235);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(236);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(237);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(238);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(239);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(240);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(241);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(263);
ent:SetKeyValue("spawnflags", "24");
ent:SetKeyValue("health", "0");
ent:SetTakedamage(not ent:GetTakedamage());
entity.CallSpawn(ent);
ent = entity.FindNumber(264);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("spawnflags", "24");
ent:SetTakedamage(not ent:GetTakedamage());
ent:SetKeyValue("targetname", "doorchair");
ent:SetKeyValue("health", "0");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
end
else
game.Print("----local...");
ent = entity.FindNumber(235);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(236);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(237);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(238);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(239);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(240);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(241);
ent:SetKeyValue("material", "3");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindNumber(263);
ent:SetKeyValue("spawnflags", "24");
ent:SetKeyValue("health", "0");
ent:SetTakedamage(not ent:GetTakedamage());
entity.CallSpawn(ent);
ent = entity.FindNumber(264);
ent:SetKeyValue("material", "1");
ent:SetKeyValue("spawnflags", "24");
ent:SetTakedamage(not ent:GetTakedamage());
ent:SetKeyValue("targetname", "doorchair");
ent:SetKeyValue("health", "0");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
end
game.Print(ent.GetTakedamage(entity.FindNumber(263)));
game.Print("...Done");
end
-- Functions
function liftbup(ent)
ent = entity.FindBModel(61);
mover.ToPosition(ent, 75, -946, 92, 1234);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function liftaup(ent)
ent = entity.FindBModel(60);
mover.ToPosition(ent, 75, -948, -1824, 642);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function liftadown(ent)
ent = entity.FindBModel(60);
mover.ToPosition(ent, 75, -948, -1824, 40);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
--Sounds
function sound38(ent, other, activator)
sound.PlaySound(entity.FindBModel(38), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
ent = entity.Spawn(); --Door Activation
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "hangerdoorcount");
ent:SetKeyValue("target", "hangerdoor");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent); --elevator trigger
ent = entity.Spawn();
ent.SetupTrigger(ent, 88, 120, 8);
ent:SetKeyValue("classname", "trigger_multiple");
ent:SetKeyValue("target", "lift-a-bool");
ent:SetKeyValue("wait", 1);
entity.CallSpawn(ent);
mover.SetPosition(ent, -1982, 60, 352);
end
function sound36(ent, other, activator)
sound.PlaySound(entity.FindBModel(36), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound135(ent, other, activator)
sound.PlaySound(entity.FindBModel(135), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound22(ent, other, activator)
sound.PlaySound(entity.FindBModel(22), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound1367(ent, other, activator)
sound.PlaySound(entity.FindBModel(136), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
sound.PlaySound(entity.FindBModel(137), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound18(ent, other, activator)
sound.PlaySound(entity.FindBModel(18), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound1389(ent, other, activator)
sound.PlaySound(entity.FindBModel(138), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
sound.PlaySound(entity.FindBModel(139), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound117(ent, other, activator)
sound.PlaySound(entity.FindBModel(117), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function liftareachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(60), "sound/movers/doors/largedoorstop.mp3", 0);
entity.Use(entity.Find("opendoor"));
end
function liftbreachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(60), "sound/movers/doors/largedoorstop.mp3", 0);
entity.Use(entity.Find("transfer"));
end

153
lua/scripts/lua/dn2/dn2.lua Normal file
View file

@ -0,0 +1,153 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "dn2");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-door setup ...");
game.Print("--set up port doors ...");
ent = entity.FindBModel(28);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(29);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(30);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(31);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
game.Print("--set up stbd doors ...");
ent = entity.FindBModel(32);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(33);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(34);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(35);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
game.Print("--set start doors ...");
ent = entity.FindBModel(24);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(25);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(26);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(27);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
game.Print("-Setting up spawnpoints...");
ent = entity.FindBModel(23);
mover.SetPosition(ent, -946, 92, 1234);
ent = entity.Spawn();
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -950, 0, 1260);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -982, 32, 1260);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -982, -32, 1260);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -918, 32, 1260);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -918, -32, 1260);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
game.Print("-Setting up viewscreen...");
ent = entity.FindBModel(3);
ent:SetKeyValue("classname", "func_static");
entity.CallSpawn(ent);
game.Print("...Done");
end

414
lua/scripts/lua/dn3/dn3.lua Normal file
View file

@ -0,0 +1,414 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "dn3");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Lift-A-Script...");
game.Print("--set up usables and lift...");
ent = entity.FindBModel(72);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound72");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(73);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "liftabool");
ent:SetKeyValue("luaUse", "sound73");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(3);
ent:SetKeyValue("classname", "func_static");
ent:SetKeyValue("luaReached", "liftareachedsound");
entity.CallSpawn(ent);
game.Print("--set up overwrite-savety ...");
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "liftabool");
ent:SetKeyValue("falsetarget", "liftastuff");
ent:SetKeyValue("swapname", "liftaswap");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("target", "liftaswap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "6");
entity.CallSpawn(ent);
game.Print("---set up relay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("target", "liftaswap");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up lift-direction-control ...");
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftastuff");
ent:SetKeyValue("target", "liftadir");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("truetarget", "liftadownrelay");
ent:SetKeyValue("falsetarget", "liftauprelay");
ent:SetKeyValue("swapname", "liftadir");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
game.Print("---set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftauprelay");
ent:SetKeyValue("luaUse", "liftaup");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftadownrelay");
ent:SetKeyValue("luaUse", "liftadown");
entity.CallSpawn(ent);
game.Print("-Lift-B-Script...");
game.Print("--set up usables and lift...");
ent = entity.FindBModel(75);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "liftbbool");
ent:SetKeyValue("luaUse", "sound75");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(76);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "liftbbool");
ent:SetKeyValue("luaUse", "sound76");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(10);
ent:SetKeyValue("luaReached", "liftbreachedsound");
entity.CallSpawn(ent);
game.Print("--set up overwrite-savety ...");
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "liftbbool");
ent:SetKeyValue("falsetarget", "liftbstuff");
ent:SetKeyValue("swapname", "liftbswap");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftbstuff");
ent:SetKeyValue("target", "liftbswap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "6");
entity.CallSpawn(ent);
game.Print("---set up relay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftbstuff");
ent:SetKeyValue("target", "liftbswap");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up lift-direction-control ...");
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftbstuff");
ent:SetKeyValue("target", "liftbdir");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "2");
entity.CallSpawn(ent);
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("falsetarget", "liftbdownrelay");
ent:SetKeyValue("truetarget", "liftbuprelay");
ent:SetKeyValue("swapname", "liftbdir");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
game.Print("---set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftbuprelay");
ent:SetKeyValue("luaUse", "liftbup");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftbdownrelay");
ent:SetKeyValue("luaUse", "liftbdown");
entity.CallSpawn(ent);
game.Print("-Lift-C-Script...");
game.Print("--set up usables ...");
ent = entity.FindBModel(77);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftcswitch");
ent:SetKeyValue("target", "liftcstuff");
ent:SetKeyValue("luaUse", "sound77");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(78);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftcswitch");
ent:SetKeyValue("target", "liftcdoor");
ent:SetKeyValue("luaUse", "sound78");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
game.Print("--set up doors ...");
ent = entity.FindBModel(51);
ent:SetKeyValue("targetname", "liftcdoor");
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(52);
ent:SetKeyValue("targetname", "liftcdoor");
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(53);
ent:SetKeyValue("targetname", "liftcdoor");
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
ent = entity.FindBModel(54);
ent:SetKeyValue("targetname", "liftcdoor");
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "0");
entity.CallSpawn(ent);
game.Print("--set up lift and transfer ...");
ent = entity.FindBModel(15);
ent:SetKeyValue("luaReached", "liftcreachedsound");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "transfer");
ent:SetKeyValue("target", "dn4");
entity.CallSpawn(ent);
game.Print("--set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftcstuff");
ent:SetKeyValue("target", "liftcmove");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
game.Print("--set up relay for doors ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftcstuff");
ent:SetKeyValue("target", "liftcdoor");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up relay for move ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftcmove");
ent:SetKeyValue("luaUse", "liftcup");
entity.CallSpawn(ent);
game.Print("-gasroom ...");
game.Print("--setting up elevator ...");
ent = entity.FindBModel(13);
ent:SetKeyValue("classname", "func_door");
ent:SetKeyValue("targetname", "elevator");
ent:SetKeyValue("angle", "-1");
ent:SetKeyValue("wait", "5");
ent:SetKeyValue("speed", "60");
ent:SetKeyValue("count", "234");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "uppity");
ent:SetKeyValue("target", "elevator");
ent:SetKeyValue("wait", "1");
entity.CallSpawn(ent);
game.Print("--setting up bridge ...");
ent = entity.FindBModel(27);
ent:SetKeyValue("classname", "func_door_rotating");
ent:SetKeyValue("targetname", "holdmeup");
ent:SetKeyValue("distance", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "60");
ent:SetKeyValue("spawnflags", "16");
entity.CallSpawn(ent);
ent = entity.FindBModel(74);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "holdmeup");
ent:SetKeyValue("luaUse", "sound74");
ent:SetKeyValue("wait", "1");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("-setting up start doors ...");
ent = entity.FindBModel(40);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(41);
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(42);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(43);
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -24, -1224, 72);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 8, -1256, 72);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 8, -1192, 72);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -56, -1256, 72);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -56, -1192, 72);
mover.SetAngles(ent, 0, 90, 0);
entity.CallSpawn(ent);
game.Print("...Done");
end
-- Functions lift A
function sound72(ent, other, activator)
sound.PlaySound(entity.FindBModel(72), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound73(ent, other, activator)
sound.PlaySound(entity.FindBModel(73), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function liftareachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(3), "sound/movers/doors/largedoorstop.mp3", 0);
end
function liftaup(ent)
ent = entity.FindBModel(3);
mover.ToPosition(ent, 75, 160, 388, 48);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function liftadown(ent)
ent = entity.FindBModel(3);
mover.ToPosition(ent, 75, 320, 388, -272);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
-- Functions lift b
function sound75(ent, other, activator)
sound.PlaySound(entity.FindBModel(75), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound76(ent, other, activator)
sound.PlaySound(entity.FindBModel(76), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function liftbreachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(10), "sound/movers/doors/largedoorstop.mp3", 0);
end
function liftbup(ent)
ent = entity.FindBModel(10);
mover.ToPosition(ent, 75, 1360, 768, 148);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function liftbdown(ent)
ent = entity.FindBModel(10);
mover.ToPosition(ent, 75, 1360, 768, -300);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
-- Functions lift C
function sound77(ent, other, activator)
sound.PlaySound(entity.FindBModel(77), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound78(ent, other, activator)
sound.PlaySound(entity.FindBModel(78), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function liftcreachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(15), "sound/movers/doors/largedoorstop.mp3", 0);
end
function liftcup(ent)
ent = entity.FindBModel(15);
mover.ToPosition(ent, 75, 704, 768, 1000);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
entity.Use(entity.Find("transfer"));
end
-- Else
function sound74(ent, other, activator)
sound.PlaySound(entity.FindBModel(77), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end

276
lua/scripts/lua/dn4/dn4.lua Normal file
View file

@ -0,0 +1,276 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "dn4");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-plasma tube...");
game.Print("--usable snap...");
ent = entity.FindBModel(52);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(53);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
game.Print("--visuals...");
ent = entity.FindBModel(54);
ent:SetKeyValue("material", "1");
entity.CallSpawn(ent);
ent = entity.FindBModel(55);
ent:SetKeyValue("targetname", "glassa");
ent:SetKeyValue("target", "glassb");
ent:SetKeyValue("material", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(56);
ent:SetKeyValue("targetname", "glassb");
ent:SetKeyValue("target", "glassa");
ent:SetKeyValue("material", "2");
entity.CallSpawn(ent);
game.Print("--background...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "explodo2count");
ent:SetKeyValue("targetname", "glassa");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "explodo2count");
ent:SetKeyValue("targetname", "glassb");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "explodo2count");
ent:SetKeyValue("target", "explodo2");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
game.Print("--explosives...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt1");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 0);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt1");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 0);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 32);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt2");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 32);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt3");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 64);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt3");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 64);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt4");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 96);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt4");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 96);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt5");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt5");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt6");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 160);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt6");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 160);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgt7");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1592, 192);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo2");
ent:SetKeyValue("target", "fxtgt7");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 688, -1664, 192);
game.Print("-breakable-mod...");
ent = entity.FindBModel(20);
ent:SetKeyValue("classname", "func_static");
entity.CallSpawn(ent);
ent = entity.FindBModel(37);
ent:SetKeyValue("classname", "func_static");
entity.CallSpawn(ent);
ent = entity.FindBModel(38);
ent:SetKeyValue("classname", "func_static");
entity.CallSpawn(ent);
ent = entity.FindBModel(39);
ent:SetKeyValue("classname", "func_static");
entity.CallSpawn(ent);
game.Print("-setting up boss-lift...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "bossdelay");
ent:SetKeyValue("target", "pootovator");
ent:SetKeyValue("wait", "15");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "bossdelay");
ent:SetKeyValue("targetname", "pootovator");
entity.CallSpawn(ent);
game.Print("-setting up endroom doors and switch...");
ent = entity.FindBModel(28);
ent:SetKeyValue("targetname", "bossdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(29);
ent:SetKeyValue("targetname", "bossdoor");
ent:SetKeyValue("angle", "0");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(30);
ent:SetKeyValue("targetname", "bossdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(31);
ent:SetKeyValue("targetname", "bossdoor");
ent:SetKeyValue("angle", "180");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
ent = entity.FindBModel(41);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "bossdoor");
ent:SetKeyValue("luaUse", "sound41");
ent:SetKeyValue("wait", "5");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
entity.Remove(entity.Find("nego"));
game.Print("-setting up start doors ...");
ent = entity.FindBModel(24);
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(25);
ent:SetKeyValue("angle", "270");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(26);
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "40");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
ent = entity.FindBModel(27);
ent:SetKeyValue("angle", "90");
ent:SetKeyValue("wait", "-1");
ent:SetKeyValue("speed", "25");
ent:SetKeyValue("count", "32");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
entity.Use(ent);
game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 664, 772, 80);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 696, 804, 80);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 696, 740, 80);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 632, 804, 80);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, 632, 740, 80);
mover.SetAngles(ent, 0, 0, 0);
entity.CallSpawn(ent);
game.Print("...Done");
end
-- Else
function sound41(ent, other, activator)
sound.PlaySound(entity.FindBModel(41), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end

220
lua/scripts/lua/dn5/dn5.lua Normal file
View file

@ -0,0 +1,220 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "dn5");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Setting up bridge-room...");
game.Print("--remove stuff...");
entity.Remove(entity.Find("killkill"));
entity.Use(entity.Find("nostick"));
game.Print("--set up brushmodels...");
ent = entity.FindBModel(8);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("luaReached", "bridgecrash");
ent:SetKeyValue("target", "pusher2");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(23);
ent:SetKeyValue("classname", "func_breakable");
ent:SetKeyValue("material", "1");
ent:SetKeyValue("splashDamage", "75");
ent:SetKeyValue("splashRadius", "75");
entity.CallSpawn(ent);
ent = entity.FindBModel(15);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("luaUse", "carcrash");
ent:SetKeyValue("target", "pusher1");
entity.CallSpawn(ent);
ent = entity.FindBModel(24);
ent:SetKeyValue("classname", "func_static");
entity.CallSpawn(ent);
game.Print("-Lift-Script...");
game.Print("--set up usables ...");
ent = entity.FindBModel(82);
ent:SetKeyValue("targetname", "liftswitch");
ent:SetKeyValue("target", "liftbool");
ent:SetKeyValue("luaUse", "sound82");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.FindBModel(84);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("targetname", "liftswitch");
ent:SetKeyValue("target", "liftbool");
ent:SetKeyValue("luaUse", "sound84");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
game.Print("--set up lift ...");
ent = entity.FindBModel(5);
ent:SetKeyValue("classname", "func_static");
ent:SetKeyValue("luaReached", "liftreachedsound");
entity.CallSpawn(ent);
game.Print("--set up overwrite-savety ...");
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("targetname", "liftbool");
ent:SetKeyValue("falsetarget", "liftstuff");
ent:SetKeyValue("swapname", "liftswap");
ent:SetKeyValue("spawnflags", "4");
entity.CallSpawn(ent);
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_delay");
ent:SetKeyValue("targetname", "liftstuff");
ent:SetKeyValue("target", "liftswap");
ent:SetKeyValue("spawnflags", "1");
ent:SetKeyValue("wait", "13");
entity.CallSpawn(ent);
game.Print("---set up relay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftstuff");
ent:SetKeyValue("target", "liftswap");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("--set up lift-direction-control ...");
game.Print("---set up delay ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftstuff");
ent:SetKeyValue("target", "liftdir");
ent:SetKeyValue("spawnflags", "8");
entity.CallSpawn(ent);
game.Print("---set up boolean ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_boolean");
ent:SetKeyValue("falsetarget", "liftdownrelay");
ent:SetKeyValue("truetarget", "liftuprelay");
ent:SetKeyValue("swapname", "liftdir");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
game.Print("---set up relays...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftuprelay");
ent:SetKeyValue("luaUse", "liftup");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "liftdownrelay");
ent:SetKeyValue("luaUse", "liftdown");
entity.CallSpawn(ent);
game.Print("-Setting up transporter...");
ent = entity.FindBModel(13);
ent:SetKeyValue("classname", "func_usable");
ent:SetKeyValue("target", "transfer");
ent:SetKeyValue("luaUse", "transferstart");
ent:SetKeyValue("luaReached", "transfermove");
ent:SetKeyValue("spawnflags", "8");
ent:SetKeyValue("wait", "3");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "transfer");
ent:SetKeyValue("target", "dn6");
ent:SetKeyValue("wait", "15");
entity.CallSpawn(ent);
game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1512, 864, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1544, 896, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1544, 832, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1480, 896, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1480, 832, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
game.Print("...Done");
end
-- bridge-room
function carcrash(ent, other, activator)
sound.PlaySound(entity.FindBModel(15), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
mover.ToPosition(entity.FindBModel(8), 25, -256, -1484, 64)
end
function bridgecrash(ent, other, activator)
entity.Use(entity.FindBModel(8));
entity.Use(entity.FindBModel(23));
mover.ToAngles(entity.FindBModel(24), 30, 21, 0, 0)
end
-- lift
function liftup(ent)
ent = entity.FindBModel(5);
mover.ToPosition(ent, 75, -2584, -352, 1024);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function liftdown(ent)
ent = entity.FindBModel(5);
mover.ToPosition(ent, 75, -2584, -352, 228);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function sound82(ent, other, activator)
sound.PlaySound(entity.FindBModel(82), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound84(ent, other, activator)
sound.PlaySound(entity.FindBModel(84), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function liftreachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(5), "sound/movers/doors/largedoorstop.mp3", 0);
end
-- transfer
function transferstart(ent)
ent = entity.FindBModel(13);
ent:SetKeyValue("classname", "func_static");
mover.ToPosition(ent, 10, -768, -480, 1012);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function transfermove(ent)
ent = entity.FindBModel(13);
mover.Halt(ent);
sound.PlaySound(entity.FindBModel(5), "sound/movers/doors/largedoorstop.mp3", 0);
mover.ToPosition(ent, 125, -768, 1696, 1012);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
ent = entity.FindBModel(76);
mover.ToPosition(ent, 125, -568, 1820, 1144);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end

399
lua/scripts/lua/dn6/dn6.lua Normal file
View file

@ -0,0 +1,399 @@
-- Startup
function InitGame(levelTime, randomSeed, restart)
game.Print("Lua Level Init...");
game.Print("-map_restart ...");
game.Print("--workaround-setup ...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_levelchange");
ent:SetKeyValue("targetname", "map_restart");
ent:SetKeyValue("target", "dn6");
entity.CallSpawn(ent);
game.Print("--trigger-setup ...");
if restart == 1 then
game.ClientPrint(-1, "Please don't use map_restart, use map or devmap instead.");
game.Print("Please don't use map_restart, use map or devmap instead.");
ent = entity.Find("map_restart")
entity.Use(ent)
end
game.Print("-Setting up Plasma Stream...");
game.Print("--usable-fix...");
ent = entity.FindBModel(143);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(9);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
game.Print("--plasma-replacement...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_steam");
ent:SetKeyValue("targetname", "plasma_jets");
ent:SetKeyValue("target", "t8");
entity.CallSpawn(ent);
mover.SetPosition(ent, 3576, 1360, -56);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_steam");
ent:SetKeyValue("targetname", "plasma_jets");
ent:SetKeyValue("target", "t9");
entity.CallSpawn(ent);
mover.SetPosition(ent, 3496, 1360, -56);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_steam");
ent:SetKeyValue("targetname", "plasma_jets");
ent:SetKeyValue("target", "t10");
entity.CallSpawn(ent);
mover.SetPosition(ent, 3536, 1360, -56);
game.Print("--relay...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("targetname", "plasma");
ent:SetKeyValue("target", "plasma_jets");
ent:SetKeyValue("luaUse", "clearplasma");
entity.CallSpawn(ent);
game.Print("-plasma tube A...");
game.Print("--usable snap...");
ent = entity.FindBModel(48);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(49);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
game.Print("--visuals...");
ent = entity.FindBModel(50);
ent:SetKeyValue("material", "1");
entity.CallSpawn(ent);
ent = entity.FindBModel(51);
ent:SetKeyValue("targetname", "glass1a");
ent:SetKeyValue("target", "glass1b");
ent:SetKeyValue("material", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(52);
ent:SetKeyValue("targetname", "glass1b");
ent:SetKeyValue("target", "glass1a");
ent:SetKeyValue("material", "2");
entity.CallSpawn(ent);
game.Print("--background...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "explodo1count");
ent:SetKeyValue("targetname", "glass1a");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "explodo1count");
ent:SetKeyValue("targetname", "glass1b");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "explodo1count");
ent:SetKeyValue("target", "explodo1");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "explodo1count");
ent:SetKeyValue("target", "explodo2");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
game.Print("--explosives...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta1");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1384, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta1");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1384, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1416, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta2");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1416, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta3");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1448, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta3");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1448, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta4");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1480, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta4");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1480, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta5");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1512, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta5");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1512, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta6");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1544, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta6");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1544, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgta7");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1984, 1576, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo1");
ent:SetKeyValue("target", "fxtgta7");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 2040, 1576, -128);
game.Print("-plasma tube B...");
game.Print("--usable snap...");
ent = entity.FindBModel(48);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(49);
ent:SetKeyValue("team", "2");
entity.CallSpawn(ent);
game.Print("--visuals...");
ent = entity.FindBModel(44);
ent:SetKeyValue("material", "1");
entity.CallSpawn(ent);
ent = entity.FindBModel(45);
ent:SetKeyValue("targetname", "glass3a");
ent:SetKeyValue("target", "glass3b");
ent:SetKeyValue("material", "2");
entity.CallSpawn(ent);
ent = entity.FindBModel(46);
ent:SetKeyValue("targetname", "glass3b");
ent:SetKeyValue("target", "glass3a");
ent:SetKeyValue("material", "2");
entity.CallSpawn(ent);
game.Print("--background...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "explodo3count");
ent:SetKeyValue("targetname", "glass3a");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_relay");
ent:SetKeyValue("target", "explodo3count");
ent:SetKeyValue("targetname", "glass3b");
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "explodo3count");
ent:SetKeyValue("target", "explodo3");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
ent:SetKeyValue("classname", "target_counter");
ent:SetKeyValue("targetname", "explodo3count");
ent:SetKeyValue("target", "explodo4");
ent:SetKeyValue("count", "1");
entity.CallSpawn(ent);
game.Print("--explosives...");
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb1");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1592, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb1");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1592, 1928, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1624, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb2");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1624, 1928, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb3");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1656, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb3");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1656, 1928, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb4");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1688, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb4");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1688, 1928, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb5");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1720, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb5");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1720, 1928, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb6");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1752, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb6");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1752, 1928, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_notnull");
ent:SetKeyValue("targetname", "fxtgtb7");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1784, 1872, -128);
ent = entity.Spawn();
ent:SetKeyValue("classname", "fx_surface_explosion");
ent:SetKeyValue("targetname", "explodo4");
ent:SetKeyValue("target", "fxtgtb7");
ent:SetKeyValue("spawnflags", "2");
entity.CallSpawn(ent);
mover.SetPosition(ent, 1784, 1928, -128);
--[[game.Print("-Setting up spawnpoints...");
entity.RemoveSpawns();
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1512, 864, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1544, 896, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1544, 832, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1480, 896, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);
ent = entity.Spawn();
ent:SetKeyValue("classname", "info_player_deathmatch");
mover.SetPosition(ent, -1480, 832, 8);
mover.SetAngles(ent, 0, 270, 0);
entity.CallSpawn(ent);]]
game.Print("...Done");
end
-- Plasma vent
function clearplasma(ent, other, activator)
entity.Remove(entity.Find("t11"));
entity.Remove(entity.Find("t11"));
end
function bridgecrash(ent, other, activator)
entity.Use(entity.FindBModel(8));
entity.Use(entity.FindBModel(23));
mover.ToAngles(entity.FindBModel(24), 30, 21, 0, 0)
end
-- lift
function liftup(ent)
ent = entity.FindBModel(5);
mover.ToPosition(ent, 75, -2584, -352, 1024);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function liftdown(ent)
ent = entity.FindBModel(5);
mover.ToPosition(ent, 75, -2584, -352, 228);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function sound82(ent, other, activator)
sound.PlaySound(entity.FindBModel(82), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function sound84(ent, other, activator)
sound.PlaySound(entity.FindBModel(84), "sound/ambience/dreadnaught/dnlcarpattern1.wav", 0);
end
function liftreachedsound(ent, other, activator)
sound.PlaySound(entity.FindBModel(5), "sound/movers/doors/largedoorstop.mp3", 0);
end
-- transfer
function transferstart(ent)
ent = entity.FindBModel(13);
ent:SetKeyValue("classname", "func_static");
mover.ToPosition(ent, 10, -768, -480, 1012);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end
function transfermove(ent)
ent = entity.FindBModel(13);
mover.Halt(ent);
sound.PlaySound(entity.FindBModel(5), "sound/movers/doors/largedoorstop.mp3", 0);
mover.ToPosition(ent, 125, -768, 1696, 1012);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
ent = entity.FindBModel(76);
mover.ToPosition(ent, 125, -568, 1820, 1144);
sound.PlaySound(ent, "sound/movers/doors/largedoorstart.mp3", 0);
end