This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 8064ba84d8
commit 6a58f406b1
7522 changed files with 4011896 additions and 15 deletions

View File

@@ -0,0 +1,96 @@
--[[
| 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/
--]]
AddCSLuaFile()
--[[
This is a utility to generate icons. You can accomplish some stuff through the console command,
but it's usually easier to just edit the source code.
Frequently used colors
combine 60,115,140
synth 210,150,70
bird 50,86,34
fun 220,0,255 (4th in pallet)
shotgunner 140 84 60
vort mid 2nd from right in pallet
zombie+headcrab middle-ish maroon
resistance upper right
-TF2-
normal 200,60,60
robots grey 109, in bottom
spooky mid row, 1/3 from the right
weapons 197 175 145
fun 4th from left
-PORTAL-
1 - White
2 - Dirty blue second row
]]
if CLIENT then
local matBack = Material("icongen/back.png")
local matFront = Material("icongen/front.png")
concommand.Add("pk_dev_iconmaker", function(ply, cmd, args, str)
local frame = vgui.Create("DFrame")
frame:SetPos(ScrW() / 2 - 270, ScrH() / 2 - 150) --ScrW() ScrH()
frame:SetSize(540, 300)
frame:SetTitle("Icon Maker")
frame:SetVisible(true)
frame:SetDraggable(false)
frame:ShowCloseButton(true)
frame:MakePopup()
local color = vgui.Create("DColorMixer", frame)
color:SetPos(10, 30)
color:SetAlphaBar(false)
--color:SetColor(Color(200,60,60)) tf2 default red
color:SetColor(Color(200, 60, 60))
local model = vgui.Create("DAdjustableModelPanel", frame)
model:SetPos(270, 30)
model:SetSize(256, 256)
model:SetLookAt(Vector(0, 0, 0))
model:SetModel(args[1] ~= "" and args[1] or "models/props_junk/watermelon01.mdl")
model:SetCamPos(Vector(100, 100, 100))
local ent = model:GetEntity()
--ent:SetRenderAngles(Angle(180,0,0))
if args[2] then
model:SetAnimated(true)
ent:ResetSequence(ent:LookupSequence(args[2]))
end
--Custom
model:GetEntity():SetSkin(1)
--model:GetEntity():SetBodygroup(2,1)
--model:GetEntity():SetBodygroup(1,1)
--[[model:GetEntity():SetBodygroup(2,1)
model:GetEntity():SetBodygroup(3,1)
model:GetEntity():SetBodygroup(4,1)]]
--model:GetEntity():SetMaterial("Models/antlion_guard/antlionGuard2")
--model:GetEntity():SetSkin(2)
--model:GetEntity():SetBodygroup(3,1)
--model:GetEntity():SetColor(Color(120,70,210))
local superPaint = model.Paint
function model:Paint()
surface.SetDrawColor(color:GetColor())
surface.SetMaterial(matBack)
surface.DrawTexturedRect(0, 0, model:GetWide(), model:GetTall())
superPaint(model)
cam.IgnoreZ(true)
surface.SetDrawColor(Color(255, 255, 255, 255))
surface.SetMaterial(matFront)
surface.DrawTexturedRect(0, 0, model:GetWide(), model:GetTall())
cam.IgnoreZ(false)
end
end)
end

View File

@@ -0,0 +1,358 @@
--[[
| 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/
--]]
--This is a untility to convert lists of sounds into tables usable by the vox system.
--TODO run the output through a spellcheck library and see if we can get it to seperate the words.
AddCSLuaFile()
local input_raw = [[
vo/npc/female01/abouttime01.wav
vo/npc/female01/abouttime02.wav
vo/npc/female01/ahgordon01.wav
vo/npc/female01/ahgordon02.wav
vo/npc/female01/ammo01.wav
vo/npc/female01/ammo02.wav
vo/npc/female01/ammo03.wav
vo/npc/female01/ammo04.wav
vo/npc/female01/ammo05.wav
vo/npc/female01/answer01.wav
vo/npc/female01/answer02.wav
vo/npc/female01/answer03.wav
vo/npc/female01/answer04.wav
vo/npc/female01/answer05.wav
vo/npc/female01/answer07.wav
vo/npc/female01/answer08.wav
vo/npc/female01/answer09.wav
vo/npc/female01/answer10.wav
vo/npc/female01/answer11.wav
vo/npc/female01/answer12.wav
vo/npc/female01/answer13.wav
vo/npc/female01/answer14.wav
vo/npc/female01/answer15.wav
vo/npc/female01/answer16.wav
vo/npc/female01/answer17.wav
vo/npc/female01/answer18.wav
vo/npc/female01/answer19.wav
vo/npc/female01/answer20.wav
vo/npc/female01/answer21.wav
vo/npc/female01/answer22.wav
vo/npc/female01/answer23.wav
vo/npc/female01/answer24.wav
vo/npc/female01/answer25.wav
vo/npc/female01/answer26.wav
vo/npc/female01/answer27.wav
vo/npc/female01/answer28.wav
vo/npc/female01/answer29.wav
vo/npc/female01/answer30.wav
vo/npc/female01/answer31.wav
vo/npc/female01/answer32.wav
vo/npc/female01/answer33.wav
vo/npc/female01/answer34.wav
vo/npc/female01/answer35.wav
vo/npc/female01/answer36.wav
vo/npc/female01/answer37.wav
vo/npc/female01/answer38.wav
vo/npc/female01/answer39.wav
vo/npc/female01/answer40.wav
vo/npc/female01/behindyou01.wav
vo/npc/female01/behindyou02.wav
vo/npc/female01/busy02.wav
vo/npc/female01/cit_dropper01.wav
vo/npc/female01/cit_dropper04.wav
vo/npc/female01/civilprotection01.wav
vo/npc/female01/civilprotection02.wav
vo/npc/female01/combine01.wav
vo/npc/female01/combine02.wav
vo/npc/female01/coverwhilereload01.wav
vo/npc/female01/coverwhilereload02.wav
vo/npc/female01/cps01.wav
vo/npc/female01/cps02.wav
vo/npc/female01/docfreeman01.wav
vo/npc/female01/docfreeman02.wav
vo/npc/female01/doingsomething.wav
vo/npc/female01/dontforgetreload01.wav
vo/npc/female01/excuseme01.wav
vo/npc/female01/excuseme02.wav
vo/npc/female01/fantastic01.wav
vo/npc/female01/fantastic02.wav
vo/npc/female01/finally.wav
vo/npc/female01/freeman.wav
vo/npc/female01/getdown02.wav
vo/npc/female01/getgoingsoon.wav
vo/npc/female01/gethellout.wav
vo/npc/female01/goodgod.wav
vo/npc/female01/gordead_ans01.wav
vo/npc/female01/gordead_ans02.wav
vo/npc/female01/gordead_ans03.wav
vo/npc/female01/gordead_ans04.wav
vo/npc/female01/gordead_ans05.wav
vo/npc/female01/gordead_ans06.wav
vo/npc/female01/gordead_ans07.wav
vo/npc/female01/gordead_ans08.wav
vo/npc/female01/gordead_ans09.wav
vo/npc/female01/gordead_ans10.wav
vo/npc/female01/gordead_ans11.wav
vo/npc/female01/gordead_ans12.wav
vo/npc/female01/gordead_ans13.wav
vo/npc/female01/gordead_ans14.wav
vo/npc/female01/gordead_ans15.wav
vo/npc/female01/gordead_ans16.wav
vo/npc/female01/gordead_ans17.wav
vo/npc/female01/gordead_ans18.wav
vo/npc/female01/gordead_ans19.wav
vo/npc/female01/gordead_ans20.wav
vo/npc/female01/gordead_ques01.wav
vo/npc/female01/gordead_ques02.wav
vo/npc/female01/gordead_ques04.wav
vo/npc/female01/gordead_ques05.wav
vo/npc/female01/gordead_ques06.wav
vo/npc/female01/gordead_ques07.wav
vo/npc/female01/gordead_ques08.wav
vo/npc/female01/gordead_ques10.wav
vo/npc/female01/gordead_ques11.wav
vo/npc/female01/gordead_ques12.wav
vo/npc/female01/gordead_ques13.wav
vo/npc/female01/gordead_ques14.wav
vo/npc/female01/gordead_ques15.wav
vo/npc/female01/gordead_ques16.wav
vo/npc/female01/gordead_ques17.wav
vo/npc/female01/gotone01.wav
vo/npc/female01/gotone02.wav
vo/npc/female01/gottareload01.wav
vo/npc/female01/gunship02.wav
vo/npc/female01/hacks01.wav
vo/npc/female01/hacks02.wav
vo/npc/female01/headcrabs01.wav
vo/npc/female01/headcrabs02.wav
vo/npc/female01/headsup01.wav
vo/npc/female01/headsup02.wav
vo/npc/female01/health01.wav
vo/npc/female01/health02.wav
vo/npc/female01/health03.wav
vo/npc/female01/health04.wav
vo/npc/female01/health05.wav
vo/npc/female01/hellodrfm01.wav
vo/npc/female01/hellodrfm02.wav
vo/npc/female01/help01.wav
vo/npc/female01/herecomehacks01.wav
vo/npc/female01/herecomehacks02.wav
vo/npc/female01/heretheycome01.wav
vo/npc/female01/heretohelp01.wav
vo/npc/female01/heretohelp02.wav
vo/npc/female01/heydoc01.wav
vo/npc/female01/heydoc02.wav
vo/npc/female01/hi01.wav
vo/npc/female01/hi02.wav
vo/npc/female01/hitingut01.wav
vo/npc/female01/hitingut02.wav
vo/npc/female01/holddownspot01.wav
vo/npc/female01/holddownspot02.wav
vo/npc/female01/illstayhere01.wav
vo/npc/female01/imhurt01.wav
vo/npc/female01/imhurt02.wav
vo/npc/female01/imstickinghere01.wav
vo/npc/female01/incoming02.wav
vo/npc/female01/itsamanhack01.wav
vo/npc/female01/itsamanhack02.wav
vo/npc/female01/leadon01.wav
vo/npc/female01/leadon02.wav
vo/npc/female01/leadtheway01.wav
vo/npc/female01/leadtheway02.wav
vo/npc/female01/letsgo01.wav
vo/npc/female01/letsgo02.wav
vo/npc/female01/likethat.wav
vo/npc/female01/littlecorner01.wav
vo/npc/female01/lookoutfm01.wav
vo/npc/female01/lookoutfm02.wav
vo/npc/female01/moan01.wav
vo/npc/female01/moan02.wav
vo/npc/female01/moan03.wav
vo/npc/female01/moan04.wav
vo/npc/female01/moan05.wav
vo/npc/female01/myarm01.wav
vo/npc/female01/myarm02.wav
vo/npc/female01/mygut02.wav
vo/npc/female01/myleg01.wav
vo/npc/female01/myleg02.wav
vo/npc/female01/nice01.wav
vo/npc/female01/nice02.wav
vo/npc/female01/no01.wav
vo/npc/female01/no02.wav
vo/npc/female01/notthemanithought01.wav
vo/npc/female01/notthemanithought02.wav
vo/npc/female01/ohno.wav
vo/npc/female01/ok01.wav
vo/npc/female01/ok02.wav
vo/npc/female01/okimready01.wav
vo/npc/female01/okimready02.wav
vo/npc/female01/okimready03.wav
vo/npc/female01/onyourside.wav
vo/npc/female01/outofyourway02.wav
vo/npc/female01/overhere01.wav
vo/npc/female01/overthere01.wav
vo/npc/female01/overthere02.wav
vo/npc/female01/ow01.wav
vo/npc/female01/ow02.wav
vo/npc/female01/pain01.wav
vo/npc/female01/pain02.wav
vo/npc/female01/pain03.wav
vo/npc/female01/pain04.wav
vo/npc/female01/pain05.wav
vo/npc/female01/pain06.wav
vo/npc/female01/pain07.wav
vo/npc/female01/pain08.wav
vo/npc/female01/pain09.wav
vo/npc/female01/pardonme01.wav
vo/npc/female01/pardonme02.wav
vo/npc/female01/question01.wav
vo/npc/female01/question02.wav
vo/npc/female01/question03.wav
vo/npc/female01/question04.wav
vo/npc/female01/question05.wav
vo/npc/female01/question06.wav
vo/npc/female01/question07.wav
vo/npc/female01/question08.wav
vo/npc/female01/question09.wav
vo/npc/female01/question10.wav
vo/npc/female01/question11.wav
vo/npc/female01/question12.wav
vo/npc/female01/question13.wav
vo/npc/female01/question14.wav
vo/npc/female01/question15.wav
vo/npc/female01/question16.wav
vo/npc/female01/question17.wav
vo/npc/female01/question18.wav
vo/npc/female01/question19.wav
vo/npc/female01/question20.wav
vo/npc/female01/question21.wav
vo/npc/female01/question22.wav
vo/npc/female01/question23.wav
vo/npc/female01/question25.wav
vo/npc/female01/question26.wav
vo/npc/female01/question27.wav
vo/npc/female01/question28.wav
vo/npc/female01/question29.wav
vo/npc/female01/question30.wav
vo/npc/female01/question31.wav
vo/npc/female01/readywhenyouare01.wav
vo/npc/female01/readywhenyouare02.wav
vo/npc/female01/reloadfm01.wav
vo/npc/female01/reloadfm02.wav
vo/npc/female01/runforyourlife01.wav
vo/npc/female01/runforyourlife02.wav
vo/npc/female01/scanners01.wav
vo/npc/female01/scanners02.wav
vo/npc/female01/sorry01.wav
vo/npc/female01/sorry02.wav
vo/npc/female01/sorry03.wav
vo/npc/female01/sorrydoc01.wav
vo/npc/female01/sorrydoc02.wav
vo/npc/female01/sorrydoc04.wav
vo/npc/female01/sorryfm01.wav
vo/npc/female01/sorryfm02.wav
vo/npc/female01/squad_affirm01.wav
vo/npc/female01/squad_affirm02.wav
vo/npc/female01/squad_affirm03.wav
vo/npc/female01/squad_affirm04.wav
vo/npc/female01/squad_affirm05.wav
vo/npc/female01/squad_affirm06.wav
vo/npc/female01/squad_affirm07.wav
vo/npc/female01/squad_affirm08.wav
vo/npc/female01/squad_affirm09.wav
vo/npc/female01/squad_approach01.wav
vo/npc/female01/squad_approach02.wav
vo/npc/female01/squad_approach03.wav
vo/npc/female01/squad_approach04.wav
vo/npc/female01/squad_away01.wav
vo/npc/female01/squad_away02.wav
vo/npc/female01/squad_away03.wav
vo/npc/female01/squad_follow01.wav
vo/npc/female01/squad_follow02.wav
vo/npc/female01/squad_follow03.wav
vo/npc/female01/squad_follow04.wav
vo/npc/female01/squad_greet01.wav
vo/npc/female01/squad_greet02.wav
vo/npc/female01/squad_greet04.wav
vo/npc/female01/squad_reinforce_group01.wav
vo/npc/female01/squad_reinforce_group02.wav
vo/npc/female01/squad_reinforce_group03.wav
vo/npc/female01/squad_reinforce_group04.wav
vo/npc/female01/squad_reinforce_single01.wav
vo/npc/female01/squad_reinforce_single02.wav
vo/npc/female01/squad_reinforce_single03.wav
vo/npc/female01/squad_reinforce_single04.wav
vo/npc/female01/squad_train01.wav
vo/npc/female01/squad_train02.wav
vo/npc/female01/squad_train03.wav
vo/npc/female01/squad_train04.wav
vo/npc/female01/startle01.wav
vo/npc/female01/startle02.wav
vo/npc/female01/stopitfm.wav
vo/npc/female01/strider.wav
vo/npc/female01/strider_run.wav
vo/npc/female01/takecover02.wav
vo/npc/female01/thehacks01.wav
vo/npc/female01/thehacks02.wav
vo/npc/female01/thislldonicely01.wav
vo/npc/female01/uhoh.wav
vo/npc/female01/upthere01.wav
vo/npc/female01/upthere02.wav
vo/npc/female01/vanswer01.wav
vo/npc/female01/vanswer02.wav
vo/npc/female01/vanswer03.wav
vo/npc/female01/vanswer04.wav
vo/npc/female01/vanswer05.wav
vo/npc/female01/vanswer06.wav
vo/npc/female01/vanswer07.wav
vo/npc/female01/vanswer08.wav
vo/npc/female01/vanswer09.wav
vo/npc/female01/vanswer10.wav
vo/npc/female01/vanswer11.wav
vo/npc/female01/vanswer12.wav
vo/npc/female01/vanswer13.wav
vo/npc/female01/vanswer14.wav
vo/npc/female01/vquestion01.wav
vo/npc/female01/vquestion02.wav
vo/npc/female01/vquestion03.wav
vo/npc/female01/vquestion04.wav
vo/npc/female01/vquestion05.wav
vo/npc/female01/vquestion06.wav
vo/npc/female01/vquestion07.wav
vo/npc/female01/waitingsomebody.wav
vo/npc/female01/watchout.wav
vo/npc/female01/watchwhat.wav
vo/npc/female01/wetrustedyou01.wav
vo/npc/female01/wetrustedyou02.wav
vo/npc/female01/whoops01.wav
vo/npc/female01/yeah02.wav
vo/npc/female01/youdbetterreload01.wav
vo/npc/female01/yougotit02.wav
vo/npc/female01/zombies01.wav
vo/npc/female01/zombies02.wav
]]
if CLIENT then
concommand.Add("pk_dev_voxgen", function(ply, cmd, args)
local n = args[1]
local output = {'local ' .. n .. '={}'}
for _, v in pairs(("\n"):Explode(input_raw)) do
if v:len() == 0 then continue end
local r = string.match(v, "/([^/]*)%.")
output[r] = v
table.insert(output, n .. '[ "' .. r .. '" ]="' .. v .. '"')
end
SetClipboardText(("\n"):Implode(output))
end)
end

