This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 0e770b2b49
commit 94063e4369
7342 changed files with 1718932 additions and 14 deletions

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,179 @@
--[[
| 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()
--Made by SkyLight http://steamcommunity.com/id/_I_I_I_I_I/, had to be indented manually because copy/pasta from github didn't. Copy pastad of Parakeet's code.
--Formatted and edited by Parakeet
pk_pills.register("professional", {
printName = "Lab Gamer",
type = "ply",
default_rp_cost = 1337666420,
model = "models/player/hostage/hostage_04.mdl",
anims = {
default = {
idle = "idle_pistol",
walk = "menu_walk",
run = "run_pistol",
crouch = "cidle_pistol",
crouch_walk = "cwalk_pistol",
glide = "swimming_pistol",
jump = "jump_pistol",
g_attack = "taunt_laugh", --flinch_head_02
g_reload = "gesture_agree",
dropItem = "Heal"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_pro"},
ammo = {
Buckshot = 100,
["357"] = 100
},
health = 1,
validHoldTypes = {"smg", "ar2", "shotgun", "crossbow", "pistol"},
movePoseMode = "xy"
})
pk_pills.register("pubbie", {
printName = "Pub Scrub",
type = "ply",
default_rp_cost = 8008135,
options = function()
return {
{
model = "models/player/urban.mdl"
},
{
model = "models/player/gasmask.mdl"
},
{
model = "models/player/riot.mdl"
},
{
model = "models/player/swat.mdl"
},
{
model = "models/player/guerilla.mdl"
},
{
model = "models/player/arctic.mdl"
},
{
model = "models/player/phoenix.mdl"
},
{
model = "models/player/leet.mdl"
}
}
end,
anims = {
default = {
idle = "idle_pistol",
walk = "walk_pistol",
run = "run_pistol",
crouch = "cidle_pistol",
crouch_walk = "cwalk_pistol",
glide = "swimming_pistol",
jump = "jump_pistol",
g_attack = "flinch_head_02",
g_reload = "reload_pistol",
dropItem = "Heal"
},
smg = {
idle = "idle_smg1",
walk = "walk_smg1",
run = "run_smg1",
crouch = "cidle_smg1",
crouch_walk = "cwalk_smg1"
},
ar2 = {
idle = "idle_ar2",
walk = "walk_ar2",
run = "run_ar2",
crouch = "cidle_ar2",
crouch_walk = "cwalk_ar2"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"pill_wep_alyxgun"},
ammo = {
smg1 = 300
},
health = 100,
validHoldTypes = {"smg", "ar2", "shotgun", "crossbow", "pistol"},
movePoseMode = "xy"
})
pk_pills.register("casual", {
printName = "Casual",
type = "ply",
default_rp_cost = 1234567,
options = function()
return {
{
model = "models/player/hostage/hostage_01.mdl"
},
{
model = "models/player/hostage/hostage_02.mdl"
},
{
model = "models/player/hostage/hostage_03.mdl"
}
}
end,
anims = {
default = {
idle = "idle_smg1",
walk = "walk_smg1",
run = "run_smg1",
crouch = "cidle_smg1",
crouch_walk = "cwalk_smg1",
glide = "swimming_smg1",
jump = "jump_smg1",
g_attack = "flinch_head_02",
g_reload = "reload_smg1",
dropItem = "Heal"
}
},
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
moveSpeed = {
walk = 60,
run = 200,
ducked = 40
},
loadout = {"weapon_smg1"},
ammo = {
smg1 = 150,
smg1_grenade = 5
},
health = 150,
validHoldTypes = {"smg", "ar2", "shotgun", "crossbow", "pistol"},
movePoseMode = "xy"
})

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 = 100
},
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,375 @@
--[[
| 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()
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,449 @@
--[[
| 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("birdbrainswagtrain", {
printName = "Bird Brain Swag Train",
side = "wild",
type = "phys",
model = "models/props_trainstation/train001.mdl",
default_rp_cost = 100000,
spawnOffset = Vector(0, 0, 200),
camera = {
offset = Vector(80, 0, 0),
dist = 2000
},
driveType = "fly",
driveOptions = {
speed = 100,
rotation = 90
},
attack = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("horn")
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if not ent.lastcar then
ent.lastcar = ent
end
if not IsValid(ent.lastcar) then return end
local t = math.random(2, 4)
if t == 4 then
t = 5
end
local pos = ent.lastcar:LocalToWorld(Vector(0, -650, 0))
if not util.IsInWorld(pos) then return end
local car = ents.Create("prop_physics")
car:SetModel("models/props_trainstation/train00" .. t .. ".mdl")
car:SetPos(pos)
car:SetAngles(ent.lastcar:GetAngles())
car:Spawn()
car:GetPhysicsObject():EnableGravity(false)
ent:DeleteOnRemove(car)
ent:PillFilterCam(car)
constraint.Ballsocket(ent.lastcar, car, 0, 0, Vector(0, 300, 0), 0, 0, 1)
ent.lastcar = car
ent:PillSound("newCar")
end
},
health = 99999,
sounds = {
horn = "ambient/alarms/razortrain_horn1.wav",
newCar = "ambient/machines/wall_crash1.wav"
}
})
pk_pills.register("landshark", {
parent = "ichthyosaur",
printName = "Landshark",
default_rp_cost = 50000,
driveType = "hover",
driveOptions = {
speed = 50,
height = 75
}
})
pk_pills.register("turbobird", {
parent = "bird_seagull",
printName = "Turbobird",
default_rp_cost = 50000,
side = "wild",
camera = {
offset = Vector(0, 0, 40),
dist = 200
},
hull = Vector(50, 50, 50),
modelScale = 5,
health = 1337,
moveSpeed = {
walk = 100,
run = 300
},
aim = {},
anims = {
default = {
fly_rate = .5,
kaboom = "reference"
}
},
sounds = {
vocalize = "npc/metropolice/vo/dontmove.wav",
loop_windup = "vehicles/Crane/crane_extend_loop1.wav",
fire = pk_pills.helpers.makeList("npc/metropolice/pain#.wav", 4)
},
attack = {
mode = "auto",
func = function(ply, ent)
ent:PillSound("fire")
local rocket = ents.Create("pill_proj_rocket")
rocket:SetModel("models/crow.mdl")
rocket:SetPos(ply:EyePos() + ply:EyeAngles():Forward() * 100)
rocket:SetAngles(ply:EyeAngles())
rocket.sound = "ambient/levels/canals/windmill_wind_loop1.wav"
rocket.trail = "trails/lol.vmt"
rocket.tcolor = HSVToColor(math.Rand(0, 360), 1, 1)
rocket:Spawn()
rocket:SetOwner(ply)
end,
delay = .3
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ent.splodin then return end
ent:PillAnim("kaboom", true)
ent:PillSound("vocalize")
ent:PillLoopSound("windup")
ent.splodin = true
timer.Simple(3, function()
if not IsValid(ent) then return end
local explode = ents.Create("env_explosion")
explode:SetPos(ply:GetPos())
explode:Spawn()
explode:SetOwner(ply)
explode:SetKeyValue("iMagnitude", "300")
explode:Fire("Explode", 0, 0)
ply:Kill()
end)
end
}
})
pk_pills.register("melon", {
printName = "Melon",
type = "phys",
side = "harmless",
model = "models/props_junk/watermelon01.mdl",
default_rp_cost = 800,
health = 69,
driveType = "roll",
driveOptions = {
power = 300,
jump = 5000,
burrow = 6
},
sounds = {
jump = "npc/headcrab_poison/ph_jump1.wav",
burrow = "npc/antlion/digdown1.wav",
loop_move = "npc/fast_zombie/gurgle_loop1.wav"
},
moveSoundControl = function(ply, ent)
local MineSpeed = ent:GetVelocity():Length()
if MineSpeed > 50 then return math.Clamp(MineSpeed / 2, 100, 150) end
end
})
pk_pills.register("haxman", {
printName = "Dr. Hax",
type = "ply",
side = "wild",
model = "models/breen.mdl",
default_rp_cost = 20000,
aim = {},
anims = {
default = {
idle = "idle_angry_melee",
walk = "walk_all",
run = "sprint_all", --pace_all
crouch = "Crouch_idleD",
crouch_walk = "Crouch_walk_aLL",
glide = "jump_holding_glide",
jump = "jump_holding_jump",
throw = "swing"
}
},
boneMorphs = {
["ValveBiped.Bip01_Head1"] = {
scale = Vector(3, 3, 3)
}
},
sounds = {
throw = "vo/npc/male01/hacks01.wav"
},
moveSpeed = {
walk = 100,
run = 1000,
ducked = 40
},
jumpPower = 1000,
movePoseMode = "yaw",
health = 10000,
noFallDamage = true,
attack = {
mode = "trigger",
func = function(ply, ent)
if not ply:OnGround() then return end
local computer = ents.Create("pill_proj_prop")
computer:SetModel("models/props_lab/monitor02.mdl")
computer:SetPos(ply:EyePos() + ply:EyeAngles():Forward() * 100)
computer:SetAngles(ply:EyeAngles())
computer:Spawn()
computer:SetPhysicsAttacker(ply)
ent:PillAnim("throw", true)
ent:PillSound("throw")
end
}
})
pk_pills.register("crate", {
printName = "Crate",
side = "harmless",
type = "phys",
model = "models/props_junk/wood_crate001a.mdl",
default_rp_cost = 200,
spawnOffset = Vector(0, 0, 30),
health = 30
})
pk_pills.register("lamp", {
printName = "Lamp",
side = "harmless",
type = "phys",
model = "models/props_interiors/Furniture_Lamp01a.mdl",
default_rp_cost = 200,
spawnOffset = Vector(0, 0, 38),
health = 30
})
pk_pills.register("cactus", {
printName = "Cactus",
side = "harmless",
type = "phys",
model = "models/props_lab/cactus.mdl",
default_rp_cost = 200,
spawnOffset = Vector(0, 0, 10),
health = 30
})
pk_pills.register("cone", {
printName = "Traffic Cone",
side = "harmless",
type = "phys",
model = "models/props_junk/TrafficCone001a.mdl",
default_rp_cost = 200,
spawnOffset = Vector(0, 0, 25),
health = 30
})
pk_pills.register("phantom", {
printName = "Phantom",
side = "harmless",
type = "phys",
model = "models/Gibs/HGIBS.mdl",
default_rp_cost = 30000,
spawnOffset = Vector(0, 0, 50),
camera = {
distFromSize = true
},
sounds = {
swap = "weapons/bugbait/bugbait_squeeze1.wav",
nope = "vo/Citadel/br_no.wav",
spook = "ambient/creatures/town_child_scream1.wav"
},
aim = {},
attack = {
mode = "trigger",
func = function(ply, ent)
local tr = util.QuickTrace(ent:GetPos(), ply:EyeAngles():Forward() * 1000, ent)
local prop = tr.Entity
if IsValid(prop) and prop:GetClass() == "prop_physics" and hook.Call("PhysgunPickup", GAMEMODE, ply, prop) then
local mymdl = ent:GetModel()
local mypos = ent:GetPos()
local myangs = ent:GetAngles()
ent:SetModel(prop:GetModel())
ent:PhysicsInit(SOLID_VPHYSICS)
ent:SetMoveType(MOVETYPE_VPHYSICS)
ent:SetSolid(SOLID_VPHYSICS)
ent:SetPos(prop:GetPos())
ent:SetAngles(prop:GetAngles())
ent:PhysWake()
prop:SetModel(mymdl)
prop:PhysicsInit(SOLID_VPHYSICS)
prop:SetMoveType(MOVETYPE_VPHYSICS)
prop:SetSolid(SOLID_VPHYSICS)
prop:SetPos(mypos)
prop:SetAngles(myangs)
prop:PhysWake()
ent:PillSound("swap")
else
ent:PillSound("nope")
end
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("spook")
end
},
driveType = "fly",
driveOptions = {
speed = 10
},
health = 666
})
pk_pills.register("steelball", {
printName = "Ball of Steel",
side = "harmless",
type = "phys",
model = "models/hunter/misc/sphere375x375.mdl",
default_rp_cost = 15000,
camera = {
offset = Vector(0, 0, 0),
dist = 1000
},
spawnOffset = Vector(0, 0, 60),
driveType = "roll",
driveOptions = {
power = 300000,
jump = 200000
},
visMat = "phoenix_storms/stripes",
physMat = "metal",
health = 30000
})
pk_pills.register("doggie", {
printName = "Doggie",
side = "harmless",
type = "ply",
model = "models/balloons/balloon_dog.mdl",
noragdoll = true,
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 5),
dist = 80
},
hull = Vector(10, 10, 15),
anims = {},
moveSpeed = {
walk = 120,
run = 240
},
visColorRandom = true,
health = 75
})
pk_pills.register("skeeter", {
printName = "Skeeter",
side = "harmless",
type = "ply",
model = "models/odessa.mdl",
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 5),
dist = 40
},
hull = Vector(5, 5, 10),
duckBy = 5,
modelScale = .2,
anims = {
default = {
idle = "cower_idle",
walk = "walk_panicked_all",
run = "run_all_panicked",
crouch = "arrestidle",
--crouch_walk="crouchrunall1", pos rot scale
glide = "spreadwallidle",
jump = "jump_holding_jump"
}
},
boneMorphs = {
["ValveBiped.Bip01_Head1"] = {
pos = Vector(5, 0, 0)
},
["ValveBiped.Bip01_L_Thigh"] = {
pos = Vector(10, 0, 0)
},
["ValveBiped.Bip01_R_Thigh"] = {
pos = Vector(-10, 0, 0)
}
},
moveSpeed = {
walk = 30,
run = 90
},
movePoseMode = "yaw",
jumpPower = 400,
health = 2,
noFallDamage = true
})
pk_pills.register("doge", {
printName = "Doge",
side = "harmless",
type = "phys",
sphericalPhysics = 20,
default_rp_cost = 30000,
sprite = {
mat = "pillsprites/shibe.png",
--color=Color(255,255,0),
size = 60,
offset = Vector(0, 0, 10)
},
--model="models/Gibs/HGIBS.mdl",
spawnOffset = Vector(0, 0, 50),
camera = {},
--distFromSize=true
sounds = {
swap = "weapons/bugbait/bugbait_squeeze1.wav",
nope = "vo/Citadel/br_no.wav",
spook = "ambient/creatures/town_child_scream1.wav"
},
attack = {
mode = "trigger",
func = function(ply, ent)
local effectdata = EffectData()
effectdata:SetOrigin(ent:GetPos())
util.Effect("wow_doge", effectdata, true, true)
ent:PillSound("wow")
end
},
driveType = "fly",
driveOptions = {
speed = 10
},
sounds = {
wow = "birdbrainswagtrain/wow.wav"
},
health = 420
})

View File

@@ -0,0 +1,516 @@
--[[
| 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("giraffe", {
printName = "Giraffe",
side = "harmless",
type = "ply",
model = "models/mossman.mdl",
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 220),
dist = 400
},
hull = Vector(50, 50, 230),
duckBy = 150,
modelScale = 2,
anims = {
default = {
idle = "man_gun",
walk = "walk_holding_package_all",
run = "run_aiming_p_all",
crouch = "coverlow_l",
crouch_walk = "crouchrunall1",
glide = "sit_chair",
jump = "cower"
}
},
boneMorphs = {
["ValveBiped.Bip01_Head1"] = {
pos = Vector(50, 25, 0),
scale = Vector(2, 2, 2)
}
},
moveSpeed = {
walk = 300,
run = 900
},
movePoseMode = "yaw",
jumpPower = 400,
health = 600
})
pk_pills.register("hula", {
printName = "Hula",
side = "harmless",
type = "ply",
model = "models/props_lab/huladoll.mdl",
noragdoll = true,
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 5),
dist = 80
},
hull = Vector(5, 5, 6),
anims = {
default = {
idle = "idle",
shake = "shake"
}
},
attack = {
mode = "auto",
delay = .2,
func = function(ply, ent)
ent:PillAnim("shake")
end
},
moveSpeed = {
walk = 40,
run = 100
},
health = 5
})
pk_pills.register("wheelbarrow", {
printName = "Wheelbarrow",
side = "harmless",
type = "phys",
model = "models/props_junk/Wheebarrow01a.mdl",
default_rp_cost = 3000,
camera = {
dist = 120
},
driveType = "hover",
driveOptions = {
speed = 5,
height = 40
}
})
pk_pills.register("goover", {
printName = "Goover",
side = "harmless",
type = "phys",
default_rp_cost = 800,
options = function()
return {
{
model = "models/maxofs2d/balloon_gman.mdl"
},
{
model = "models/maxofs2d/balloon_mossman.mdl"
}
}
end,
driveType = "fly",
driveOptions = {
speed = 20
},
health = 50
})
pk_pills.register("baby", {
printName = "Baby",
side = "harmless",
type = "phys",
model = "models/props_c17/doll01.mdl",
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 5),
dist = 80
},
driveType = "hover",
driveOptions = {
speed = 3,
height = 20
},
health = 15
})
pk_pills.register("facepunch", {
printName = "Facepunch",
side = "wild",
type = "phys",
camera = {
dist = 300
},
default_rp_cost = 18000,
model = "models/props_phx/facepunch_logo.mdl",
driveType = "fly",
driveOptions = {
speed = 60,
rotation2 = 90
},
sounds = {
fire = "physics/metal/metal_box_impact_hard2.wav"
},
attack = {
mode = "auto",
delay = .33,
func = function(ply, ent)
ent:PillSound("fire")
local bomb = ents.Create("pill_proj_bomb")
bomb:SetModel("models/props_phx/facepunch_barrel.mdl")
bomb:SetPos(ent:GetPos() + ply:EyeAngles():Forward() * 100)
bomb:SetAngles(ply:EyeAngles())
bomb:SetOwner(ply)
bomb:Spawn()
end
},
health = 11111
})
pk_pills.register("rpg", {
printName = "RPG",
side = "harmless",
type = "phys",
default_rp_cost = 5000,
model = "models/weapons/w_missile_closed.mdl",
driveType = "fly",
driveOptions = {
speed = 30,
rocketMode = true
},
aim = {},
damageFromWater = -1,
sounds = {
loop_move = "weapons/rpg/rocket1.wav"
},
trail = {
texture = "trails/smoke.vmt",
width = 10
},
collide = function(ply, ent, collide)
ply:Kill()
end,
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
})
pk_pills.register("rocket", {
parent = "rpg",
printName = "Rocket",
default_rp_cost = 10000,
model = false,
options = function()
return {
{
model = "models/props_phx/amraam.mdl"
},
{
model = "models/props_phx/ww2bomb.mdl"
},
{
model = "models/props_phx/torpedo.mdl"
},
{
model = "models/props_phx/mk-82.mdl"
}
}
end,
aim = {},
camera = {
dist = 300
},
driveOptions = {
speed = 60
},
die = function(ply, ent)
local pos = ent:GetPos()
local splode = function()
if not IsValid(ply) then return end
local explode = ents.Create("env_explosion")
explode:SetPos(pos + VectorRand() * 100)
explode:Spawn()
explode:SetOwner(ply)
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
end
splode()
for i = 1, 4 do
timer.Simple(i / 5, splode)
end
end
})
pk_pills.register("rocket2", {
parent = "rocket",
printName = "Super Rocket",
default_rp_cost = 20000,
model = "models/props_phx/rocket1.mdl",
options = false,
camera = {
dist = 600
},
aim = {},
driveOptions = {
speed = 90,
rotation2 = 90
},
die = function(ply, ent)
local pos = ent:GetPos()
local splode = function()
if not IsValid(ply) then return end
local explode = ents.Create("env_explosion")
explode:SetPos(pos + VectorRand() * 500)
explode:Spawn()
explode:SetOwner(ply)
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
end
splode()
for i = 1, 19 do
timer.Simple(i / 10, splode)
end
end
})
pk_pills.register("sawblade", {
printName = "Saw Blade",
side = "wild",
type = "phys",
default_rp_cost = 9000,
model = "models/props_junk/sawblade001a.mdl",
driveType = "fly",
driveOptions = {
speed = 10,
spin = 200
},
sounds = {
loop_move = "vehicles/v8/third.wav",
cut = "physics/metal/sawblade_stick1.wav"
},
collide = function(ply, ent, collide)
if collide.HitNormal.z < 0.5 and collide.HitNormal.z > -0.5 then
local force = -collide.HitNormal
--GTFO
ent:GetPhysicsObject():ApplyForceCenter(force * 20000)
--Give Damage
local dmginfo = DamageInfo()
dmginfo:SetDamage(100)
dmginfo:SetAttacker(ply)
dmginfo:SetDamageForce(force * -10000)
collide.HitEntity:TakeDamageInfo(dmginfo)
ent:PillSound("cut")
end
end,
contactForceHorizontal = true,
health = 500
})
pk_pills.register("carousel", {
printName = "Carousel",
side = "wild",
type = "phys",
camera = {
dist = 300
},
default_rp_cost = 12000,
model = "models/props_c17/playground_carousel01.mdl",
driveType = "fly",
driveOptions = {
speed = 20,
spin = 100
},
health = 1000
})
pk_pills.register("chopper", {
printName = "Chopper",
side = "wild",
type = "phys",
camera = {
dist = 300
},
default_rp_cost = 12000,
model = "models/props_c17/TrapPropeller_Blade.mdl",
driveType = "fly",
driveOptions = {
speed = 20,
spin = -300
},
health = 1000
})
pk_pills.register("propeller", {
printName = "Propeller",
side = "wild",
type = "phys",
camera = {
dist = 200
},
default_rp_cost = 8000,
options = function()
return {
{
model = "models/props_phx/misc/propeller2x_small.mdl"
},
{
model = "models/props_phx/misc/propeller3x_small.mdl"
}
}
end,
driveType = "fly",
driveOptions = {
speed = 20,
spin = -300
},
health = 600
})
pk_pills.register("turbine", {
printName = "Turbine",
side = "wild",
type = "phys",
camera = {
dist = 200
},
default_rp_cost = 8000,
options = function()
return {
{
model = "models/props_phx/misc/paddle_small.mdl"
},
{
model = "models/props_phx/misc/paddle_small2.mdl"
}
}
end,
driveType = "fly",
driveOptions = {
speed = 20,
spin = -300
},
health = 600
})
pk_pills.register("dorf", {
printName = "Dorf",
side = "harmless",
type = "ply",
model = "models/Eli.mdl",
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 40),
dist = 60
},
hull = Vector(20, 20, 50),
modelScale = .5,
anims = {
default = {
idle = "lineidle01",
walk = "walk_all",
run = "run_all_panicked",
jump = "jump_holding_jump"
}
},
boneMorphs = {
["ValveBiped.Bip01_Pelvis"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine1"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine2"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine4"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Head1"] = {
scale = Vector(4, 4, 4)
},
["ValveBiped.Bip01_L_Clavicle"] = {
pos = Vector(0, 0, 10)
},
["ValveBiped.Bip01_R_Clavicle"] = {
pos = Vector(0, 0, -10)
}
},
moveSpeed = {
walk = 60,
run = 150
},
movePoseMode = "yaw",
jumpPower = 200,
health = 40
})
pk_pills.register("babyguardian", {
printName = "Baby Guardian",
parent = "antlion_guard",
side = "harmless",
type = "ply",
default_rp_cost = 15000,
camera = {
offset = Vector(0, 0, 20),
dist = 60
},
hull = Vector(30, 30, 30),
modelScale = .25,
moveSpeed = {
walk = 90,
run = 90
},
attack = {
range = 50,
dmg = 25
},
charge = {
vel = 300,
dmg = 50
},
movePoseMode = "yaw",
jumpPower = 500,
health = 200
})
pk_pills.register("headcrab_jumbo", {
printName = "Jumbo Crab",
parent = "headcrab_poison",
side = "harmless",
type = "ply",
default_rp_cost = 15000,
camera = {
offset = Vector(0, 0, 40),
dist = 300
},
hull = Vector(200, 200, 75),
modelScale = 5,
moveSpeed = {
walk = 100,
run = 200
},
sounds = {
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"}
},
jump = false,
glideThink = false,
movePoseMode = "yaw",
health = 1000
})

