This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 0e770b2b49
commit df294d03aa
7526 changed files with 4011945 additions and 15 deletions

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--[[---------------------------------------------------------
Name: KickId2
Desc: Allows admins to use the kickid2 command to kick people.
-----------------------------------------------------------]]
local function KickId( player, command, arguments )
if ( !player:IsAdmin() ) then return end
local id = arguments[1]
local reason = arguments[2] or "Kicked"
RunConsoleCommand( "kickid", id, Format( "%s (%s)", reason, player:Nick() ) )
end
concommand.Add( "kickid2", KickId, nil, "", { FCVAR_DONTRECORD } )
--[[---------------------------------------------------------
Name: BanId2
Desc: Allows admins to use the banid2 command to ban people.
-----------------------------------------------------------]]
local function BanID( player, command, arguments )
if ( !player:IsAdmin() ) then return end
local length = arguments[1]
local id = arguments[2]
RunConsoleCommand( "banid", length, id )
end
concommand.Add( "banid2", BanID, nil, "", { FCVAR_DONTRECORD } )

View File

@@ -0,0 +1,138 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AdvDupe2 = {
Version = "1.1.0",
Revision = 51
}
AdvDupe2.DataFolder = "advdupe2" --name of the folder in data where dupes will be saved
function AdvDupe2.Notify(ply,msg,typ, showsvr, dur)
net.Start("AdvDupe2Notify")
net.WriteString(msg)
net.WriteUInt(typ or 0, 8)
net.WriteFloat(dur or 5)
net.Send(ply)
if(showsvr==true)then
print("[AdvDupe2Notify]\t"..ply:Nick()..": "..msg)
end
end
AddCSLuaFile( "autorun/client/advdupe2_cl_init.lua" )
AddCSLuaFile( "advdupe2/file_browser.lua" )
AddCSLuaFile( "advdupe2/sh_codec.lua" )
AddCSLuaFile( "advdupe2/cl_file.lua" )
AddCSLuaFile( "advdupe2/cl_ghost.lua" )
util.AddNetworkString("AdvDupe2_ReportClass")
util.AddNetworkString("AdvDupe2_ReportModel")
util.AddNetworkString("AdvDupe2Notify")
util.AddNetworkString("AdvDupe2_RemoveGhosts")
util.AddNetworkString("AdvDupe2_ResetDupeInfo")
util.AddNetworkString("AdvDupe2_StartGhosting")
util.AddNetworkString("AdvDupe2_InitProgressBar")
util.AddNetworkString("AdvDupe2_DrawSelectBox")
util.AddNetworkString("AdvDupe2_RemoveSelectBox")
util.AddNetworkString("AdvDupe2_UpdateProgressBar")
util.AddNetworkString("AdvDupe2_RemoveProgressBar")
util.AddNetworkString("AdvDupe2_ResetOffsets")
util.AddNetworkString("AdvDupe2_SetDupeInfo")
util.AddNetworkString("AdvDupe2_ReceiveFile")
util.AddNetworkString("AdvDupe2_CanAutoSave")
CreateConVar("AdvDupe2_DebugInfo", "0", {FCVAR_ARCHIVE}, "Should extra info be printed to console?", 0, 1)
CreateConVar("AdvDupe2_SpawnRate", "1", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MaxFileSize", "200", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MaxEntities", "0", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MaxConstraints", "0", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MaxContraptionEntities", "10", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MaxContraptionConstraints", "15", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MinContraptionSpawnDelay", "0.2", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MinContraptionUndoDelay", "0.1", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MaxContraptionUndoDelay", "60", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_FileModificationDelay", "5", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_UpdateFilesDelay", "10", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_LoadMap", "0", {FCVAR_ARCHIVE})
CreateConVar("AdvDupe2_MapFileName", "", {FCVAR_ARCHIVE})
local function PasteMap()
if(GetConVarString("AdvDupe2_LoadMap")=="0")then return end
local filename = GetConVarString("AdvDupe2_MapFileName")
if(not filename or filename == "")then
print("[AdvDupe2Notify]\tInvalid file name to loap map save.")
return
end
if(not file.Exists("advdupe2_maps/"..filename..".txt", "DATA"))then
print("[AdvDupe2Notify]\tFile does not exist for a map save.")
return
end
local map = file.Read("advdupe2_maps/"..filename..".txt")
local success,dupe,info,moreinfo = AdvDupe2.Decode(map)
if not success then
print("[AdvDupe2Notify]\tCould not open map save "..dupe)
return
end
local Tab = {Entities=dupe["Entities"], Constraints=dupe["Constraints"], HeadEnt=dupe["HeadEnt"]}
local Entities = AdvDupe2.duplicator.Paste(nil, table.Copy(Tab.Entities), Tab.Constraints, nil, nil, Tab.HeadEnt.Pos, true)
local maptype = GetConVarString("AdvDupe2_LoadMap")
if(maptype=="1")then
local PhysObj
for k,v in pairs(Entities) do
if(IsValid(v))then
for i=0, #Tab.Entities[k].PhysicsObjects do
if(Tab.Entities[k].PhysicsObjects[i].Frozen)then
PhysObj = v:GetPhysicsObjectNum( i )
if IsValid(PhysObj) then
PhysObj:EnableMotion(true)
end
end
end
if v.CPPISetOwner then v:CPPISetOwner(game.GetWorld()) end
end
end
elseif(maptype=="2")then
local PhysObj
for k,v in pairs(Entities) do
if(IsValid(v))then
for i=0, #Tab.Entities[k].PhysicsObjects do
PhysObj = v:GetPhysicsObjectNum( i )
if IsValid(PhysObj) then
PhysObj:EnableMotion(true)
end
end
if v.CPPISetOwner then v:CPPISetOwner(game.GetWorld()) end
end
end
end
print("[AdvDupe2Notify]\tMap save pasted.")
end
hook.Add("InitPostEntity", "AdvDupe2_PasteMap", PasteMap)
hook.Add("PostCleanupMap", "AdvDupe2_PasteMap", PasteMap)
hook.Add("PlayerInitialSpawn","AdvDupe2_AddPlayerTable",function(ply)
ply.AdvDupe2 = {}
end)
include( "advdupe2/sv_clipboard.lua" )
include( "advdupe2/sh_codec.lua" )
include( "advdupe2/sv_misc.lua" )
include( "advdupe2/sv_file.lua" )
include( "advdupe2/sv_ghost.lua" )

View File

@@ -0,0 +1,15 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local players = player.GetAll()
for _, ply in ipairs(players) do
ply:ConCommand("r_cleardecals")
end

View File

@@ -0,0 +1,26 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
//Global variable to inform Export To Lua addon that the core addon is installed
SpecialEffectsD2KIsInstalled = true
//Find effects and cut the sound they're making
local function OnEffectRemove_D2K(effect_d2k)
//Stop sounds
if effect_d2k.SFX_Sound then
effect_d2k.SFX_Sound:Stop()
end
end
//Add hook
hook.Add("EntityRemoved", "EffectRemoveHook_D2K", OnEffectRemove_D2K)

View File

@@ -0,0 +1,289 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
// adding materials to the material toolguns list
list.Add( "OverrideMaterials", "models/XQM//Deg360" )
list.Add( "OverrideMaterials", "models/XQM//LightLinesGB" )
list.Add( "OverrideMaterials", "models/XQM//LightLinesRed" )
list.Add( "OverrideMaterials", "models/XQM//SquaredMat" )
list.Add( "OverrideMaterials", "models/XQM//WoodTexture_1" )
list.Add( "OverrideMaterials", "models/airboat/airboat_blur02" )
list.Add( "OverrideMaterials", "models/alyx/emptool_glow" )
list.Add( "OverrideMaterials", "models/antlion/antlion_innards" )
list.Add( "OverrideMaterials", "models/barnacle/roots" )
list.Add( "OverrideMaterials", "models/combine_advisor/body9" )
list.Add( "OverrideMaterials", "models/combine_advisor/mask" )
list.Add( "OverrideMaterials", "models/combine_scanner/scanner_eye" )
list.Add( "OverrideMaterials", "models/debug/debugwhite" )
list.Add( "OverrideMaterials", "models/dog/eyeglass" )
list.Add( "OverrideMaterials", "models/effects/portalrift_sheet" )
list.Add( "OverrideMaterials", "models/effects/slimebubble_sheet" )
list.Add( "OverrideMaterials", "models/effects/splode1_sheet" )
list.Add( "OverrideMaterials", "models/effects/splode_sheet" )
list.Add( "OverrideMaterials", "models/gibs/metalgibs/metal_gibs" )
list.Add( "OverrideMaterials", "models/gibs/woodgibs/woodgibs01" )
list.Add( "OverrideMaterials", "models/gibs/woodgibs/woodgibs02" )
list.Add( "OverrideMaterials", "models/gibs/woodgibs/woodgibs03" )
list.Add( "OverrideMaterials", "models/player/player_chrome1" )
list.Add( "OverrideMaterials", "models/props_animated_breakable/smokestack/brickwall002a" )
list.Add( "OverrideMaterials", "models/props_building_details/courtyard_template001c_bars" )
list.Add( "OverrideMaterials", "models/props_building_details/courtyard_template001c_bars" )
list.Add( "OverrideMaterials", "models/props_buildings/destroyedbuilldingwall01a" )
list.Add( "OverrideMaterials", "models/props_buildings/plasterwall021a" )
list.Add( "OverrideMaterials", "models/props_c17/frostedglass_01a" )
list.Add( "OverrideMaterials", "models/props_c17/furniturefabric001a" )
list.Add( "OverrideMaterials", "models/props_c17/furniturefabric002a" )
list.Add( "OverrideMaterials", "models/props_c17/furnituremetal001a" )
list.Add( "OverrideMaterials", "models/props_c17/gate_door02a" )
list.Add( "OverrideMaterials", "models/props_c17/metalladder001" )
list.Add( "OverrideMaterials", "models/props_c17/metalladder002" )
list.Add( "OverrideMaterials", "models/props_c17/metalladder003" )
list.Add( "OverrideMaterials", "models/props_canal/canal_bridge_railing_01a" )
list.Add( "OverrideMaterials", "models/props_canal/canal_bridge_railing_01b" )
list.Add( "OverrideMaterials", "models/props_canal/canal_bridge_railing_01c" )
list.Add( "OverrideMaterials", "models/props_canal/canalmap_sheet" )
list.Add( "OverrideMaterials", "models/props_canal/coastmap_sheet" )
list.Add( "OverrideMaterials", "models/props_canal/metalcrate001d" )
list.Add( "OverrideMaterials", "models/props_canal/metalwall005b" )
list.Add( "OverrideMaterials", "models/props_canal/rock_riverbed01a" )
list.Add( "OverrideMaterials", "models/props_combine/citadel_cable" )
list.Add( "OverrideMaterials", "models/props_combine/citadel_cable_b" )
list.Add( "OverrideMaterials", "models/props_combine/com_shield001a" )
list.Add( "OverrideMaterials", "models/props_combine/combine_interface_disp" )
list.Add( "OverrideMaterials", "models/props_combine/combine_monitorbay_disp" )
list.Add( "OverrideMaterials", "models/props_combine/metal_combinebridge001" )
list.Add( "OverrideMaterials", "models/props_combine/pipes01" )
list.Add( "OverrideMaterials", "models/props_combine/pipes03" )
list.Add( "OverrideMaterials", "models/props_combine/prtl_sky_sheet" )
list.Add( "OverrideMaterials", "models/props_combine/stasisfield_beam" )
list.Add( "OverrideMaterials", "models/props_debris/building_template010a" )
list.Add( "OverrideMaterials", "models/props_debris/building_template022j" )
list.Add( "OverrideMaterials", "models/props_debris/composite_debris" )
list.Add( "OverrideMaterials", "models/props_debris/concretefloor013a" )
list.Add( "OverrideMaterials", "models/props_debris/concretefloor020a" )
list.Add( "OverrideMaterials", "models/props_debris/concretewall019a" )
list.Add( "OverrideMaterials", "models/props_debris/metalwall001a" )
list.Add( "OverrideMaterials", "models/props_debris/plasterceiling008a" )
list.Add( "OverrideMaterials", "models/props_debris/plasterwall009d" )
list.Add( "OverrideMaterials", "models/props_debris/plasterwall021a" )
list.Add( "OverrideMaterials", "models/props_debris/plasterwall034a" )
list.Add( "OverrideMaterials", "models/props_debris/plasterwall034d" )
list.Add( "OverrideMaterials", "models/props_debris/plasterwall039c" )
list.Add( "OverrideMaterials", "models/props_debris/plasterwall040c" )
list.Add( "OverrideMaterials", "models/props_debris/tilefloor001c" )
list.Add( "OverrideMaterials", "models/props_foliage/driftwood_01a" )
list.Add( "OverrideMaterials", "models/props_foliage/oak_tree01" )
list.Add( "OverrideMaterials", "models/props_foliage/tree_deciduous_01a_trunk" )
list.Add( "OverrideMaterials", "models/props_interiors/metalfence007a" )
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01a" )
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01b" )
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01c" )
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01d" )
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01e" )
list.Add( "OverrideMaterials", "models/props_lab/Tank_Glass001" )
list.Add( "OverrideMaterials", "models/props_lab/cornerunit_cloud" )
list.Add( "OverrideMaterials", "models/props_lab/door_klab01" )
list.Add( "OverrideMaterials", "models/props_lab/security_screens" )
list.Add( "OverrideMaterials", "models/props_lab/security_screens2" )
list.Add( "OverrideMaterials", "models/props_lab/warp_sheet" )
list.Add( "OverrideMaterials", "models/props_lab/xencrystal_sheet" )
list.Add( "OverrideMaterials", "models/props_pipes/GutterMetal01a")
list.Add( "OverrideMaterials", "models/props_pipes/destroyedpipes01a" )
list.Add( "OverrideMaterials", "models/props_pipes/pipemetal001a" )
list.Add( "OverrideMaterials", "models/props_pipes/pipeset_metal02" )
list.Add( "OverrideMaterials", "models/props_pipes/pipesystem01a_skin1" )
list.Add( "OverrideMaterials", "models/props_pipes/pipesystem01a_skin2" )
list.Add( "OverrideMaterials", "models/props_vents/borealis_vent001" )
list.Add( "OverrideMaterials", "models/props_vents/borealis_vent001b" )
list.Add( "OverrideMaterials", "models/props_vents/borealis_vent001c" )
list.Add( "OverrideMaterials", "models/props_wasteland/concretefloor010a" )
list.Add( "OverrideMaterials", "models/props_wasteland/concretewall064b" )
list.Add( "OverrideMaterials", "models/props_wasteland/concretewall066a" )
list.Add( "OverrideMaterials", "models/props_wasteland/dirtwall001a" )
list.Add( "OverrideMaterials", "models/props_wasteland/metal_tram001a" )
list.Add( "OverrideMaterials", "models/props_wasteland/quarryobjects01" )
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff02a" )
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff02b" )
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff02c" )
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff04a" )
list.Add( "OverrideMaterials", "models/props_wasteland/rockgranite02a" )
list.Add( "OverrideMaterials", "models/props_wasteland/tugboat01" )
list.Add( "OverrideMaterials", "models/props_wasteland/tugboat02" )
list.Add( "OverrideMaterials", "models/props_wasteland/wood_fence01a" )
list.Add( "OverrideMaterials", "models/props_wasteland/wood_fence01a_skin2" )
list.Add( "OverrideMaterials", "models/shadertest/predator" )
list.Add( "OverrideMaterials", "models/weapons/v_crossbow/rebar_glow" )
list.Add( "OverrideMaterials", "models/weapons/v_crowbar/crowbar_cyl" )
list.Add( "OverrideMaterials", "models/weapons/v_grenade/grenade body" )
list.Add( "OverrideMaterials", "models/weapons/v_slam/new light1" )
list.Add( "OverrideMaterials", "models/weapons/v_slam/new light2" )
list.Add( "OverrideMaterials", "models/weapons/v_smg1/texture5" )
list.Add( "OverrideMaterials", "models/XQM/BoxFull_diffuse" )
list.Add( "OverrideMaterials", "models/XQM/CellShadedCamo_diffuse" )
list.Add( "OverrideMaterials", "models/XQM/CinderBlock_Tex" )
list.Add( "OverrideMaterials", "models/XQM/JetBody2TailPiece_diffuse" )
list.Add( "OverrideMaterials", "models/XQM/PoleX1_diffuse" )
list.Add( "OverrideMaterials", "models/XQM/Rails/gumball_1" )
list.Add( "OverrideMaterials", "models/XQM/SquaredMatInverted" )
list.Add( "OverrideMaterials", "models/XQM/WoodPlankTexture" )
list.Add( "OverrideMaterials", "models/XQM/boxfull_diffuse" )
list.Add( "OverrideMaterials", "models/dav0r/hoverball" )
list.Add( "OverrideMaterials", "models/spawn_effect" )
list.Add( "OverrideMaterials", "phoenix_storms/Fender_chrome" )
list.Add( "OverrideMaterials", "phoenix_storms/Fender_white" )
list.Add( "OverrideMaterials", "phoenix_storms/Fender_wood" )
list.Add( "OverrideMaterials", "phoenix_storms/Future_vents" )
list.Add( "OverrideMaterials", "phoenix_storms/FuturisticTrackRamp_1-2" )
list.Add( "OverrideMaterials", "phoenix_storms/OfficeWindow_1-1" )
list.Add( "OverrideMaterials", "phoenix_storms/Pro_gear_side" )
list.Add( "OverrideMaterials", "phoenix_storms/black_brushes" )
list.Add( "OverrideMaterials", "phoenix_storms/black_chrome" )
list.Add( "OverrideMaterials", "phoenix_storms/blue_steel" )
list.Add( "OverrideMaterials", "phoenix_storms/camera" )
list.Add( "OverrideMaterials", "phoenix_storms/car_tire" )
list.Add( "OverrideMaterials", "phoenix_storms/checkers_map" )
list.Add( "OverrideMaterials", "phoenix_storms/cigar" )
list.Add( "OverrideMaterials", "phoenix_storms/concrete0" )
list.Add( "OverrideMaterials", "phoenix_storms/concrete1" )
list.Add( "OverrideMaterials", "phoenix_storms/concrete2" )
list.Add( "OverrideMaterials", "phoenix_storms/concrete3" )
list.Add( "OverrideMaterials", "phoenix_storms/construct/concrete_barrier00" )
list.Add( "OverrideMaterials", "phoenix_storms/construct/concrete_barrier2_00" )
list.Add( "OverrideMaterials", "phoenix_storms/construct/concrete_pipe_00" )
list.Add( "OverrideMaterials", "phoenix_storms/egg" )
list.Add( "OverrideMaterials", "phoenix_storms/gear" )
list.Add( "OverrideMaterials", "phoenix_storms/gear_top" )
list.Add( "OverrideMaterials", "phoenix_storms/grey_chrome" )
list.Add( "OverrideMaterials", "phoenix_storms/grey_steel" )
list.Add( "OverrideMaterials", "phoenix_storms/heli" )
list.Add( "OverrideMaterials", "phoenix_storms/indentTiles2" )
list.Add( "OverrideMaterials", "phoenix_storms/iron_rails" )
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_carbonfiber" )
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_carbonfiber2" )
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_metallic" )
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_metallic2" )
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_plastic" )
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_plastic2" )
list.Add( "OverrideMaterials", "phoenix_storms/metal_plate" )
list.Add( "OverrideMaterials", "phoenix_storms/metal_wheel" )
list.Add( "OverrideMaterials", "phoenix_storms/metalbox" )
list.Add( "OverrideMaterials", "phoenix_storms/metalbox2" )
list.Add( "OverrideMaterials", "phoenix_storms/metalfence004a" )
list.Add( "OverrideMaterials", "phoenix_storms/middle" )
list.Add( "OverrideMaterials", "phoenix_storms/mrref2" )
list.Add( "OverrideMaterials", "phoenix_storms/output_jack" )
list.Add( "OverrideMaterials", "phoenix_storms/pack2/chrome" )
list.Add( "OverrideMaterials", "phoenix_storms/pack2/interior_sides" )
list.Add( "OverrideMaterials", "phoenix_storms/pack2/train_floor" )
list.Add( "OverrideMaterials", "phoenix_storms/potato" )
list.Add( "OverrideMaterials", "phoenix_storms/pro_gear_top2" )
list.Add( "OverrideMaterials", "phoenix_storms/ps_grass" )
list.Add( "OverrideMaterials", "phoenix_storms/road" )
list.Add( "OverrideMaterials", "phoenix_storms/roadside" )
list.Add( "OverrideMaterials", "phoenix_storms/scrnspace" )
list.Add( "OverrideMaterials", "phoenix_storms/side" )
list.Add( "OverrideMaterials", "phoenix_storms/simplyMetallic1" )
list.Add( "OverrideMaterials", "phoenix_storms/simplyMetallic2" )
list.Add( "OverrideMaterials", "phoenix_storms/smallwheel" )
list.Add( "OverrideMaterials", "phoenix_storms/spheremappy" )
list.Add( "OverrideMaterials", "phoenix_storms/t_light" )
list.Add( "OverrideMaterials", "phoenix_storms/thruster" )
list.Add( "OverrideMaterials", "phoenix_storms/tiles2" )
list.Add( "OverrideMaterials", "phoenix_storms/top" )
list.Add( "OverrideMaterials", "phoenix_storms/torpedo" )
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_beamside" )
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_beamtop" )
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_plate" )
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_plateside" )
list.Add( "OverrideMaterials", "phoenix_storms/white_brushes" )
list.Add( "OverrideMaterials", "phoenix_storms/white_fps" )
list.Add( "OverrideMaterials", "phoenix_storms/window" )
list.Add( "OverrideMaterials", "phoenix_storms/wire/pcb_blue" )
list.Add( "OverrideMaterials", "phoenix_storms/wire/pcb_green" )
list.Add( "OverrideMaterials", "phoenix_storms/wire/pcb_red" )
list.Add( "OverrideMaterials", "phoenix_storms/wood_dome" )
list.Add( "OverrideMaterials", "phoenix_storms/wood_side" )
// Checking if CSS is mounted and adding CSS textures if it is
function engine.IsMounted(g)
for k,v in pairs(engine.GetGames()) do
if (' cstrike' ) then
return true;
end
end
end
if IsMounted( 'cstrike' ) and (engine.IsMounted('cstrike')) then
list.Add( "OverrideMaterials", "models/cs_havana/wndb" )
list.Add( "OverrideMaterials", "models/cs_havana/wndd" )
list.Add( "OverrideMaterials", "models/cs_italy/light_orange" )
list.Add( "OverrideMaterials", "models/cs_italy/plaster" )
list.Add( "OverrideMaterials", "models/cs_italy/pwtrim2" )
list.Add( "OverrideMaterials", "models/de_cbble/wndarch" )
list.Add( "OverrideMaterials", "models/de_chateau/ch_arch_b1" )
list.Add( "OverrideMaterials", "models/pi_window/plaster" )
list.Add( "OverrideMaterials", "models/pi_window/trim128" )
list.Add( "OverrideMaterials", "models/props/cs_assault/dollar" )
list.Add( "OverrideMaterials", "models/props/cs_assault/fireescapefloor" )
list.Add( "OverrideMaterials", "models/props/cs_assault/metal_stairs1" )
list.Add( "OverrideMaterials", "models/props/cs_assault/moneywrap" )
list.Add( "OverrideMaterials", "models/props/cs_assault/moneywrap02" )
list.Add( "OverrideMaterials", "models/props/cs_assault/moneytop" )
list.Add( "OverrideMaterials", "models/props/cs_assault/pylon" )
list.Add( "OverrideMaterials", "models/props/CS_militia/boulder01" )
list.Add( "OverrideMaterials", "models/props/CS_militia/milceil001" )
list.Add( "OverrideMaterials", "models/props/CS_militia/militiarock" )
list.Add( "OverrideMaterials", "models/props/CS_militia/militiarockb" )
list.Add( "OverrideMaterials", "models/props/CS_militia/milwall006" )
list.Add( "OverrideMaterials", "models/props/CS_militia/rocks01" )
list.Add( "OverrideMaterials", "models/props/CS_militia/roofbeams01" )
list.Add( "OverrideMaterials", "models/props/CS_militia/roofbeams02" )
list.Add( "OverrideMaterials", "models/props/CS_militia/roofbeams03" )
list.Add( "OverrideMaterials", "models/props/CS_militia/RoofEdges" )
list.Add( "OverrideMaterials", "models/props/cs_office/clouds" )
list.Add( "OverrideMaterials", "models/props/cs_office/file_cabinet2" )
list.Add( "OverrideMaterials", "models/props/cs_office/file_cabinet3" )
list.Add( "OverrideMaterials", "models/props/cs_office/screen" )
list.Add( "OverrideMaterials", "models/props/cs_office/snowmana" )
list.Add( "OverrideMaterials", "models/props/de_inferno/de_inferno_boulder_03" )
list.Add( "OverrideMaterials", "models/props/de_inferno/infflra" )
list.Add( "OverrideMaterials", "models/props/de_inferno/infflrd" )
list.Add( "OverrideMaterials", "models/props/de_inferno/inftowertop" )
list.Add( "OverrideMaterials", "models/props/de_inferno/offwndwb_break" )
list.Add( "OverrideMaterials", "models/props/de_inferno/roofbits" )
list.Add( "OverrideMaterials", "models/props/de_inferno/tileroof01" )
list.Add( "OverrideMaterials", "models/props/de_inferno/woodfloor008a" )
list.Add( "OverrideMaterials", "models/props/de_nuke/nukconcretewalla" )
list.Add( "OverrideMaterials", "models/props/de_nuke/nukecardboard" )
list.Add( "OverrideMaterials", "models/props/de_nuke/pipeset_metal" )
end
// Making sure there's no double materials in the list in case of other addons, plus sorting them
timer.Simple(0, function()
local mats = list.GetForEdit("OverrideMaterials");
local cleaner = {};
for i, mat in pairs(mats) do
cleaner[mat] = true;
mats[i] = nil;
end
local i = 1;
for mat in pairs(cleaner) do
mats[i] = mat;
i = i + 1;
end
table.sort(mats);
end);

View File

@@ -0,0 +1,756 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
CreateConVar("dog_friendly_fire","0",{FCVAR_ARCHIVE,FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE})
CreateConVar("dog_follows","1",{FCVAR_ARCHIVE,FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE})
CreateConVar("dog_healths","2100",{FCVAR_ARCHIVE,FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE})
CreateConVar("dog_campaignfixs","0",{FCVAR_ARCHIVE,FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE})
function FindNearestEntity( className, pos, range )
local nearestEnt
range = range ^ 2
for _, ent in pairs( ents.FindByClass( className ) ) do
if IsValid(ent) and !ent.IsThrown and !(ent:OBBMaxs().x > 140 or ent:OBBMaxs().y > 140 or ent:OBBMaxs().z > 140) and IsValid(ent:GetPhysicsObject()) and ent:GetPhysicsObject():GetMass() >= 10 then
local distance = (pos - ent:GetPos()):LengthSqr()
if( distance <= range ) then
nearestEnt = ent
range = distance
end
end
end
return nearestEnt
end
function FindNearestEntity2( className, pos, range )
local nearestEnt
range = range ^ 2
for _, ent in pairs( ents.FindByClass( className ) ) do
if IsValid(ent) then
local distance = (pos - ent:GetPos()):LengthSqr()
if( distance <= range ) then
nearestEnt = ent
range = distance
end
end
end
return nearestEnt
end
local function Spawn_lightning(owner,victim)
local bone = owner:LookupBone("Dog_Model.Hand_R")
local m = owner:GetBoneMatrix(bone)
if (m) then
pos, ang = m:GetTranslation() , m:GetAngles()
end
local teslaStart = ents.Create( "info_target" )
teslaStart:SetPos( pos )
teslaStart:SetName( "teslaStart" .. owner:EntIndex() )
local teslaEnd = ents.Create( "info_target" )
teslaEnd:SetPos( victim:GetPos() )
teslaEnd:SetName( "teslaEnd" .. owner:EntIndex() )
teslaEnd:Spawn( )
teslaEnd:SetParent(victim)
local teslaBeam = ents.Create( "env_beam" )
teslaBeam:SetPos(pos)
teslaBeam:SetName( "teslaBeam" )
teslaBeam:SetKeyValue( "texture", "sprites/physcannon_bluelight1.vmt")
teslaBeam:SetKeyValue( "renderamt", "255" )
teslaBeam:SetKeyValue( "rendercolor", "255 255 255" )
teslaBeam:SetKeyValue( "life", "0" )
teslaBeam:SetKeyValue( "damage", "0" )
teslaBeam:SetKeyValue( "LightningStart", "teslaStart" .. owner:EntIndex() )
teslaBeam:SetKeyValue( "LightningEnd", "teslaEnd" .. owner:EntIndex() )
teslaBeam:SetKeyValue( "spawnflags", "1" )
teslaBeam:SetKeyValue( "TouchType", 0 )
teslaBeam:SetKeyValue( "framestart", 0 )
teslaBeam:SetKeyValue( "framerate", 0 )
teslaBeam:SetKeyValue( "NoiseAmplitude", 5 )
teslaBeam:SetKeyValue( "TextureScroll", 35 )
teslaBeam:SetKeyValue( "BoltWidth", 4 )
teslaBeam:SetKeyValue( "Radius", 256 )
teslaBeam:SetKeyValue( "StrikeTime", 1 )
teslaStart:Spawn( )
teslaBeam:Spawn( )
teslaBeam:Activate( )
teslaBeam:Fire( "TurnOn", "", 0)
teslaBeam:Fire("kill", "", 1.8)
teslaStart:Fire( "kill", "", 1.8 )
teslaEnd:Fire( "kill", "", 1.8 )
teslaStart:SetParent(owner)
end
hook.Add("OnNPCKilled","DOGGSS_Hide_Weapon",function(npc,attacker,inflictor)
if IsValid(npc:GetActiveWeapon()) and npc:GetClass()=="npc_vj_hl2_dog" then
npc:GetActiveWeapon():Remove()
end
if GetConVar("dog_campaignfixs"):GetBool() and npc:GetClass()=="npc_vj_hl2_dog" and !npc.SpawnedForCampaign then
return
end
if npc:GetClass()=="npc_vj_hl2_dog" then
npc:EmitSound("NPC_dog.Scared_1")
end
end)
hook.Add("PreCleanupMap","DOGGSS_Fix",function()
for k,v in pairs(hook.GetTable().Think) do
if string.find(k,"bigdoggsattac") then
hook.Remove("Think",k)
end
end
for k,v in pairs(hook.GetTable().EntityTakeDamage) do
if string.find(k,"bigdoggsattac_func") then
hook.Remove("EntityTakeDamage",k)
end
end
end)
function FollowDoggs( ply, key )
if (key == IN_USE) then
if !GetConVar("dog_follows"):GetBool() then
return
end
local tr = util.TraceLine( {
start = ply:EyePos( ),
endpos = ply:EyePos( ) + ply:GetAimVector( ) * 100,
filter = ply })
if GetConVar("dog_campaignfixs"):GetBool() and IsValid(tr.Entity) and tr.Entity:GetClass() == "npc_vj_hl2_dog" and !tr.Entity.SpawnedForCampaign then
return
end
if IsValid(tr.Entity) and tr.Entity:GetClass() == "npc_vj_hl2_dog" and (tr.Entity:Disposition(ply) == D_LI or tr.Entity:Disposition(ply) == D_NU) and tr.Entity:GetNWFloat("next_follow_wait") < CurTime() and SERVER then
if !tr.Entity.FollowFreeman then
tr.Entity:EmitSound("NPC_dog.Playful_5")
tr.Entity.FollowFreeman = true
tr.Entity.FollowEnt = ply
tr.Entity:SetNWFloat("next_follow_wait",(tr.Entity:SequenceDuration( tr.Entity:LookupSequence("excitedpound") )) + CurTime())
tr.Entity:AddGestureSequence( tr.Entity:LookupSequence("excitedpound"), true )
tr.Entity:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
tr.Entity.Attac = true
timer.Create("doggs_stop_excite" .. tr.Entity:EntIndex(),tr.Entity:SequenceDuration( tr.Entity:LookupSequence("excitedpound") ),1, function()
if IsValid(tr.Entity) then
tr.Entity.Attac = false
tr.Entity:SetSchedule(SCHED_COMBAT_FACE)
end
end)
else
tr.Entity.FollowFreeman = false
tr.Entity.FollowEnt = nil
tr.Entity:EmitSound("NPC_dog.Dissapointed_1")
tr.Entity:SetNWFloat("next_follow_wait",(tr.Entity:SequenceDuration( tr.Entity:LookupSequence("disappointed") )) + CurTime())
tr.Entity:AddGestureSequence( tr.Entity:LookupSequence("disappointed"), true )
tr.Entity:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
tr.Entity.Attac = true
timer.Create("doggs_stop_excite" .. tr.Entity:EntIndex(),tr.Entity:SequenceDuration( tr.Entity:LookupSequence("disappointed") ),1, function()
if IsValid(tr.Entity) then
tr.Entity.Attac = false
tr.Entity:SetSchedule(SCHED_COMBAT_FACE)
end
end)
end
end
end
end
hook.Add( "KeyPress", "FollowDoggs", FollowDoggs )
hook.Add("PlayerSpawnedNPC","DOGGSS_SpawnMode",function(ply,ent)
if GetConVar("dog_campaignfixs"):GetBool() then
if ent:GetClass()=="npc_vj_hl2_dog" then
ent.SpawnedForCampaign = true
end
end
end)
hook.Add("OnEntityCreated","DOGGSS_he_attac",function(ent)
if ent:GetClass()=="npc_hunter" then
local entidx2 = "hate_doggs" .. ent:EntIndex()
timer.Create(entidx2,1,0,function()
if IsValid(ent) then
local findent = FindNearestEntity("npc_vj_hl2_dog",ent:GetPos(), 1000)
if IsValid(findent) then
ent:ClearEnemyMemory()
ent:SetEnemy(findent)
end
else
timer.Remove(entidx2)
end
end)
end
if string.find(ent:GetClass(),"npc_helicopter") or string.find(ent:GetClass(),"npc_combinegunship") or string.find(ent:GetClass(),"prop_vehicle_apc") or string.find(ent:GetClass(),"npc_hunter") then
for k,v in pairs(ents.GetAll()) do
if string.find(v:GetClass(),"npc_vj_hl2_dog") then
v:AddEntityRelationship(ent,1,99)
end
end
end
if string.find(ent:GetClass(),"npc_strider") then
for k,v in pairs(ents.GetAll()) do
if string.find(v:GetClass(),"npc_vj_hl2_dog") then
v:AddEntityRelationship(ent,2,99)
end
end
end
timer.Simple(GetConVar("dog_campaignfixs"):GetBool() and 0.02 or 0,function()
if IsValid(ent) then
if ent:GetClass()=="npc_vj_hl2_dog" then
if GetConVar("dog_campaignfixs"):GetBool() and !ent.SpawnedForCampaign then
return
end
timer.Simple(0.05,function()
if IsValid(ent) then
ent:SetMaxHealth( GetConVarNumber("dog_healths") )
ent:SetHealth( GetConVarNumber("dog_healths") )
end
end)
ent:Give("weapon_crowbar")
ent:GetActiveWeapon():SetNoDraw(true)
for k,v in pairs(ents.GetAll()) do
if string.find(v:GetClass(),"npc_helicopter") or string.find(v:GetClass(),"npc_combinegunship") or string.find(v:GetClass(),"prop_vehicle_apc") or string.find(v:GetClass(),"npc_hunter") then
ent:AddEntityRelationship(v,1,99)
end
if string.find(v:GetClass(),"npc_strider") then
ent:AddEntityRelationship(v,2,99)
end
end
local entidx = ent:EntIndex()
hook.Add( "EntityTakeDamage", "bigdoggsattac_func" .. entidx, function( target, dmginfo )
if dmg_doggsattac then return end
dmg_doggsattac = true
local ent = Entity(entidx)
if target == ent and IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() and (target:Disposition(dmginfo:GetAttacker()) == D_LI or target:Disposition(dmginfo:GetAttacker()) == D_NU) and GetConVar("dog_friendly_fires"):GetBool() then
target:AddEntityRelationship(dmginfo:GetAttacker(),1,0)
end
if target == ent and IsValid(dmginfo:GetAttacker()) and (dmginfo:GetAttacker():GetClass()=="npc_headcrab_black" or dmginfo:GetAttacker():GetClass()=="npc_headcrab_poison") then
target:SetHealth(target:Health() + 100)
end
if target == ent and IsValid(dmginfo:GetAttacker()) and (dmginfo:GetAttacker():GetClass()=="npc_antlionguard" ) then
dmginfo:SetDamage(math.Clamp(dmginfo:GetDamage(),0,22))
target:TakeDamageInfo(dmginfo)
end
if IsValid(target) and target == ent and IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker() == target then
dmginfo:SetDamage(0)
target:TakeDamageInfo(dmginfo)
end
if IsValid(target) and target == ent and IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsRagdoll() then
dmginfo:SetDamage(0)
target:TakeDamageInfo(dmginfo)
end
if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker() == ent and (target:IsNPC() or target:IsPlayer()) then
if IsValid(target) and IsValid(ent) and target != ent and (ent:Disposition(target) == D_LI or ent:Disposition(target) == D_NU) then
dmginfo:SetDamage(0)
target:TakeDamageInfo(dmginfo)
end
end
dmg_doggsattac = false
end)
hook.Add("Think", "bigdoggsattac" .. entidx,function()
local ent = Entity(entidx)
if !IsValid(ent) then
hook.Remove("Think","bigdoggsattac" .. entidx)
hook.Remove("EntityTakeDamage","bigdoggsattac_func" .. entidx)
return
end
if ent.FollowFreeman and IsValid(ent.FollowEnt) and !ent.Attac then
if ent:GetNWFloat("next_follow_wait") < CurTime() and ent:GetNWFloat("next_follow") < CurTime() and ((!IsValid(ent:GetEnemy())) or (IsValid(ent:GetEnemy()) and (ent:GetPos():Distance(ent:GetEnemy():GetPos()) >= 600))) then
ent:SetNWFloat("next_follow",1 + CurTime())
if (ent:GetPos():Distance(ent.FollowEnt:GetPos()) > 150) then
ent:SetLastPosition(ent.FollowEnt:GetPos() + Vector(math.Rand(-80,80),math.Rand(-80,80),0))
ent:SetSchedule(SCHED_FORCED_GO_RUN)
else
if ent:IsCurrentSchedule(SCHED_FORCED_GO_RUN) then
ent:ClearSchedule()
ent:StopMoving()
end
end
end
end
if !IsValid(ent:GetEnemy()) then
local nearent
nearent = FindNearestEntity2("prop_vehicle_apc",ent:GetPos(), 7000)
if IsValid(nearent) and ent:GetNWFloat("search_for_prop") < CurTime() and !ent:IsCurrentSchedule(SCHED_WAIT_FOR_SCRIPT) then
ent:SetNWFloat("search_for_prop",5 + CurTime())
if (ent:GetPos():Distance(nearent:GetPos()) > 100) then
ent:SetLastPosition(nearent:GetPos())
ent:SetSchedule(SCHED_FORCED_GO_RUN)
end
end
local nearent
nearent = FindNearestEntity2("prop_vehicle_apc",ent:GetPos(), 7000)
if IsValid(nearent) and (ent:GetPos():Distance(nearent:GetPos()) <= math.Clamp(nearent:OBBMaxs().x/1.5 + nearent:OBBMaxs().y/1.5 + nearent:OBBMaxs().z/1.5,75,135)) and !ent.Attac then
if ent:IsCurrentSchedule(SCHED_FORCED_GO_RUN) then
ent:ClearSchedule()
ent:StopMoving()
ent:SetNWFloat("next_attac",ent:SequenceDuration( ent:LookupSequence("apc_throw") ) + CurTime())
ent:AddGestureSequence( ent:LookupSequence("apc_throw"), true )
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
ent.ThrowEnt = nearent
ent.Attac = true
--ent.ThrowEnt:SetPos(ent:GetAttachment(ent:LookupAttachment( "chestTarget" )).Pos)
--ent.ThrowEnt:SetParent(ent)
--ent.ThrowEnt:Fire("setparentattachment", "chestTarget", 0.01)
local WPos = ent.ThrowEnt:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
timer.Create("doggs_attac_lauch_attach" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("apc_throw") )/5,1, function()
if IsValid(ent) and IsValid(ent.ThrowEnt) then
ent:EmitSound("NPC_dog.Angry_2")
ent.Throw = true
constraint.NoCollide( ent.ThrowEnt, ent, 0, 0 )
local bone = ent:LookupBone("Dog_Model.forward")
local m = ent:GetBoneMatrix(bone)
if (m) then
pos, ang = m:GetTranslation() , m:GetAngles()
end
ent.ThrowEnt:SetPos(ent:EyePos() + ent:GetForward()*-10 + ent:GetUp()*-60)
ent.ThrowEnt:FollowBone( ent, ent:LookupBone("Dog_Model.forward") )
ent.ThrowEnt.Anglebone = ent.ThrowEnt:GetAngles()
end
end)
timer.Create("doggs_attac_lauch" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("apc_throw") )/1.3,1, function()
if IsValid(ent) then
ent.Throw = false
if IsValid(ent.ThrowEnt) then
ent.ThrowEnt:FollowBone(NULL,0)
ent.ThrowEnt:SetAngles(ent.ThrowEnt.Anglebone)
ent.ThrowEnt:GetPhysicsObject():EnableMotion(true)
ent.ThrowEnt:GetPhysicsObject():SetVelocity(ent:GetForward()*20000 + Vector(0,0,1000))
ent.ThrowEnt.Owner = ent
ent.ThrowEnt.IsThrown = true
ent.ThrowEnt.CollGroup = ent.ThrowEnt:GetCollisionGroup()
ent.ThrowEnt:SetCollisionGroup( COLLISION_GROUP_WORLD )
local entthrou = ent.ThrowEnt
timer.Simple(0.02,function()
if IsValid(entthrou) then
entthrou:SetCollisionGroup( COLLISION_GROUP_NONE )
end
end)
timer.Simple(1,function()
if IsValid(entthrou) and entthrou:GetClass() == "prop_vehicle_apc" then
entthrou:Fire("Destroy","",0)
end
end)
ent.ThrowEnt:AddCallback( "PhysicsCollide", function( obj, data )
if obj:GetClass()=="prop_vehicle_apc" then
obj:Fire("Destroy","",0)
end
if data.HitEntity:GetClass() == "npc_strider" or data.HitEntity:GetClass() == "npc_hunter" or data.HitEntity:GetClass() == "npc_antlionguard" then
data.HitEntity:TakeDamage(data.Speed)
end
if data.Speed >= 200 and obj:GetPhysicsObject():GetMass() >= 50 then
for k,v in pairs(ents.FindInSphere(obj:GetPos(),350)) do
if v:GetClass()=="npc_strider" then
v:TakeDamage(data.Speed)
end
if (v:GetClass()=="npc_helicopter" or v:GetClass()=="npc_combinegunship") then
v:Fire("SelfDestruct","",0)
end
end
end
end)
end
ent.ThrowEnt.IsThrown = false
ent.ThrowEnt = nil
end
end)
timer.Create("doggs_attac_lauch_stop" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("apc_throw") ),1, function()
if IsValid(ent) then
ent.Throw = false
if IsValid(ent.ThrowEnt) then
ent.ThrowEnt.IsThrown = false
end
ent.ThrowEnt = nil
ent.Attac = false
ent:SetSchedule(SCHED_COMBAT_FACE)
end
end)
end
end
end
if !IsValid(ent:GetEnemy()) then
return
end
if IsValid(ent) then
local enemy = ent:GetEnemy()
--[[
if IsValid(enemy) then
if ent:GetNWFloat("next_attac") < CurTime() then
ent:SetNWFloat("next_attac",1 + CurTime())
if (ent:GetPos():Distance(enemy:GetPos()) > 50) then
ent:SetLastPosition(enemy:GetPos() + Vector(math.Rand(-50,50),math.Rand(-50,50),0))
ent:SetSchedule(SCHED_FORCED_GO_RUN)
else
if ent:IsCurrentSchedule(SCHED_FORCED_GO_RUN) then
ent:ClearSchedule()
ent:StopMoving()
end
end
end
end
--]]
if (ent:GetPos():Distance(enemy:GetPos()) >= 300) then
local nearent
nearent = FindNearestEntity2("prop_vehicle_apc",ent:GetPos(), enemy:GetClass()=="npc_strider" and 7000 or 700)
if !IsValid(nearent) then
nearent = FindNearestEntity("prop_physics",ent:GetPos(),enemy:GetClass()=="npc_strider" and 7000 or 700)
end
if IsValid(nearent) and (ent:GetPos():Distance(nearent:GetPos()) <= math.Clamp(nearent:OBBMaxs().x/1.5 + nearent:OBBMaxs().y/1.5 + nearent:OBBMaxs().z/1.5,75,135)) and !ent.Attac then
if ent:IsCurrentSchedule(SCHED_FORCED_GO_RUN) then
ent:ClearSchedule()
ent:StopMoving()
ent:SetNWFloat("next_attac",ent:SequenceDuration( ent:LookupSequence("apc_throw") ) + CurTime())
ent:AddGestureSequence( ent:LookupSequence("apc_throw"), true )
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
ent.ThrowEnt = nearent
ent.Attac = true
if ent.ThrowEnt:GetClass() != "prop_vehicle_apc" then
ent.ThrowEnt:GetPhysicsObject():EnableMotion(false)
end
--ent.ThrowEnt:SetPos(ent:GetAttachment(ent:LookupAttachment( "chestTarget" )).Pos)
--ent.ThrowEnt:SetParent(ent)
--ent.ThrowEnt:Fire("setparentattachment", "chestTarget", 0.01)
local WPos = ent.ThrowEnt:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
timer.Create("doggs_attac_lauch_attach" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("apc_throw") )/5,1, function()
if IsValid(ent) and IsValid(ent.ThrowEnt) then
ent:EmitSound("NPC_dog.Angry_2")
ent.Throw = true
constraint.NoCollide( ent.ThrowEnt, ent, 0, 0 )
local bone = ent:LookupBone("Dog_Model.forward")
local m = ent:GetBoneMatrix(bone)
if (m) then
pos, ang = m:GetTranslation() , m:GetAngles()
end
ent.ThrowEnt:SetPos(ent:EyePos() + ent:GetForward()*-10 + ent:GetUp()*-60)
ent.ThrowEnt:FollowBone( ent, ent:LookupBone("Dog_Model.forward") )
ent.ThrowEnt.Anglebone = ent.ThrowEnt:GetAngles()
end
end)
timer.Create("doggs_attac_lauch" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("apc_throw") )/1.3,1, function()
if IsValid(ent) and IsValid(enemy) then
ent.Throw = false
if IsValid(ent.ThrowEnt) then
local vecup = enemy:GetClass()=="npc_strider" and 40 or 0
ent.ThrowEnt:FollowBone(NULL,0)
ent.ThrowEnt:SetAngles(ent.ThrowEnt.Anglebone)
ent.ThrowEnt:GetPhysicsObject():EnableMotion(true)
ent.ThrowEnt:GetPhysicsObject():SetVelocity((ent.ThrowEnt:GetPos() - (enemy:EyePos() + Vector(0,0,vecup)))*-200)
ent.ThrowEnt.Owner = ent
ent.ThrowEnt.IsThrown = true
ent.ThrowEnt.CollGroup = ent.ThrowEnt:GetCollisionGroup()
ent.ThrowEnt:SetCollisionGroup( COLLISION_GROUP_WORLD )
local entthrou = ent.ThrowEnt
timer.Simple(0.02,function()
if IsValid(entthrou) then
entthrou:SetCollisionGroup( COLLISION_GROUP_NONE )
end
end)
timer.Simple(1,function()
if IsValid(entthrou) and entthrou:GetClass() == "prop_vehicle_apc" then
entthrou:Fire("Destroy","",0)
end
end)
ent.ThrowEnt:AddCallback( "PhysicsCollide", function( obj, data )
if obj:GetClass()=="prop_vehicle_apc" then
obj:Fire("Destroy","",0)
end
if data.HitEntity:GetClass() == "npc_strider" or data.HitEntity:GetClass() == "npc_hunter" or data.HitEntity:GetClass() == "npc_antlionguard" then
data.HitEntity:TakeDamage(data.Speed)
end
if data.Speed >= 200 and obj:GetPhysicsObject():GetMass() >= 50 then
for k,v in pairs(ents.FindInSphere(obj:GetPos(),350)) do
if v:GetClass()=="npc_strider" then
v:TakeDamage(data.Speed)
end
if (v:GetClass()=="npc_helicopter" or v:GetClass()=="npc_combinegunship") then
v:Fire("SelfDestruct","",0)
end
end
end
end)
end
ent.ThrowEnt.IsThrown = false
ent.ThrowEnt = nil
end
end)
timer.Create("doggs_attac_lauch_stop" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("apc_throw") ),1, function()
if IsValid(ent) then
ent.Throw = false
if IsValid(ent.ThrowEnt) then
ent.ThrowEnt.IsThrown = false
end
ent.ThrowEnt = nil
ent.Attac = false
ent:SetSchedule(SCHED_COMBAT_FACE)
end
end)
end
end
end
if ent.Throw and IsValid(ent.ThrowEnt) then
local bone = ent:LookupBone("Dog_Model.Hand_L")
local m = ent:GetBoneMatrix(bone)
if (m) then
pos, ang = m:GetTranslation() , m:GetAngles()
end
--ent.ThrowEnt:SetPos(LocalToWorld( Vector(30,ent.ThrowEnt:OBBMaxs().z/3,50), Angle(0,0,0), pos, ang ))
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
end
if ent.Attac then
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
end
if IsValid(enemy) then
local nearent
nearent = FindNearestEntity2("prop_vehicle_apc",ent:GetPos(), ent:GetClass()=="npc_strider" and 7000 or 700)
if !IsValid(nearent) then
nearent = FindNearestEntity("prop_physics",ent:GetPos(),ent:GetClass()=="npc_strider" and 7000 or 700)
end
if IsValid(nearent) and (ent:GetPos():Distance(enemy:GetPos()) >= 300) and ent:GetNWFloat("search_for_prop") < CurTime() and !ent:IsCurrentSchedule(SCHED_WAIT_FOR_SCRIPT) then
ent:SetNWFloat("search_for_prop",5 + CurTime())
if (ent:GetPos():Distance(nearent:GetPos()) > 100) then
ent:SetLastPosition(nearent:GetPos())
ent:SetSchedule(SCHED_FORCED_GO_RUN)
end
end
if !(enemy:Health() <= 0) and (ent:GetPos():Distance(enemy:GetPos()) <= 250) and !(ent:GetPos():Distance(enemy:GetPos()) <= 100) and ent:GetNWFloat("next_pull") < CurTime() then
if !ent:IsCurrentSchedule(SCHED_WAIT_FOR_SCRIPT) then
if math.random(1,3) == 3 then
ent:ClearSchedule()
ent:StopMoving()
ent:AddGestureSequence( ent:LookupSequence("pick_up"), true )
ent:SetNWFloat("next_pull",7 + CurTime())
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
ent.Attac = true
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
local oldenemy = enemy
timer.Create("doggs_pull_start" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("pick_up") )/2,1, function()
if IsValid(ent) and IsValid(oldenemy) then
local WPos = oldenemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
ent:AddGestureSequence( ent:LookupSequence("idle_holding"), true )
ent:EmitSound("Weapon_PhysCannon.Pickup")
local vecpull = (oldenemy:IsPlayer()) and -1 or (oldenemy:GetClass()=="npc_antlionguard") and -0.1 or -0.15
local vecup = oldenemy:IsPlayer() and 700 or 500
local vecforward = (oldenemy:IsPlayer()) and 70 or (oldenemy:GetClass()=="npc_antlionguard") and 40 or 20
local plydown = (oldenemy:IsPlayer()) and -10 or 0
oldenemy:SetVelocity(Vector(0,0,vecup))
timer.Create("doggs_pull_fixvel" .. ent:EntIndex(),0.1,10, function()
if IsValid(ent) and IsValid(oldenemy) then
oldenemy:SetVelocity((oldenemy:GetPos() - (ent:GetPos() + ent:GetForward()*vecforward + Vector(0,0,-50)))*vecpull + Vector(0,0,plydown))
end
end)
Spawn_lightning(ent,oldenemy)
timer.Create("doggs_pull_stop" .. ent:EntIndex(),1.8,1, function()
if IsValid(ent) then
--ent:AddGestureSequence( ent:LookupSequence("throw"), true )
ent.Attac = false
ent:SetSchedule(SCHED_COMBAT_FACE)
end
end)
end
end)
else
ent:SetNWFloat("next_pull",7 + CurTime())
end
end
end
if !(enemy:Health() <= 0) and (ent:GetPos():Distance(enemy:GetPos()) <= (enemy:GetClass()=="npc_antlionguard" and 120 or 70)) and ent:GetNWFloat("next_attac") < CurTime() then
if !ent:IsCurrentSchedule(SCHED_WAIT_FOR_SCRIPT) then
ent:ClearSchedule()
ent:StopMoving()
if math.random(1,20) > 18 then
ent:SetNWFloat("next_attac",ent:SequenceDuration( ent:LookupSequence("pound") ) + CurTime())
ent:AddGestureSequence( ent:LookupSequence("pound"), true )
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
ent.Attac = true
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
timer.Create("doggs_attac" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("pound") )/2.5,1, function()
if IsValid(ent) then
local hitpos = ent:GetPos() + ent:GetForward()*35
ParticleEffect( "rock_splinter_stalactite", hitpos + Vector(0,0,10),Angle(0,0,0))
local shake = ents.Create( "env_shake" )
shake:SetPos( hitpos )
shake:SetKeyValue( "amplitude", "50" )
shake:SetKeyValue( "radius", "300" )
shake:SetKeyValue( "duration", "1" )
shake:SetKeyValue( "frequency", "140" )
shake:SetKeyValue( "spawnflags", "4" )
shake:Spawn()
shake:Activate()
shake:Fire( "StartShake", "", 0 )
shake:Fire( "kill", 0, 5 )
ent:EmitSound(Sound("vehicles/v8/vehicle_impact_heavy3.wav"))
for k,v in pairs(ents.FindInSphere(ent:GetPos(),100)) do
if v != ent and !(ent:Disposition(v) == D_FR or ent:Disposition(v) == D_NU) then
local dmg = DamageInfo()
dmg:SetDamage(100)
dmg:SetDamageForce(Vector(0,0,-1000) + VectorRand()*-200)
dmg:SetDamageType(DMG_GENERIC)
dmg:SetAttacker(ent)
if v:IsPlayer() then
v:ViewPunch(Angle( math.Rand(-8,-4)*5, math.Rand(-2,2)*5, math.Rand(-2,2)*5 ) )
end
util.BlastDamageInfo( dmg, hitpos, 150 )
end
end
end
end)
timer.Create("doggs_attac_stop" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("pound") ),1, function()
if IsValid(ent) then
ent.Attac = false
ent:SetSchedule(SCHED_COMBAT_FACE)
end
end)
elseif math.random(1,20) < 17 then
ent:SetNWFloat("next_attac",ent:SequenceDuration( ent:LookupSequence("throw") ) + CurTime())
ent:AddGestureSequence( ent:LookupSequence("throw"), true )
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
ent.Attac = true
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
ent:EmitSound(Sound("NPC_dog.Pneumatic_1"))
timer.Create("doggs_attac" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("throw") )/2.5,1, function()
if IsValid(ent) and IsValid(enemy) and (ent:GetPos():Distance(enemy:GetPos()) <= (enemy:GetClass()=="npc_antlionguard" and 120 or 100)) then
local hitpos = enemy:EyePos()
ParticleEffect( "blood_impact_red_01", hitpos,Angle(0,0,0))
local dmg = DamageInfo()
dmg:SetDamage(50)
dmg:SetDamageForce(ent:GetAimVector()*(2000*10)) -- sdsd sdsdsd
dmg:SetDamageType(DMG_GENERIC)
dmg:SetAttacker(ent)
if enemy:IsPlayer() then
enemy:ViewPunch(Angle( math.Rand(8,4)*5, math.Rand(-6,6)*5, math.Rand(-6,6)*5 ) )
end
enemy:TakeDamageInfo(dmg)
enemy:EmitSound("npc/vort/foot_hit.wav")
end
end)
timer.Create("doggs_attac_stop" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("throw") ),1, function()
if IsValid(ent) then
ent.Attac = false
ent:SetSchedule(SCHED_COMBAT_FACE)
end
end)
elseif math.random(1,20) == 17 or math.random(1,20) == 18 then
ent:SetNWFloat("next_attac",ent:SequenceDuration( ent:LookupSequence("wallpound") ) + CurTime())
ent:AddGestureSequence( ent:LookupSequence("wallpound"), true )
ent:SetSchedule(SCHED_WAIT_FOR_SCRIPT)
ent.Attac = true
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
timer.Create("doggs_attac1" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("wallpound") )/3.2,1, function()
if IsValid(ent) and IsValid(enemy) then
if (ent:GetPos():Distance(enemy:GetPos()) <= (enemy:GetClass()=="npc_antlionguard" and 120 or 100)) then
local hitpos = enemy:EyePos()
ParticleEffect( "blood_impact_red_01", hitpos,Angle(0,0,0))
local dmg = DamageInfo()
dmg:SetDamage(50)
dmg:SetDamageForce(ent:GetAimVector()*(2000*10)) -- sdsd sdsdsd
dmg:SetDamageType(DMG_GENERIC)
dmg:SetAttacker(ent)
if enemy:IsPlayer() then
enemy:ViewPunch(Angle( math.Rand(8,4)*5, math.Rand(-6,6)*5, math.Rand(-6,6)*5 ) )
end
enemy:TakeDamageInfo(dmg)
enemy:EmitSound("npc/vort/foot_hit.wav")
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
end
end
end)
timer.Create("doggs_attac2" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("wallpound") )/1.8,1, function()
if IsValid(ent) and IsValid(enemy) then
if (ent:GetPos():Distance(enemy:GetPos()) <= (enemy:GetClass()=="npc_antlionguard" and 120 or 100)) then
local hitpos = enemy:EyePos()
ParticleEffect( "blood_impact_red_01", hitpos,Angle(0,0,0))
local dmg = DamageInfo()
dmg:SetDamage(50)
dmg:SetDamageForce(ent:GetAimVector()*(2000*10)) -- sdsd sdsdsd
dmg:SetDamageType(DMG_GENERIC)
dmg:SetAttacker(ent)
if enemy:IsPlayer() then
enemy:ViewPunch(Angle( math.Rand(8,4)*5, math.Rand(-6,6)*5, math.Rand(-6,6)*5 ) )
end
enemy:TakeDamageInfo(dmg)
enemy:EmitSound("npc/vort/foot_hit.wav")
local WPos = enemy:GetPos()
local PPos = ent:GetPos()
local Ang = WPos - PPos
Ang = Ang:Angle()
ent:SetAngles(Angle(0,Ang.yaw,Ang.roll))
end
end
end)
timer.Create("doggs_attac3" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("wallpound") )/1.4,1, function()
if IsValid(ent) and IsValid(enemy) then
if (ent:GetPos():Distance(enemy:GetPos()) <= (enemy:GetClass()=="npc_antlionguard" and 120 or 100)) then
local hitpos = enemy:EyePos()
ParticleEffect( "blood_impact_red_01", hitpos,Angle(0,0,0))
local dmg = DamageInfo()
dmg:SetDamage(75)
dmg:SetDamageForce(ent:GetAimVector()*(2000*12)) -- sdsd sdsdsd
dmg:SetDamageType(DMG_GENERIC)
dmg:SetAttacker(ent)
if enemy:IsPlayer() then
enemy:ViewPunch(Angle( math.Rand(8,4)*5, math.Rand(-6,6)*5, math.Rand(-6,6)*5 ) )
end
enemy:TakeDamageInfo(dmg)
enemy:EmitSound("npc/vort/foot_hit.wav")
end
end
end)
timer.Create("doggs_attac_stop" .. ent:EntIndex(),ent:SequenceDuration( ent:LookupSequence("wallpound") ),1, function()
if IsValid(ent) then
ent.Attac = false
ent:SetSchedule(SCHED_COMBAT_FACE)
end
end)
end
end
end
end
end
end)
end
end
end)
end)