View File

@@ -0,0 +1,365 @@
--[[
| 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/
--]]
pk_pills.registerDrive("roll", {
think = function(ply, ent, options)
local aimYaw = Angle(0, ply:EyeAngles().y, 0)
local moveDir = Vector(0, 0, 0)
if (ply:KeyDown(IN_FORWARD)) then
moveDir = moveDir + aimYaw:Forward()
end
if (ply:KeyDown(IN_BACK)) then
moveDir = moveDir - aimYaw:Forward()
end
if (ply:KeyDown(IN_MOVERIGHT)) then
moveDir = moveDir + aimYaw:Right()
end
if (ply:KeyDown(IN_MOVELEFT)) then
moveDir = moveDir - aimYaw:Right()
end
local phys = ent:GetPhysicsObject()
if not IsValid(phys) then return end
local center = ent:LocalToWorld(phys:GetMassCenter())
moveDir:Normalize()
if options.rotcap then
local av = phys:GetAngleVelocity()
local abs = math.abs(av.x) + math.abs(av.y) + math.abs(av.z)
if abs > options.rotcap then return end
end
phys:ApplyForceOffset(moveDir * options.power, center + Vector(0, 0, 1))
phys:ApplyForceOffset(moveDir * -options.power, center + Vector(0, 0, -1))
end,
key = function(ply, ent, options, key)
if key == IN_JUMP and options.jump then
local shouldJump = false
if (ent:GetMoveType() == MOVETYPE_NONE) then
ent:SetMoveType(MOVETYPE_VPHYSICS)
ent:SetPos(ent:GetPos() + Vector(0, 0, ent:BoundingRadius() + options.burrow))
shouldJump = true
else
local trace = util.QuickTrace(ent:GetPos(), Vector(0, 0, -ent:BoundingRadius() + 2), ent)
if trace.Hit then
shouldJump = true
end
end
if shouldJump then
ent:GetPhysicsObject():ApplyForceCenter(Vector(0, 0, options.jump))
ent:PillSound("jump")
end
elseif key == IN_DUCK and options.burrow and ent:GetMoveType() == MOVETYPE_VPHYSICS then
local trace = util.QuickTrace(ent:GetPos(), Vector(0, 0, -ent:BoundingRadius() + 2), ent)
if trace.Hit and (trace.MatType == MAT_DIRT or trace.MatType == MAT_SAND) then
ent:PillSound("burrow")
local p = ent:GetPos()
ent:SetPos(Vector(p.x, p.y, trace.HitPos.z - options.burrow))
ent:SetMoveType(MOVETYPE_NONE)
if ent.formTable.model then
ent:SetModel(ent.formTable.model)
end
ent:PillLoopStopAll()
end
end
end
})
pk_pills.registerDrive("fly", {
think = function(ply, ent, options)
local phys = ent:GetPhysicsObject()
if not IsValid(phys) then return end
if phys:IsGravityEnabled() then
phys:EnableGravity(false)
end
--Lateral Movement
local move = Vector(0, 0, 0)
local rotatedAngle = ent:GetAngles()
local aim = Angle(0, ply:EyeAngles().y, 0)
if options.spin then
rotatedAngle = aim
end
if options.rotation then
rotatedAngle:RotateAroundAxis(rotatedAngle:Up(), options.rotation)
end
if options.rotation2 then
rotatedAngle:RotateAroundAxis(rotatedAngle:Right(), options.rotation2)
end
if options.rocketMode then
move = rotatedAngle:Forward() * options.speed
aim.p = math.Clamp(ply:EyeAngles().p, -50, 50)
else
if not options.tilt then
if (ply:KeyDown(IN_FORWARD)) then
move = rotatedAngle:Forward() * options.speed
elseif (ply:KeyDown(IN_BACK)) then
move = move + rotatedAngle:Forward() * -options.speed
end
if (ply:KeyDown(IN_MOVERIGHT)) then
move = move + rotatedAngle:Right() * options.speed
elseif (ply:KeyDown(IN_MOVELEFT)) then
move = move + rotatedAngle:Right() * -options.speed
end
aim.p = math.Clamp(ply:EyeAngles().p, -30, 30)
else
local baseDir = aim
if (ply:KeyDown(IN_FORWARD)) then
move = baseDir:Forward() * options.speed
aim.p = options.tilt or 0
elseif (ply:KeyDown(IN_BACK)) then
move = move + baseDir:Forward() * -options.speed
aim.p = -options.tilt or 0
end
if (ply:KeyDown(IN_MOVERIGHT)) then
move = move + baseDir:Right() * options.speed
aim.r = options.tilt or 0
elseif (ply:KeyDown(IN_MOVELEFT)) then
move = move + baseDir:Right() * -options.speed
aim.r = -options.tilt or 0
end
end
--UpDown
if (ply:KeyDown(IN_JUMP)) then
move = move + Vector(0, 0, options.speed * 2 / 3)
elseif (ply:KeyDown(IN_DUCK)) then
move = move + Vector(0, 0, -options.speed * 2 / 3)
end
end
phys:AddVelocity(move - phys:GetVelocity() * .02)
if options.rotation then
aim:RotateAroundAxis(aim:Up(), -options.rotation)
end
if options.rotation2 then
aim:RotateAroundAxis(aim:Right(), -options.rotation2)
end
--[[if options.spin then
aim=ent.spinAng or Angle(0,0,0)
aim=aim+Angle(0,-options.spin,0)
ent.spinAng=aim
end]]
local localAim = ent:WorldToLocalAngles(aim)
if options.spin then
localAim = Angle(0, -options.spin, 0)
end
local moveAng = Vector(0, 0, 0)
moveAng.y = localAim.p * 3
moveAng.z = localAim.y * 3
moveAng.x = localAim.r * 3
phys:AddAngleVelocity(-1 * phys:GetAngleVelocity() + moveAng)
end,
--return LocalAim
key = function(ply, ent, options, key) end
})
pk_pills.registerDrive("hover", {
think = function(ply, ent, options)
--UpDown
if not ply:KeyDown(IN_DUCK) then
local phys = ent:GetPhysicsObject()
if not IsValid(phys) then return end
--Lateral movement
local move = Vector(0, 0, 0)
local rotatedAngle = ent:GetAngles()
if (ply:KeyDown(IN_FORWARD)) then
move = rotatedAngle:Forward() * options.speed
elseif (ply:KeyDown(IN_BACK)) then
move = move + rotatedAngle:Forward() * -options.speed
end
if (ply:KeyDown(IN_MOVERIGHT)) then
move = move + rotatedAngle:Right() * options.speed
elseif (ply:KeyDown(IN_MOVELEFT)) then
move = move + rotatedAngle:Right() * -options.speed
end
phys:AddVelocity(move - phys:GetVelocity() * .02)
--Hovering
local tr = util.QuickTrace(ent:GetPos(), Vector(0, 0, -1) * (options.height or 100), ent)
if tr.Hit then
phys:AddVelocity(Vector(0, 0, 10))
end
local aim = Angle(0, ply:EyeAngles().y, 0)
local localAim = ent:WorldToLocalAngles(aim)
local moveAng = Vector(0, 0, 0)
moveAng.y = localAim.p * 3
moveAng.z = localAim.y * 3
moveAng.x = localAim.r * 3
phys:AddAngleVelocity(-1 * phys:GetAngleVelocity() + moveAng)
end
end,
key = function(ply, ent, options, key) end
})
pk_pills.registerDrive("swim", {
think = function(ply, ent, options)
local phys = ent:GetPhysicsObject()
if not ent.setupBuoyancy then
phys:SetBuoyancyRatio(.135)
ent.setupBuoyancy = true
end
local speed
if ent:WaterLevel() > 1 then
speed = options.speed
else
speed = options.speed / 3
if math.Rand(0, 1) > .9 then
ent:TakeDamage(1)
end
end
--Lateral Movement
local move = Vector(0, 0, 0)
local rotatedAngle = ent:GetAngles()
local aim = Angle(0, ply:EyeAngles().y, 0)
if (ply:KeyDown(IN_FORWARD)) then
move = rotatedAngle:Forward()
elseif (ply:KeyDown(IN_BACK)) then
move = move - rotatedAngle:Forward()
end
if (ply:KeyDown(IN_MOVERIGHT)) then
move = move + rotatedAngle:Right()
elseif (ply:KeyDown(IN_MOVELEFT)) then
move = move - rotatedAngle:Right()
end
aim.p = math.Clamp(ply:EyeAngles().p, -80, 80)
phys:AddVelocity(move * speed)
local localAim = ent:WorldToLocalAngles(aim)
local moveAng = Vector(0, 0, 0)
moveAng.y = localAim.p * 3
moveAng.z = localAim.y * 3
moveAng.x = localAim.r * 3
phys:AddAngleVelocity(-1 * phys:GetAngleVelocity() + moveAng)
end,
--return LocalAim
key = function(ply, ent, options, key) end
})
pk_pills.registerDrive("strider", {
think = function(ply, ent, options)
local h = ent:GetPoseParameter("body_height")
if h < 200 then
h = 200
ent:SetPoseParameter("body_height", h)
end
--UpDown
if ply:KeyDown(IN_JUMP) and h < 500 then
h = h + 5
ent:SetPoseParameter("body_height", h)
elseif ply:KeyDown(IN_DUCK) and h > 200 then
h = h - 5
ent:SetPoseParameter("body_height", h)
end
local run = ply:KeyDown(IN_SPEED)
local phys = ent:GetPhysicsObject()
local aim = Angle(0, ply:EyeAngles().y, 0)
local move = Vector(0, 0, 0)
if (ply:KeyDown(IN_FORWARD)) then
move = aim:Forward()
elseif (ply:KeyDown(IN_BACK)) then
move = move - aim:Forward()
end
if (ply:KeyDown(IN_MOVERIGHT)) then
move = move + aim:Right()
elseif (ply:KeyDown(IN_MOVELEFT)) then
move = move - aim:Right()
end
move:Normalize()
if (move:Length() > 0) then
ent:PillAnim("walk_all")
if run then
ent:SetPlaybackRate(2)
else
ent:SetPlaybackRate(1)
end
ent:SetPoseParameter("move_yaw", ent:WorldToLocalAngles(move:Angle()).y)
--Stepping
--Step Sounds
if not ent.lastStep then
ent.lastStep = 0
end
if ent.lastStep == 0 and ent:GetCycle() > 1 / 3 then
ent.lastStep = 1
ent:PillSound("step")
elseif ent.lastStep == 1 and ent:GetCycle() > 2 / 3 then
ent.lastStep = 2
ent:PillSound("step")
elseif ent.lastStep == 2 and ent:GetCycle() < 2 / 3 then
ent.lastStep = 0
ent:PillSound("step")
end
else
ent:SetPlaybackRate(1)
ent:PillAnim("Idle01")
end
--Datass
local tr = util.QuickTrace(ent:GetPos(), Vector(0, 0, -1) * h, ent)
if tr.Hit then
phys:AddVelocity(-ent:GetVelocity() + Vector(0, 0, 2000 * (1 - tr.Fraction)) + move * (run and 200 or 100))
end
local localAim = ent:WorldToLocalAngles(aim)
local moveAng = Vector(0, 0, 0)
moveAng.y = localAim.p * 3
moveAng.z = localAim.y * 3
moveAng.x = localAim.r * 3
phys:AddAngleVelocity(-1 * phys:GetAngleVelocity() + moveAng)
end,
key = function(ply, ent, options, key) end
})

View File