View File

@@ -0,0 +1,297 @@
--[[
| 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("parakeet", {
parent = "bird_pigeon",
printName = "Parakeet",
visColorRandom = true,
reload = function(ply, ent)
local egg = ents.Create("prop_physics")
egg:SetModel("models/props_phx/misc/egg.mdl")
local ang = ply:EyeAngles()
ang.p = 0
egg:SetPos(ply:EyePos() + ang:Forward() * 30)
egg:Spawn()
local phys = egg:GetPhysicsObject()
if IsValid(phys) then
phys:SetVelocity(ply:GetVelocity() + ply:EyeAngles():Forward() * 800 + (ply:IsOnGround() and Vector(0, 0, 600) or Vector()))
end
egg:Fire("FadeAndRemove", nil, 10)
end,
sounds = {
vocalize = pk_pills.helpers.makeList("ambient/levels/canals/swamp_bird#.wav", 6)
}
})
local dragon_attacks = {
function(ply, pos)
local thing = ents.Create("pill_proj_prop")
thing:SetModel(table.Random{"models/props_lab/monitor02.mdl", "models/props_junk/CinderBlock01a.mdl", "models/props_junk/sawblade001a.mdl", "models/props_junk/harpoon002a.mdl", "models/props_junk/watermelon01.mdl", "models/props_c17/FurnitureWashingmachine001a.mdl", "models/props_c17/FurnitureFridge001a.mdl", "models/props_c17/FurnitureBathtub001a.mdl", "models/props_wasteland/prison_toilet01.mdl", "models/props_vehicles/carparts_tire01a.mdl"})
thing:SetPos(pos)
thing:SetAngles(ply:EyeAngles())
thing:Spawn()
thing:SetPhysicsAttacker(ply)
end,
function(ply, pos)
local thing = ents.Create("prop_physics")
thing:SetModel(table.Random{"models/props_c17/oildrum001_explosive.mdl", "models/props_junk/propane_tank001a.mdl", "models/props_junk/gascan001a.mdl"})
thing:SetPos(pos)
thing:SetAngles(ply:EyeAngles())
thing:Spawn()
thing:SetPhysicsAttacker(ply)
thing:Ignite(100)
local phys = thing:GetPhysicsObject()
if IsValid(phys) then
phys:Wake()
phys:EnableGravity(false)
phys:EnableDrag(false)
phys:SetDamping(0, 0)
phys:SetVelocity(ply:EyeAngles():Forward() * 3000)
end
end,
function(ply, pos)
local thing = ents.Create("pill_proj_energy_grenade")
thing:SetPos(pos)
thing:SetAngles(ply:EyeAngles() + Angle(-50 + math.Rand(-10, 10), math.Rand(-10, 10), math.Rand(-10, 10)))
thing:Spawn()
thing:SetOwner(ply)
end,
function(ply, pos)
local rocket = ents.Create("rpg_missile")
rocket:SetPos(pos)
rocket:SetAngles(ply:EyeAngles())
rocket:SetSaveValue("m_flDamage", 200)
rocket:SetOwner(ply)
rocket:SetVelocity(ply:EyeAngles():Forward() * 1500)
rocket:Spawn()
end,
function(ply, pos)
local bomb = ents.Create("grenade_helicopter")
bomb:SetPos(pos)
bomb:SetAngles(Angle(math.Rand(-180, 180), math.Rand(-180, 180), math.Rand(-180, 180)))
bomb:Spawn()
bomb:SetPhysicsAttacker(ply)
bomb:GetPhysicsObject():AddVelocity(ply:EyeAngles():Forward() * 3000)
end,
function(ply, pos)
local nade = ents.Create("npc_grenade_frag")
nade:SetPos(pos)
nade:SetAngles(ply:EyeAngles())
nade:Spawn()
nade:SetOwner(ply)
nade:Fire("SetTimer", 3, 0)
nade:GetPhysicsObject():SetVelocity((ply:EyeAngles():Forward() + Vector(0, 0, .2)) * 3000)
end,
function(ply, pos)
local ball = ents.Create("prop_combine_ball")
ball:SetPos(pos)
ball:SetAngles(ply:EyeAngles())
ball:Spawn()
ball:SetOwner(ply)
ball:SetSaveValue('m_flRadius', 12)
ball:SetSaveValue("m_nState", 3)
ball:SetSaveValue("m_nMaxBounces", 10)
ball:GetPhysicsObject():SetVelocity(ply:EyeAngles():Forward() * 3000)
end
}
pk_pills.register("dagent", {
printName = "Dragon Agent",
side = "wild",
type = "ply",
default_rp_cost = 20000,
visColorRandom = true,
model = "models/player/combine_super_soldier.mdl",
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
anims = {
default = {
idle = "idle_magic",
walk = "walk_magic",
run = "run_magic",
crouch = "cidle_magic",
crouch_walk = "cwalk_magic",
glide = "jump_magic",
jump = "jump_magic",
swim = "swimming_magic"
}
},
attack = {
mode = "auto",
delay = .2,
func = function(ply, ent)
ent:PillSound("attack", true)
table.Random(dragon_attacks)(ply, ply:GetShootPos() + ply:EyeAngles():Forward() * 100)
end
},
moveSpeed = {
walk = 60,
run = 600,
ducked = 60
},
sounds = {
attack = "weapons/gauss/fire1.wav"
},
jumpPower = 800,
movePoseMode = "xy",
health = 10000
})
pk_pills.register("dingus", {
printName = "Dingus",
side = "harmless",
type = "ply",
default_rp_cost = 1000,
visColorRandom = true,
model = "models/player/soldier_stripped.mdl",
visMat = "models/debug/debugwhite",
aim = {
xPose = "aim_yaw",
yPose = "aim_pitch"
},
camera = {
offset = Vector(0, 0, 50)
},
hull = Vector(15, 15, 50),
duckBy = 10,
anims = {
default = {
idle = "idle_magic",
walk = "walk_magic",
run = "run_magic",
crouch = "cidle_magic",
crouch_walk = "cwalk_magic",
glide = "jump_magic",
jump = "jump_magic",
swim = "swimming_magic"
}
},
attack = {
mode = "auto",
delay = .2,
func = function(ply, ent)
ent:PillSound("attack", true)
local ball = ents.Create("sent_ball")
ball:SetPos(ply:GetShootPos() + ply:EyeAngles():Forward() * 150)
ball:SetBallSize(100)
ball:Spawn()
local color = ent:GetPuppet():GetColor()
ball:SetBallColor(Vector(color.r / 255, color.g / 255, color.b / 255))
ball:GetPhysicsObject():SetVelocity(ply:EyeAngles():Forward() * 1000)
timer.Simple(5, function()
if IsValid(ball) then
ball:Remove()
end
end)
end
},
attack2 = {
mode = "auto",
delay = 1,
func = function(ply, ent)
ent:PillSound("donger")
end
},
moveSpeed = {
walk = 40,
run = 300,
ducked = 20
},
modelScale = .8,
sounds = {
attack = "weapons/physcannon/energy_bounce1.wav",
donger = pk_pills.helpers.makeList("birdbrainswagtrain/dingus#.wav", 9),
donger_pitch = 80
},
jumpPower = 400,
movePoseMode = "xy",
health = 80
})
pk_pills.register("error", {
printName = "ERROR",
side = "harmless",
type = "ply",
model = "models/error.mdl",
noragdoll = true,
default_rp_cost = 800,
camera = {
offset = Vector(0, 0, 25),
dist = 100
},
hull = Vector(80, 80, 80),
anims = {},
moveSpeed = {
walk = 200,
run = 400
},
jumpPower = 500,
health = 128
})
--[[
pk_pills.register("chicken",{
printName="Chicken",
side="harmless",
type="ply",
model="models/chicken/chicken.mdl",
options=function() return {
{skin=0},
{skin=1}
} end,
noragdoll=true,
default_rp_cost=800,
camera={
offset=Vector(0,0,5),
dist=80
},
hull=Vector(15,15,15),
anims={
default={
idle="idle01",
walk="walk01",
run="run01",
glide="flap_falling"
}
},
moveSpeed={
walk=20,
run=120
},
noFallDamage=true,
health=30
})
pk_pills.register("turbochicken",{
printName="Fubar's Little Helper",
parent="chicken",
attachments={"models/antlers/antlers.mdl"},
default_rp_cost=8000,
camera={
offset=Vector(0,0,40),
dist=300
},
hull=Vector(90,90,90),
modelScale=6,
moveSpeed={
walk=120,
run=800
},
jumpPower=800,
health=300
})
]]

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 = 60
},
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,539 @@
--[[
| 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 function all_humans()
--{model="models/Combine_Super_Soldier.mdl"},
--{model="models/Combine_Soldier_PrisonGuard.mdl"},
--{model="models/Combine_Soldier.mdl"},
--{model="models/Police.mdl"}
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"
},
{
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"
},
{
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"
},
{
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"
},
{
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"
},
{
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"
},
{
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"
},
{
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"
},
{
model = "models/barney.mdl"
},
{
model = "models/monk.mdl"
},
{
model = "models/gman_high.mdl"
},
{
model = "models/alyx.mdl"
},
{
model = "models/Kleiner.mdl"
},
{
model = "models/Eli.mdl"
},
{
model = "models/mossman.mdl"
},
{
model = "models/odessa.mdl"
},
{
model = "models/breen.mdl"
}
}
end
pk_pills.register("jake_e", {
printName = "WE LOVE JAKE",
model = false,
options = all_humans,
parent = "zombie_fast",
anims = {
default = {
idle = "fear_reaction_idle",
run = "run_protected_all",
jump = "cower",
glide = "cower_idle",
jump_attack = "cower",
glide_attack = "cower_idle",
attack = "walkaimall1",
climb = "lineidle02",
climb_start = "jump_holding_jump",
release = "swing"
}
},
boneMorphs = {
["ValveBiped.Bip01_Spine"] = {
rot = Angle(90, 0, 0)
},
["ValveBiped.Bip01_Head1"] = {
scale = Vector(2, 2, 2),
rot = Angle(90, 0, 0)
}
},
crab = "melon"
})
pk_pills.register("jake_k", {
printName = "JAKE IS THE BEST",
model = false,
options = all_humans,
parent = "antlion",
modelScale = 1,
anims = {
default = {
idle = "sit_ground",
walk = "walk_all",
run = "run_protected_all",
fly = "run_protected_all",
jump = "run_protected_all",
glide = "run_protected_all",
melee1 = "meleeattack01",
melee2 = "meleeattack01",
melee3 = "meleeattack01",
charge_start = "jump_holding_land",
charge_loop = "crouchrunall1",
charge_hit = "kick_door",
burrow_in = "idle_to_sit_ground",
burrow_out = "sit_ground_to_idle",
burrow_loop = "injured1"
}
},
boneMorphs = {
["ValveBiped.Bip01_Pelvis"] = {
scale = Vector(2, 2, 2),
rot = Angle(0, 0, 20),
pos = Vector(0, 0, 0)
},
["ValveBiped.Bip01_Spine"] = {
scale = Vector(2, 2, 1)
},
["ValveBiped.Bip01_Spine1"] = {
scale = Vector(2, 2, 1)
},
["ValveBiped.Bip01_Spine2"] = {
scale = Vector(2, 2, 1)
},
["ValveBiped.Bip01_Spine4"] = {
scale = Vector(2, 2, 1)
},
["ValveBiped.Bip01_Head1"] = {
scale = Vector(4, 4, 1),
rot = Angle(0, 20, 0)
},
["ValveBiped.Bip01_L_Clavicle"] = {
pos = Vector(0, 0, 10)
},
["ValveBiped.Bip01_R_Clavicle"] = {
pos = Vector(0, 0, -10)
}
},
--["ValveBiped.Bip01_R_Forearm"]={pos=Vector(-100,0,-100),scale=Vector(1,100,1)},
--["ValveBiped.Bip01_L_Forearm"]={pos=Vector(-100,0,100),scale=Vector(1,100,1)},
--["ValveBiped.Bip01_R_Foot"]={pos=Vector(20,0,0)},
--["ValveBiped.Bip01_L_Foot"]={pos=Vector(20,0,0)},
--[[moveSpeed={
walk=100,
run=400
},]]
movePoseMode = "yaw"
})
--jumpPower=400,
--health=40,
--muteSteps=true
pk_pills.register("jake_a", {
printName = "JAKE IS A COOL GUY",
side = "harmless",
type = "ply",
model = false,
options = all_humans,
camera = {
--offset=Vector(0,0,40),
dist = 300
},
hull = Vector(200, 200, 100),
modelScale = 2,
anims = {
default = {
idle = "lineidle01",
walk = "walk_all",
run = "run_protected_all",
jump = "jump_holding_jump"
}
},
boneMorphs = {
["ValveBiped.Bip01_Pelvis"] = {
scale = Vector(2, 2, 2),
rot = Angle(0, 0, 90),
pos = Vector(0, 0, 0)
},
["ValveBiped.Bip01_Spine"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine1"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine2"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine4"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Head1"] = {
scale = Vector(4, 4, 4),
rot = Angle(0, 90, 0)
},
["ValveBiped.Bip01_L_Clavicle"] = {
pos = Vector(0, 0, 10)
},
["ValveBiped.Bip01_R_Clavicle"] = {
pos = Vector(0, 0, -10)
},
["ValveBiped.Bip01_R_Forearm"] = {
pos = Vector(50, 0, 0)
},
["ValveBiped.Bip01_L_Forearm"] = {
pos = Vector(50, 0, 0)
},
["ValveBiped.Bip01_R_Foot"] = {
pos = Vector(20, 0, 0)
},
["ValveBiped.Bip01_L_Foot"] = {
pos = Vector(20, 0, 0)
}
},
moveSpeed = {
walk = 100,
run = 400
},
movePoseMode = "yaw",
jumpPower = 400,
health = 40,
muteSteps = true
})
pk_pills.register("jake_j", {
printName = "GIVE US JAKE",
model = false,
options = all_humans,
parent = "bird_pigeon",
modelScale = .2,
anims = {
default = {
idle = "sit_ground",
walk = "walk_all",
run = "run_protected_all",
fly = "run_protected_all",
jump = "run_protected_all",
glide = "run_protected_all",
eat = "preskewer"
}
},
boneMorphs = {
["ValveBiped.Bip01_Pelvis"] = {
scale = Vector(2, 2, 2),
rot = Angle(0, 0, 20),
pos = Vector(0, 0, 0)
},
["ValveBiped.Bip01_Spine"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine1"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine2"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Spine4"] = {
scale = Vector(2, 2, 2)
},
["ValveBiped.Bip01_Head1"] = {
scale = Vector(4, 4, 4),
rot = Angle(0, 20, 0)
},
["ValveBiped.Bip01_L_Clavicle"] = {
pos = Vector(0, 0, 10)
},
["ValveBiped.Bip01_R_Clavicle"] = {
pos = Vector(0, 0, -10)
},
["ValveBiped.Bip01_R_Forearm"] = {
pos = Vector(-100, 0, -100),
scale = Vector(1, 100, 1)
},
["ValveBiped.Bip01_L_Forearm"] = {
pos = Vector(-100, 0, 100),
scale = Vector(1, 100, 1)
}
},
--["ValveBiped.Bip01_R_Foot"]={pos=Vector(20,0,0)},
--["ValveBiped.Bip01_L_Foot"]={pos=Vector(20,0,0)},
--[[moveSpeed={
walk=100,
run=400
},]]
movePoseMode = "yaw"
})
--jumpPower=400,
--health=40,
--muteSteps=true
pk_pills.register("jake_2", {
printName = "~ALL HAIL JAKE~",
parent = "hero_overseer",
model = false,
options = all_humans,
anims = {
default = {
idle = "fear_reaction_idle"
}
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if not ply:OnGround() then return end
ent:PillSound("clang")
local puppet = ent:GetPuppet()
for i = 1, puppet:GetBoneCount() do
puppet:ManipulateBonePosition(i, puppet:GetManipulateBonePosition(i) + VectorRand() * 2)
end
end
},
sounds = {
clang = "weapons/crowbar/crowbar_impact1.wav"
}
})
pk_pills.register("jake_car", {
printName = "~JAKE'S CAR~",
parent = "wheelbarrow",
model = false,
options = function()
return {
{
model = "models/props_vehicles/car002a_physics.mdl"
},
{
model = "models/props_vehicles/car001b_hatchback.mdl"
},
{
model = "models/props_vehicles/car001a_hatchback.mdl"
},
{
model = "models/props_vehicles/car002b_physics.mdl"
},
{
model = "models/props_vehicles/car003a_physics.mdl"
},
{
model = "models/props_vehicles/car003b_physics.mdl"
},
{
model = "models/props_vehicles/car004a_physics.mdl"
},
{
model = "models/props_vehicles/car004b_physics.mdl"
},
{
model = "models/props_vehicles/car005a_physics.mdl"
},
{
model = "models/props_vehicles/car005b_physics.mdl"
},
{
model = "models/props_vehicles/van001a_physics.mdl"
}
}
end,
driveOptions = {
speed = 5000
},
camera = {
dist = 500
}
})

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