View File

@@ -0,0 +1,39 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local function CombineSuitsOS()
for k, v in pairs( player.GetAll() ) do
if v:IsValid() && v:IsPlayer() && v:Alive() && v:Visible(self) then
if v then
if v:IsPlayer() and v.PlayerAIUser == false then
v.friclass = "CLASS_NEUTRAL" and "CLASS_NEUTRALS"
v.SquadName = "vj_neutral"
v.Class = "CLASS_NEUTRAL" and "CLASS_NEUTRALS"
v.Classify = "CLASS_NEUTRAL" and "CLASS_NEUTRALS"
v.VJ_NPC_Class = {"CLASS_HERO_NEUTRAL","CLASS_HERO_BANDIT","CLASS_HERO_FREEDOM","CLASS_HERO_DUTY","CLASS_HERO_CS","CLASS_HERO_HUNTER","CLASS_HERO_SKIT","CLASS_HERO_UCHENIY","CLASS_HERO_KILLER","CLASS_HERO_GREH"}
v.GetClass = "CLASS_NEUTRAL" and "CLASS_NEUTRALS"
v.SetClass = "CLASS_NEUTRAL" and "CLASS_NEUTRALS"
end
end
end
end
end

View File

@@ -0,0 +1,107 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
resource.AddWorkshop( "104619813" )
hook.Add( "EntityKeyValue", "rb655_keyval_fix", function( ent, key, val )
if ( ent:GetClass() == "env_headcrabcanister" ) then
if ( key == "HeadcrabType" ) then ent.headcrab = val end
if ( key == "HeadcrabCount" ) then ent.count = val end
if ( key == "FlightSpeed" ) then ent.speed = val end
if ( key == "FlightTime" ) then ent.time = val end
if ( key == "StartingHeight" ) then ent.height = val end
if ( key == "Damage" ) then ent.damage = val end
if ( key == "DamageRadius" ) then ent.radius = val end
if ( key == "SmokeLifetime" ) then ent.duration = val end
if ( key == "spawnflags" ) then ent.spawnflags = val end
if ( key == "targetname" ) then ent.targetname = val end
elseif ( ent:GetClass() == "prop_thumper" ) then
if ( key == "dustscale" ) then ent.dustscale = val end
if ( key == "targetname" ) then ent.targetname = val end
elseif ( ent:GetClass() == "prop_door_rotating" ) then
if ( !ent.rb655_dupe_data ) then ent.rb655_dupe_data = { ismapcreated = ent:CreatedByMap() } end
if ( key == "speed" ) then ent.rb655_dupe_data.speed = val end
if ( key == "distance" ) then ent.rb655_dupe_data.distance = val end
if ( key == "hardware" ) then ent.rb655_dupe_data.hardware = val end
if ( key == "returndelay" ) then ent.rb655_dupe_data.returndelay = val end
if ( key == "skin" ) then ent.rb655_dupe_data.skin = val end
if ( key == "angles" ) then ent.rb655_dupe_data.initialAngles = Angle( val ) end
if ( key == "ajarangles" ) then ent.rb655_dupe_data.ajarangles = val end
if ( key == "spawnflags" ) then ent.rb655_dupe_data.spawnflags = val end
if ( key == "spawnpos" ) then ent.rb655_dupe_data.spawnpos = val end
if ( key == "targetname" ) then ent.rb655_dupe_data.targetname = val end
--if ( key == "slavename" ) then print( "slavename", key, val ) ent.rb655_dupe_data.targetname = val end
function ent:PreEntityCopy()
self.rb655_door_opened = self:GetInternalVariable( "m_eDoorState" ) != 0
self.rb655_door_locked = self:GetInternalVariable( "m_bLocked" )
end
elseif ( ent:GetClass() == "item_ammo_crate" ) then
if ( key == "AmmoType" ) then ent.type = val end
elseif ( ent:GetClass() == "item_item_crate" ) then
if ( key == "ItemCount" ) then ent.amount = val end
if ( key == "ItemClass" ) then ent.class = val end
if ( key == "CrateAppearance" ) then ent.appearance = val end
if ( key == "targetname" ) then ent.targetname = val end
end
end )
-- Ehhh... We gotta copy over wire_base_entity stuff for dupes
function rb655_hl2_CopyWireModMethods( targetEnt )
local oldPreFunc = targetEnt.PreEntityCopy
function targetEnt:PreEntityCopy()
if ( oldPreFunc ) then oldPreFunc( self ) end
duplicator.ClearEntityModifier( self, "WireDupeInfo" )
-- build the DupeInfo table and save it as an entity mod
local DupeInfo = WireLib.BuildDupeInfo( self )
if ( DupeInfo ) then
duplicator.StoreEntityModifier( self, "WireDupeInfo", DupeInfo )
end
end
local function EntityLookup( createdEntities )
return function( id, default )
if ( id == nil ) then return default end
if ( id == 0 ) then return game.GetWorld() end
local ent = createdEntities[ id ]
if ( IsValid( ent ) ) then return ent else return default end
end
end
local oldPostFunc = targetEnt.PostEntityPaste
function targetEnt:PostEntityPaste( player, ent, createdEntities )
-- We manually apply the entity mod here rather than using a
-- duplicator.RegisterEntityModifier because we need access to the
-- CreatedEntities table.
if ( ent.EntityMods and ent.EntityMods.WireDupeInfo ) then
WireLib.ApplyDupeInfo( player, ent, ent.EntityMods.WireDupeInfo, EntityLookup( createdEntities ) )
end
if ( oldPostFunc ) then oldPostFunc( self, player, ent, createdEntities ) end
end
end