@@ -0,0 +1,185 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("antlion", {
printName = "Antlion",
side = "hl_antlion",
type = "ply",
model = "models/antlion.mdl",
default_rp_cost = 4000,
options = function()
return {
{
skin = 0
},
{
skin = 1
},
{
skin = 2
},
{
skin = 3
}
}
end,
camera = {
offset = Vector(0, 0, 30),
dist = 150
},
hull = Vector(60, 60, 50),
anims = {
default = {
idle = "Idle",
walk = "walk_all",
run = "run_all",
glide = "jump_glide",
jump = "jump_start",
melee1 = "attack1",
melee2 = "attack2",
melee3 = "attack3",
charge_start = "charge_start",
charge_loop = "charge_run",
charge_hit = "charge_end",
swim = "drown",
burrow_in = "digin",
burrow_loop = "digidle",
burrow_out = "digout"
}
},
sounds = {
melee = pk_pills.helpers.makeList("npc/antlion/attack_single#.wav", 3),
melee_hit = pk_pills.helpers.makeList("npc/zombie/claw_strike#.wav", 3),
charge_start = "npc/antlion/pain1.wav",
charge_hit = "npc/antlion/land1.wav", --"npc/antlion_guard/shove1.wav",
loop_fly = "npc/antlion/fly1.wav",
loop_charge = "npc/antlion/charge_loop1.wav",
land = "npc/antlion/land1.wav",
burrow_in = "npc/antlion/digdown1.wav",
burrow_out = "npc/antlion/digup1.wav",
step = pk_pills.helpers.makeList("npc/antlion/foot#.wav", 4)
},
aim = {
xPose = "head_yaw",
yPose = "head_pitch",
nocrosshair = true
},
attack = {
mode = "trigger",
func = pk_pills.common.melee,
animCount = 3,
delay = .5,
range = 75,
dmg = 25
},
charge = {
vel = 800,
dmg = 50,
delay = .6
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillChargeAttack()
end
},
movePoseMode = "yaw",
moveSpeed = {
walk = 200,
run = 500
},
jumpPower = 500,
jump = function(ply, ent)
if ply:GetVelocity():Length() < 300 then
ply:SetVelocity(Vector(0, 0, 500))
end
end,
glideThink = function(ply, ent)
ent:PillLoopSound("fly")
local puppet = ent:GetPuppet()
if puppet:GetBodygroup(1) == 0 then
puppet:SetBodygroup(1, 1)
end
end,
land = function(ply, ent)
ent:PillLoopStop("fly")
local puppet = ent:GetPuppet()
puppet:SetBodygroup(1, 0)
end,
canBurrow = true,
health = 120,
noFallDamage = true,
damageFromWater = 1
})
pk_pills.register("antlion_guard", {
printName = "Antlion Guard",
type = "ply",
model = "models/antlion_guard.mdl",
default_rp_cost = 10000,
camera = {
offset = Vector(0, 0, 80),
dist = 300
},
hull = Vector(120, 120, 100),
anims = {
default = {
idle = "idle",
walk = "walk1",
crouch = "cover_loop",
crouch_walk = "cover_creep2",
melee = "shove",
charge_start = "charge_startfast",
charge_loop = "charge_loop",
g_charge_hit = "charge_hit"
}
},
sounds = {
melee = pk_pills.helpers.makeList("npc/antlion_guard/angry#.wav", 3),
melee_hit = "npc/antlion_guard/shove1.wav",
charge_start = pk_pills.helpers.makeList("npc/antlion_guard/angry#.wav", 3),
charge_hit = "npc/antlion_guard/shove1.wav",
step = {"npc/antlion_guard/foot_heavy1.wav", "npc/antlion_guard/foot_heavy2.wav", "npc/antlion_guard/foot_light1.wav", "npc/antlion_guard/foot_light2.wav"}
},
aim = {
xPose = "head_yaw",
yPose = "head_pitch",
nocrosshair = true
},
attack = {
mode = "trigger",
func = pk_pills.common.melee,
delay = .5,
range = 150,
dmg = 50
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillChargeAttack()
end
},
charge = {
vel = 800,
dmg = 100,
delay = .8
},
movePoseMode = "yaw",
moveSpeed = {
walk = 250,
ducked = 125
},
jumpPower = 0,
health = 500,
damageFromWater = 5
})

View File

@@ -0,0 +1,126 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("bird_crow", {
printName = "Crow",
side = "harmless",
type = "ply",
model = "models/crow.mdl",
default_rp_cost = 1000,
camera = {
offset = Vector(0, 0, 5),
dist = 40
},
hull = Vector(10, 10, 10),
anims = {
default = {
idle = "Idle01",
walk = "Walk",
run = "Run",
glide = "Soar",
fly = "Fly01",
eat = "Eat_A",
jump = "Takeoff"
}
},
moveSpeed = {
walk = 15,
run = 40
},
health = 20,
moveMod = function(ply, ent, mv, cmd)
if not ply:IsOnGround() then
local angs = mv:GetAngles()
if cmd:KeyDown(IN_JUMP) then
angs.p = -30
mv:SetVelocity(angs:Forward() * 300)
if SERVER then
ent:PillAnimTick("fly")
end
elseif cmd:KeyDown(IN_DUCK) then
angs.p = 30
mv:SetVelocity(angs:Forward() * 300)
if SERVER then
ent:PillAnimTick("fly")
end
else
angs.p = 10
mv:SetVelocity(angs:Forward() * 500)
end
end
end,
land = function(ply, ent)
ent:PillLoopStop("fly")
end,
sounds = {
vocalize = pk_pills.helpers.makeList("npc/crow/alert#.wav", 2, 3),
loop_fly = "npc/crow/flap2.wav"
},
attack = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("vocalize")
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ply:IsOnGround() then
ent:PillAnim("eat", true)
timer.Simple(1, function()
if not IsValid(ent) then return end
if ply:Health() < 10 then
ply:SetHealth(10)
end
end)
timer.Simple(2, function()
if not IsValid(ent) then return end
ply:SetHealth(20)
end)
end
end
}
})
pk_pills.register("bird_pigeon", {
parent = "bird_crow",
printName = "Pigeon",
model = "models/pigeon.mdl",
sounds = {
vocalize = pk_pills.helpers.makeList("ambient/creatures/pigeon_idle#.wav", 4)
}
})
pk_pills.register("bird_seagull", {
parent = "bird_crow",
printName = "Seagull",
model = "models/seagull.mdl",
sounds = {
vocalize = pk_pills.helpers.makeList("ambient/creatures/seagull_idle#.wav", 3)
},
flapSoundPitch = 50,
anims = {
default = {
fly = "Fly"
}
},
health = 50,
attack2 = {
mode = ""
}
})

View File

@@ -0,0 +1,118 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("stalker", {
printName = "Stalker",
type = "ply",
model = "models/stalker.mdl",
default_rp_cost = 8000,
side = "hl_combine",
health = 100,
duckBy = 0,
anims = {
default = {
idle = "idle01",
walk = "walk_all"
}
},
aim = {},
attack = {
mode = "trigger",
func = function(ply, ent)
local target = ents.Create("info_target")
target:SetPos(ply:GetEyeTrace().HitPos + ply:EyeAngles():Forward() * 20)
target:SetName("laser_target_" .. ent:EntIndex() .. "_" .. os.time())
target:Spawn()
local beam = ents.Create("env_laser")
beam:SetPos(ply:EyePos() + ply:EyeAngles():Forward() * 30)
beam:SetKeyValue("texture", "materials/cable/redlaser.vmt")
beam:SetKeyValue("damage", 100)
beam:SetKeyValue("width", 2)
beam:SetKeyValue("dissolvetype", 0)
beam:SetKeyValue("LaserTarget", target:GetName())
beam:Spawn()
beam:Fire("turnon", "", 0)
ply:Freeze(true)
ent:PillLoopSound("laser")
ent:PillSound("laser_start")
timer.Simple(2, function()
if IsValid(target) then
target:Remove()
end
if IsValid(beam) then
beam:Remove()
end
ply:Freeze(false)
if IsValid(ent) then
ent:PillLoopStop("laser")
end
end)
end
},
sounds = {
loop_laser = "npc/stalker/laser_burn.wav",
laser_start = "weapons/gauss/fire1.wav",
step = {"npc/stalker/stalker_footstep_left1.wav", "npc/stalker/stalker_footstep_left2.wav", "npc/stalker/stalker_footstep_right1.wav", "npc/stalker/stalker_footstep_right2.wav"}
},
moveSpeed = {
walk = 50,
run = 50
},
jumpPower = 0
})
pk_pills.register("crab_synth", {
printName = "Crab Synth",
side = "hl_combine",
type = "ply",
model = "models/Synth.mdl",
default_rp_cost = 15000,
side = "hl_combine",
camera = {
offset = Vector(0, 0, 50),
dist = 400
},
hull = Vector(200, 200, 110),
anims = {
default = {
idle = "idle01",
walk = "walk01"
}
},
aim = {
offset = 120
},
--attachment="eyes",
--fixTracers=true
--simple=true
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .05,
damage = 20,
spread = .05,
tracer = "AR2Tracer"
},
moveSpeed = {
walk = 150,
run = 300
},
sounds = {
shoot = "weapons/ar2/fire1.wav"
},
jumpPower = 0,
health = 5000
})

View File

@@ -0,0 +1,249 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("ccamera", {
printName = "Combine Camera",
side = "hl_combine",
type = "phys",
model = "models/combine_camera/combine_camera.mdl",
boxPhysics = {Vector(-10, -10, -20), Vector(10, 10, 0)},
userSpawn = {
type = "ceiling"
},
spawnFrozen = true,
camera = {
offset = Vector(0, 0, -50),
dist = 100,
underslung = true
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
canAim = function(ply, ent) return ent.active end,
attack = {
mode = "trigger",
func = function(ply, ent)
if ent.active and not ent.busy then
ent:PillSound("pic")
end
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ent.busy then return end
if ent.active then
ent:PillAnim("retract")
ent:PillSound("retract")
ent.active = false
else
ent:PillAnim("deploy")
ent:PillSound("deploy")
end
ent.busy = true
timer.Simple(.2, function()
if not IsValid(ent) then return end
if ent:GetSequence() == ent:LookupSequence("deploy") then
ent.active = true
end
ent.busy = false
end)
end
},
health = 40,
sounds = {
deploy = "npc/turret_floor/deploy.wav",
retract = "npc/turret_floor/retract.wav",
die = "npc/turret_floor/die.wav",
pic = "npc/scanner/scanner_photo1.wav"
}
})
pk_pills.register("cturret_ceiling", {
printName = "Combine Ceiling Turret",
parent = "ccamera",
model = "models/combine_turrets/ceiling_turret.mdl",
aim = {
attachment = "eyes"
},
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .1,
damage = 4,
spread = .01,
anim = "fire",
tracer = "AR2Tracer"
},
sounds = {
shoot = pk_pills.helpers.makeList("npc/turret_floor/shoot#.wav", 3)
}
})
pk_pills.register("ccrawler", {
printName = "Combine Flea Drone",
side = "hl_combine",
type = "ply",
model = "models/combine_turrets/ground_turret.mdl",
noragdoll = true,
default_rp_cost = 4000,
camera = {
offset = Vector(0, 0, 30),
dist = 80
},
hull = Vector(30, 30, 20),
anims = {},
moveSpeed = {
walk = 100,
run = 300
},
boneMorphs = {
["Ground_turret.mesh2"] = {
rot = Angle(0, 180, 0)
},
["Ground_turret.Gun"] = {
rot = Angle(0, 0, 0),
pos = Vector(0, -3, 39)
}
},
aim = {
attachment = "eyes",
simple = true
},
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .2,
damage = 5,
spread = .02,
tracer = "AR2Tracer"
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ply:IsOnGround() then
ply:TakeDamage(30, ply)
local v = ply:EyeAngles():Forward() * 600 + Vector(0, 0, 600)
ply:SetLocalVelocity(v)
ent:PillSound("jump")
local start = 20
local endd = 10
ent.trail = util.SpriteTrail(ent, 0, Color(100, 100, 100), false, start, endd, 4, 1 / (start + endd) * .5, "trails/smoke.vmt")
end
end
},
land = function(ply, ent)
if IsValid(ent.trail) then
ent.trail:Remove()
end
end,
sounds = {
shoot = "weapons/pistol/pistol_fire3.wav",
jump = "weapons/grenade_launcher1.wav"
},
noFallDamage = true,
muteSteps = true,
health = 150
})
--[[
pk_pills.register("bmturret",{
printName="Mini Turret",
type="phys",
model="models/turret/miniturret.mdl",
boxPhysics={Vector(-20,-20,-20),Vector(20,20,20)},
userSpawn= {
type="wall",
ang=Angle(90,0,0)
},
seqInit="deploy",
spawnFrozen=true,
camera={
offset=Vector(0,0,60),
dist=80
},
aim={
attachment="0",
},
canAim=function(ply,ent)
return ent:GetCycle()==1
end,
attack={
mode= "auto",
func=pk_pills.common.shoot,
delay=.1,
damage=4,
spread=.01,
tracer="Tracer"
},
boneMorphs = {
["Bone01"]=function(ply,ent)
local a= ent:WorldToLocalAngles(ply:EyeAngles())
if ent:GetCycle()==1 then
return {rot=Angle(a.y,0,0)}
end
end,
["Bone03"]=function(ply,ent)
local a= ent:WorldToLocalAngles(ply:EyeAngles())
if ent:GetCycle()==1 then
return {rot=Angle(0,a.p,0)}
end
end
},
health=80,
sounds={
shoot="weapons/smg1/smg1_fire1.wav"
}
})
pk_pills.register("bmturret2",{
printName="Gatling Turret",
parent="bmturret",
type="phys",
model="models/turret/turret.mdl",
camera={
offset=Vector(0,0,80),
dist=100
},
attack={
mode= "auto",
func=pk_pills.common.shoot,
delay=.05,
damage=6,
spread=.01,
tracer="AR2Tracer"
},
boneMorphs = {
["Dummy02"]=function(ply,ent)
local a= ent:WorldToLocalAngles(ply:EyeAngles())
if ent:GetCycle()==1 then
return {rot=Angle(a.y,0,0)}
end
end,
["Dummy05"]=function(ply,ent)
local a= ent:WorldToLocalAngles(ply:EyeAngles())
if ent:GetCycle()==1 then
return {rot=Angle(0,a.p,0)}
end
end
},
health=160,
sounds={
shoot="weapons/ar2/fire1.wav"
}
})
]]

View File

@@ -0,0 +1,466 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("hunter_chopper", {
printName = "Hunter-Chopper",
side = "hl_combine",
type = "phys",
model = "models/Combine_Helicopter.mdl",
default_rp_cost = 20000,
spawnOffset = Vector(0, 0, 200),
camera = {
offset = Vector(80, 0, 0),
dist = 1000
},
driveType = "fly",
driveOptions = {
speed = 20,
tilt = 20
},
seqInit = "idle",
aim = {
xPose = "weapon_yaw",
yPose = "weapon_pitch",
yInvert = true,
attachment = "Muzzle"
},
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .02,
damage = 10,
spread = .05,
tracer = "HelicopterTracer"
},
attack2 = {
mode = "auto",
func = function(ply, ent)
ent:PillSound("dropBomb")
local bomb = ents.Create("grenade_helicopter")
bomb:SetPos(ent:LocalToWorld(Vector(-60, 0, -60)))
bomb:SetAngles(Angle(math.Rand(-180, 180), math.Rand(-180, 180), math.Rand(-180, 180)))
bomb:Spawn()
bomb:SetPhysicsAttacker(ply)
local randVec = VectorRand()
randVec.z = 0
bomb:GetPhysicsObject():AddVelocity(ent:GetVelocity() + randVec * 100)
end,
delay = .5
},
reload = function(ply, ent)
if ent.lastrocket and ent.lastrocket + 1 > CurTime() then return end
ent:PillSound("rocket")
local rocket = ents.Create("rpg_missile")
rocket:SetPos(ent:LocalToWorld(Vector(0, 80, -80)))
rocket:SetAngles(ply:EyeAngles())
rocket:SetSaveValue("m_flDamage", 200)
rocket:SetOwner(ply)
rocket:SetVelocity(ent:GetVelocity())
rocket:Spawn()
rocket = ents.Create("rpg_missile")
rocket:SetPos(ent:LocalToWorld(Vector(0, -80, -80)))
rocket:SetAngles(ply:EyeAngles())
rocket:SetSaveValue("m_flDamage", 200)
rocket:SetOwner(ply)
rocket:SetVelocity(ent:GetVelocity())
rocket:Spawn()
ent.lastrocket = CurTime()
end,
health = 5600,
damageFromWater = -1,
sounds = {
loop_move = "npc/attack_helicopter/aheli_rotor_loop1.wav",
loop_attack = "npc/attack_helicopter/aheli_weapon_fire_loop3.wav",
dropBomb = "npc/attack_helicopter/aheli_mine_drop1.wav",
die = pk_pills.helpers.makeList("ambient/explosions/explode_#.wav", 9),
rocket = "weapons/grenade_launcher1.wav"
}
})
pk_pills.register("gunship", {
printName = "Combine Gunship",
side = "hl_combine",
type = "phys",
model = "models/gunship.mdl",
default_rp_cost = 20000,
spawnOffset = Vector(0, 0, 200),
camera = {
offset = Vector(80, 0, 0),
dist = 1000
},
driveType = "fly",
driveOptions = {
speed = 20,
tilt = 20
},
seqInit = "prop_turn",
aim = {
xPose = "flex_horz",
yPose = "flex_vert",
attachment = "Muzzle"
},
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .1,
damage = 10,
spread = .02,
tracer = "HelicopterTracer"
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ent.usingWarpCannon then return end
local fireAngs = ent:GetAngles()
fireAngs.p = 45
fireAngs.r = 0
local tr = util.QuickTrace(ent:GetPos(), ent:GetPos() + fireAngs:Forward() * 99999, ent)
local effectdata = EffectData()
effectdata:SetEntity(ent)
effectdata:SetOrigin(tr.HitPos)
util.Effect("warp_cannon", effectdata, true, true)
ent:PillSound("warp_charge") --belly_cannon
timer.Simple(1.2, function()
if not IsValid(ent) then return end
ent:PillSound("warp_fire")
util.BlastDamage(ent, ply, tr.HitPos, 200, 1000)
if IsValid(tr.Entity) then
local phys = tr.Entity:GetPhysicsObject()
if IsValid(phys) then
phys:ApplyForceCenter(ply:EyeAngles():Forward() * 9 ^ 7)
end
end
end)
ent.usingWarpCannon = true
timer.Simple(2.4, function()
if not IsValid(ent) then return end
ent.usingWarpCannon = nil
end)
end
},
pose = {
fin_accel = function(ply, ent, old)
local vel = WorldToLocal(ent:GetVelocity(), Angle(), Vector(0, 0, 0), ent:GetAngles())
return vel.x / 800
end,
fin_sway = function(ply, ent, old)
local vel = WorldToLocal(ent:GetVelocity(), Angle(), Vector(0, 0, 0), ent:GetAngles())
return -vel.y / 800
end,
antenna_accel = function(ply, ent, old)
local vel = WorldToLocal(ent:GetVelocity(), Angle(), Vector(0, 0, 0), ent:GetAngles())
return vel.x / 2000
end,
antenna_sway = function(ply, ent, old)
local vel = WorldToLocal(ent:GetVelocity(), Angle(), Vector(0, 0, 0), ent:GetAngles())
return -vel.y / 2000
end
},
health = 5,
onlyTakesExplosiveDamage = true,
damageFromWater = -1,
sounds = {
loop_move = "npc/combine_gunship/engine_whine_loop1.wav",
loop_attack = "npc/combine_gunship/gunship_weapon_fire_loop6.wav",
die = pk_pills.helpers.makeList("ambient/explosions/explode_#.wav", 9),
warp_charge = "npc/strider/charging.wav",
warp_fire = "npc/strider/fire.wav"
}
})
pk_pills.register("dropship", {
printName = "Combine Dropship",
side = "hl_combine",
type = "phys",
model = "models/Combine_dropship.mdl",
default_rp_cost = 10000,
spawnOffset = Vector(0, 0, 200),
camera = {
offset = Vector(0, 0, 200),
dist = 1000
},
driveType = "fly",
driveOptions = {
speed = 30,
tilt = 20
},
aim = {
xPose = "weapon_yaw",
yPose = "weapon_pitch",
yInvert = true,
attachment = "Muzzle",
usesSecondaryEnt = true
},
attack = {
mode = "trigger",
func = function(ply, ent)
if IsValid(ent.container) then
ent.container:Deploy()
end
end
},
attack2 = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .1,
damage = 4,
spread = .01,
tracer = "HelicopterTracer"
},
reload = function(ply, ent)
if IsValid(ent.container) then
ent.container:SetParent()
ent.container:PhysicsInit(SOLID_VPHYSICS)
ent.container:SetMoveType(MOVETYPE_VPHYSICS)
ent.container:SetSolid(SOLID_VPHYSICS)
ent.container:SetPos(ent:GetPos())
ent.container:SetAngles(ent:GetAngles())
ent.container:GetPhysicsObject():Wake()
ent:SetPillAimEnt(nil)
ent:PillSound("drop")
ent:PillLoopStop("deploy")
ent.container = nil
else
local tr = util.TraceHull({
start = ent:GetPos(),
endpos = ent:GetPos() + Vector(0, 0, -200),
filter = {ent},
mins = Vector(-50, -50, -50),
maxs = Vector(50, 50, 50)
})
local grabent = tr.Entity
if IsValid(grabent) then
if (grabent:GetClass() == "pill_dropship_container") then
grabent:SetPos(ent:GetPos())
grabent:SetAngles(ent:GetAngles())
grabent:SetParent(ent)
grabent:Fire("setparentattachment", "cargo_anim")
ent:SetPillAimEnt(grabent)
ent:PillFilterCam(grabent)
ent:PillSound("grab")
ent.container = grabent
elseif (grabent:GetClass() == "pill_dropship_strider" and not grabent.droppedfrom) then
grabent:SetPos(ent:GetPos())
grabent:SetAngles(ent:GetAngles())
grabent:SetParent(ent)
grabent:Fire("setparentattachment", "cargo_anim")
ent:PillFilterCam(grabent)
ent:PillSound("grab")
ent.container = grabent
elseif (grabent:GetClass() == "npc_strider") then
local strider_grabbed = ents.Create("pill_dropship_strider")
strider_grabbed:SetPos(ent:GetPos())
strider_grabbed:SetAngles(ent:GetAngles())
strider_grabbed:Spawn()
strider_grabbed:SetParent(ent)
strider_grabbed:Fire("setparentattachment", "cargo_anim")
ent:PillFilterCam(strider_grabbed)
ent:PillSound("grab")
ent.container = strider_grabbed
grabent:Remove()
end
end
end
end,
seqInit = "idle",
pose = {
body_accel = function(ply, ent, old)
local vel = WorldToLocal(ent:GetVelocity(), Angle(), Vector(0, 0, 0), ent:GetAngles())
return vel.x / 800
end,
body_sway = function(ply, ent, old)
local vel = WorldToLocal(ent:GetVelocity(), Angle(), Vector(0, 0, 0), ent:GetAngles())
return -vel.y / 800
end
},
damageFromWater = -1,
sounds = {
loop_move = "npc/combine_gunship/dropship_engine_near_loop1.wav",
loop_attack2 = "npc/combine_gunship/gunship_fire_loop1.wav",
loop_deploy = "npc/combine_gunship/dropship_dropping_pod_loop1.wav",
alert_empty = "npc/attack_helicopter/aheli_damaged_alarm1.wav",
grab = "vehicles/Crane/crane_magnet_switchon.wav",
drop = "vehicles/Crane/crane_magnet_release.wav",
die = pk_pills.helpers.makeList("ambient/explosions/explode_#.wav", 9)
}
})
pk_pills.register("advisor", {
printName = "Advisor",
side = "hl_combine",
type = "phys",
model = "models/advisor.mdl",
default_rp_cost = 8000,
camera = {
dist = 250
},
seqInit = "Idle01",
sphericalPhysics = 50,
driveType = "fly",
driveOptions = {
speed = 10
},
attack = {
mode = "trigger",
func = function(ply, ent)
if ent:GetSequence() ~= ent:LookupSequence("Idle01") then return end
ent:PillAnim("attackL", true)
local tr = util.TraceHull({
start = ent:GetPos(),
endpos = ent:GetPos() + ent:GetAngles():Forward() * 200,
filter = {ent},
mins = Vector(-25, -25, -25),
maxs = Vector(25, 25, 25)
})
if IsValid(tr.Entity) then
local dmg = DamageInfo()
dmg:SetAttacker(ply)
dmg:SetInflictor(ent)
dmg:SetDamageType(DMG_SLASH)
dmg:SetDamage(50)
tr.Entity:TakeDamageInfo(dmg)
ent:PillSound("hit")
end
timer.Simple(.5, function()
if not IsValid(ent) then return end
ent:PillAnim("Idle01", true)
end)
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ent:GetSequence() ~= ent:LookupSequence("Idle01") then return end
ent:PillAnim("attackR", true)
local tr = util.TraceHull({
start = ent:GetPos(),
endpos = ent:GetPos() + ent:GetAngles():Forward() * 200,
filter = {ent},
mins = Vector(-25, -25, -25),
maxs = Vector(25, 25, 25)
})
if IsValid(tr.Entity) then
local dmg = DamageInfo()
dmg:SetAttacker(ply)
dmg:SetInflictor(ent)
dmg:SetDamageType(DMG_SLASH)
dmg:SetDamage(50)
tr.Entity:TakeDamageInfo(dmg)
ent:PillSound("hit")
end
timer.Simple(.5, function()
if not IsValid(ent) then return end
ent:PillAnim("Idle01", true)
end)
end
},
health = 1000,
sounds = {
loop_move = "ambient/levels/citadel/citadel_ambient_voices1.wav",
hit = pk_pills.helpers.makeList("npc/zombie/claw_strike#.wav", 3)
}
})
pk_pills.register("strider", {
printName = "Strider",
side = "hl_combine",
type = "phys",
model = "models/combine_strider.mdl",
default_rp_cost = 20000,
camera = {
dist = 750
},
seqInit = "Idle01",
driveType = "strider",
aim = {
xInvert = true,
xPose = "minigunYaw",
yPose = "minigunPitch",
attachment = "MiniGun",
fixTracers = true,
simple = true,
overrideStart = Vector(80, 0, -40)
},
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .2,
damage = 30,
spread = .02,
tracer = "HelicopterTracer"
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ent.usingWarpCannon then return end
local tr = util.QuickTrace(ent:LocalToWorld(Vector(80, 0, -40)), ply:EyeAngles():Forward() * 99999, ent)
local effectdata = EffectData()
effectdata:SetEntity(ent)
effectdata:SetOrigin(tr.HitPos)
util.Effect("warp_cannon", effectdata, true, true)
ent:PillSound("warp_charge")
timer.Simple(1.2, function()
if not IsValid(ent) then return end
ent:PillSound("warp_fire")
util.BlastDamage(ent, ply, tr.HitPos, 200, 1000)
if IsValid(tr.Entity) then
local phys = tr.Entity:GetPhysicsObject()
if IsValid(phys) then
phys:ApplyForceCenter(ply:EyeAngles():Forward() * 9 ^ 7)
end
end
end)
ent.usingWarpCannon = true
timer.Simple(2.4, function()
if not IsValid(ent) then return end
ent.usingWarpCannon = nil
end)
end
},
renderOffset = function(ply, ent)
local h = ent:GetPoseParameter("body_height") * 500
return Vector(0, 0, 500 - h)
end,
health = 7,
onlyTakesExplosiveDamage = true,
sounds = {
step = pk_pills.helpers.makeList("npc/strider/strider_step#.wav", 6),
shoot = "npc/strider/strider_minigun.wav",
warp_charge = "npc/strider/charging.wav",
warp_fire = "npc/strider/fire.wav"
}
})

View File