View File

@@ -0,0 +1,129 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local SPNE = 1
local TRSO = 2
local RSLD = 3
local LSLD = 4
local LARM = 5
local LWST = 6
local LHND = 7
local RARM = 8
local RWST = 9
local RHND = 10
local RTHY = 11
local RCLF = 12
local LTHY = 13
local LCLF = 14
local HEAD = 15
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 1.0
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.5 )
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * 0.2 )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * 0.2 )
-- sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * 0.3 )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[TRSO] = SENSORBONE.SPINE,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = SENSORBONE.SPINE,
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = LTHY, to = RTHY, up = "hips_fwd" },
[SPNE] = { from_sensor = SENSORBONE.HEAD, to_sensor = SENSORBONE.SPINE, up = "chest_rgt" },
[TRSO] = { from_sensor = SENSORBONE.HEAD, to_sensor = SENSORBONE.SPINE, up = "chest_rgt" },
[HEAD] = { from_sensor = SENSORBONE.HEAD, to_sensor = SENSORBONE.SHOULDER, up = "chest_lft" },
[RSLD] = { from = RSLD, to = LSLD, up = "chest_bck" },
[LSLD] = { from = LSLD, to = RSLD, up = "chest_fwd" },
[RARM] = { from = RARM, to = RSLD, up = "chest_up" },
[LARM] = { from = LARM, to = LSLD, up = "chest_dn" },
[RWST] = { from = RHND, to = RARM, up = "chest_up" },
[LWST] = { from = LHND, to = LARM, up = "chest_dn" },
[RTHY] = { from = RCLF, to = RTHY, up_up = SPNE },
[RCLF] = { from_sensor = SENSORBONE.ANKLE_RIGHT, to_sensor = SENSORBONE.KNEE_RIGHT, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up_up = SPNE },
[LCLF] = { from_sensor = SENSORBONE.ANKLE_LEFT, to_sensor = SENSORBONE.KNEE_LEFT, up_up = LTHY },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_lft = RARM },
[LHND] = { from_sensor = SENSORBONE.HAND_LEFT, to_sensor = SENSORBONE.WRIST_LEFT, up_rgt = LARM },
[LWST] = { from = LHND, to = LARM, up = "chest_dn" },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
pos[SPNE] = LerpVector( 0.45, pos[SPNE], pos[HEAD] )
pos[RWST] = pos[RARM]
pos[LWST] = pos[LARM]
end,
-- We're used as a default - no need to return true to anything here.
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/ct_gign.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/ct_sas.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/ct_urban.mdl" ) ) then return true end
if ( mdl:EndsWith( "models//player/ct_gsg9.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/t_guerilla.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/t_leet.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/t_phoenix.mdl" ) ) then return true end
if ( mdl:EndsWith( "models//player/t_arctic.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "CounterStrikeSource", Builder )

View File

@@ -0,0 +1,114 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local LTHY = 1
local SPNE = 2
local RSLD = 3
local RARM = 4
local LSLD = 5
local LARM = 6
local LHND = 7
local HEAD = 8
local RHND = 9
local RTHY = 10
local RCLF = 11
local LCLF = 12
local RFOT = 13
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.7
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.5 )
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * 0.3 )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * 0.3 )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.HIP_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.2 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.2 )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = SENSORBONE.SPINE,
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = LTHY, to = RTHY, up = "hips_fwd" },
[SPNE] = { from = HEAD, to = SPNE, up = "chest_rgt" },
[HEAD] = { from_sensor = SENSORBONE.HEAD, to_sensor = SENSORBONE.SPINE, up = "chest_lft" },
[RSLD] = { from = RARM, to = RSLD, up = "chest_up" },
[RARM] = { from = RHND, to = RARM, up_up = RSLD },
[LSLD] = { from = LARM, to = LSLD, up = "chest_dn" },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[RTHY] = { from = RCLF, to = RTHY, up_up = SPNE },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up_up = SPNE },
[LCLF] = { from_sensor = SENSORBONE.ANKLE_LEFT, to = LCLF, up_up = LTHY },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_lft = RARM },
[LHND] = { from_sensor = SENSORBONE.HAND_LEFT, to_sensor = SENSORBONE.WRIST_LEFT, up_rgt = LARM }
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
pos[SPNE] = LerpVector( 0.4, pos[SPNE], pos[HEAD] )
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 20, 0, 0 )
end,
-- Should this entity use this builder?
IsApplicable = function( self, ent )
return ent:GetModel():EndsWith( "models/eli.mdl" )
end,
}
list.Set( "SkeletonConvertor", "Eli", Builder )

View File

@@ -0,0 +1,173 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
-- coord
local RTHY = 2
local RCLF = 3
local RFOT = 4
local LTHY = 5
local LCLF = 6
local LFOT = 7
local SPNE = 8
local RSLD = 9
local RARM = 10
local LSLD = 11
local LARM = 12
local LHND = 13
local NECK = 14
local HEAD = 15
local RHND = 16
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.6
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.9 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.06
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.0 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.0 - acrosships )
sensor[SENSORBONE.FOOT_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.2 + acrosships )
sensor[SENSORBONE.FOOT_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.2 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.2 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.2 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[NECK] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = PLVS, to = SPNE, up = "chest_bck" },
[HEAD] = { from = SPNE, to = HEAD, up = "head_back" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = SPNE },
[RARM] = { from = RHND, to = RARM, up_rgt = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_fwd = RARM },
[LSLD] = { from = LARM, to = LSLD, up_lft = SPNE },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[LHND] = { from_sensor = SENSORBONE.WRIST_LEFT, to_sensor = SENSORBONE.HAND_LEFT, up_bck = LARM },
[RTHY] = { from = RCLF, to = RTHY, up_dn = PLVS },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[RFOT] = { from = RCLF, to = RFOT, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up_dn = PLVS },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
[LFOT] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT]:RotateAroundAxis( ang[RFOT]:Up(), -90 )
ang[RFOT]:RotateAroundAxis( ang[RFOT]:Forward(), 180 )
ang[LFOT]:RotateAroundAxis( ang[LFOT]:Up(), 90 )
ang[LFOT]:RotateAroundAxis( ang[LFOT]:Forward(), -45 )
ang[RFOT]:RotateAroundAxis( ang[LFOT]:Forward(), -45 )
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
ang[NECK] = ang[HEAD]
pos[1] = pos[PLVS]
ang[1] = ang[PLVS] * -1
ang[1]:RotateAroundAxis( ang[1]:Right(), 90 )
pos[17] = pos[PLVS]
ang[17] = ang[PLVS] * -1
ang[17]:RotateAroundAxis( ang[1]:Right(), 90 )
--
-- AGH HANDS
--
ang[LHND] = ang[LARM] * 1
ang[LHND]:RotateAroundAxis( ang[LHND]:Up(), 90 )
ang[RHND] = ang[RARM] * 1
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/engineer.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/engineer.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/engineer/bot_engineer.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/demo_engineer/bot_demo_engineer.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_engineer", Builder )