@@ -0,0 +1,376 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("rollermine", {
printName = "Rollermine",
side = "hl_combine",
type = "phys",
model = "models/roller.mdl",
model2 = "models/roller_spikes.mdl",
default_rp_cost = 3000,
driveType = "roll",
driveOptions = {
power = 8000,
jump = 15000,
burrow = 6
},
attack = {
mode = "trigger",
func = function(ply, ent)
if ent:GetMoveType() ~= MOVETYPE_VPHYSICS then return end
if ent:GetModel() == ent.formTable.model then
ent:PillSound("bladesOut")
ent:PillLoopSound("charge")
else
ent:PillSound("bladesIn")
ent:PillLoopStop("charge")
end
ent:SetModel(ent:GetModel() == ent.formTable.model and ent.formTable.model2 or ent.formTable.model)
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillDie()
ply:Spawn()
end
},
diesOnExplode = true,
damageFromWater = -1,
die = function(ply, ent)
local explode = ents.Create("env_explosion")
explode:SetPos(ent:GetPos())
explode:Spawn()
explode:SetOwner(ply)
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
end,
sounds = {
jump = "npc/roller/mine/rmine_predetonate.wav",
burrow = "npc/roller/mine/combine_mine_deactivate1.wav",
contact = "npc/roller/mine/rmine_explode_shock1.wav",
bladesIn = pk_pills.helpers.makeList("npc/roller/mine/rmine_blades_in#.wav", 3),
bladesOut = pk_pills.helpers.makeList("npc/roller/mine/rmine_blades_out#.wav", 3),
loop_move = "npc/roller/mine/rmine_moveslow_loop1.wav",
loop_charge = "npc/roller/mine/rmine_seek_loop2.wav"
},
moveSoundControl = function(ply, ent)
local MineSpeed = ent:GetVelocity():Length()
if MineSpeed > 50 then return math.Clamp(MineSpeed / 2, 100, 150) end
end,
contact = function(ply, ent, other)
if ent:GetModel() == ent.formTable.model2 then return 25, DMG_SHOCK, 20000 end
end
})
pk_pills.register("cityscanner", {
printName = "City Scanner",
side = "hl_combine",
type = "phys",
model = "models/Combine_Scanner.mdl",
default_rp_cost = 1000,
driveType = "fly",
driveOptions = {
speed = 6
},
aim = {
xPose = "flex_horz",
yPose = "flex_vert",
nocrosshair = true
},
pose = {
dynamo_wheel = function(ply, ent, old) return old + 10 end,
tail_control = function(ply, ent) return ent:GetPhysicsObject():GetVelocity().z / 6 end
},
attack = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("pic")
end
},
seqInit = "idle",
health = 30,
damageFromWater = -1,
sounds = {
loop_move = "npc/scanner/scanner_scan_loop1.wav",
die = "npc/scanner/scanner_explode_crash2.wav",
pic = "npc/scanner/scanner_photo1.wav"
}
})
pk_pills.register("manhack", {
printName = "Manhack",
side = "hl_combine",
type = "phys",
model = "models/manhack.mdl",
default_rp_cost = 2000,
driveType = "fly",
driveOptions = {
speed = 6,
tilt = 20
},
attack = {
mode = "trigger",
func = function(ply, ent)
if not ent.blades then
ent:PillSound("toggleBlades")
ent:PillLoopSound("blades")
else
ent:PillSound("toggleBlades")
ent:PillLoopStop("blades")
end
ent.blades = not ent.blades
end
},
pose = {
Panel1 = function(ply, ent, old)
if ent.blades and old < 90 then return old + 20 end
if not ent.blades and old > 0 then return old - 20 end
end,
Panel2 = function(ply, ent, old)
if ent.blades and old < 90 then return old + 20 end
if not ent.blades and old > 0 then return old - 20 end
end,
Panel3 = function(ply, ent, old)
if ent.blades and old < 90 then return old + 20 end
if not ent.blades and old > 0 then return old - 20 end
end,
Panel4 = function(ply, ent, old)
if ent.blades and old < 90 then return old + 20 end
if not ent.blades and old > 0 then return old - 20 end
end
},
bodyGroups = {1, 2},
seqInit = "fly",
health = 25,
damageFromWater = -1,
sounds = {
loop_move = "npc/manhack/mh_engine_loop1.wav",
loop_blades = "npc/manhack/mh_blade_loop1.wav",
toggleBlades = "npc/manhack/mh_blade_snick1.wav",
cut_flesh = pk_pills.helpers.makeList("npc/manhack/grind_flesh#.wav", 3),
cut = pk_pills.helpers.makeList("npc/manhack/grind#.wav", 5),
die = "npc/manhack/gib.wav"
},
collide = function(ply, ent, collide)
if ent.blades and collide.HitNormal.z < 0.5 and collide.HitNormal.z > -0.5 then
local force = -collide.HitNormal
--GTFO
ent:GetPhysicsObject():ApplyForceCenter(force * 1000)
--Give Damage
local dmginfo = DamageInfo()
dmginfo:SetDamage(25)
dmginfo:SetAttacker(ply)
dmginfo:SetDamageForce(force * -10000)
collide.HitEntity:TakeDamageInfo(dmginfo)
if (collide.HitEntity:IsPlayer() or collide.HitEntity:IsNPC() or collide.HitEntity:GetClass() == "pill_ent_phys") then
ent:PillSound("cut_flesh")
else
ent:PillSound("cut")
end
end
end,
contactForceHorizontal = true
})
pk_pills.register("clawscanner", {
printName = "Claw Scanner",
side = "hl_combine",
type = "phys",
model = "models/Shield_Scanner.mdl",
default_rp_cost = 3000,
driveType = "fly",
driveOptions = {
speed = 6
},
attack = {
mode = "trigger",
func = function(ply, ent)
if ent:GetSequence() == ent:LookupSequence("HoverClosed") then
--NOT calling this twice will result in bugged animations. Fuck your animations, Valve.
ent:PillAnim("OpenUp", true)
ent:PillAnim("OpenUp", true)
local mine
timer.Simple(1, function()
if not IsValid(ent) then return end
--Make a mine
local attach = ent:LookupAttachment("claw")
mine = ents.Create("pill_hopper")
local angpos = ent:GetAttachment(attach)
mine:SetPos(angpos.Pos)
mine:SetAngles(angpos.Ang)
mine:SetParent(ent)
mine:Spawn()
mine:SetOwner(ply)
mine:Fire("setparentattachment", "claw", 0.01)
ent:PillSound("minepop")
end)
timer.Simple(3, function()
if not IsValid(ent) then return end
ent:PillAnim("CloseUp", true)
mine:SetParent(nil)
mine:PhysicsInit(SOLID_VPHYSICS)
local phys = mine:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
ent:PillSound("minedrop")
timer.Simple(2, function()
if not IsValid(ent) then return end
ent:PillAnim("HoverClosed", true)
end)
end)
end
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("pic")
end
},
seqInit = "HoverClosed",
health = 30,
damageFromWater = -1,
sounds = {
loop_move = "npc/scanner/combat_scan_loop6.wav",
die = "npc/scanner/scanner_explode_crash2.wav",
minepop = "npc/ichthyosaur/snap.wav",
minedrop = pk_pills.helpers.makeList("npc/scanner/combat_scan#.wav", 5),
pic = "npc/scanner/scanner_photo1.wav"
}
})
pk_pills.register("cturret", {
printName = "Combine Turret",
side = "hl_combine",
type = "phys",
model = "models/combine_turrets/floor_turret.mdl",
default_rp_cost = 2000,
spawnOffset = Vector(0, 0, 5),
camera = {
offset = Vector(0, 0, 60)
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch",
attachment = "eyes"
},
canAim = function(ply, ent) return ent.active end,
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .1,
damage = 4,
spread = .01,
anim = "fire",
tracer = "AR2Tracer"
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ent.busy then return end
if ent.active then
ent:PillAnim("retract")
ent:PillSound("retract")
ent.active = false
else
ent:PillAnim("deploy")
ent:PillSound("deploy")
ent:PillLoopSound("alarm")
timer.Simple(1, function()
if not IsValid(ent) then return end
ent:PillLoopStop("alarm")
end)
end
ent.busy = true
timer.Simple(.2, function()
if not IsValid(ent) then return end
if ent:GetSequence() == ent:LookupSequence("deploy") then
ent.active = true
end
ent.busy = false
end)
end
},
diesOnExplode = true,
damageFromWater = -1,
sounds = {
loop_alarm = "npc/turret_floor/alarm.wav",
shoot = pk_pills.helpers.makeList("npc/turret_floor/shoot#.wav", 3),
deploy = "npc/turret_floor/deploy.wav",
retract = "npc/turret_floor/retract.wav",
die = "npc/turret_floor/die.wav",
auto_ping = "npc/turret_floor/ping.wav",
auto_ping_func = function(ply, ent) return ent.active and not ent.loopingSounds["alarm"]:IsPlaying() and (not ent.lastAttack or ent.lastAttack + .2 < CurTime()), 1 end
}
})
pk_pills.register("mortar_synth", {
printName = "Mortar Synth",
side = "hl_combine",
type = "phys",
model = "models/mortarsynth.mdl",
default_rp_cost = 8000,
sphericalPhysics = 30,
driveType = "hover",
driveOptions = {
speed = 6,
height = 50
},
attack = {
mode = "auto",
delay = 1,
func = function(ply, ent)
--if ent.attacking then return end
ent:PillAnim("Mortar_Shoot", true)
ent:SetPlaybackRate(2)
--ent.attacking=true
timer.Simple(.5, function()
if not IsValid(ent) then return end
ent:PillSound("fire")
local angs = ply:EyeAngles()
angs.p = angs.p - 45
local nade = ents.Create("pill_proj_energy_grenade")
nade:SetPos(ent:LocalToWorld(Vector(50, 0, 50)))
nade:SetAngles(angs)
nade:SetOwner(ply)
nade:Spawn()
end)
end
},
--[[timer.Simple(1,function()
if !IsValid(ent) then return end
ent.attacking=nil
end)]]
health = 400,
sounds = {
loop_move = "npc/scanner/combat_scan_loop6.wav",
fire = "npc/env_headcrabcanister/launch.wav"
}
})

View File

@@ -0,0 +1,272 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("csoldier", {
printName = "Combine Soldier",
type = "ply",
model = "models/Combine_Soldier.mdl",
default_rp_cost = 5000,
skin = 0,
options = function()
return {
{
model = "models/Combine_Soldier.mdl"
},
{
model = "models/Combine_Soldier_PrisonGuard.mdl"
}
}
end,
side = "hl_combine",
voxSet = "combine",
anims = {
default = {
idle = "Idle_Unarmed",
walk = "WalkUnarmed_all",
run = "Run_turretCarry_ALL",
crouch = "CrouchIdle",
crouch_walk = "Crouch_WalkALL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
throw = "grenThrow",
rappel = "rappelloop",
land = "jump_holding_land",
g_attack = "gesture_shoot_ar2",
g_reload = "gesture_reload"
},
smg = {
idle = "CombatIdle1_SMG1",
walk = "Walk_aiming_all",
run = "RunAIMALL1",
crouch = "crouch_aim_sm1",
g_reload = "gesture_reload_SMG1"
},
ar2 = {
idle = "CombatIdle1",
walk = "Walk_aiming_all",
run = "RunAIMALL1"
},
shotgun = {
idle = "CombatIdle1_SG",
walk = "Walk_aiming_all_SG",
run = "RunAIMALL1_SG",
g_attack = "gesture_shoot_shotgun"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ply:IsOnGround() then end
end
},
flashlight = function(ply, ent)
if not ply:IsOnGround() and not ent.grappleEnd then
local tr = ply:GetEyeTrace()
if (tr.Fraction < 0.01) then
ent.grappleEnd = tr.HitPos
ent.grappleSliding = true
local effectdata = EffectData()
effectdata:SetOrigin(ent.grappleEnd)
effectdata:SetEntity(ent)
util.Effect("rappel_line", effectdata, true, true)
ent:PillSound("rappel_start")
ent:PillLoopSound("rappel")
end
elseif ply:IsOnGround() then
ent:PillAnim("throw", true)
if not ent.formTable.throwsManhack then
timer.Simple(.75, function()
if not IsValid(ent) then return end
local nade = ents.Create("npc_grenade_frag")
nade:SetPos(ply:EyePos() + ply:EyeAngles():Forward() * 50)
nade:SetAngles(ply:EyeAngles())
nade:Spawn()
nade:SetOwner(ply)
nade:Fire("SetTimer", 3, 0)
nade:GetPhysicsObject():SetVelocity((ply:EyeAngles():Forward() + Vector(0, 0, .4)) * 1000)
end)
else
timer.Simple(1, function()
if not IsValid(ent) then return end
local hax = ents.Create("npc_manhack")
hax:SetPos(ply:EyePos() + ply:EyeAngles():Forward() * 100)
hax:SetAngles(ply:EyeAngles())
hax:Spawn()
hax:GetPhysicsObject():SetVelocity(Vector(0, 0, 500))
end)
end
end
end,
moveMod = function(ply, ent, mv, cmd)
--garbage code... vertical velocity predicted, lateral velocity not
if SERVER and ent.grappleEnd then
ent:PillAnimTick("rappel")
local targetVel = -500
if ply:KeyDown(IN_JUMP) then
if ent.grappleSliding then
ent:PillLoopStop("rappel")
ent:PillSound("rappel_brake")
ent.grappleSliding = false
end
targetVel = 0
else
if not ent.grappleSliding then
ent:PillLoopSound("rappel")
ent.grappleSliding = true
end
end
if mv:GetVelocity().z < targetVel then
local latforce = (ent.grappleEnd - mv:GetOrigin()) * .05
latforce.z = 0
mv:SetVelocity(mv:GetVelocity() + latforce)
local curvel = mv:GetVelocity()
curvel.z = targetVel
mv:SetVelocity(curvel)
end
end
--dumb
if CLIENT and ent:GetPuppet():GetSequence() == ent:GetPuppet():LookupSequence("rappelloop") then
local targetVel = -500
if ply:KeyDown(IN_JUMP) then
targetVel = 0
end
if mv:GetVelocity().z < targetVel then
local curvel = mv:GetVelocity()
curvel.z = targetVel
mv:SetVelocity(curvel)
end
end
end,
land = function(ply, ent)
if ent.grappleEnd then
ent.grappleEnd = nil
ent.grappleSliding = nil
ent:PillAnim("land", true)
ent:PillLoopStop("rappel")
end
end,
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"weapon_ar2", "pill_wep_holstered"},
ammo = {
AR2 = 90
},
validHoldTypes = {"ar2", "shotgun", "smg"},
movePoseMode = "yaw",
health = 150,
sounds = {
rappel_start = "weapons/crossbow/fire1.wav",
rappel_brake = "physics/metal/sawblade_stick1.wav",
loop_rappel = "weapons/tripwire/ropeshoot.wav",
step = pk_pills.helpers.makeList("npc/combine_soldier/gear#.wav", 6)
}
})
pk_pills.register("csoldier_shotgunner", {
parent = "csoldier",
printName = "Combine Shotgunner",
skin = 1,
loadout = {"weapon_shotgun"},
ammo = {
AR2 = 0,
Buckshot = 30
}
})
--[[)
pk_pills.register("csoldier_guard",{
parent="csoldier",
printName="Prison Soldier",
model="models/Combine_Soldier_PrisonGuard.mdl",
options=false
})
pk_pills.register("csoldier_guard_shotgunner",{
parent="csoldier_shotgunner",
printName="Prison Shotgunner",
model="models/Combine_Soldier_PrisonGuard.mdl"
})]]
pk_pills.register("csoldier_elite", {
parent = "csoldier",
printName = "Combine Elite",
model = "models/Combine_Super_Soldier.mdl",
default_rp_cost = 6000,
options = false,
ammo = {
AR2AltFire = 6
},
health = 300
})
pk_pills.register("csoldier_police", {
parent = "csoldier",
printName = "Metrocop",
model = "models/Police.mdl",
options = false,
anims = {
default = {
idle = "busyidle2",
walk = "walk_all",
run = "run_all",
crouch = "Crouch_idle_pistol",
crouch_walk = "Crouch_all",
throw = "deploy"
},
smg = {
idle = "smg1angryidle1",
walk = "walk_aiming_SMG1_all",
run = "run_aiming_SMG1_all",
crouch = "crouch_idle_smg1",
g_reload = "gesture_reload_smg1",
g_attack = "gesture_shoot_smg1"
},
pistol = {
idle = "pistolangryidle2",
walk = "walk_aiming_pistol_all",
run = "run_aiming_pistol_all",
g_reload = "gesture_reload_pistol",
g_attack = "gesture_shoot_pistol"
},
melee = {
idle = "batonangryidle1",
walk = "walk_hold_baton_angry",
g_attack = "swinggesture"
}
},
sounds = {
step = pk_pills.helpers.makeList("npc/metropolice/gear#.wav", 6)
},
throwsManhack = true,
validHoldTypes = {"melee", "pistol", "smg"},
loadout = {"weapon_stunstick", "weapon_pistol", "weapon_smg1", "pill_wep_holstered"},
ammo = {
AR2 = 0,
pistol = 54,
smg1 = 90
},
health = 100
})