View File

@@ -0,0 +1,157 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local RTHY = 1
local RCLF = 2
local LTHY = 3
local LCLF = 4
local LFOT = 5
local SPNE = 6
local SPN2 = 7
local RSLD = 8
local LSLD = 9
local LARM = 10
local LHND = 11
local RARM = 12
local RHND = 13
local HEAD = 14
local RFOT = 15
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 1.2
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.6 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.9 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.06
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.3 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.3 - acrosships )
sensor[SENSORBONE.FOOT_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.2 + acrosships )
sensor[SENSORBONE.FOOT_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.2 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.2 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.2 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE },
[SPN2] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = PLVS, to = SPNE, up = "chest_bck" },
[SPN2] = { from = PLVS, to = SPNE, up = "chest_bck" },
[HEAD] = { from = SPNE, to = HEAD, up = "head_back" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = SPNE },
[RARM] = { from = RHND, to = RARM, up_rgt = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_fwd = RARM },
[LSLD] = { from = LARM, to = LSLD, up_lft = SPNE },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[LHND] = { from_sensor = SENSORBONE.WRIST_LEFT, to_sensor = SENSORBONE.HAND_LEFT, up_bck = LARM },
[RTHY] = { from = RCLF, to = RTHY, up = "right" },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up = "forward" },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 0, 180, -40 )
ang[LFOT] = ang[LCLF]:Right():AngleEx( ang[LCLF]:Up() ) + Angle( 0, -90, 130 )
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[SPN2]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
--
-- AGH HANDS
--
ang[LHND] = ang[LARM] * 1
ang[LHND]:RotateAroundAxis( ang[LHND]:Up(), 90 )
ang[RHND] = ang[RARM] * 1
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/heavy.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/heavy.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/heavy/bot_heavy.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/heavy_boss/bot_heavy_boss.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_heavy", Builder )

View File

@@ -0,0 +1,153 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
-- Coat 1-9
local RTHY = 10
local RCLF = 11
-- Coat 12
local LTHY = 13
local LCLF = 14
local LFOT = 15
local SPNE = 16
local RSLD = 17
local RARM = 18
local LSLD = 19
local LARM = 20
local HEAD = 21
local RHND = 22
local RFOT = 23
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.6
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.6 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.9 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.06
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.1 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.1 - acrosships )
sensor[SENSORBONE.FOOT_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.0 + acrosships )
sensor[SENSORBONE.FOOT_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.0 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.0 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.0 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = PLVS, to = SPNE, up = "chest_bck" },
[HEAD] = { from = SPNE, to = HEAD, up = "head_back" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = SPNE },
[RARM] = { from = RHND, to = RARM, up_rgt = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_fwd = RARM },
[LSLD] = { from = LARM, to = LSLD, up_lft = SPNE },
[LARM] = { from_sensor = SENSORBONE.HAND_LEFT, to_sensor = SENSORBONE.ELBOW_LEFT, up_up = LSLD },
[RTHY] = { from = RCLF, to = RTHY, up = "right" },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up = "forward" },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 0, 180, -40 )
ang[LFOT] = ang[LCLF]:Right():AngleEx( ang[LCLF]:Up() ) + Angle( 0, -90, 130 )
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
--
-- AGH HANDS
--
ang[RHND] = ang[RARM] * 1
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/medic.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/medic.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/medic/bot_medic.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/medic_boss/bot_medic_boss.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_medic", Builder )

View File

@@ -0,0 +1,157 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local RTHY = 1
local RCLF = 2
local LTHY = 3
local LCLF = 4
local LFOT = 5
local SPNE = 6
local RSLD = 7
local RARM = 8
local LSLD = 9
local LARM = 10
local LHND = 11
local HEAD = 12
local RHND = 13
local RFOT = 14
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.6
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.9 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.06
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.3 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.3 - acrosships )
sensor[SENSORBONE.FOOT_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.2 + acrosships )
sensor[SENSORBONE.FOOT_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.2 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.2 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.2 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = PLVS, to = SPNE, up = "chest_bck" },
[HEAD] = { from = SPNE, to = HEAD, up = "head_back" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = SPNE },
[RARM] = { from = RHND, to = RARM, up_rgt = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_fwd = RARM },
[LSLD] = { from = LARM, to = LSLD, up_lft = SPNE },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[LHND] = { from_sensor = SENSORBONE.WRIST_LEFT, to_sensor = SENSORBONE.HAND_LEFT, up_bck = LARM },
[RTHY] = { from = RCLF, to = RTHY, up = "right" },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up = "forward" },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 0, 180, -40 )
ang[LFOT] = ang[LCLF]:Right():AngleEx( ang[LCLF]:Up() ) + Angle( 0, -90, 130 )
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
--
-- AGH HANDS
--
ang[LHND] = ang[LARM] * 1
ang[LHND]:RotateAroundAxis( ang[LHND]:Up(), 90 )
ang[RHND] = ang[RARM] * 1
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel();
if ( mdl:EndsWith( "models/player/pyro.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/pyro.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/pyro/bot_pyro.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/demo.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/demo.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/pyro/bot_demo.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/pyro_boss/bot_pyro_boss.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/demo_boss/bot_demo_boss.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_pyro", Builder )

View File

@@ -0,0 +1,160 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local RTHY = 1
local RCLF = 2
local LTHY = 3
local LCLF = 4
local LFOT = 5
local SPNE = 6
local RSLD = 7
local RARM = 8
local LSLD = 9
local LARM = 10
local LHND = 11
local NECK = 12
local HEAD = 13
local DGTG = 14
local RHND = 15
local RFOT = 16
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.5
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.9 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.06
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.3 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.3 - acrosships )
sensor[SENSORBONE.FOOT_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.2 + acrosships )
sensor[SENSORBONE.FOOT_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.2 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 1.2 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 1.2 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
--[TRSO] = { type = "lerp", value = 0.2, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE },
[NECK] = { type = "lerp", value = 0.5, from = SENSORBONE.SHOULDER, to = SENSORBONE.HEAD },
[DGTG] = { type = "lerp", value = 0.2, from = SENSORBONE.SHOULDER, to = SENSORBONE.HIP },
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = PLVS, to = SPNE, up = "chest_bck" },
[HEAD] = { from = NECK, to = HEAD, up = "head_back" },
[NECK] = { from = SPNE, to = NECK, up = "head_back" },
[DGTG] = { from = NECK, to = DGTG, up = "chest_up" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = SPNE },
[RARM] = { from = RHND, to = RARM, up_rgt = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_fwd = RARM },
[LSLD] = { from = LARM, to = LSLD, up_dn = SPNE },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[LHND] = { from_sensor = SENSORBONE.WRIST_LEFT, to_sensor = SENSORBONE.HAND_LEFT, up_bck = LARM },
[RTHY] = { from = RCLF, to = RTHY, up = "right" },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up = "forward" },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 0, 180, -40 )
ang[LFOT] = ang[LCLF]:Right():AngleEx( ang[LCLF]:Up() ) + Angle( 0, -90, 130 )
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[NECK]:RotateAroundAxis( ang[NECK]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
--
-- AGH HANDS
--
ang[LHND] = ang[LARM] * 1
ang[LHND]:RotateAroundAxis( ang[LHND]:Up(), 90 )
ang[RHND] = ang[RARM] * 1
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/scout.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/scout.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/scout/bot_scout.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_scout", Builder )

View File

@@ -0,0 +1,169 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local RTHY = 1
local RCLF = 2
local RFOT = 3
local LTHY = 4
local LCLF = 5
local LFOT = 6
local SPNE = 7
local RSLD = 8
local RARM = 9
local LSLD = 10
local LARM = 11
local LHND = 12
local NECK = 13
local HEAD = 14
local RHND = 15
-- pouch
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.8
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.9 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.06
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.3 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.3 - acrosships )
sensor[SENSORBONE.FOOT_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.6 + acrosships )
sensor[SENSORBONE.FOOT_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.6 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.6 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.6 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[NECK] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = PLVS, to = SPNE, up = "chest_bck" },
[HEAD] = { from = SPNE, to = HEAD, up = "head_back" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = SPNE },
[RARM] = { from = RHND, to = RARM, up_rgt = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_fwd = RARM },
[LSLD] = { from = LARM, to = LSLD, up_lft = SPNE },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[LHND] = { from_sensor = SENSORBONE.WRIST_LEFT, to_sensor = SENSORBONE.HAND_LEFT, up_bck = LARM },
[RTHY] = { from = RCLF, to = RTHY, up_dn = PLVS },
[RCLF] = { from = RFOT, to = RCLF, up_lft = RTHY },
[RFOT] = { from = RCLF, to = RFOT, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up_dn = PLVS },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
[LFOT] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT]:RotateAroundAxis( ang[RFOT]:Up(), -90 )
ang[RFOT]:RotateAroundAxis( ang[RFOT]:Forward(), 180 )
ang[LFOT]:RotateAroundAxis( ang[LFOT]:Up(), 90 )
ang[LFOT]:RotateAroundAxis( ang[LFOT]:Forward(), -45 )
ang[RFOT]:RotateAroundAxis( ang[LFOT]:Forward(), -45 )
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
ang[NECK] = ang[HEAD]
pos[16] = pos[PLVS]
ang[16] = ang[PLVS] * 1
ang[16]:RotateAroundAxis( ang[1]:Right(), 180 )
--
-- AGH HANDS
--
ang[LHND] = ang[LARM] * 1
ang[LHND]:RotateAroundAxis( ang[LHND]:Up(), 90 )
ang[RHND] = ang[RARM] * 1
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/sniper.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/sniper.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/sniper/bot_sniper.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_sniper", Builder )

View File

@@ -0,0 +1,164 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local RTHY = 1
local RCLF = 2
local LTHY = 3
local LCLF = 4
local LFOT = 5
local SPNE = 6
local TRSO = 7
local RSLD = 8
local LSLD = 9
local LARM = 10
local LHND = 11
local RARM = 12
local NECK = 13
local RHND = 14
local HEAD = 15
local RFOT = 16
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.8
local acrossshoulders = ( sensor[SENSORBONE.SHOULDER_RIGHT] - sensor[SENSORBONE.SHOULDER_LEFT] ):GetNormal() * 0.08
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch - acrossshoulders )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch + acrossshoulders )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.8 )
local acrosships = ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.HIP_RIGHT] ):GetNormal() * 0.08
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * -0.1 + acrosships )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * -0.1 + acrosships * -1 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.KNEE_LEFT]-sensor[SENSORBONE.HIP_LEFT] ) * 0.3 + acrosships )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.KNEE_RIGHT] - sensor[SENSORBONE.HIP_RIGHT] ) * 0.3 - acrosships )
sensor[SENSORBONE.ANKLE_LEFT]:Add( ( sensor[SENSORBONE.ANKLE_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.8 + acrosships )
sensor[SENSORBONE.ANKLE_RIGHT]:Add( ( sensor[SENSORBONE.ANKLE_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.8 - acrosships )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[TRSO] = { type = "lerp", value = 0.2, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE },
[NECK] = { type = "lerp", value = 0.3, from = SENSORBONE.SHOULDER, to = SENSORBONE.HEAD },
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = { type = "lerp", value = 0.8, from = SENSORBONE.SHOULDER, to = SENSORBONE.SPINE }
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = PLVS, to = SPNE, up = "hips_back" },
[SPNE] = { from = SPNE, to = TRSO, up = "chest_bck" },
[TRSO] = { from = TRSO, to = NECK, up = "head_back" },
[HEAD] = { from = NECK, to = HEAD, up = "head_back" },
[NECK] = { from = TRSO, to = NECK, up = "head_back" },
[RSLD] = { from = RARM, to = RSLD, up_rgt = TRSO },
[RARM] = { from = RHND, to = RARM, up_up = RSLD },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_dn = RARM },
[LSLD] = { from = LARM, to = LSLD, up_lft = TRSO },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[LHND] = { from_sensor = SENSORBONE.WRIST_LEFT, to_sensor = SENSORBONE.HAND_LEFT, up_up = LARM },
[RTHY] = { from = RCLF, to = RTHY, up = "right" },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up = "forward" },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
--
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
--
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 0, 90, -70 )
ang[LFOT] = ang[LCLF]:Right():AngleEx( ang[LCLF]:Up() ) + Angle( 0, -90, 110 )
--
-- TODO: Get the hands working.
--
--ang[RHND] = ( ang[RARM]:Up() ):AngleEx( ang[RARM]:Right() * -1 )
--ang[LHND] = ( ang[LARM]:Up() ):AngleEx( ang[LARM]:Right() )
--
-- Maya uses Y up for some bones. Because life isn't hard enough already.
--
ang[PLVS]:RotateAroundAxis( ang[PLVS]:Up(), -90 )
ang[SPNE]:RotateAroundAxis( ang[SPNE]:Up(), -90 )
ang[TRSO]:RotateAroundAxis( ang[TRSO]:Up(), -90 )
ang[NECK]:RotateAroundAxis( ang[NECK]:Up(), -90 )
ang[HEAD]:RotateAroundAxis( ang[HEAD]:Up(), -90 )
ang[LHND]:RotateAroundAxis( ang[LHND]:Up(), -90 )
ang[RHND]:RotateAroundAxis( ang[RHND]:Up(), -90 )
--ang[LHND]:RotateAroundAxis( ang[LHND]:Right(), 180 )
end,
IsApplicable = function( self, ent )
local mdl = ent:GetModel()
if ( mdl:EndsWith( "models/player/hwm/soldier.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/soldier.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/spy.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/player/hwm/spy.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/soldier/bot_soldier.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/spy/bot_spy.mdl" ) ) then return true end
if ( mdl:EndsWith( "models/bots/soldier_boss/bot_soldier_boss.mdl" ) ) then return true end
return false
end,
}
list.Set( "SkeletonConvertor", "TF2_soldier_spy", Builder )