View File

@@ -0,0 +1,206 @@
--[[
| 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/
--]]
AddCSLuaFile()
local combineMdls = {"models/combine_soldier.mdl", "models/combine_soldier_prisonguard.mdl", "models/combine_super_soldier.mdl", "models/police.mdl", "models/zombie/zombie_soldier.mdl", "models/player/combine_soldier.mdl", "models/player/combine_soldier_prisonguard.mdl", "models/player/combine_super_soldier.mdl", "models/player/police.mdl", "models/player/police_fem.mdl", "models/player/zombie_soldier.mdl"}
pk_pills.register("headcrab", {
printName = "Headcrab",
side = "hl_zombie",
zombie = "zombie",
type = "ply",
model = "models/headcrabclassic.mdl",
default_rp_cost = 6000,
camera = {
offset = Vector(0, 0, 5),
dist = 75
},
hull = Vector(20, 20, 10),
anims = {
default = {
idle = "idle01",
walk = "run1",
jump = "jumpattack_broadcast",
swim = "drown",
burrow_in = "burrowin",
burrow_loop = "burrowidle",
burrow_out = "burrowout"
}
},
sounds = {
jump = pk_pills.helpers.makeList("npc/headcrab/attack#.wav", 3),
bite = "npc/headcrab/headbite.wav",
burrow_in = "npc/antlion/digdown1.wav",
burrow_out = "npc/antlion/digup1.wav",
step = pk_pills.helpers.makeList("npc/headcrab_poison/ph_step#.wav", 4)
},
moveSpeed = {
walk = 30,
run = 30
},
jumpPower = 300,
jump = function(ply, ent)
v = ply:EyeAngles():Forward()
v.z = 0
v:Normalize()
ply:SetVelocity(v * 200)
ent:PillSound("jump")
ent.canBite = true
end,
glideThink = function(ply, ent)
if ent.canBite then
local aim = ply:GetAimVector()
aim.z = 0
aim:Normalize()
local tracedata = {}
tracedata.start = ply:EyePos()
tracedata.endpos = ply:EyePos() + aim * 5 + Vector(0, 0, -5)
tracedata.filter = ply
tracedata.mins = Vector(-8, -8, -8)
tracedata.maxs = Vector(8, 8, 8)
local trace = util.TraceHull(tracedata)
if IsValid(trace.Entity) then
local crabbed = trace.Entity
if crabbed:IsNPC() or crabbed:IsPlayer() then
ent:PillSound("bite")
end
if crabbed:Health() <= ent.formTable.biteDmg and not crabbed:IsFlagSet(FL_GODMODE) then
local crabbed_actual
if pk_pills.getMappedEnt(crabbed) then
crabbed_actual = pk_pills.getMappedEnt(crabbed)
else
crabbed_actual = crabbed
end
if crabbed_actual:LookupBone("ValveBiped.Bip01_Head1") and crabbed_actual:LookupBone("ValveBiped.Bip01_L_Foot") and crabbed_actual:LookupBone("ValveBiped.Bip01_R_Foot") then
local mdl
if pk_pills.getMappedEnt(crabbed) then
local crabbedpill = pk_pills.getMappedEnt(crabbed)
if crabbedpill.subModel then
mdl = crabbedpill.subModel --doesnt work
else
mdl = crabbedpill:GetPuppet():GetModel()
end
else
mdl = crabbed:GetModel()
end
local t = ent.formTable.zombie
if t == "zombie" and pk_pills.hasPack("ep1") and table.HasValue(combineMdls, mdl) then
t = "ep1_zombine"
end
local newPill = pk_pills.apply(ply, t)
local dbl = ents.Create("pill_attachment_zed")
dbl:SetParent(newPill:GetPuppet())
dbl:SetModel(mdl)
dbl:Spawn()
newPill.subModel = mdl
if crabbed:IsNPC() or crabbed:IsPlayer() then
ply:SetPos(crabbed:GetPos())
ply:SetEyeAngles(crabbed:EyeAngles())
else
ent:PillSound("bite")
end
if crabbed:IsPlayer() then
crabbed:KillSilent()
else
crabbed:Remove()
end
else
crabbed:TakeDamage(10000, ply, ply)
end
else
crabbed:TakeDamage(ent.formTable.biteDmg, ply, ply)
end
ent.canBite = nil
end
end
end,
land = function(ply, ent)
ent.canBite = nil
end,
biteDmg = 60,
canBurrow = true,
health = 40
})
pk_pills.register("headcrab_fast", {
parent = "headcrab",
printName = "Fast Headcrab",
zombie = "zombie_fast",
type = "ply",
model = "models/headcrab.mdl",
default_rp_cost = 8000,
anims = {
default = {
jump = "attack"
}
},
moveSpeed = {
walk = 100,
run = 200
},
canBurrow = false
})
pk_pills.register("headcrab_poison", {
parent = "headcrab",
printName = "Poison Headcrab",
zombie = "zombie_poison",
type = "ply",
model = "models/headcrabblack.mdl",
default_rp_cost = 7000,
anims = {
default = {
jump = false,
poison_jump = "tele_attack_a",
run = "scurry"
}
},
sounds = {
rattle = pk_pills.helpers.makeList("npc/headcrab_poison/ph_rattle#.wav", 3),
jump = pk_pills.helpers.makeList("npc/headcrab_poison/ph_jump#.wav", 3),
bite = pk_pills.helpers.makeList("npc/headcrab_poison/ph_poisonbite#.wav", 3)
},
moveSpeed = {
run = 100
},
jumpPower = 0,
jump = function(ply, ent)
if ent.poison_jump_blocked then return end
v = ply:EyeAngles():Forward()
v.z = 0
v:Normalize()
ent:PillSound("rattle")
ent:PillAnim("poison_jump")
ent.poison_jump_blocked = true
timer.Simple(1.6, function()
if not IsValid(ent) then return end
ent.poison_jump_blocked = false
ent:PillSound("jump")
ply:SetVelocity(v * 200 + Vector(0, 0, 300))
ent.canBite = true
end)
end,
biteDmg = 100,
canBurrow = false
})

View File

@@ -0,0 +1,353 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("citizen_m", {
printName = "Male Citizen",
type = "ply",
voxSet = "citm",
default_rp_cost = 600,
options = function()
return {
{
model = "models/Humans/Group01/male_01.mdl"
},
{
model = "models/Humans/Group01/male_02.mdl"
},
{
model = "models/Humans/Group01/male_03.mdl"
},
{
model = "models/Humans/Group01/male_04.mdl"
},
{
model = "models/Humans/Group01/male_05.mdl"
},
{
model = "models/Humans/Group01/male_06.mdl"
},
{
model = "models/Humans/Group01/male_07.mdl"
},
{
model = "models/Humans/Group01/male_08.mdl"
},
{
model = "models/Humans/Group01/male_09.mdl"
}
}
end,
anims = {
default = {
idle = "idle_angry",
walk = "walk_all",
run = "run_all",
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
g_attack = "gesture_shoot_smg1",
g_reload = "gesture_reload_smg1",
dropItem = "Heal"
},
smg = {
idle = "Idle_SMG1_Aim_Alert",
walk = "walkAIMALL1",
run = "run_aiming_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all"
},
ar2 = {
idle = "idle_angry_Ar2",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_ar2",
g_reload = "gesture_reload_ar2"
},
shotgun = {
idle = "Idle_Angry_Shotgun",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_shotgun",
g_reload = "gesture_reload_ar2"
}
},
flashlight = function(ply, ent)
if ply:IsOnGround() and ent.formTable.drops then
ent:PillAnim("dropItem", true)
timer.Simple(1.25, function()
if not IsValid(ent) then return end
local ang = ply:EyeAngles()
ang.p = 0
local item = ents.Create(table.Random(ent.formTable.drops))
item:SetPos(ply:EyePos() + ang:Forward() * 70)
item:Spawn()
end)
end
end,
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_holstered"},
health = 100,
validHoldTypes = {"smg", "ar2", "shotgun"},
movePoseMode = "yaw"
})
pk_pills.register("refugee_m", {
parent = "citizen_m",
printName = "Male Refugee",
default_rp_cost = 4000,
options = function()
return {
{
model = "models/Humans/Group02/male_01.mdl"
},
{
model = "models/Humans/Group02/male_02.mdl"
},
{
model = "models/Humans/Group02/male_03.mdl"
},
{
model = "models/Humans/Group02/male_04.mdl"
},
{
model = "models/Humans/Group02/male_05.mdl"
},
{
model = "models/Humans/Group02/male_06.mdl"
},
{
model = "models/Humans/Group02/male_07.mdl"
},
{
model = "models/Humans/Group02/male_08.mdl"
},
{
model = "models/Humans/Group02/male_09.mdl"
}
}
end,
loadout = {nil, "weapon_smg1"},
ammo = {
smg1 = 50
}
})
pk_pills.register("rebel_m", {
parent = "citizen_m",
printName = "Male Rebel",
drops = {"item_ammo_pistol", "item_ammo_smg1", "item_ammo_ar2", "item_box_buckshot"},
default_rp_cost = 5000,
options = function()
return {
{
model = "models/Humans/Group03/male_01.mdl"
},
{
model = "models/Humans/Group03/male_02.mdl"
},
{
model = "models/Humans/Group03/male_03.mdl"
},
{
model = "models/Humans/Group03/male_04.mdl"
},
{
model = "models/Humans/Group03/male_05.mdl"
},
{
model = "models/Humans/Group03/male_06.mdl"
},
{
model = "models/Humans/Group03/male_07.mdl"
},
{
model = "models/Humans/Group03/male_08.mdl"
},
{
model = "models/Humans/Group03/male_09.mdl"
}
}
end,
loadout = {nil, "weapon_ar2", "weapon_shotgun"},
ammo = {
AR2 = 50,
Buckshot = 50
}
})
pk_pills.register("medic_m", {
parent = "citizen_m",
printName = "Male Medic",
drops = {"item_healthkit"},
default_rp_cost = 6000,
options = function()
return {
{
model = "models/Humans/Group03m/male_01.mdl"
},
{
model = "models/Humans/Group03m/male_02.mdl"
},
{
model = "models/Humans/Group03m/male_03.mdl"
},
{
model = "models/Humans/Group03m/male_04.mdl"
},
{
model = "models/Humans/Group03m/male_05.mdl"
},
{
model = "models/Humans/Group03m/male_06.mdl"
},
{
model = "models/Humans/Group03m/male_07.mdl"
},
{
model = "models/Humans/Group03m/male_08.mdl"
},
{
model = "models/Humans/Group03m/male_09.mdl"
}
}
end,
loadout = {nil, "weapon_smg1"},
ammo = {
smg1 = 50
}
})
pk_pills.register("citizen_f", {
parent = "citizen_m",
printName = "Female Citizen",
voxSet = "citf",
options = function()
return {
{
model = "models/Humans/Group01/female_01.mdl"
},
{
model = "models/Humans/Group01/female_02.mdl"
},
{
model = "models/Humans/Group01/female_03.mdl"
},
{
model = "models/Humans/Group01/female_04.mdl"
},
{
model = "models/Humans/Group01/female_06.mdl"
},
{
model = "models/Humans/Group01/female_07.mdl"
}
}
end
})
pk_pills.register("refugee_f", {
parent = "refugee_m",
printName = "Female Refugee",
voxSet = "citf",
options = function()
return {
{
model = "models/Humans/Group02/female_01.mdl"
},
{
model = "models/Humans/Group02/female_02.mdl"
},
{
model = "models/Humans/Group02/female_03.mdl"
},
{
model = "models/Humans/Group02/female_04.mdl"
},
{
model = "models/Humans/Group02/female_06.mdl"
},
{
model = "models/Humans/Group02/female_07.mdl"
}
}
end
})
pk_pills.register("rebel_f", {
parent = "rebel_m",
printName = "Female Rebel",
voxSet = "citf",
options = function()
return {
{
model = "models/Humans/Group03/female_01.mdl"
},
{
model = "models/Humans/Group03/female_02.mdl"
},
{
model = "models/Humans/Group03/female_03.mdl"
},
{
model = "models/Humans/Group03/female_04.mdl"
},
{
model = "models/Humans/Group03/female_06.mdl"
},
{
model = "models/Humans/Group03/female_07.mdl"
}
}
end
})
pk_pills.register("medic_f", {
parent = "medic_m",
printName = "Female Medic",
voxSet = "citf",
options = function()
return {
{
model = "models/Humans/Group03m/female_01.mdl"
},
{
model = "models/Humans/Group03m/female_02.mdl"
},
{
model = "models/Humans/Group03m/female_03.mdl"
},
{
model = "models/Humans/Group03m/female_04.mdl"
},
{
model = "models/Humans/Group03m/female_06.mdl"
},
{
model = "models/Humans/Group03m/female_07.mdl"
}
}
end
})

View File

@@ -0,0 +1,493 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("dog", {
printName = "Dog",
type = "ply",
model = "models/dog.mdl",
default_rp_cost = 10000,
camera = {
dist = 300
},
hull = Vector(120, 120, 100),
anims = {
default = {
idle = "idle01",
walk = "walk_all",
run = "run_all",
melee = "throw"
}
},
sounds = {
melee = "npc/dog/dog_servo6.wav",
melee_hit = pk_pills.helpers.makeList("physics/metal/metal_box_impact_hard#.wav", 3),
step = pk_pills.helpers.makeList("npc/dog/dog_footstep#.wav", 4)
},
aim = {
xPose = "head_yaw",
yPose = "head_pitch"
},
reload = function(ply, ent)
pk_pills.common.melee(ply, ent, {
delay = .5,
range = 150,
dmg = 50
})
end,
movePoseMode = "yaw",
moveSpeed = {
walk = 150,
run = 500
},
jumpPower = 0,
loadout = {"weapon_physcannon"},
hideWeapons = true,
health = 1200
})
pk_pills.register("hero_infiltrator", {
printName = "The Infiltrator",
type = "ply",
model = "models/barney.mdl",
default_rp_cost = 10000,
anims = {
default = {
idle = "idle_angry",
walk = "walk_all",
run = "run_all",
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
g_attack = "gesture_shoot_smg1",
g_reload = "gesture_reload_smg1",
change = "helmet_reveal"
},
smg = {
idle = "Idle_SMG1_Aim_Alert",
walk = "walkAIMALL1",
run = "run_aiming_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all"
},
ar2 = {
idle = "idle_angry_Ar2",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
--g_attack="gesture_shoot_ar2",
g_reload = "gesture_reload_ar2"
},
shotgun = {
idle = "Idle_Angry_Shotgun",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_shotgun",
g_reload = "gesture_reload_ar2"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_holstered", "weapon_ar2", "weapon_shotgun", "weapon_smg1"},
ammo = {
AR2 = 100,
Buckshot = 100,
smg1 = 100
},
health = 1000,
validHoldTypes = {"smg", "ar2", "shotgun"},
movePoseMode = "yaw",
flashlight = function(ply, ent)
if not ply:IsOnGround() then return end
ent:PillAnim("change", true)
if ent.disguised then
ent.disguised = nil
timer.Simple(1, function()
if IsValid(ent.disguise_faceplate) then
ent.disguise_faceplate:Fire("setparentattachment", "faceplate_attachment", 0)
end
if IsValid(ent) then
pk_pills.setAiTeam(ply, "default")
end
end)
timer.Simple(2, function()
if IsValid(ent.disguise_faceplate) then
ent.disguise_faceplate:Remove()
end
if IsValid(ent.disguise_helmet) then
ent.disguise_helmet:Remove()
end
end)
else --helmet_attachment faceplate_attachment
ent.disguised = true
ent.disguise_faceplate = ents.Create("prop_dynamic")
ent.disguise_faceplate:SetModel("models/barneyhelmet_faceplate.mdl")
ent.disguise_faceplate:SetPos(ply:GetPos())
ent.disguise_faceplate:SetParent(ent:GetPuppet())
ent.disguise_faceplate:Spawn()
ent.disguise_faceplate:Fire("setparentattachment", "faceplate_attachment", 0)
ent.disguise_helmet = ents.Create("prop_dynamic")
ent.disguise_helmet:SetModel("models/barneyhelmet.mdl")
ent.disguise_helmet:SetPos(ply:GetPos())
ent.disguise_helmet:SetParent(ent:GetPuppet())
ent.disguise_helmet:Spawn()
ent.disguise_helmet:Fire("setparentattachment", "helmet_attachment", 0)
timer.Simple(1, function()
if IsValid(ent.disguise_faceplate) then
ent.disguise_faceplate:Fire("setparentattachment", "helmet_attachment", 0)
end
if IsValid(ent) then
pk_pills.setAiTeam(ply, "hl_infiltrator")
end
end)
end
end
})
pk_pills.register("hero_monk", {
printName = "The Monk",
type = "ply",
model = "models/monk.mdl",
default_rp_cost = 10000,
anims = {
default = {
idle = "lineidle02",
walk = "walk_all",
run = "run_all",
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
g_attack = "gesture_shoot_smg1",
g_reload = "gesture_reload_smg1"
},
smg = {
idle = "Idle_SMG1_Aim_Alert",
walk = "walkAIMALL1",
run = "run_alert_aiming_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all"
},
ar2 = {
idle = "idle_angry_Ar2",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_ar2",
g_reload = "gesture_reload_ar2"
},
shotgun = {
idle = "Idle_Angry_Shotgun",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_shotgun",
g_reload = "gesture_reload_ar2"
},
crossbow = {
idle = "Idle_SMG1_Aim_Alert",
walk = "walkAIMALL1_ar2",
run = "run_aiming_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_ar2",
g_reload = "gesture_reload_ar2"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_holstered", "weapon_shotgun", "pill_wep_annabelle"},
ammo = {
Buckshot = 100,
["357"] = 100
},
health = 1000,
validHoldTypes = {"smg", "ar2", "shotgun", "crossbow"},
movePoseMode = "yaw"
})
pk_pills.register("hero_overseer", {
printName = "The Overseer",
type = "ply",
model = "models/gman_high.mdl",
default_rp_cost = 20000,
anims = {
default = {
idle = "idle",
walk = "walk_all",
run = "sprint_all", --pace_all
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
melee = "swing",
cloak = "open_door_away",
teleport = "tiefidget"
}
},
sounds = {
--melee=pk_pills.helpers.makeList("npc/zombie/zo_attack#.wav",2),
melee_hit = pk_pills.helpers.makeList("npc/zombie/claw_strike#.wav", 3),
melee_miss = pk_pills.helpers.makeList("npc/zombie/claw_miss#.wav", 2),
cloak = "buttons/combine_button1.wav",
uncloak = "buttons/combine_button1.wav",
teleport = "ambient/machines/teleport4.wav"
},
cloak = {
max = -1
},
moveSpeed = {
walk = 100,
run = 1000,
ducked = 40
},
jumpPower = 1000,
movePoseMode = "yaw",
health = 10000,
noFallDamage = true,
attack = {
mode = "trigger",
func = function(a, b, c)
if not b.iscloaked then
pk_pills.common.melee(a, b, c)
end
end,
delay = .3,
range = 40,
dmg = 1000
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if not ply:OnGround() then return end
ent:PillAnim("cloak", true)
timer.Simple(1, function()
if not IsValid(ent) then return end
ent:ToggleCloak()
end)
end
},
--[[
if ent.cloaked then
ent.cloaked=nil
timer.Simple(1,function()
if !IsValid(ent) then return end
ent:PillSound("cloak")
ent:GetPuppet():SetMaterial()
ent:GetPuppet():DrawShadow(true)
pk_pills.setAiTeam(ply,"default")
end)
else
ent.cloaked=true
timer.Simple(1,function()
if !IsValid(ent) or !IsValid(ent:GetPuppet()) then return end
ent:PillSound("cloak")
ent:GetPuppet():SetMaterial("Models/effects/vol_light001")
ent:GetPuppet():DrawShadow(false)
pk_pills.setAiTeam(ply,"harmless")
end)
end]]
reload = function(ply, ent)
if not ply:OnGround() then return end
ent:PillAnim("teleport", true)
timer.Simple(1, function()
if not IsValid(ent) then return end
local tracein = {}
tracein.maxs = Vector(16, 16, 72)
tracein.mins = Vector(-16, -16, 0)
tracein.start = ply:EyePos()
tracein.endpos = ply:EyePos() + ply:EyeAngles():Forward() * 9999
tracein.filter = {ply, ent, ent:GetPuppet()}
local traceout = util.TraceHull(tracein)
ply:SetPos(traceout.HitPos)
ent:PillSound("teleport")
end)
end
})
pk_pills.register("hero_hacker", {
printName = "The Hacker",
type = "ply",
model = "models/alyx.mdl",
default_rp_cost = 10000,
anims = {
default = {
idle = "idle_angry",
walk = "walk_all",
run = "run_all",
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
g_attack = "gesture_shoot_smg1",
g_reload = "gesture_reload_smg1"
},
smg = {
idle = "Idle_SMG1_Aim_Alert",
walk = "walkAIMALL1",
run = "run_aiming_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all"
},
ar2 = {
idle = "idle_ar2_aim",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
--g_attack="gesture_shoot_ar2",
g_reload = "gesture_reload_ar2"
},
shotgun = {
idle = "idle_ar2_aim",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_shotgun",
g_reload = "gesture_reload_ar2"
},
pistol = {
idle = "Pistol_idle_aim",
walk = "walk_aiming_p_all",
run = "run_aiming_p_all"
}
},
sounds = {
hack = "buttons/blip1.wav",
nohack = "buttons/button2.wav"
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_holstered", "pill_wep_alyxgun", "weapon_shotgun"},
ammo = {
smg1 = 300
},
health = 1000,
validHoldTypes = {"pistol", "smg", "ar2", "shotgun"},
movePoseMode = "yaw",
flashlight = function(ply, ent)
local tr = ply:GetEyeTrace()
local hackables = {"npc_turret_floor", "npc_rollermine", "npc_manhack"}
if (tr.HitPos:Distance(tr.StartPos) < 100 and table.HasValue(hackables, tr.Entity:GetClass())) and pk_pills.getAiTeam(tr.Entity) ~= "default" then
pk_pills.setAiTeam(tr.Entity, "default")
ent:PillSound("hack")
if tr.Entity:GetClass() ~= "npc_turret_floor" then
tr.Entity:GetPhysicsObject():SetVelocity(ply:GetAimVector() * 100)
end
else
ent:PillSound("nohack")
end
end
})
pk_pills.register("hero_physicist", {
printName = "The Physicist",
type = "ply",
model = "models/Kleiner.mdl",
default_rp_cost = 10000,
anims = {
default = {
idle = "idle_angry",
walk = "walk_all",
run = "run_all",
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
g_attack = "gesture_shoot_smg1",
g_reload = "gesture_reload_smg1"
},
smg = {
idle = "Idle_SMG1_Aim_Alert",
walk = "walkAIMALL1",
run = "run_aiming_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all"
},
ar2 = {
idle = "idle_ar2_aim",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
--g_attack="gesture_shoot_ar2",
g_reload = "gesture_reload_ar2"
},
shotgun = {
idle = "idle_ar2_aim",
walk = "walkAIMALL1_ar2",
run = "run_aiming_ar2_all",
crouch = "crouch_aim_smg1",
crouch_walk = "Crouch_walk_aiming_all",
g_attack = "gesture_shoot_shotgun",
g_reload = "gesture_reload_ar2"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_holstered", "weapon_shotgun", "pill_wep_translocator"},
ammo = {
AR2 = 100,
Buckshot = 100,
smg1 = 100
},
health = 1000,
validHoldTypes = {"smg", "ar2", "shotgun"},
movePoseMode = "yaw"
})

View File

@@ -0,0 +1,100 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("vort", {
printName = "Vortigaunt",
type = "ply",
model = "models/vortigaunt.mdl",
default_rp_cost = 8000,
voxSet = "vort",
camera = {
dist = 200
},
anims = {
default = {
idle = "Idle01",
walk = "Walk_all",
run = "Run_all",
melee1 = "MeleeHigh1",
melee2 = "MeleeHigh2",
melee3 = "MeleeHigh3",
melee4 = "MeleeLow",
attackRanged = "zapattack1"
}
},
sounds = {
melee = pk_pills.helpers.makeList("npc/vort/claw_swing#.wav", 2),
melee_hit = pk_pills.helpers.makeList("npc/zombie/claw_strike#.wav", 3),
loop_ranged_charge = "npc/vort/attack_charge.wav",
ranged_fire = "npc/vort/attack_shoot.wav",
step = pk_pills.helpers.makeList("npc/vort/vort_foot#.wav", 4)
},
aim = {
xPose = "head_yaw",
yPose = "head_pitch"
},
attack = {
mode = "trigger",
func = function(ply, ent)
local superpowers = ent.formTable.superpowers
ent:PillAnim("attackRanged", true)
ent:PillLoopSound("ranged_charge")
local puppet = ent:GetPuppet()
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, puppet, puppet:LookupAttachment("leftclaw"))
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, puppet, puppet:LookupAttachment("rightclaw"))
timer.Simple(1.5, function()
if not IsValid(ent) then return end
ent:PillLoopStop("ranged_charge")
ent:PillSound("ranged_fire")
local tr = ply:GetEyeTrace()
local attachment = puppet:GetAttachment(puppet:LookupAttachment("leftclaw"))
puppet:StopParticles()
if attachment then
util.ParticleTracerEx(superpowers and "weapon_combine_ion_cannon" or "vortigaunt_beam", attachment.Pos, tr.HitPos, true, puppet:EntIndex(), puppet:LookupAttachment("leftclaw"))
end
if superpowers then
ParticleEffect("weapon_combine_ion_cannon_explosion", tr.HitPos, Angle(0, 0, 0))
sound.Play("ambient/explosions/explode_1.wav", tr.HitPos, 75, 100, 1)
util.BlastDamage(ent, ply, tr.HitPos, 200, 400)
else
util.BlastDamage(ent, ply, tr.HitPos, 10, 400)
end
end)
end
},
attack2 = {
mode = "trigger",
func = pk_pills.common.melee,
animCount = 4,
delay = .5,
range = 40,
dmg = 25
},
movePoseMode = "yaw",
moveSpeed = {
walk = 100,
run = 300
},
duckBy = 0,
jumpPower = 0,
health = 120
})
pk_pills.register("vort_slave", {
parent = "vort",
side = "hl_combine",
printName = "Vortigaunt Slave",
model = "models/vortigaunt_slave.mdl"
})

View File

@@ -0,0 +1,235 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("ichthyosaur", {
printName = "Ichthyosaur",
side = "wild",
type = "phys",
model = "models/Ichthyosaur.mdl",
default_rp_cost = 600,
camera = {
dist = 350
},
seqInit = "swim",
sphericalPhysics = 30,
driveType = "swim",
driveOptions = {
speed = 10
},
aim = {
xPose = "sidetoside",
yPose = "upanddown",
nocrosshair = true
},
attack = {
mode = "trigger",
func = function(ply, ent)
if ent:GetSequence() ~= ent:LookupSequence("swim") then return end
ent:PillAnim("attackstart", true)
timer.Simple(.5, function()
if not IsValid(ent) then return end
local tr = util.TraceHull({
start = ent:GetPos(),
endpos = ent:GetPos() + ent:GetAngles():Forward() * 200,
filter = {ent},
mins = Vector(-5, -5, -5),
maxs = Vector(5, 5, 5)
})
if IsValid(tr.Entity) then
local dmg = DamageInfo()
dmg:SetAttacker(ply)
dmg:SetInflictor(ent)
dmg:SetDamageType(DMG_SLASH)
dmg:SetDamage(50)
tr.Entity:TakeDamageInfo(dmg)
ent:PillAnim("attackend", true)
ent:PillSound("bite")
timer.Simple(1.8, function()
if not IsValid(ent) then return end
ent:PillAnim("swim", true)
end)
else
ent:PillAnim("attackmiss", true)
timer.Simple(.5, function()
if not IsValid(ent) then return end
ent:PillAnim("swim", true)
end)
end
end)
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("vocalize")
end
},
health = 400,
sounds = {
loop_move = "npc/ichthyosaur/water_breath.wav",
vocalize = pk_pills.helpers.makeList("npc/ichthyosaur/attack_growl#.wav", 3),
bite = "npc/ichthyosaur/snap.wav"
}
})
pk_pills.register("barnacle", {
printName = "Barnacle",
side = "harmless",
type = "phys",
model = "models/barnacle.mdl",
boxPhysics = {Vector(-10, -10, -20), Vector(10, 10, 0)},
default_rp_cost = 1000,
userSpawn = {
type = "ceiling",
offset = Vector(0, 0, 2)
},
spawnFrozen = true,
camera = {
offset = Vector(0, 0, -50),
dist = 100,
underslung = true
},
seqInit = "idle01",
attack = {
mode = "auto",
delay = 0,
func = function(ply, ent)
if ent.busy then return end
if not IsValid(ent.tongue) then
ent.tongue = ents.Create("pill_barnacle_tongue")
ent.tongue:SetPos(ent:GetPos() + Vector(0, 0, -40))
ent.tongue:Spawn()
ent:DeleteOnRemove(ent.tongue)
constraint.NoCollide(ent, ent.tongue, 0, 0)
ent.tongue_constraint, ent.tongue_vis = constraint.Elastic(ent, ent.tongue, 0, 0, Vector(0, 0, -30), Vector(0, 0, 0), 20000, 4000, 0, "cable/rope", 1, true)
ent.tongue_len = 20
elseif IsValid(ent.tongue_constraint) then
ent.tongue_len = ent.tongue_len + 1
ent.tongue_constraint:Fire("SetSpringLength", ent.tongue_len, 0)
ent.tongue_vis:Fire("SetLength", ent.tongue_len, 0)
end
end
},
attack2 = {
mode = "auto",
delay = 0,
func = function(ply, ent)
if ent.busy then return end
if not IsValid(ent.tongue) or ent.tongue_len <= 20 then
ent:PillAnim("attack_smallthings", true)
ent:PillAnim("attack_smallthings", true)
ent.busy = true
timer.Simple(.8, function()
if not IsValid(ent) then return end
local tr = util.TraceHull({
start = ent:GetPos() + Vector(0, 0, -10),
endpos = ent:GetPos() + Vector(0, 0, -60),
filter = {ent, ply, (IsValid(ent.tongue) and ent.tongue or nil)},
mins = Vector(-10, -10, -10),
maxs = Vector(10, 10, 10)
})
if (tr.HitNonWorld) then
if tr.Entity:IsRagdoll() then
local effectdata = EffectData()
effectdata:SetOrigin(ent:GetPos() + Vector(0, 0, -30))
effectdata:SetNormal(Vector(0, 0, -1))
effectdata:SetMagnitude(1)
effectdata:SetScale(10)
effectdata:SetColor(0)
effectdata:SetFlags(3)
util.Effect("bloodspray", effectdata)
ent:PillSound("chompgib")
tr.Entity:Remove()
for k, v in pairs{"models/Gibs/HGIBS.mdl", "models/Gibs/HGIBS_rib.mdl", "models/Gibs/HGIBS_scapula.mdl", "models/Gibs/HGIBS_spine.mdl"} do
local d = ents.Create("prop_physics")
d:SetModel(v)
d:SetPos(ent:GetPos() + Vector(0, 0, -30))
d:Spawn()
d:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
d:Fire("Kill", nil, 10)
local p = d:GetPhysicsObject()
if IsValid(p) then
p:ApplyForceCenter(VectorRand() * 1000)
end
end
else
tr.Entity:TakeDamage(20, ply, ent)
ent:PillSound("chomp")
end
end
end)
timer.Simple(1.5, function()
if not IsValid(ent) then return end
ent:PillAnim("idle01", true)
ent.busy = false
end)
elseif IsValid(ent.tongue_constraint) then
ent.tongue_len = ent.tongue_len - 1
ent.tongue_constraint:Fire("SetSpringLength", ent.tongue_len, 0)
ent.tongue_vis:Fire("SetLength", ent.tongue_len, 0)
end
end
},
reload = function(ply, ent)
if IsValid(ent.tongue) then
if constraint.RemoveConstraints(ent.tongue, "Weld") then
ent:PillSound("drop")
end
end
end,
boneMorphs = {
["Barnacle.tongue1"] = {
scale = Vector(0, 0, 0),
pos = Vector(0, 0, 50)
},
["Barnacle.tongue2"] = {
scale = Vector(0, 0, 0)
},
["Barnacle.tongue3"] = {
scale = Vector(0, 0, 0)
},
["Barnacle.tongue4"] = {
scale = Vector(0, 0, 0)
},
["Barnacle.tongue5"] = {
scale = Vector(0, 0, 0)
},
["Barnacle.tongue6"] = {
scale = Vector(0, 0, 0)
},
["Barnacle.tongue7"] = {
scale = Vector(0, 0, 0)
},
["Barnacle.tongue8"] = {
scale = Vector(0, 0, 0)
}
},
health = 35,
sounds = {
chomp = "npc/barnacle/barnacle_crunch3.wav",
chompgib = "player/pl_fallpain1.wav",
drop = "npc/barnacle/barnacle_bark1.wav"
}
})

View File

@@ -0,0 +1,294 @@
--[[
| 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/
--]]
AddCSLuaFile()
pk_pills.register("zombie", {
printName = "Zombie",
side = "hl_zombie",
crab = "headcrab",
type = "ply",
model = "models/Zombie/Classic.mdl",
default_rp_cost = 7000,
health = 100,
bodyGroups = {1},
anims = {
default = {
idle = "Idle01",
walk = "walk",
melee1 = "attackA",
melee2 = "attackB",
melee3 = "attackC",
melee4 = "attackD",
melee5 = "attackE",
melee6 = "attackF",
release = "releasecrab"
}
},
sounds = {
melee = pk_pills.helpers.makeList("npc/zombie/zo_attack#.wav", 2),
melee_hit = pk_pills.helpers.makeList("npc/zombie/claw_strike#.wav", 3),
melee_miss = pk_pills.helpers.makeList("npc/zombie/claw_miss#.wav", 2),
bust = "npc/barnacle/barnacle_crunch2.wav",
release = pk_pills.helpers.makeList("npc/zombie/zombie_pain#.wav", 6),
step = pk_pills.helpers.makeList("npc/zombie/foot#.wav", 3)
},
attack = {
mode = "trigger",
func = pk_pills.common.melee,
animCount = 6,
delay = .8,
range = 40,
dmg = 25
},
reload = function(ply, ent)
ent:PillAnim("release", true)
ent:PillSound("release")
timer.Simple(1, function()
if not IsValid(ent) then return end
local r = ents.Create("prop_ragdoll")
r:SetModel(ent.subModel or ent:GetPuppet():GetModel())
r:SetPos(ply:GetPos())
r:SetAngles(ply:GetAngles())
r:Spawn()
r:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
r:Fire("FadeAndRemove", nil, 10)
local puppet = ent:GetPuppet()
local attach = puppet:GetAttachment(puppet:LookupAttachment("head"))
pk_pills.apply(ply, ent.formTable.crab)
if (attach) then
ply:SetPos(attach.Pos)
else
ply:SetPos(ply:GetPos() + Vector(0, 0, 60))
end
end)
end,
flashlight = function(ply, ent)
if ent.formTable.printName == "Zombie" or ent.formTable.printName == "Fast Zombie" then
ent:PillSound("bust")
local e = pk_pills.apply(ply, ent.formTable.printName == "Zombie" and "zombie_torso" or "zombie_torso_fast")
e:PillAnim("fall", true)
ply:SetPos(ply:GetPos() + Vector(0, 0, 30))
ply:SetVelocity(Vector(0, 0, 400) + ply:GetAimVector() * 300)
local r = ents.Create("prop_ragdoll")
r:SetModel(ent.formTable.printName == "Zombie" and "models/zombie/classic_legs.mdl" or "models/gibs/fast_zombie_legs.mdl")
r:SetPos(ply:GetPos())
r:SetAngles(ply:GetAngles())
r:Spawn()
r:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
r:Fire("FadeAndRemove", nil, 10)
end
end,
movePoseMode = "yaw",
moveSpeed = {
walk = 50,
run = 100
},
jumpPower = 0,
duckBy = 0
})
pk_pills.register("zombie_poison", {
parent = "zombie",
printName = "Poison Zombie",
crab = "headcrab_poison",
model = "models/Zombie/Poison.mdl",
default_rp_cost = 8000,
health = 300,
anims = {
default = {
run = "run",
melee = "melee_01",
throw = "Throw"
}
},
bodyGroups = {nil, 2, 3, 4},
sounds = {
throw1 = pk_pills.helpers.makeList("npc/zombie_poison/pz_throw#.wav", 2, 3),
throw2 = pk_pills.helpers.makeList("npc/headcrab_poison/ph_jump#.wav", 1, 3)
},
attack = {
animCount = false
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillAnim("throw", true)
ent:PillSound("throw1")
timer.Simple(1.3, function()
if not IsValid(ent) then return end
ent:PillSound("throw2")
local headcrab = ents.Create("pill_jumper_headcrab")
local puppet = ent:GetPuppet()
local angs = ply:EyeAngles()
angs.p = 0
headcrab:SetPos(ply:EyePos() + angs:Forward() * 100)
headcrab:SetAngles(angs)
headcrab:Spawn()
headcrab:GetPhysicsObject():SetVelocity(angs:Forward() * 300 + Vector(0, 0, 200))
end)
end
},
moveSpeed = {
run = 200
},
movePoseMode = false
})
pk_pills.register("zombie_fast", {
parent = "zombie",
printName = "Fast Zombie",
crab = "headcrab_fast",
model = "models/Zombie/fast.mdl",
default_rp_cost = 9000,
anims = {
default = {
idle = "idle",
walk = "walk_all",
run = "Run",
jump = "leap_start",
glide = "leap_loop",
jump_attack = "leap",
glide_attack = "leapstrike",
attack = "Melee",
climb = "climbloop",
climb_start = "climbmount",
release = "br2_roar"
}
},
sounds = {
jump = "npc/fast_zombie/fz_scream1.wav",
attack = "npc/fast_zombie/fz_frenzy1.wav"
},
attack = {
mode = "tick",
func = function(ply, ent)
if not ply:IsOnGround() or ply:GetVelocity():Length() > 1 then return end
ent:PillAnimTick("attack")
if not ent.lastAttack or ent.lastAttack + .3 < CurTime() then
if ply:TraceHullAttack(ply:EyePos(), ply:EyePos() + ply:EyeAngles():Forward() * 40, Vector(-10, -10, -10), Vector(10, 10, 10), 10, DMG_SLASH, 1, true) then
ent:PillSound("melee_hit")
else
ent:PillSound("melee_miss")
end
ent.lastAttack = CurTime()
end
if not ent.lastAttackSound or ent.lastAttackSound + 2 < CurTime() then
ent:PillSound("attack")
ent.lastAttackSound = CurTime()
end
end
},
attack2 = {
mode = "tick",
func = function(ply, ent)
local start = ply:GetPos() + Vector(0, 0, 10)
local dir = ply:GetAimVector()
dir.z = 0
dir:Normalize()
local tracedata = {}
tracedata.start = start
tracedata.endpos = start + dir * 20
tracedata.filter = ply
tracedata.mins = Vector(-8, -8, -8)
tracedata.maxs = Vector(8, 8, 8)
if util.TraceHull(tracedata).Hit then
if ply:IsOnGround() then
ply:SetVelocity(Vector(0, 0, 150))
ent:PillAnim("climb_start")
end
ply:SetLocalVelocity(Vector(0, 0, 100))
ent:PillAnimTick("climb")
end
end
},
noFallDamage = true,
jump = function(ply, ent)
if ply:GetVelocity():Length() < 350 then
v = ply:EyeAngles():Forward()
v.z = 0
v:Normalize()
ply:SetVelocity(v * 100 + Vector(0, 0, 300))
else
ent:PillAnim("jump_attack")
ent.canAttack = true
end
ent:PillSound("jump")
end,
glideThink = function(ply, ent)
if ent.canAttack then
if ply:TraceHullAttack(ply:EyePos(), ply:EyePos() + ply:EyeAngles():Forward() * 50, Vector(-20, -20, -20), Vector(20, 20, 20), 50, DMG_SLASH, 1, true) then
ent:PillSound("melee_hit")
ent.canAttack = nil
end
ent:PillAnimTick("glide_attack")
end
end,
land = function(ply, ent)
ent.canAttack = nil
end,
moveSpeed = {
run = 400
},
jumpPower = 400
})
pk_pills.register("zombie_torso", {
parent = "zombie",
printName = "Zombie Torso",
model = "models/Zombie/classic_torso.mdl",
default_rp_cost = 6500,
camera = {
offset = Vector(0, 0, 10),
dist = 150
},
hull = Vector(30, 30, 20),
anims = {
default = {
idle = "idle",
walk = "crawl",
melee = "attack",
fall = "fall"
}
},
attack = {
animCount = false,
delay = .4
},
movePoseMode = false
})
pk_pills.register("zombie_torso_fast", {
parent = "zombie_torso",
printName = "Fast Zombie Torso",
model = "models/zombie/fast_torso.mdl",
default_rp_cost = 8500,
crab = "headcrab_fast",
anims = {
default = {
melee = "attack01",
fall = false
}
},
moveSpeed = {
walk = 100,
run = 200
}
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
--[[
| 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/
--]]
AddCSLuaFile()
-- Sooner or later the entire damn addon will be launched from here.

View File

@@ -0,0 +1,44 @@
--[[
| 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/
--]]
require("pk_pills")
AddCSLuaFile()
if SERVER then
resource.AddWorkshop("106427033")
include("ppp_include/drivemodes.lua")
end
game.AddParticles("particles/Vortigaunt_FX.pcf")
PrecacheParticleSystem("vortigaunt_beam")
PrecacheParticleSystem("vortigaunt_beam_b")
include("ppp_include/vox_lists.lua")
pk_pills.packStart("Half-Life 2","base","games/16/hl2.png")
include("ppp_include/pill_combine_soldiers.lua")
include("ppp_include/pill_combine_phys_small.lua")
include("ppp_include/pill_combine_phys_large.lua")
include("ppp_include/pill_combine_misc.lua")
include("ppp_include/pill_combine_new.lua")
include("ppp_include/pill_headcrabs.lua")
include("ppp_include/pill_zombies.lua")
include("ppp_include/pill_antlions.lua")
include("ppp_include/pill_wild.lua")
include("ppp_include/pill_resistance_heros.lua")
include("ppp_include/pill_resistance.lua")
include("ppp_include/pill_vorts.lua")
include("ppp_include/pill_birds.lua")