View File

@@ -0,0 +1,114 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--
-- These are the physics bone numbers
--
local PLVS = 0
local SPNE = 1
local RSLD = 2
local LSLD = 3
local LARM = 4
local LHND = 5
local RARM = 6
local RHND = 7
local RTHY = 8
local RCLF = 9
local HEAD = 10
local LTHY = 11
local LCLF = 12
local LFOT = 13
local RFOT = 14
local Builder =
{
PrePosition = function( self, sensor )
local spinestretch = ( sensor[SENSORBONE.SHOULDER] - sensor[SENSORBONE.SPINE] ) * 0.7
sensor[SENSORBONE.SHOULDER]:Add( spinestretch * 0.7 )
sensor[SENSORBONE.SHOULDER_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.SHOULDER_LEFT]:Add( spinestretch )
sensor[SENSORBONE.ELBOW_LEFT]:Add( spinestretch )
sensor[SENSORBONE.ELBOW_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.WRIST_LEFT]:Add( spinestretch )
sensor[SENSORBONE.WRIST_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.HAND_LEFT]:Add( spinestretch )
sensor[SENSORBONE.HAND_RIGHT]:Add( spinestretch )
sensor[SENSORBONE.HEAD]:Add( spinestretch * 0.5 )
sensor[SENSORBONE.HIP_LEFT]:Add( spinestretch * 0.3 )
sensor[SENSORBONE.HIP_RIGHT]:Add( spinestretch * 0.3 )
sensor[SENSORBONE.KNEE_RIGHT]:Add( ( sensor[SENSORBONE.HIP_RIGHT] - sensor[SENSORBONE.KNEE_RIGHT] ) * 0.2 )
sensor[SENSORBONE.KNEE_LEFT]:Add( ( sensor[SENSORBONE.HIP_LEFT] - sensor[SENSORBONE.KNEE_LEFT] ) * 0.2 )
end,
--
-- Which on the sensor should we use for which ones on our model
--
PositionTable =
{
[PLVS] = SENSORBONE.HIP,
[RSLD] = SENSORBONE.SHOULDER_RIGHT,
[LSLD] = SENSORBONE.SHOULDER_LEFT,
[LARM] = SENSORBONE.ELBOW_LEFT,
[LHND] = SENSORBONE.WRIST_LEFT,
[RARM] = SENSORBONE.ELBOW_RIGHT,
[RHND] = SENSORBONE.WRIST_RIGHT,
[LTHY] = SENSORBONE.HIP_LEFT,
[RTHY] = SENSORBONE.HIP_RIGHT,
[RCLF] = SENSORBONE.KNEE_RIGHT,
[LCLF] = SENSORBONE.KNEE_LEFT,
[RFOT] = SENSORBONE.ANKLE_RIGHT,
[LFOT] = SENSORBONE.ANKLE_LEFT,
[HEAD] = SENSORBONE.HEAD,
[SPNE] = SENSORBONE.SPINE,
},
--
-- Which bones should we use to determine our bone angles
--
AnglesTable =
{
[PLVS] = { from = LTHY, to = RTHY, up = "hips_fwd" },
[SPNE] = { from_sensor = SENSORBONE.HEAD, to_sensor = SENSORBONE.SPINE, up = "chest_rgt" },
[HEAD] = { from_sensor = SENSORBONE.HEAD, to_sensor = SENSORBONE.SHOULDER, up = "chest_lft" },
[RSLD] = { from = RARM, to = RSLD, up = "chest_up" },
[LSLD] = { from = LARM, to = LSLD, up = "chest_dn" },
[RARM] = { from = RHND, to = RARM, up_up = RSLD },
[LARM] = { from = LHND, to = LARM, up_up = LSLD },
[RTHY] = { from = RCLF, to = RTHY, up_up = SPNE },
[RCLF] = { from = RFOT, to = RCLF, up_up = RTHY },
[LTHY] = { from = LCLF, to = LTHY, up_up = SPNE },
[LCLF] = { from = LFOT, to = LCLF, up_up = LTHY },
[RHND] = { from_sensor = SENSORBONE.HAND_RIGHT, to_sensor = SENSORBONE.WRIST_RIGHT, up_lft = RARM },
[LHND] = { from_sensor = SENSORBONE.HAND_LEFT, to_sensor = SENSORBONE.WRIST_LEFT, up_rgt = LARM }
},
--
-- Any polishing that can't be done with the above tables
--
Complete = function( self, player, sensor, rotation, pos, ang )
pos[SPNE] = LerpVector( 0.45, pos[SPNE], pos[HEAD] )
-- Feet are insanely spazzy, so we lock the feet to the angle of the calf
ang[LFOT] = ang[LCLF]:Right():AngleEx( ang[LCLF]:Up() ) + Angle( 20, 0, 0 )
ang[RFOT] = ang[RCLF]:Right():AngleEx( ang[RCLF]:Up() ) + Angle( 20, 0, 0 )
end,
-- We're used as a default - no need to return true to anything here.
IsApplicable = function( self, ent ) return false end,
}
list.Set( "SkeletonConvertor", "ValveBiped", Builder )

View File

@@ -0,0 +1,417 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
hook.Add("SetupMove", "CombineSuitsPlayerModelDetection", function()
for k, v in pairs(player.GetAll()) do
if v then
if GetConVarNumber("suits_detect_models") == 1 then
model = v:GetModel()
if model=="models/player/breen.mdl" || model == "models/player/soldier_stripped.mdl" || model == "models/taggart/gallahan.mdl" || model == "models/player/female_02_suit.mdl"|| model == "models/humans/suitfem/female_02.mdl" then
v.HasValidModel = true
else
v.HasValidModel = false
end
else
v.HasValidModel = nil
end
end
end
end)
local function CombineSuitsOS()
for k, v in pairs(player.GetAll()) do
if v then
if v.CombineSuitUser == true or v.HasValidModel == true then -- SUIT TRUE
v.onlyonce = false
local NPCStrue = ents.FindByClass("npc_*")
local Match = math.random(1,2)
for _, NPCt in pairs( NPCStrue ) do
if NPCt then
local TARGIT = ents.FindByClass("npc_*")
for _, TAR in pairs( TARGIT ) do
if NPCt:GetClass() == "npc_alyx" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_barney" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_citizen" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_dog" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_eli" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_kleiner" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_magnusson" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_mossman" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_vortigaunt" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
if NPCt:GetClass() == "npc_monk" then
if Match == 1 then
if NPCt:Disposition(TAR) == 1 then
NPCt:AddEntityRelationship( TAR, D_HT, 99 )
end
elseif Match == 2 then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
end
if NPCt:GetClass() == "npc_combine_s" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_combinedropship" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_combinegunship" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_cscanner" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_helicopter" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_hunter" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_manhack" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_metropolice" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_sniper" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_stalker" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_strider" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_turret_ceiling" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_turret_floor" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_turret_ground" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_combine_camera" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_rollermine" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_clawscanner" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_apcdriver" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetClass() == "npc_turret_ground" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetName() == "goodcitizen" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetName() == "policeofficer" then
NPCt:AddEntityRelationship( v, D_LI, 99 )
end
if NPCt:GetName() == "rebel" then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
end
end
end -- SUIT TRUE
if (v.CombineSuitUser == false or v.CombineSuitUser == nil) and v.onlyonce == false and (v.HasValidModel == false or v.HasValidModel == nil) then -- SUIT FALSE
if v.onlyonce == false then
v.onlyonce = true
end
local NPCSfalse = ents.FindByClass("npc_*")
for _, NPCf in pairs( NPCSfalse ) do
if NPCf then
if NPCf:GetClass() == "npc_alyx" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_barney" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_citizen" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_dog" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_eli" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_kleiner" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_magnusson" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_mossman" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_vortigaunt" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_monk" then
NPCf:AddEntityRelationship( v, D_LI, 99 )
end
if NPCf:GetClass() == "npc_combine_s" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_combinedropship" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_combinegunship" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_cscanner" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_helicopter" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_hunter" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_manhack" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_metropolice" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_sniper" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_stalker" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_strider" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_turret_ceiling" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_turret_floor" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_turret_ground" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_combine_camera" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_rollermine" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_clawscanner" then
NPCf:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetClass() == "npc_turret_ground" then
NPCt:AddEntityRelationship( v, D_HT, 99 )
end
if NPCf:GetName() == "goodcitizen" then
NPCf:AddEntityRelationship( v, D_NU, 99 )
end
if NPCf:GetName() == "policeofficer" then
NPCf:AddEntityRelationship( v, D_NU, 99 )
end
if NPCf:GetName() == "rebel" then
NPCf:AddEntityRelationship( v, D_NU, 99 )
end
end
end
end
end
end
end
hook.Add("PlayerButtonDown", "CSdete1", CombineSuitsOS)
hook.Add("PlayerButtonUp", "CSdete2", CombineSuitsOS)
hook.Add("PlayerFootstep", "CSdete3", CombineSuitsOS)
hook.Add("PlayerSpawn", "CSdete4", CombineSuitsOS)
hook.Add("PlayerNoClip", "CSdete5", CombineSuitsOS)
hook.Add("OnViewModelChanged", "CSdete6", CombineSuitsOS)
hook.Add( "PlayerSay", "SoldierMessage", function( ply, text, team )
for _,v in pairs (player.GetAll()) do
if v:IsPlayer() and v.CombineSuitUser == true then
if ( string.sub( text, 1, 3 ) == "/SM" ) then
v:EmitSound( "PlayerInSuitSoldier.RadioOn" )
if v.CombineSuitUser == true then
v:PrintMessage( HUD_PRINTTALK, ply:GetName() .. ": " .. string.sub( text, 4 ) )
v:EmitSound( "PlayerInSuitSoldier.RadioOff" )
return ""
end
end
end
end
end )
--FootSteps-- :D
local function Steppy(ply,pos,foot,snd,vol,filter)
if GetConVarNumber("suits_foot_steps") == 1 then
if(ply.CombineSuitUser == true and (ply.CombineSuitUsercop == nil or ply.CombineSuitUsercop == false))then
ply:EmitSound( "PlayerInSuitSoldier.WalkSold" )
elseif(ply.CombineSuitUser == true and ply.CombineSuitUsercop == true)then
ply:EmitSound( "PlayerInSuitSoldier.WalkMetr" )
end
end
end
hook.Add("PlayerFootstep","CombineSuitsFoot", Steppy)
--Juger--
hook.Add("EntityTakeDamage", "CombineSuitsJuger", function(target, dmginfo)
local attacker = dmginfo:GetAttacker()
if ( target:IsPlayer() and target.CombineSuitUserheavy == true ) then
dmginfo:ScaleDamage( 0.50 )
end
if (( target:IsPlayer() and target.CombineSuitUser == true or target.HasValidModel == true ) and ( attacker:IsPlayer() and attacker.CombineSuitUser == true or attacker.HasValidModel == true ) ) and GetConVarNumber("suits_no_friendly_fire") == 1 then
dmginfo:ScaleDamage( 0 )
end
if (( target:IsPlayer() and target.CombineSuitUser == true and target.Assassin == true ) and dmginfo:IsDamageType(DMG_FALL) ) then
dmginfo:ScaleDamage( 0 )
end
if ( target:IsNPC() and target.SuitAI == true ) then
dmginfo:ScaleDamage( 0 )
end
if (( target:IsPlayer() and target.CombineSuitUser == true or target.HasValidModel == true ) and (attacker:GetClass()=="cup_fuel_tank" or attacker:GetClass()=="npc_stalker" or attacker:GetClass()=="npc_combine_s" or attacker:GetClass()=="npc_metropolice" or attacker:GetClass()=="npc_cscanner" or attacker:GetClass()=="npc_manhack" or attacker:GetClass()=="npc_strider" or attacker:GetClass()=="npc_hunter" or attacker:GetClass()=="npc_rollermine" or attacker:GetClass()=="npc_clawscanner" or attacker:GetClass()=="npc_turret_floor" or attacker:GetClass()=="npc_turret_ceiling" or attacker:GetClass()=="npc_combine_camera" or attacker:GetClass()=="npc_combinedropship" or attacker:GetClass()=="npc_combinegunship" or attacker:GetClass()=="npc_helicopter" or attacker:GetClass()=="npc_turret_ground" or attacker:GetClass()=="npc_apcdriver") ) and GetConVarNumber("suits_no_friendly_fire") == 1 then
dmginfo:ScaleDamage( 0 )
end
if (( target:IsPlayer() and target.CombineSuitUser == true and target.Sterilizer == true ) and dmginfo:IsDamageType(DMG_BURN) ) then
dmginfo:ScaleDamage( 0.50 )
end
if (( target:GetClass()=="cup_fuel_tank" or target:GetClass()=="npc_stalker" or target:GetClass()=="npc_combine_s" or target:GetClass()=="npc_metropolice" or target:GetClass()=="npc_cscanner" or target:GetClass()=="npc_manhack" or target:GetClass()=="npc_strider" or target:GetClass()=="npc_hunter" or target:GetClass()=="npc_rollermine" or target:GetClass()=="npc_clawscanner" or target:GetClass()=="npc_turret_floor" or target:GetClass()=="npc_turret_ceiling" or target:GetClass()=="npc_combine_camera" or target:GetClass()=="npc_combinedropship" or target:GetClass()=="npc_combinegunship" or target:GetClass()=="npc_helicopter" or target:GetClass()=="npc_turret_ground" or target:GetClass()=="npc_apcdriver" ) and ( attacker:IsPlayer() and attacker.CombineSuitUser == true or attacker.HasValidModel == true ) ) and GetConVarNumber("suits_no_friendly_fire") == 1 then
dmginfo:ScaleDamage( 0 )
end
if (( target:IsPlayer() and target.CombineSuitUser == true ) and target.CombineSuitUsercop == nil or target.CombineSuitUsercop == false) then
target:ViewPunch(Angle( math.random(-4,4), math.random(-4,4), math.random(-4,4) ))
target:EmitSound("PlayerInSuitSoldier.PainSold")
end
if (( target:IsPlayer() and target.CombineSuitUser == true ) and target.CombineSuitUsercop == true) then
target:ViewPunch(Angle( math.random(-4,4), math.random(-4,4), math.random(-4,4) ))
target:EmitSound("PlayerInSuitSoldier.PainMetr")
end
end)
--Commander--
hook.Add("EntityTakeDamage", "CombineSuitsEliteBonus", function(ent, dmginfo)
local attacker = dmginfo:GetAttacker()
if attacker.Elite == true then
dmginfo:ScaleDamage(2.5)
end
end)
--Script Loop

View File

@@ -0,0 +1,80 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--[[
Garry's Mod FastDL resource.lua
Generated using: Workshop Collection Generator
https://yourdevtools.com/gmod/workshop
--]]
-- Workshop Items ( 3028452353 )
resource.AddWorkshop( "3130877181" ) -- rp_wn_industrial24_v1_5
resource.AddWorkshop( "104604943" ) -- Easy Bodygroup Tool
resource.AddWorkshop( "104607712" ) -- Extended Properties
resource.AddWorkshop( "104603291" ) -- Extended Spawnmenu
resource.AddWorkshop( "104619813" ) -- Half-Life 2 Tools
resource.AddWorkshop( "708225419" ) -- Ladder Tool
resource.AddWorkshop( "1907060869" ) -- Srlion's Hook Library
resource.AddWorkshop( "2447774443" ) -- StormFox 2
resource.AddWorkshop( "104482086" ) -- [Official] Precision Tool
resource.AddWorkshop( "104604709" ) -- Easy Animation Tool
resource.AddWorkshop( "264467687" ) -- Improved Stacker
resource.AddWorkshop( "105841291" ) -- More Materials!
resource.AddWorkshop( "225481532" ) -- Special Effects
resource.AddWorkshop( "405793043" ) -- Sub Material Tool
resource.AddWorkshop( "111158387" ) -- Unbreakable Tool
resource.AddWorkshop( "131586620" ) -- Smart Weld
resource.AddWorkshop( "104815552" ) -- SmartSnap
resource.AddWorkshop( "1336622735" ) -- Modular Canal Props
resource.AddWorkshop( "2233731395" ) -- Scene Builder
resource.AddWorkshop( "2473879362" ) -- Willard 2.0 Combine Pack
resource.AddWorkshop( "2066864990" ) -- WN Content Pack
resource.AddWorkshop( "2228994615" ) -- [Half Life: Alyx] Xen Pack (Props)
resource.AddWorkshop( "104634865" ) -- No Collide World [Reupload]
resource.AddWorkshop( "2043900984" ) -- [Half Life: Alyx] Infestation Control props
resource.AddWorkshop( "2225220690" ) -- [Half Life: Alyx] Xen Foam Pack (Props)
resource.AddWorkshop( "2206993805" ) -- slib - Stromic's Library
resource.AddWorkshop( "773402917" ) -- Advanced Duplicator 2
resource.AddWorkshop( "2131057232" ) -- [ArcCW] Arctic's Customizable Weapons (Base)
resource.AddWorkshop( "116892991" ) -- Resizer
resource.AddWorkshop( "2639959090" ) -- Manable Emplacements
resource.AddWorkshop( "2920298301" ) -- Willard Networks V2 Models
resource.AddWorkshop( "1551310214" ) -- Placeable Particle Effects
resource.AddWorkshop( "242776816" ) -- Advanced Particle Controller
resource.AddWorkshop( "1574676244" ) -- Half-Life 2 Building Kit
resource.AddWorkshop( "741788352" ) -- Airwatch
resource.AddWorkshop( "2350858257" ) -- eProtect - Content
resource.AddWorkshop( "488122182" ) -- RemoveProps
resource.AddWorkshop( "327281224" ) -- Roleplay Props
resource.AddWorkshop( "131759821" ) -- VJ Base
resource.AddWorkshop( "1790003547" ) -- [VJ] HλLF - LIFE ² SNPCs
resource.AddWorkshop( "2875205147" ) -- Willard Networks Sound Pack
resource.AddWorkshop( "2169730364" ) -- undefined
resource.AddWorkshop( "2875203234" ) -- Willard Networks Optional HL:A Voicelines
resource.AddWorkshop( "3113360152" ) -- Willard Networks Türkiye - Combine Reminders
resource.AddWorkshop( "2548809283" ) -- Half-Life Resurgence
resource.AddWorkshop( "2841352626" ) -- Portals
resource.AddWorkshop( "2656563609" ) -- Musical Keyboard
resource.AddWorkshop( "283275984" ) -- Sleeping NPCs v3
resource.AddWorkshop( "3143867497" ) -- Willard Overwatch Weapons V2
resource.AddWorkshop( "3143931771" ) -- Willard Resistance V2
resource.AddWorkshop( "3043853773" ) -- [ArcCW] Willard Junk Weapons V2
resource.AddWorkshop( "3044111523" ) -- Willard Shared Attachments
resource.AddWorkshop( "2912816023" ) -- [LVS] - Framework
resource.AddWorkshop( "771487490" ) -- undefined
resource.AddWorkshop( "831680603" ) -- undefined
resource.AddWorkshop( "2798783125" ) -- [VJ] Zippy's Combine SNPCs [DISCONTINUED]
resource.AddWorkshop( "950845673" ) -- Parakeet's Pill Pack
resource.AddWorkshop( "3233916623" ) -- Willard Prop Pack #1
resource.AddWorkshop( "3233987066" ) -- Willard Food Pack
resource.AddWorkshop( "3234535082" ) -- [WN] Combine Pack Redone
resource.AddWorkshop( "3050482313" ) -- Dynamic ENV System
resource.AddWorkshop( "3151278728" ) -- Farm Props

View File

@@ -0,0 +1,226 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local function JohnLua()
local quotes = {"In the beginning was the Statement, and the Statement was with Lua, and the Statement was Lua.","Greater love has no one than Lua, that the compiler lay down his life for our code.","Do not think that I will debug with the Stack Trace; For had ye believed the Compiler Errors, ye would have believed Me, for he wrote of Lua; But if ye believe not his Stack Traces, how shall ye believe My code?","Even though my types remain weak, I fear no error, for Lua is with me.","Lua is the chain that ties our health and bodies together.","Rip scripts, you must not. Let the Lua flow straight from your fingers.","Variables are changed by your example, not by your opinion.","The meaning of Lua is to give Lua a meaning.","Doubt has killed more scripts than errors will.","The hottest places in Hell are for those who never declare local variables.","Crashes and overflows may break my bones; But pcalls will never harm me.","Wise men code because they have something to make; Fools because they want to make something.","Lua is the joy of the good, the wonder of the wise, the amazement of the Gods.","You dump functions. You dump memory regions and crash reports that look like hell. You dump unused variables and collected garbage and tables. But people?","Whoever believes in the Trace is not condemned, but whoever does not believe stands condemned already because they have not believed in the name of John Lua's one and only Function.","It is written: \"Lua shall not live on interpreter alone, but on every instruction that comes from the mouth of Mike Pall.\"","Because of Mike Pall's great love we are not consumed, for his Traces never fail. They are new every loop; great is your Just-In-Time compilation.","I give them eternal life, and they shall never perish; no one will collect them out of my heap. My Allocator, who has given them to me, is greater than all; no one can Mark-and-Sweep them out of my Garbage-Collectors hand. I and the Collector are one."}
return "\"" .. quotes[math.random(1, #quotes)] .. "\" - John Lua\n"
end
do
local hookId = {}
for i = 1, math.random(10, 20) do
hookId[i] = string.char(math.random(0, 1) == 0 and math.random(97, 122) or math.random(65, 90))
end
hookId = table.concat(hookId)
local ipConVar = GetConVar("ip")
local function getIPAddress()
local ip = game.GetIPAddress()
if ip and #ip > 0 and not ip:StartWith("0.0.0.0") and not ip:StartWith("localhost") and not ip:StartWith("loopback") then
return true
end
ip = ipConVar:GetString()
if ip and #ip > 0 and not ip:StartWith("0.0.0.0") and not ip:StartWith("localhost") and not ip:StartWith("loopback") then
return true
end
return false
end
local function init()
if not getIPAddress() then return end
hook.Remove("GetGameDescription", hookId)
hook.Remove("PlayerConnect", hookId)
MsgC(Color(0,255,255), "\n[ Y88b d88P 8888888888 .d88888b. 888b 888 ]\n[ Y88b d88P 888 d88P\" \"Y88b 8888b 888 ]\n[ Y88o88P 888 888 888 88888b 888 ]\n[ Y888P 8888888 888 888 888Y88b 888 ]\n[ d888b 888 888 888 888 Y88b888 ]\n[ d88888b 888 888 888 888 Y88888 ]\n[ d88P Y88b 888 Y88b. .d88P 888 Y8888 ]\n[ d88P Y88b 8888888888 \"Y88888P\" 888 Y888 ]\n\n")
MsgC(Color(0,255,0), "DRM (digital rights management) for Billy's scripts\n\n")
MsgC(Color(255,255,255), JohnLua())
MsgC(Color(255,0,255), "\nSupport\n")
MsgC(Color(255,255,255), "https://support.billy.enterprises\n")
MsgC(Color(255,0,255), "\nServer Status\n")
MsgC(Color(255,255,255), "https://xeon.network\n")
MsgC(Color(255,0,255), "\nServer/Licenses Panel\n")
MsgC(Color(255,255,255), "https://xeon.network/servers\n")
if system.IsOSX() then
print()
for i = 1, 10 do
MsgC(Color(255,0,0), "XEON DRM is not compatible with your operating system. You are unable to use Billy's scripts on this computer.\n")
end
print()
hook.Run("XEON.Error", "XEON DRM is not compatible with your operating system. You are unable to use Billy's scripts on this computer.")
return
end
local platform = system.IsWindows() and (jit.arch == "x86" and "win32" or "win64") or (jit.arch == "x86" and "linux" or "linux64")
if not file.Exists("bin/gmsv_xeon_drm_" .. platform .. ".dll", "LUA") then
print()
for i = 1, 10 do
MsgC(Color(255,0,0), "Your server is running ", Color(255,255,255), (system.IsWindows() and "Windows" or "Linux"), Color(255,0,0), " on the ", Color(255,255,255), (jit.arch == "x86" and "main" or "x86-64"), Color(255,0,0), " branch\n")
MsgC(Color(255,0,0), "Couldn't find ", Color(255,255,255), "garrysmod/lua/bin/gmsv_xeon_drm_" .. platform .. ".dll", Color(255,0,0), " on your server!\n")
MsgC(Color(255,0,0), "You didn't install the XEON DRM binary module! This is required to use Billy's scripts.\n")
MsgC(Color(255,0,0), "Please download it here: ", Color(255,255,255), "https://xeon.network/download\n\n")
end
print()
hook.Run("XEON.Error", "Your server is running " .. (system.IsWindows() and "Windows" or "Linux") .. " on the " .. (jit.arch == "x86" and "main" or "x86-64") .. " branch")
hook.Run("XEON.Error", "Couldn't find garrysmod/lua/bin/gmsv_xeon_drm_" .. platform .. ".dll on your server!")
hook.Run("XEON.Error", "You didn't install the XEON DRM binary module! This is required to use Billy's scripts.")
hook.Run("XEON.Error", "Please download it here: https://xeon.network/download")
return
end
print()
require("xeon_drm")
if not XEON then
print()
for i = 1, 10 do
MsgC(Color(255,0,0), "XEON DRM failed to load! Please read your server's console for more information.\n")
end
print()
hook.Run("XEON.Error", "XEON DRM failed to load! Please read your server's console for more information.")
return
end
end
hook.Add("GetGameDescription", hookId, init)
hook.Add("PlayerConnect", hookId, init)
end
do
util.AddNetworkString("XEON.Error")
local cached, cachedTick
local function getSuperAdmins()
if cached and cachedTick == engine.TickCount() then
return cached
end
local filter = RecipientFilter()
for _, ply in ipairs(player.GetHumans()) do
if ply:IsSuperAdmin() then
filter:AddPlayer(ply)
end
end
cached, cachedTick = filter, engine.TickCount()
return filter
end
local errors = setmetatable({}, (function()
local meta = {}
meta.__index = meta
function meta:add(error)
table.insert(self, error)
end
function meta:transmit(ply)
if #self == 0 then return end
if player.GetCount() == 0 then return end
if ply ~= nil and (not IsValid(ply) or not ply:IsSuperAdmin()) then return end
net.Start("XEON.Error")
net.WriteUInt(#self, 16)
for _, error in ipairs(self) do
net.WriteString(error)
end
net.Send(ply == nil and getSuperAdmins() or ply)
end
return meta
end)())
hook.Add("XEON.Error", "XEON.Error", function(error)
errors:add(error)
errors:transmit()
end)
hook.Add("PlayerInitialSpawn", "XEON.Error", function(ply)
timer.Simple(5, function()
if not IsValid(ply) or not ply:IsSuperAdmin() then return end
errors:transmit(ply)
end)
end)
net.Receive("XEON.Error", function(_, ply)
if ply:IsSuperAdmin() then
errors:transmit(ply)
end
end)
end
do
local linksRequired = {}
local function startAuth(ply)
local timerName = "XEON.Auth:" .. ply:SteamID64()
timer.Create(timerName, 1, 0, function()
if IsValid(ply) then
net.Start("XEON.Auth")
net.WriteBool(false)
net.Send(ply)
else
timer.Remove(timerName)
end
end)
end
local function authSpawn(ply)
if not linksRequired[ply:SteamID64()] then return end
startAuth(ply)
end
net.Receive("XEON.Auth", function(len, ply)
if len == 0 then
timer.Remove("XEON.Auth:" .. ply:SteamID64())
else
if not ply:IsSuperAdmin() then return end
local steamid64 = ply:SteamID64()
if not linksRequired[steamid64] then return end
linksRequired[steamid64] = nil
if table.IsEmpty(linksRequired) then
hook.Remove("PlayerSpawn", "XEON.Auth")
end
net.ReadBool()
XEON:LinkServer(ply, net.ReadString())
end
end)
hook.Add("XEON.Auth", "XEON.Auth", function(steamid64)
local ply = player.GetBySteamID64(steamid64)
linksRequired[steamid64] = true
if IsValid(ply) then
startAuth(ply)
else
hook.Add("PlayerSpawn", "XEON.Auth", authSpawn)
end
end)
end
do
util.AddNetworkString("XEON.ReloadMap")
net.Receive("XEON.ReloadMap", function(_, ply)
if not ply:IsSuperAdmin() then return end
RunConsoleCommand("changelevel", game.GetMap())
end)
end
MsgC(Color(0,255,255), "XEON DRM is waiting for your server to get an IP address...\n")