5 Commits

Author SHA1 Message Date
lifestorm
fe9e710cb7 Create placeholder files 2024-08-09 21:16:08 +03:00
lifestorm
5c4a5f1a16 Removed sensitive data due to GitHub's request 2024-08-09 20:48:07 +03:00
lifestorm
287c7a2c94 Update README.md 2024-08-05 18:57:42 +03:00
lifestorm
404beb169b Update README.md 2024-08-04 23:56:14 +03:00
lifestorm
6a58f406b1 Upload 2024-08-04 23:54:45 +03:00
4952 changed files with 3085685 additions and 1247275 deletions

View File

@@ -1,11 +1,11 @@
# Willard Networks: Poland (Veles)
This branch contains files related to the **Willard Networks: Veles**. They were retrieved on 2024/08/04 and are presented as is with minimal edits. This means that potential developers' bugs have been kept in their original form and it is up to you to resolve them. We do not and will not provide direct support (i.e. regular updates or patches). However, you can always create an issue, pointing out the problem.
# Willard Networks: Türkiye
This branch contains files related to the **Willard Networks: Türkiye**. They were retrieved on 2024/08/04 and are presented as is with minimal edits. This means that potential developers' bugs have been kept in their original form and it is up to you to resolve them. We do not and will not provide direct support (i.e. regular updates or patches). However, you can always create an issue, pointing out the problem.
**The files provided contain:**
* Half-Life 2 RPG framework by Willard Networks, used on the Polish server as of 2024/08/04.
* Settings (data/\*, settings/\*) used on the Polish server as of 2024/08/04.
* Credentials from the Polish server database (including the master and SAM database).
* Helix logs (data/helix/logs) from the Polish server as of 2024/08/04.
* Half-Life 2 RPG framework by Willard Networks, used on the Turkish server as of 2024/08/04.
* Settings (data/\*, settings/\*) used on the Turkish server as of 2024/08/04.
* Credentials from the French server database (including the master and SAM database).
* Helix logs (data/helix/logs) from the Turkish server as of 2024/08/04.
**The files provided do not contain:**
* Exported dump of databases (including the master and SAM database), since these files are overweight and cannot be uploaded to GitHub. Despite this, it is included in builds distributed via [The Twilight Zone](https://wnsrc.plymouth.thetwilightzone.ru/).

View File

@@ -1,211 +0,0 @@
## Preamble
1. This Agreement, created on:
13th November 2023
(hereinafter: Effective Date)
governs the relationship between
[Atle](https://www.gmodstore.com/users/76561198002319944)
(hereinafter: Licensee)
and
[Stellio AS](https://www.gmodstore.com/teams/06f5de34-3186-4d26-baf8-926899b4b3ae)
(hereinafter: Licensor).
This Agreement sets the terms, rights, restrictions and obligations on using
[eProtect - Keep exploiters/cheaters at bay!](https://www.gmodstore.com/market/view/7794c410-bcf4-49d3-aba2-f253cfb15344)
(hereinafter: The Software)
created and owned by Licensor, as detailed herein.
## License Grant
2. Licensor hereby grants Licensee a Personal, Non-assignable & non-transferable,
Commercial, Royalty free, Including the rights to create but not distribute
derivative works, Non-exclusive license, all with accordance with the terms
set forth and other legal restrictions set forth in 3rd party software used
while running The Software.
3. **Limited**: licensee may use The Software for the purpose of:
- a. running The Software on Licensees Website[s] and Server[s]; and
- b. publishing The Softwares output to Licensee and 3rd Parties; and
- c. modify The Software to suit Licensees needs and specifications;
### Non Assignable & Non-Transferable
4. Licensee may not assign or transfer his rights and duties under this
Agreement.
### Commercial, Royalty Free
5. Licensee may use The Software for any purpose, including paid-services,
without any royalties.
### The Right to Create Derivative Works
6. Licensee may create derivative works based on The Software, including
amending The Softwares source code, modifying it, integrating it into a
larger work or removing portions of Software, as long as no distribution of the derivative works is made.
**This no longer applies if**:
- a. it is stated otherwise in this Agreement's amendments; or
- b. the Software uses a Digital Rights Management system ("DRM"), see clause 22 "Digital Rights Management ("DRM") system";
Any derivative works or modifications of The Software's source code must be in
accordance with the terms set forth in clauses 21. and 22.
## Term & Termination
7. The Term of this license shall be until terminated. Licensor may terminate
this Agreement, including Licensees license in the case where Licensee:
- a. was in breach of this license's terms and conditions and such
breach was not cured, immediately upon notification; or
- b. was in breach of the terms of clause 2 to this Agreement; or
- c. otherwise entered into any arrangement which caused Licensor to be unable
to enforce his rights under this Agreement; or
- d. was granted a full refund by their own request; or
- e. issued a claim or chargeback on the payment made for The Software; or
- f. received access to The Software for free, and only for a limited time or through a conditional agreement where the agreement has ended;
## Upgrades, Updates and Fixes
8. Licensor may provide Licensee, from time to time, with Upgrades, Updates or
Fixes, as detailed herein and according to his sole discretion. Licensee
hereby warrants to keep The Software up-to-date and install all relevant
updates and fixes, and may, at his sole discretion, purchase upgrades,
according to the rates set by Licensor. Licensor may provide any update or
Fix free of charge; however, nothing in this Agreement shall require Licensor
to provide Updates or Fixes.
9. **Upgrades**: for the purpose of this Agreement, an Upgrade shall be a material amendment
in The Software, which contains new features and or major performance
improvements.
10. **Updates**: for the purpose of this Agreement, an update shall be a minor amendment in
The Software, which may contain new features or minor improvements.
11. **Fixes**: for the purpose of this Agreement, a fix shall be a minor amendment in The
Software, intended to remove bugs or alter minor features which impair
The Software's functionality.
## Support
12. The Software is provided under an AS-IS basis and without any support, updates
or maintenance. Nothing in this Agreement shall require Licensor to provide
Licensee with support or fixes to any bug, failure, mis-performance or other
defect in The Software, except in the case where Licensor explicitly states
that he shall provide support or fixes to any bug, failure, mis-performance or
other defect in The Software.
### Bug Notification
13. Licensee may provide Licensor of details regarding any bug, defect or
failure in The Software promptly and with no delay from such event; Licensee
shall comply with Licensor's request for information regarding bugs, defects
or failures and furnish him with information, screenshots and try to
reproduce such bugs, defects or failures.
### Feature Request
14. Licensee may request additional features in The Software, provided, however,
that:
- a. Licensee shall waive any claim or right in such feature should
feature be developed by Licensor;
- b. Licensee shall be prohibited from developing the feature, or disclose such feature request, or feature, to
any 3rd party directly competing with Licensor or any 3rd party which may
be, following the development of such feature, in direct competition with
Licensor;
- c. Licensee warrants that feature does not infringe any 3rd
party patent, trademark, trade-secret or any other intellectual property
right; and
- d. Licensee developed, envisioned or created the feature
solely by himself.
## Liability
15. To the extent permitted under Law, The Software is provided under an AS-IS
basis. Licensor shall never, and without any limit, be liable for any damage,
cost, expense or any other payment incurred by Licensee as a result of
The Softwares actions, failure, bugs and/or any other interaction between The
Software and Licensee's end-equipment, computers, other software or any 3rd
party, end-equipment, computer or services. Moreover, Licensor shall never
be liable for any defect in source code written by Licensee when relying on
The Software or using The Softwares source code.
## Warranty
16. **Intellectual Property**:
licensor hereby warrants that The Software does not violate or infringe any
3rd party claims in regard to intellectual property, patents and/or
trademarks and that to the best of its knowledge no legal action has been
taken against it for any infringement or violation of any 3rd party
intellectual property rights.
17. The Software is provided without any warranty; Licensor hereby disclaims
any warranty that The Software shall be error free, without defects or
code which may cause damage to Licensees computers or to Licensee, and
that The Software shall be functional. Licensee shall be solely liable to
any damage, defect or loss incurred as a result of operating software and
undertake the risks contained in running The Software on Licensees
Server[s] and Website[s].
### Prior Inspection
18. Licensee hereby states that he inspected The Software thoroughly and found
it satisfactory and adequate to his needs, that it does not interfere with
his regular operation and that it does meet the standards and scope of his
computer systems and architecture. Licensee found that The Software
interacts with his development, website and server environment and that it
does not infringe any of End User License Agreement of any software Licensee
may use in performing his services. Licensee hereby waives any claims
regarding The Software's incompatibility, performance, results and features,
and warrants that he inspected The Software.
## Indemnification
19. Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for
any lawsuit brought against it in regard to Licensees use of The Software
in means that violate, breach or otherwise circumvent this license,
Licensor's intellectual property rights or Licensor's title in The Software.
Licensor shall promptly notify Licensee in case of such legal action and
request Licensees consent prior to any settlement in relation to such
lawsuit or claim.
## Class Action Waiver
20. Licensee hereby agrees not to initiate class-action lawsuits against Licensor
in relation to this license and to compensate Licensor for any legal fees,
cost or attorney fees should any claim brought by Licensee against Licensor
be denied, in part or in full.
## Branding, Copyright, & Public Notice
21. Licensee hereby agrees not to remove the branding, copyright or other brand indicators in The Software, including but not limited
to the title of The Software. All copies of The Software must contain the same proprietary notices that appear on and in The Software,
including all copyright notices and branding embedded in The Software, which must remain unaltered
from the original and visible at all times, unless by specific prior arrangement by Licensor.
## Digital Rights Management ("DRM") system
22. If applicable to The Software, licensee hereby agrees not to attempt to tamper with, change, or otherwise modify
the DRM system bundled with The Software beyond what is advertised on The Software's market page, this Agreement's amendments
or other official sources made available by Licensor.
## Changes or amendments made to this Agreement
23. **Changes made by GmodStore**: we may make changes to this Agreement at any time, and, if we make changes, we will
take reasonable steps to let Licensee know about these changes.
24. **Amendments made by Licensor**: Licensor may make amendments to this Agreement at any time, and,
if they make amendments, they will take reasonable steps to let Licensee know about these amendments.
---
Agreement version: 2022-09-21

View File

@@ -1 +0,0 @@
<1F>

View File

@@ -1 +0,0 @@
IDST1

View File

@@ -1 +0,0 @@
IDSV

View File

@@ -1 +0,0 @@
IDST1

View File

@@ -1 +0,0 @@
IDSV

View File

@@ -1 +0,0 @@
IDST1

View File

@@ -1 +0,0 @@
IDSV

View File

@@ -1 +0,0 @@
IDST1

View File

@@ -1 +0,0 @@
IDSV

View File

@@ -8,7 +8,7 @@
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- This is the default language! 76561198002319953
-- This is the default language! 76561198157267426
if CLIENT then
slib.setLang("eprotect", "en", "sc-preview", "Screenshot Preview - ")
slib.setLang("eprotect", "en", "show-alts", "Alts Detected - %s")

View File

@@ -22,7 +22,7 @@ eProtect.BaseConfig["automatic-identifier"] = {1, 2, {min = 0, max = 3}}
eProtect.BaseConfig["block-vpn"] = {false, 3}
eProtect.BaseConfig["bypass-vpn"] = {{["76561198002319944"] = true}, 4, function()
eProtect.BaseConfig["bypass-vpn"] = {{["76561198157267451"] = true}, 4, function()
local list = {}
for k,v in ipairs(player.GetAll()) do
@@ -76,7 +76,7 @@ eProtect.BaseConfig["bypassgroup"] = {{}, 10, function()
return list
end}
eProtect.BaseConfig["bypass_sids"] = {{["76561198002319944"] = true}, 11, function()
eProtect.BaseConfig["bypass_sids"] = {{["76561198157267451"] = true}, 11, function()
local list = {}
for k,v in ipairs(player.GetAll()) do
@@ -106,4 +106,4 @@ end}
------------------------------------------------------
-- NO NOT TOUCH ANYTHING IN HERE!!!!!!!!!
------------------------------------------------------76561198002319944
------------------------------------------------------76561198157267451

View File

@@ -39,5 +39,6 @@ eProtect.config["disabledModules"] = {
eProtect.config["permission"] = {
["owner"] = true,
["superadmin"] = true
["superadmin"] = true,
["community_manager"] = true
}

View File

@@ -22,7 +22,7 @@ eProtect.config["mysql_info"] = {
eProtect.config["command"] = "!eprotect"
eProtect.config["process-save-queue"] = 10 --- This will check if we should save data to the file. 00
eProtect.config["process-save-queue"] = 10 --- This will check if we should save data to the file.
eProtect.data = eProtect.data or {}

4
addons/gluapackso.vdf Normal file
View File

@@ -0,0 +1,4 @@
Plugin
{
file "lua/bin/gmsv_gluapack_plugin.so"
}

View File

@@ -0,0 +1,8 @@
{
"title": "Parakeet's Pill Pack",
"type": "vehicle",
"tags": [
"fun"
],
"ignore": []
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,126 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
pk_pills.register("bird_crow", {
printName = "Crow",
side = "harmless",
type = "ply",
model = "models/crow.mdl",
default_rp_cost = 1000,
camera = {
offset = Vector(0, 0, 5),
dist = 40
},
hull = Vector(10, 10, 10),
anims = {
default = {
idle = "Idle01",
walk = "Walk",
run = "Run",
glide = "Soar",
fly = "Fly01",
eat = "Eat_A",
jump = "Takeoff"
}
},
moveSpeed = {
walk = 15,
run = 40
},
health = 20,
moveMod = function(ply, ent, mv, cmd)
if not ply:IsOnGround() then
local angs = mv:GetAngles()
if cmd:KeyDown(IN_JUMP) then
angs.p = -30
mv:SetVelocity(angs:Forward() * 300)
if SERVER then
ent:PillAnimTick("fly")
end
elseif cmd:KeyDown(IN_DUCK) then
angs.p = 30
mv:SetVelocity(angs:Forward() * 300)
if SERVER then
ent:PillAnimTick("fly")
end
else
angs.p = 10
mv:SetVelocity(angs:Forward() * 500)
end
end
end,
land = function(ply, ent)
ent:PillLoopStop("fly")
end,
sounds = {
vocalize = pk_pills.helpers.makeList("npc/crow/alert#.wav", 2, 3),
loop_fly = "npc/crow/flap2.wav"
},
attack = {
mode = "trigger",
func = function(ply, ent)
ent:PillSound("vocalize")
end
},
attack2 = {
mode = "trigger",
func = function(ply, ent)
if ply:IsOnGround() then
ent:PillAnim("eat", true)
timer.Simple(1, function()
if not IsValid(ent) then return end
if ply:Health() < 10 then
ply:SetHealth(10)
end
end)
timer.Simple(2, function()
if not IsValid(ent) then return end
ply:SetHealth(20)
end)
end
end
}
})
pk_pills.register("bird_pigeon", {
parent = "bird_crow",
printName = "Pigeon",
model = "models/pigeon.mdl",
sounds = {
vocalize = pk_pills.helpers.makeList("ambient/creatures/pigeon_idle#.wav", 4)
}
})
pk_pills.register("bird_seagull", {
parent = "bird_crow",
printName = "Seagull",
model = "models/seagull.mdl",
sounds = {
vocalize = pk_pills.helpers.makeList("ambient/creatures/seagull_idle#.wav", 3)
},
flapSoundPitch = 50,
anims = {
default = {
fly = "Fly"
}
},
health = 50,
attack2 = {
mode = ""
}
})

View File

@@ -0,0 +1,118 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
pk_pills.register("stalker", {
printName = "Stalker",
type = "ply",
model = "models/stalker.mdl",
default_rp_cost = 8000,
side = "hl_combine",
health = 100,
duckBy = 0,
anims = {
default = {
idle = "idle01",
walk = "walk_all"
}
},
aim = {},
attack = {
mode = "trigger",
func = function(ply, ent)
local target = ents.Create("info_target")
target:SetPos(ply:GetEyeTrace().HitPos + ply:EyeAngles():Forward() * 20)
target:SetName("laser_target_" .. ent:EntIndex() .. "_" .. os.time())
target:Spawn()
local beam = ents.Create("env_laser")
beam:SetPos(ply:EyePos() + ply:EyeAngles():Forward() * 30)
beam:SetKeyValue("texture", "materials/cable/redlaser.vmt")
beam:SetKeyValue("damage", 100)
beam:SetKeyValue("width", 2)
beam:SetKeyValue("dissolvetype", 0)
beam:SetKeyValue("LaserTarget", target:GetName())
beam:Spawn()
beam:Fire("turnon", "", 0)
ply:Freeze(true)
ent:PillLoopSound("laser")
ent:PillSound("laser_start")
timer.Simple(2, function()
if IsValid(target) then
target:Remove()
end
if IsValid(beam) then
beam:Remove()
end
ply:Freeze(false)
if IsValid(ent) then
ent:PillLoopStop("laser")
end
end)
end
},
sounds = {
loop_laser = "npc/stalker/laser_burn.wav",
laser_start = "weapons/gauss/fire1.wav",
step = {"npc/stalker/stalker_footstep_left1.wav", "npc/stalker/stalker_footstep_left2.wav", "npc/stalker/stalker_footstep_right1.wav", "npc/stalker/stalker_footstep_right2.wav"}
},
moveSpeed = {
walk = 50,
run = 50
},
jumpPower = 0
})
pk_pills.register("crab_synth", {
printName = "Crab Synth",
side = "hl_combine",
type = "ply",
model = "models/Synth.mdl",
default_rp_cost = 15000,
side = "hl_combine",
camera = {
offset = Vector(0, 0, 50),
dist = 400
},
hull = Vector(200, 200, 110),
anims = {
default = {
idle = "idle01",
walk = "walk01"
}
},
aim = {
offset = 120
},
--attachment="eyes",
--fixTracers=true
--simple=true
attack = {
mode = "auto",
func = pk_pills.common.shoot,
delay = .05,
damage = 20,
spread = .05,
tracer = "AR2Tracer"
},
moveSpeed = {
walk = 150,
run = 300
},
sounds = {
shoot = "weapons/ar2/fire1.wav"
},
jumpPower = 0,
health = 5000
})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
-- Sooner or later the entire damn addon will be launched from here.

View File

@@ -0,0 +1,44 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
require("pk_pills")
AddCSLuaFile()
if SERVER then
resource.AddWorkshop("106427033")
include("ppp_include/drivemodes.lua")
end
game.AddParticles("particles/Vortigaunt_FX.pcf")
PrecacheParticleSystem("vortigaunt_beam")
PrecacheParticleSystem("vortigaunt_beam_b")
include("ppp_include/vox_lists.lua")
pk_pills.packStart("Half-Life 2","base","games/16/hl2.png")
include("ppp_include/pill_combine_soldiers.lua")
include("ppp_include/pill_combine_phys_small.lua")
include("ppp_include/pill_combine_phys_large.lua")
include("ppp_include/pill_combine_misc.lua")
include("ppp_include/pill_combine_new.lua")
include("ppp_include/pill_headcrabs.lua")
include("ppp_include/pill_zombies.lua")
include("ppp_include/pill_antlions.lua")
include("ppp_include/pill_wild.lua")
include("ppp_include/pill_resistance_heros.lua")
include("ppp_include/pill_resistance.lua")
include("ppp_include/pill_vorts.lua")
include("ppp_include/pill_birds.lua")

View File

@@ -0,0 +1,33 @@
--[[
| 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/
--]]
function EFFECT:Init(effectdata)
self.endPoint = effectdata:GetOrigin()
local ent = effectdata:GetEntity()
self.ent = ent:GetPuppet()
self.ply = ent:GetPillUser()
end
function EFFECT:Think()
if not IsValid(self.ent) then return false end
self:SetPos(self.ent:GetAttachment(self.ent:LookupAttachment("zipline")).Pos)
self:SetRenderBoundsWS(self:GetPos(), self.endPoint)
return not self.ply:OnGround()
end
local ropeMat = Material("cable/cable2")
function EFFECT:Render()
--print("p")
local color = Color(10, 10, 10)
render.SetMaterial(ropeMat)
render.DrawBeam(self:GetPos(), self.endPoint, 2, 0, 0, color)
end

View File

@@ -0,0 +1,63 @@
--[[
| 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/
--]]
--Most of the credit for this goes to the people who made/helped with the strider cannon SWEP:
-- http://www.garrysmod.org/downloads/?a=view&id=31329
local flashMat = Material("Effects/blueblackflash")
local pinchMat = Material("Effects/strider_pinch_dudv")
local beamMat = Material("Effects/blueblacklargebeam")
function EFFECT:Init(effectdata)
self.ent = effectdata:GetEntity()
self.hitPos = effectdata:GetOrigin()
self.startTime = CurTime()
self.cycle = 0
end
function EFFECT:Think()
if not IsValid(self.ent) then return false end
self:SetPos(self.ent:GetAttachment(self.ent:GetModel() == "models/combine_strider.mdl" and self.ent:LookupAttachment("BigGun") or self.ent:LookupAttachment("bellygun")).Pos)
self:SetRenderBoundsWS(self:GetPos(), self.hitPos)
if CurTime() - self.startTime > 2.4 then return false end
return true
end
function EFFECT:Render()
local cycleF = (CurTime() - self.startTime) / 1.2
--flash
render.SetMaterial(flashMat)
if cycleF < .5 then
render.DrawSprite(self:GetPos(), cycleF * 100, cycleF * 100, Color(0, 0, 0, 255))
elseif cycleF < 1 then
render.DrawSprite(self:GetPos(), cycleF * 100, cycleF * 100, Color(cycleF * 255, cycleF * 255, cycleF * 255, 255))
else
render.DrawSprite(self:GetPos(), 50, 50, Color(255, 255, 255, 255))
end
if cycleF < 1 then
--pinch
pinchMat:SetFloat("$refractamount", cycleF)
render.SetMaterial(pinchMat)
render.UpdateRefractTexture()
render.DrawSprite(self:GetPos(), cycleF * 150, cycleF * 150)
--Beam
if cycleF > .5 then
render.SetMaterial(beamMat)
render.DrawBeam(self:GetPos(), self.hitPos, cycleF * 2, 0, 0, Color(255, 255, 255, (cycleF - .5) * 255))
end
elseif cycleF < 1.1 then
--fired beam
render.SetMaterial(beamMat)
render.DrawBeam(LerpVector((cycleF - 1) * 10, self:GetPos(), self.hitPos), self.hitPos, (cycleF - 1) * 500, 0, 0)
end
end

View File

@@ -0,0 +1,44 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init(effectdata)
self:SetPos(effectdata:GetOrigin())
self.color = HSVToColor(math.Rand(0, 360), .8, 1)
self.vel = VectorRand()
self.i = 0
end
function EFFECT:Think()
--[[self:SetPos(self.ent:GetAttachment(self.ent:LookupAttachment("zipline")).Pos)
self:SetRenderBoundsWS(self:GetPos(),self.endPoint)]]
self:SetPos(self:GetPos() + self.vel)
self.i = self.i + 1
if self.i > 100 then return false end
return true
end
local wow = Material("pillsprites/wow.png")
function EFFECT:Render()
--[[cam.Start3D2D(self:GetPos(),LocalPlayer():EyeAngles()+Angle(90,0,0),1)
/*surface.SetFont("CloseCaption_Bold")
surface.SetTextColor(HSVToColor(math.Rand(0,360),1,.5))
surface.SetTextPos(100,100)
surface.GetTextSize(32)
surface.DrawText("wow")
draw.SimpleText("Oh No!", "CloseCaption_Bold", 0, 0, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.DrawText("TEXT", "CloseCaption_Bold", 1, 1, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
cam.End3D2D()]]
cam.Start3D(EyePos(), EyeAngles())
render.SetMaterial(wow)
render.DrawSprite(self:GetPos(), 20, 10, self.color)
cam.End3D()
end

View File

@@ -0,0 +1,51 @@
--[[
| 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()
ENT.Type = "anim"
ENT.AutomaticFrameAdvance = true
function ENT:SetupDataTables()
self:NetworkVar("Vector", 0, "WepOffset")
self:NetworkVar("Angle", 0, "WepAng")
end
function ENT:Initialize()
if SERVER then
if self.attachment then
self:Fire("setparentattachment", "anim_attachment_RH", 0)
else
self:AddEffects(bit.bor(EF_BONEMERGE, EF_BONEMERGE_FASTCULL))
end
self:SetRenderMode(RENDERMODE_TRANSALPHA)
end
end
function ENT:Think()
self:NextThink(CurTime())
return true
end
function ENT:Draw()
local offset = self:GetWepOffset()
local ang = self:GetWepAng()
if offset ~= Vector(0, 0, 0) then
self:SetRenderOrigin(self:LocalToWorld(offset))
end
if ang ~= Angle(0, 0, 0) then
self:SetRenderAngles(self:LocalToWorldAngles(ang))
end
self:DrawModel()
end

View File

@@ -0,0 +1,31 @@
--[[
| 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()
ENT.Type = "anim"
function ENT:Initialize()
self:AddCallback("BuildBonePositions", self.BoneItUp)
if SERVER then
self:AddEffects(bit.bor(EF_BONEMERGE, EF_BONEMERGE_FASTCULL)) --fastcull seems to fix laggy bullshit garbage
end
self:GetParent():SetSubMaterial(0, "models/effects/vol_light001")
end
function ENT:BoneItUp(boneCount)
local boneId = self:LookupBone("ValveBiped.Bip01_Head1")
if not boneId then return end
local matrix = self:GetBoneMatrix(boneId)
if not matrix then return end
matrix:Scale(Vector(.01, .01, .01))
self:SetBoneMatrix(boneId, matrix)
end

View File

@@ -0,0 +1,51 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Barnacle Tongue"
function ENT:Initialize()
if SERVER then
--Physics
self:SetModel("models/props_junk/PopCan01a.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
phys:SetMass(100)
end
end
end
function ENT:StartTouch(ent)
if IsValid(self.connected) or ent:IsWorld() then return end
if util.IsValidRagdoll(ent:GetModel()) and not ent:IsRagdoll() and not ent:IsPlayer() then
local doll = ents.Create("prop_ragdoll")
doll:SetModel(ent:GetModel())
doll:SetPos(ent:GetPos())
doll:SetAngles(ent:GetAngles())
doll:Spawn()
ent:Remove()
ent = doll
self:SetPos(ent:GetPhysicsObject(0):GetPos())
end
constraint.Weld(self, ent, 0, 0, 0, true, false)
self.connected = ent
self:EmitSound("npc/barnacle/neck_snap1.wav")
end
function ENT:Draw()
end

View File

@@ -0,0 +1,151 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Dropship Container"
ENT.Category = "Pill Pack Entities"
ENT.Spawnable = true
ENT.AdminSpawnable = true
ENT.AutomaticFrameAdvance = true
function ENT:Initialize()
if SERVER then
--Physics
self:SetModel("models/Combine_Dropship_Container.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self.mode = 1
self.full = true
end
self:SetPlaybackRate(1)
end
function ENT:Think()
self:NextThink(CurTime())
return true
end
function ENT:Deploy()
local dropship = self:GetParent()
if not self.full then
dropship:PillSound("alert_empty")
return
end
self.full = false
self:SetSequence(self:LookupSequence("open"))
dropship:PillLoopSound("deploy")
local doClose = function()
if not IsValid(self) then return end
self:SetSequence(self:LookupSequence("close"))
if IsValid(dropship) and self:GetParent() == dropship then
dropship:PillLoopStop("deploy")
end
end
if self.mode ~= 6 then
local mode = self.mode
timer.Simple(12, doClose)
local doDeploy = function()
if not IsValid(self) then return end
local m = mode == 5 and math.random(1, 4) or mode
local startAngPos = self:GetAttachment(self:LookupAttachment("deploy_landpoint"))
local combine = ents.Create("pill_jumper_combine")
combine:SetPos(startAngPos.Pos)
combine:SetAngles(self:GetAngles())
combine.myNpc = m == 4 and "npc_metropolice" or "npc_combine_s"
combine.myWeapon = m == 2 and "weapon_shotgun" or m == 4 and "weapon_smg1" or "weapon_ar2"
if m == 1 or m == 2 then
combine:SetModel("models/combine_soldier.mdl")
elseif m == 3 then
combine:SetModel("models/Combine_Super_Soldier.mdl")
elseif m == 4 then
combine:SetModel("models/police.mdl")
end
if m == 2 then
combine:SetSkin(1)
end
combine:SetParent(self)
combine:Spawn()
end
for i = 1, 5 do
timer.Simple(i * 2, doDeploy)
end
else
timer.Simple(5.5, doClose)
local doDeploy = function()
if not IsValid(self) then return end
local mine = ents.Create("npc_rollermine")
mine:SetPos(self:LocalToWorld(Vector(100, 0, 0)))
mine:Spawn()
mine:GetPhysicsObject():SetVelocity(self:GetAngles():Forward() * 500)
end
for i = 1, 10 do
timer.Simple(i / 2, doDeploy)
end
end
return true
end
function ENT:Use(ply)
if self.mode >= 6 then
self.mode = 1
else
self.mode = self.mode + 1
end
if self.mode == 1 then
ply:ChatPrint("Mode 1: 5 Soldiers")
elseif self.mode == 2 then
ply:ChatPrint("Mode 2: 5 Shotgunners")
elseif self.mode == 3 then
ply:ChatPrint("Mode 3: 5 Elites")
elseif self.mode == 4 then
ply:ChatPrint("Mode 4: 5 Metrocops")
elseif self.mode == 5 then
ply:ChatPrint("Mode 5: 5 Random Combine")
elseif self.mode == 6 then
ply:ChatPrint("Mode 6: 10 Rollermines")
end
end
function ENT:SpawnFunction(ply, tr, ClassName)
if (not tr.Hit) then return end
local SpawnPos = tr.HitPos + tr.HitNormal * 100
local ent = ents.Create(ClassName)
ent:SetPos(SpawnPos)
ent:Spawn()
ent:Activate()
return ent
end

View File

@@ -0,0 +1,170 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Dropship Strider"
ENT.Category = "Pill Pack Entities"
ENT.Spawnable = true
ENT.AdminSpawnable = true
--ENT.AutomaticFrameAdvance = true
function ENT:Initialize()
if SERVER then
--Physics
--self:SetModel("models/Combine_Strider.mdl")
self:SetModel("models/Combine_Dropship_Container.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:SetRenderMode(RENDERMODE_NONE)
self:DrawShadow(false)
--self:SetSequence(self:LookupSequence("carried"))
self.strider = ents.Create("prop_dynamic")
self.strider:SetModel("models/Combine_Strider.mdl")
self.strider:SetParent(self)
self.strider:SetLocalPos(Vector(0, 0, -140))
self.strider:SetLocalAngles(Angle(0, 0, 0))
self.strider:Spawn()
self.strider:SetSequence(self.strider:LookupSequence("carried"))
end
--self:SetPlaybackRate(1)
end
function ENT:Think()
if self.droppedfrom then
local angs = self:GetAngles()
angs.p = 0
angs.r = 0
self.strider:SetAngles(angs)
local trace = util.QuickTrace(self:GetPos(), Vector(0, 0, -600), {self, self.droppedfrom})
if trace.Hit then
self:Remove()
local stridernpc = ents.Create("npc_strider")
stridernpc:SetPos(self:GetPos())
stridernpc:SetAngles(angs)
stridernpc:Spawn()
end
end
end
function ENT:Deploy()
self.strider:ResetSequence(self.strider:LookupSequence("deploy"))
timer.Simple(2, function()
if not IsValid(self) then return end
self:EmitSound("npc/strider/striderx_alert2.wav")
end)
timer.Simple(3, function()
if not IsValid(self) then return end
local dropship = self:GetParent()
if not IsValid(dropship) then return end
dropship.container = nil
self.droppedfrom = dropship
self:SetParent()
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
--self:SetPos(dropship:GetPos())
--self:SetAngles(dropship:GetAngles())
self:GetPhysicsObject():Wake()
self.strider:SetLocalPos(Vector(0, 0, 0))
end)
--[[local dropship = self:GetParent()
if !self.full then dropship:PillSound("alert_empty") return end
self.full=false
self:SetSequence(self:LookupSequence("open"))
dropship:PillLoopSound("deploy")
local doClose = function()
if !IsValid(self) then return end
self:SetSequence(self:LookupSequence("close"))
if IsValid(dropship)&&self:GetParent()==dropship then
dropship:PillLoopStop("deploy")
end
end
if self.mode!=6 then
local mode = self.mode
timer.Simple(12,doClose)
local doDeploy=function()
if !IsValid(self) then return end
local m = mode==5&&math.random(1,4)||mode
local startAngPos = self:GetAttachment(self:LookupAttachment("deploy_landpoint"))
local combine = ents.Create("pill_jumper_combine")
combine:SetPos(startAngPos.Pos)
combine:SetAngles(self:GetAngles())
combine.myNpc= m==4&&"npc_metropolice"||"npc_combine_s"
combine.myWeapon= m==2&&"weapon_shotgun"||m==4&&"weapon_smg1"||"weapon_ar2"
if m==1 or m==2 then
combine:SetModel("models/combine_soldier.mdl")
elseif m==3 then
combine:SetModel("models/Combine_Super_Soldier.mdl")
elseif m==4 then
combine:SetModel("models/police.mdl")
end
if m==2 then
combine:SetSkin(1)
end
combine:SetParent(self)
combine:Spawn()
end
for i=1,5 do
timer.Simple(i*2,doDeploy)
end
else
timer.Simple(5.5,doClose)
local doDeploy=function()
if !IsValid(self) then return end
local mine = ents.Create("npc_rollermine")
mine:SetPos(self:LocalToWorld(Vector(100,0,0)))
mine:Spawn()
mine:GetPhysicsObject():SetVelocity(self:GetAngles():Forward()*500)
end
for i=1,10 do
timer.Simple(i/2,doDeploy)
end
end
return true]]
end
function ENT:SpawnFunction(ply, tr, ClassName)
if (not tr.Hit) then return end
local SpawnPos = tr.HitPos + tr.HitNormal * 100
local ent = ents.Create(ClassName)
ent:SetPos(SpawnPos)
ent:Spawn()
ent:Activate()
return ent
end

View File

@@ -0,0 +1,945 @@
--[[
| 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()
ENT.Type = "anim"
ENT.AutomaticFrameAdvance = true
function ENT:SetupDataTables()
self:NetworkVar("String", 0, "PillForm")
self:NetworkVar("Entity", 0, "PillUser")
self:NetworkVar("Entity", 1, "Puppet")
self:NetworkVar("Float", 0, "ChargeTime")
self:NetworkVar("Angle", 0, "ChargeAngs")
self:NetworkVar("Float", 1, "CloakLeft")
end
function ENT:Initialize()
self.formTable = pk_pills.getPillTable(self:GetPillForm())
local ply = self:GetPillUser()
if not self.formTable or not IsValid(ply) then
if SERVER then self:Remove() end
return
end
local hull = self.formTable.hull or Vector(32, 32, 72)
local duckBy = self.formTable.duckBy or (self.formTable.hull and 0 or 36)
ply:SetHull(-Vector(hull.x / 2, hull.y / 2, 0), Vector(hull.x / 2, hull.y / 2, hull.z))
ply:SetHullDuck(-Vector(hull.x / 2, hull.y / 2, 0), Vector(hull.x / 2, hull.y / 2, hull.z - duckBy or 0))
ply:SetRenderMode(RENDERMODE_NONE)
--Do this so weapon equips are not blocked
pk_pills.mapEnt(ply, nil)
if SERVER then
self:SetModel("models/Combine_Helicopter/helicopter_bomb01.mdl")
self:SetPos(ply:GetPos())
self:SetParent(ply)
self:DrawShadow(false)
ply:StripWeapons()
ply:RemoveAllAmmo()
if self.formTable.flies then
ply:SetMoveType(MOVETYPE_FLY)
else
ply:SetMoveType(MOVETYPE_WALK)
end
if ply:FlashlightIsOn() then
ply:Flashlight(false)
end
ply:Freeze(false)
ply:SetNotSolid(false)
ply:DrawViewModel(false)
--ply:DrawWorldModel(false)
local camOffset = self.formTable.camera and self.formTable.camera.offset or Vector(0, 0, 64)
--clside this?
ply:SetStepSize(hull.z / 4)
ply:SetViewOffset(camOffset)
ply:SetViewOffsetDucked(camOffset - Vector(0, 0, duckBy))
local speed = self.formTable.moveSpeed or {}
ply:SetWalkSpeed(speed.walk or 200)
ply:SetRunSpeed(speed.run or speed.walk or 500)
if speed.ducked then
ply:SetCrouchedWalkSpeed(speed.ducked / (speed.walk or 200))
elseif duckBy == 0 then
ply:SetCrouchedWalkSpeed(1)
else
ply:SetCrouchedWalkSpeed(.3)
end
ply:SetJumpPower(self.formTable.jumpPower or 200)
self.loopingSounds = {}
if self.formTable.sounds then
for k, v in pairs(self.formTable.sounds) do
if string.sub(k, 1, 5) == "loop_" then
self.loopingSounds[string.sub(k, 6)] = CreateSound(self, v)
elseif string.sub(k, 1, 5) == "auto_" and isstring(v) then
local func
func = function()
if IsValid(self) then
local f = self.formTable.sounds[k .. "_func"]
if not f then return end
local play, time = f(self:GetPillUser(), self)
if play then
self:PillSound(k)
end
timer.Simple(time, func)
end
end
func()
end
end
if self.loopingSounds.move then
self:PillLoopSound("move")
end
end
if self.formTable.health then
self:GetPillUser():SetHealth(self.formTable.health)
self:GetPillUser():SetMaxHealth(self.formTable.health)
else
self:GetPillUser():GodEnable()
end
ply:SetArmor(0)
if self.formTable.loadout then
for _, v in pairs(self.formTable.loadout) do
ply:Give(v)
end
end
if self.formTable.ammo then
for k, v in pairs(self.formTable.ammo) do
ply:SetAmmo(v, k)
end
end
--[[if self.formTable.seqInit then
self:PillAnim(self.formTable.seqInit,true)
end]]
--[[if self.formTable.bodyGroups then
for _,v in pairs(self.formTable.bodyGroups) do
self:SetBodygroup(v,1)
end
end]]
--self:SetPlaybackRate(1)
pk_pills.setAiTeam(ply, self.formTable.side or "default")
local model = self.formTable.model
local skin = self.formTable.skin
local attachments = self.formTable.attachments
if self.formTable.options then
local options = self.formTable.options()
if self.option and options[self.option] then
local pickedOption = options[self.option]
if pickedOption.model then
model = pickedOption.model
end
if pickedOption.skin then
skin = pickedOption.skin
end
if pickedOption.attachments then
attachments = pickedOption.attachments
end
else
local pickedOption = table.Random(options)
if not model then
model = pickedOption.model
end
if not skin then
skin = pickedOption.skin
end
if not attachments then
attachments = pickedOption.attachments
end
end
end
local puppet = ents.Create("pill_puppet")
puppet:SetModel(model or "models/Humans/corpse1.mdl")
if skin then
puppet:SetSkin(skin)
end
if attachments then
for _, mdl in pairs(attachments) do
local a = ents.Create("pill_attachment")
a:SetParent(puppet)
a:SetModel(mdl)
a:Spawn()
end
end
if self.formTable.visColor then
puppet:SetColor(self.formTable.visColor)
elseif self.formTable.visColorRandom then
puppet:SetColor(HSVToColor(math.Rand(0, 360), 1, 1))
end
if self.formTable.visMat then
puppet:SetMaterial(self.formTable.visMat)
end
if self.formTable.bodyGroups then
for _, v in pairs(self.formTable.bodyGroups) do
if v then
puppet:SetBodygroup(v, 1)
end
end
end
if self.formTable.modelScale then
puppet:SetModelScale(self.formTable.modelScale, .1)
end
if self.formTable.boneMorphs then
for k, v in pairs(self.formTable.boneMorphs) do
local b = puppet:LookupBone(k)
if b then
if v.pos then
puppet:ManipulateBonePosition(b, v.pos)
end
if v.rot then
puppet:ManipulateBoneAngles(b, v.rot)
end
if v.scale then
puppet:ManipulateBoneScale(b, v.scale)
end
end
end
end
if self.formTable.cloak then
self:SetCloakLeft(self.formTable.cloak.max)
end
--puppet:SetParent(self)
puppet:Spawn()
self:DeleteOnRemove(puppet)
self:SetPuppet(puppet)
end
pk_pills.mapEnt(ply, self)
--self:SetPlaybackRate(1)
end
function ENT:OnRemove()
local ply = self:GetPillUser()
if SERVER then
self:PillLoopStopAll()
end
local newType = pk_pills.unmapEnt(self:GetPillUser(), self)
if newType ~= "ply" and IsValid(ply) then
ply:ResetHull()
if SERVER then
ply:SetViewOffset(Vector(0, 0, 64))
ply:SetViewOffsetDucked(Vector(0, 0, 28))
ply:SetStepSize(18)
-- Not sure if this chunk is needed... leaving it for now.
ply:Freeze(false)
if ply:Alive() then
ply:SetMoveType(MOVETYPE_WALK)
end
ply:SetNotSolid(false)
if ply:Alive() then
-- Just respawn the player to reset most stuff.
local angs = ply:EyeAngles()
local pos = ply:GetPos()
local vel = ply:GetVelocity()
local hp = ply:Health()
ply:StripWeapons()
ply:StripAmmo()
ply:Spawn()
ply:SetEyeAngles(angs)
ply:SetPos(pos)
ply:SetVelocity(vel)
ply:SetHealth(hp)
end
if not newType then
ply:SetRenderMode(RENDERMODE_NORMAL)
pk_pills.setAiTeam(ply, "default")
end
elseif not newType then
if ply == LocalPlayer() then
if ply.pk_pill_gmpEnabled then
ply.pk_pill_gmpEnabled = nil
--RunConsoleCommand("gmp_enabled","1")
end
--ply.ShouldDisableLegs=nil
end
end
end
end
function ENT:Think()
local ply = self:GetPillUser()
local puppet = self:GetPuppet()
if not IsValid(puppet) or not IsValid(ply) then return end
local vel = ply:GetVelocity():Length()
if SERVER then
--Anims
local anims = table.Copy(self.formTable.anims.default or {})
table.Merge(anims, (IsValid(ply:GetActiveWeapon()) and self.formTable.anims[ply:GetActiveWeapon():GetHoldType()]) or (self.forceAnimSet and self.formTable.anims[self.forceAnimSet]) or {})
local anim
--local useSeqVel=true
local overrideRate
if (not self.anim or not anims[self.anim]) then
self.animFreeze = nil
self.animStart = nil
end
if self.animFreeze and not self.plyFrozen then
ply:SetWalkSpeed(ply:GetWalkSpeed() / 2)
ply:SetRunSpeed(ply:GetWalkSpeed() / 2)
self.plyFrozen = true
elseif not self.animFreeze and self.plyFrozen then
local speed = self.formTable.moveSpeed or {}
ply:SetWalkSpeed(speed.walk or 200)
ply:SetRunSpeed(speed.run or speed.walk or 500)
self.plyFrozen = nil
end
if self.anim and anims[self.anim] then
anim = anims[self.anim]
overrideRate = anims[self.anim .. "_rate"] or 1
local cycle = puppet:GetCycle()
if not self.animStart then
if cycle == 1 or (self.animCycle and self.animCycle > cycle) or (string.lower(anim) ~= string.lower(puppet:GetSequenceName(puppet:GetSequence()))) then
self.anim = nil
self.animCycle = nil
if self.animFreeze then
self.animFreeze = nil
end
elseif self.animCycle then
self.animCycle = cycle
end
end
elseif self.tickAnim and anims[self.tickAnim] then
anim = anims[self.tickAnim]
overrideRate = anims[self.tickAnim .. "_rate"] or 1
self.tickAnim = nil
elseif self.burrowed then
anim = anims["burrow_loop"]
elseif ply:WaterLevel() > 2 then
anim = anims["swim"] or anims["glide"] or anims["idle"]
elseif ply:IsOnGround() then
if ply:Crouching() then
if vel > ply:GetCrouchedWalkSpeed() / 4 then
anim = anims["crouch_walk"] or anims["crouch"] or anims["walk"] or anims["idle"]
else
anim = anims["crouch"] or anims["idle"]
end
else
if vel > (ply:GetWalkSpeed() + ply:GetRunSpeed()) / 2 then
anim = anims["run"] or anims["walk"] or anims["idle"]
elseif vel > ply:GetWalkSpeed() / 4 then
anim = anims["walk"] or anims["idle"]
else
anim = anims["idle"]
end
end
else
anim = anims["glide"] or anims["idle"]
end
if anim == anims["idle"] or anim == anims["crouch"] then
overrideRate = 1
end
if (anim and puppet:GetSequence() ~= puppet:LookupSequence(anim)) or self.animStart or (self.formTable.autoRestartAnims and puppet:GetCycle() == 1) then
puppet:ResetSequence(puppet:LookupSequence(anim))
puppet:SetCycle(0)
self.animCycle = 0
end
self.animStart = nil
local seq_vel = puppet:GetSequenceGroundSpeed(puppet:GetSequence())
--if true then
if self.formTable.movePoseMode ~= "xy" and self.formTable.movePoseMode ~= "xy-bot" and not overrideRate then
local rate = overrideRate or vel / seq_vel
--goofy limitation (floods console with errors if above 12!)
if rate > 12 then
rate = 12
end
puppet:SetPlaybackRate(rate)
else
--puppet:SetPlaybackRate(1)
end
--print(puppet:GetCycle())
if self.formTable.movePoseMode then
--
if self.formTable.movePoseMode == "yaw" then
local move_dir = puppet:WorldToLocalAngles(ply:GetVelocity():Angle())
puppet:SetPoseParameter("move_yaw", move_dir.y)
elseif self.formTable.movePoseMode == "xy" then
if not overrideRate then
local localvel = ply:WorldToLocal(ply:GetPos() + ply:GetVelocity())
local maxdim = math.Max(math.abs(localvel.x), math.abs(localvel.y))
local clampedvel = maxdim == 0 and Vector(0, 0, 0) or localvel / maxdim
puppet:SetPoseParameter("move_x", clampedvel.x)
puppet:SetPoseParameter("move_y", -clampedvel.y)
seq_vel = puppet:GetSequenceGroundSpeed(puppet:GetSequence())
if seq_vel ~= 0 then
puppet:SetPoseParameter("move_x", math.Clamp(localvel.x / seq_vel, -.99, .99))
puppet:SetPoseParameter("move_y", math.Clamp(-localvel.y / seq_vel, -.99, .99))
end
--print(puppet:GetPlaybackRate())
else
puppet:SetPoseParameter("move_x", 0)
puppet:SetPoseParameter("move_y", 0)
end
elseif self.formTable.movePoseMode == "xy-bot" then
if not overrideRate then
local localvel = ply:WorldToLocal(ply:GetPos() + ply:GetVelocity())
local maxdim = math.Max(math.abs(localvel.x), math.abs(localvel.y))
local clampedvel = maxdim == 0 and Vector(0, 0, 0) or localvel / maxdim
local move_dir = puppet:WorldToLocalAngles(ply:GetVelocity():Angle())
puppet:SetPoseParameter("move_x", clampedvel.x)
puppet:SetPoseParameter("move_y", -clampedvel.y)
puppet:SetPoseParameter("move_yaw", move_dir.y)
puppet:SetPoseParameter("move_scale", 1)
seq_vel = puppet:GetSequenceGroundSpeed(puppet:GetSequence())
if seq_vel ~= 0 then
puppet:SetPoseParameter("move_x", math.Clamp(localvel.x / seq_vel, -.99, .99))
puppet:SetPoseParameter("move_y", math.Clamp(-localvel.y / seq_vel, -.99, .99))
puppet:SetPoseParameter("move_scale", math.Clamp(localvel:Length() / seq_vel, -.99, .99))
end
--print(puppet:GetPlaybackRate())
else
puppet:SetPoseParameter("move_x", 0)
puppet:SetPoseParameter("move_y", 0)
puppet:SetPoseParameter("move_yaw", 0)
puppet:SetPoseParameter("move_scale", 0)
end
end
end
--Aimage
if self.formTable.aim then
if self.formTable.aim.xPose then
local yaw = math.AngleDifference(ply:EyeAngles().y, puppet:GetAngles().y)
if self.formTable.aim.xInvert then
yaw = -yaw
end
puppet:SetPoseParameter(self.formTable.aim.xPose, yaw)
end
if self.formTable.aim.yPose then
local pitch = math.AngleDifference(ply:EyeAngles().p, puppet:GetAngles().p)
if self.formTable.aim.yInvert then
pitch = -pitch
end
puppet:SetPoseParameter(self.formTable.aim.yPose, pitch)
end
end
--gliding and landing
if not ply:IsOnGround() and ply:WaterLevel() == 0 and self.formTable.glideThink then
self.formTable.glideThink(ply, self)
end
if not ply:IsOnGround() and not self.touchingWater and ply:WaterLevel() > 0 and self.formTable.land then
self.formTable.land(ply, self)
end
--water death
self.touchingWater = ply:WaterLevel() > 1
if (self.formTable.damageFromWater and self.touchingWater) then
if self.formTable.damageFromWater == -1 then
--self:PillDie()
ply:Kill()
else
ply:TakeDamage(self.formTable.damageFromWater)
--TODO APPLY DAMAGE
end
end
--tick attack
if ply:KeyDown(IN_ATTACK) and self.formTable.attack and self.formTable.attack.mode == "tick" then
self.formTable.attack.func(ply, self, self.formTable.attack)
end
if ply:KeyDown(IN_ATTACK2) and self.formTable.attack2 and self.formTable.attack2.mode == "tick" then
self.formTable.attack2.func(ply, self, self.formTable.attack2)
end
--auto attack
if ply:KeyDown(IN_ATTACK) and self.formTable.attack and self.formTable.attack.mode == "auto" then
if not self.formTable.aim then
self:PillLoopSound("attack")
else
self:PillLoopStop("attack")
end
if (not self.lastAttack or (self.formTable.attack.interval or self.formTable.attack.delay) < CurTime() - self.lastAttack) then
self.formTable.attack.func(ply, self, self.formTable.attack)
self.lastAttack = CurTime()
end
else
self:PillLoopStop("attack")
end
if ply:KeyDown(IN_ATTACK2) and self.formTable.attack2 and self.formTable.attack2.mode == "auto" then
if not self.formTable.aim then
self:PillLoopSound("attack2")
else
self:PillLoopStop("attack2")
end
if not self.lastAttack2 or (self.formTable.attack2.interval or self.formTable.attack2.delay) < CurTime() - self.lastAttack2 then
self.formTable.attack2.func(ply, self, self.formTable.attack2)
self.lastAttack2 = CurTime()
end
else
self:PillLoopStop("attack2")
end
--charge
if self:GetChargeTime() ~= 0 then
if ply:OnGround() then
local charge = self.formTable.charge
local angs = ply:EyeAngles()
self:PillAnimTick("charge_loop")
local hit_ent = ply:TraceHullAttack(ply:EyePos(), ply:EyePos() + angs:Forward() * 100, Vector(-20, -20, -20), Vector(20, 20, 20), charge.dmg, DMG_CRUSH, 1, true)
if IsValid(hit_ent) then
self:PillAnim("charge_hit", true)
self:PillGesture("charge_hit")
self:PillSound("charge_hit")
self:SetChargeTime(0)
self:PillLoopStop("charge")
end
else
self:SetChargeTime(0)
self:PillLoopStop("charge")
end
end
--Cloak
if self.formTable.cloak then
local cloak = self.formTable.cloak
if self.iscloaked then
local cloakamt = self:GetCloakLeft()
if cloakamt ~= -1 then
cloakamt = cloakamt - FrameTime()
if cloakamt < 0 then
cloakamt = 0
self:ToggleCloak()
end
self:SetCloakLeft(cloakamt)
end
else
local cloakamt = self:GetCloakLeft()
if cloakmt ~= -1 and cloakamt < cloak.max then
cloakamt = cloakamt + FrameTime() * cloak.rechargeRate
if cloakamt > cloak.max then
cloakamt = cloak.max
end
self:SetCloakLeft(cloakamt)
end
end
local color = self:GetPuppet():GetColor()
if self.iscloaked then
if color.a > 0 then
color.a = color.a - 5
self:GetPuppet():SetColor(color)
end
else
if color.a < 255 then
color.a = color.a + 5
self:GetPuppet():SetColor(color)
end
end
--PrintTable(color)
if IsValid(self.wepmdl) and self.wepmdl:GetColor().a ~= color.a then
self.wepmdl:SetColor(color)
end
end
--if !IsValid(ply) then self:NextThink(CurTime()) return true end
--wepon-no longer SO hackey
if not self.formTable.hideWeapons then
local realWep = self:GetPillUser():GetActiveWeapon()
--&&self:GetPillUser()!=ply or pk_pills.var_thirdperson:GetBool()) then
if IsValid(realWep) and realWep:GetModel() ~= "" then
--hiding the real thing [BROKEN]
--[[if realWep:GetRenderMode()!=RENDERMODE_NONE then
realWep:SetRenderMode(RENDERMODE_NONE)
end]]
if realWep.pill_attachment then
if IsValid(self.wepmdl) then
self.wepmdl:Remove()
end
self.wepmdl = ents.Create("pill_attachment_wep")
self.wepmdl:SetParent(self:GetPuppet())
self.wepmdl:SetModel(realWep:GetModel())
self.wepmdl.attachment = realWep.pill_attachment
self.wepmdl:Spawn()
if realWep.pill_offset then
self.wepmdl:SetWepOffset(realWep.pill_offset)
end
if realWep.pill_angle then
self.wepmdl:SetWepAng(realWep.pill_angle)
end
realWep.pill_proxy = self.wepmdl
elseif not IsValid(self.wepmdl) then
self.wepmdl = ents.Create("pill_attachment_wep")
self.wepmdl:SetParent(self:GetPuppet())
self.wepmdl:SetModel(realWep:GetModel())
self.wepmdl:Spawn()
realWep.pill_proxy = self.wepmdl
elseif self.wepmdl:GetModel() ~= realWep:GetModel() then
self.wepmdl:SetModel(realWep:GetModel())
end
elseif IsValid(self.wepmdl) then
self.wepmdl:Remove()
end
end
else
if self:GetPillUser() ~= LocalPlayer() or pk_pills.convars.cl_thirdperson:GetBool() then
puppet:SetNoDraw(false)
else
puppet:SetNoDraw(true)
end
local realWep = self:GetPillUser():GetActiveWeapon()
if IsValid(realWep) and realWep:GetModel() ~= "" and not realWep:GetNoDraw() then
realWep:SetNoDraw(true)
end
end
--Align pos and angles with player
if SERVER then
puppet:SetPos(ply:GetPos())
else
puppet:SetRenderOrigin(ply:GetPos())
end
if vel > 0 or math.abs(math.AngleDifference(puppet:GetAngles().y, ply:EyeAngles().y)) > 60 then
local angs = ply:EyeAngles()
angs.p = 0
if SERVER then
puppet:SetAngles(angs)
else
--puppet:SetAngles(angs)
puppet:SetRenderAngles(angs)
end
end
self:NextThink(CurTime())
return true
end
if SERVER then
function ENT:DoKeyPress(ply, key)
if self.animFreeze then return end
if self:GetChargeTime() ~= 0 then
self:SetChargeTime(0)
self:PillLoopStop("charge")
return
end
if key == IN_ATTACK and self.formTable.attack and self.formTable.attack.mode == "trigger" then
self.formTable.attack.func(ply, self, self.formTable.attack)
end
if key == IN_ATTACK2 and self.formTable.attack2 and self.formTable.attack2.mode == "trigger" then
self.formTable.attack2.func(ply, self, self.formTable.attack2)
end
if key == IN_RELOAD and self.formTable.reload then
self.formTable.reload(ply, self)
end
if key == IN_DUCK then
if self.formTable.canBurrow then
if not self.burrowed then
local trace = util.QuickTrace(ply:GetPos(), Vector(0, 0, -1), ply)
if trace.Hit and (trace.MatType == MAT_DIRT or trace.MatType == MAT_SAND or trace.MatType == MAT_GRASS) then
self:PillAnim("burrow_in")
self:PillSound("burrow_in")
ply:SetLocalVelocity(Vector(0, 0, 0))
ply:SetMoveType(MOVETYPE_NONE)
ply:SetNotSolid(true)
self.burrowed = true
self:GetPuppet():DrawShadow(false)
--local p=ply: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:PillSound("burrow")
--ent:PillLoopStopAll()
end
else
self:PillAnim("burrow_out")
self:PillSound("burrow_out")
ply:SetMoveType(MOVETYPE_WALK)
ply:SetNotSolid(false)
self.burrowed = nil
self:GetPuppet():DrawShadow(true)
end
end
end
end
function ENT:DoJump()
if self.formTable.jump then
self.formTable.jump(self:GetPillUser(), self)
end
end
function ENT:PillDie()
local ply = self:GetPillUser()
if self.formTable.die then
self.formTable.die(ply, self)
end
self:PillSound("die")
if IsValid(self:GetPuppet()) and not self.formTable.noragdoll then
local r = ents.Create("prop_ragdoll")
r:SetModel(self.subModel or self:GetPuppet():GetModel())
r:SetPos(ply:GetPos())
r:SetAngles(ply:GetAngles())
--r:SetOwner(ply)
r:Spawn()
r:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
r:Fire("FadeAndRemove", nil, 10)
end
self:Remove()
pk_pills.handeDeathCommon(self)
end
--[[function ENT:PillDie()
if self.dead then return end
self:GetPillUser():KillSilent()
if self.formTable.die then
self.formTable.die(self:GetPillUser(),self)
end
self:PillSound("die")
self:Remove()
self.dead=true
end]]
function ENT:PillAnim(name, freeze)
self.anim = name
self.animStart = true
self.animFreeze = true
end
function ENT:PillAnimTick(name)
self.tickAnim = name
end
function ENT:PillGesture(name)
local ply = self:GetPillUser()
local puppet = self:GetPuppet()
if not IsValid(puppet) then return end
local anims = table.Copy(self.formTable.anims.default or {})
table.Merge(anims, IsValid(ply:GetActiveWeapon()) and self.formTable.anims[ply:GetActiveWeapon():GetHoldType()] or {})
local gesture = anims["g_" .. name]
if gesture then
puppet:RestartGesture(puppet:GetSequenceActivity(puppet:LookupSequence(gesture)))
end
end
function ENT:PillChargeAttack()
if not self:GetPillUser():OnGround() or self.burrowed then return end
self:PillAnim("charge_start", true)
self:PillSound("charge_start")
local function doStart()
if not IsValid(self) then return end
self:SetChargeTime(CurTime())
local angs = self:GetPillUser():EyeAngles()
angs.p = 0
self:SetChargeAngs(angs)
self:PillLoopSound("charge")
end
if self.formTable.charge.delay then
timer.Simple(self.formTable.charge.delay, doStart)
else
doStart()
end
end
function ENT:PillFilterCam(ent)
net.Start("pk_pill_filtercam")
net.WriteEntity(self)
net.WriteEntity(ent)
net.Send(self:GetPillUser())
end
else
function ENT:GetPillHealth()
return self:GetPillUser():Health()
end
end
--The "bulk" parameter should only be used if you plan to play a ton of sounds in quick succession.
function ENT:PillSound(name, bulk)
if not self.formTable.sounds then return end
local s = self.formTable.sounds[name]
if (istable(s)) then
s = table.Random(s)
end
if isstring(s) then
if bulk then
sound.Play(s, self:GetPos(), self.formTable.sounds[name .. "_level"] or (name == "step" and 75 or 100), self.formTable.sounds[name .. "_pitch"] or 100, 1)
else
self:EmitSound(s, self.formTable.sounds[name .. "_level"] or (name == "step" and 75 or 100), self.formTable.sounds[name .. "_pitch"] or 100)
end
return true
end
end
function ENT:PillLoopSound(name, volume, pitch)
if not self.loopingSounds[name] then return end
local s = self.loopingSounds[name]
if s:IsPlaying() then
if volume then
s:ChangeVolume(volume)
end
if pitch then
s:ChangePitch(pitch, .1)
end
else
if volume or pitch then
s:PlayEx(volume or 1, pitch or 100)
else
s:Play()
end
end
end
function ENT:PillLoopStop(name)
if not self.loopingSounds[name] then return end
local s = self.loopingSounds[name]
s:FadeOut(.1)
end
function ENT:PillLoopStopAll()
if self.loopingSounds then
for _, v in pairs(self.loopingSounds) do
v:Stop()
end
end
end
function ENT:ToggleCloak()
local ply = self:GetPillUser()
if self.iscloaked then
self.iscloaked = nil
self:PillSound("uncloak")
pk_pills.setAiTeam(ply, self.formTable.side or "default")
else
local cloakleft = self:GetCloakLeft()
if cloakleft > 0 or cloakleft == -1 then
self.iscloaked = true
self:PillSound("cloak")
pk_pills.setAiTeam(ply, "harmless")
end
end
end
function ENT:Draw()
--Align pos and angles with player
--[[local puppet = self:GetPuppet()
local ply = self:GetPillUser()
local vel=ply:GetVelocity():Length()
if IsValid(puppet) then
puppet:SetRenderOrigin(ply:GetPos())
if vel>0||math.abs(math.AngleDifference(puppet:GetAngles().y,ply:EyeAngles().y))>60 then
local angs=ply:EyeAngles()
angs.p=0
puppet:SetRenderAngles(angs)
end
end
puppet:DrawModel()]]
end

View File

@@ -0,0 +1,602 @@
--[[
| 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()
ENT.Type = "anim"
ENT.AutomaticFrameAdvance = true
function ENT:SetupDataTables()
self:NetworkVar("String", 0, "PillForm")
self:NetworkVar("Entity", 0, "PillUser")
--self:NetworkVar("Int",0,"PillHealth")
self:NetworkVar("Entity", 1, "PillAimEnt")
end
function ENT:SetPillHealth(h)
local ply = self:GetPillUser()
if IsValid(ply) then
ply:SetHealth(h)
end
end
function ENT:GetPillHealth(h)
local ply = self:GetPillUser()
if IsValid(ply) then return ply:Health() end
end
function ENT:Initialize()
pk_pills.mapEnt(self:GetPillUser(), self)
self.formTable = pk_pills.getPillTable(self:GetPillForm())
local ply = self:GetPillUser()
if not self.formTable or not IsValid(ply) then
self:Remove()
return
end
ply:SetRenderMode(RENDERMODE_NONE)
if SERVER then
local model = self.formTable.model
local skin = self.formTable.skin
local visMat = self.formTable.visMat
if self.formTable.options then
local options = self.formTable.options()
if self.option and options[self.option] then
local pickedOption = options[self.option]
if pickedOption.model then
model = pickedOption.model
end
if pickedOption.skin then
skin = pickedOption.skin
end
if pickedOption.visMat then
visMat = pickedOption.visMat
end
else
local pickedOption = table.Random(options)
if not model then
model = pickedOption.model
end
if not skin then
skin = pickedOption.skin
end
if not visMat then
visMat = pickedOption.visMat
end
end
end
self:SetModel(model or "models/props_junk/watermelon01.mdl")
if skin then
self:SetSkin(skin)
end
--Physics
if self.formTable.sphericalPhysics then
self:PhysicsInitSphere(self.formTable.sphericalPhysics)
self:GetPhysicsObject():SetMass(250)
elseif self.formTable.boxPhysics then
self:PhysicsInitBox(self.formTable.boxPhysics[1], self.formTable.boxPhysics[2])
self:GetPhysicsObject():SetMass(250)
else
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
end
if self.formTable.spawnFrozen then
self:GetPhysicsObject():EnableMotion(false)
end
ply:DeleteOnRemove(self)
--ply:PhysicsInit(SOLID_NONE)
ply:SetMoveType(MOVETYPE_NONE)
ply:SetSolid(SOLID_NONE)
ply:GodEnable()
ply:SetArmor(0)
ply:StripWeapons()
ply:RemoveAllAmmo()
if ply:FlashlightIsOn() then
ply:Flashlight(false)
end
pk_pills.setAiTeam(ply, "harmless")
if self.formTable.health then
ply:SetHealth(self.formTable.health)
ply:SetMaxHealth(self.formTable.health)
end
local phys = self:GetPhysicsObject()
if IsValid(phys) then
phys:Wake()
if self.formTable.physMat then
phys:SetMaterial(self.formTable.physMat)
end
end
self.drive = {
functions = pk_pills.getDrive(self.formTable.driveType),
options = self.formTable.driveOptions
}
self.loopingSounds = {}
if self.formTable.sounds then
for k, v in pairs(self.formTable.sounds) do
if v == false then continue end
if string.sub(k, 1, 5) == "loop_" then
self.loopingSounds[string.sub(k, 6)] = CreateSound(self, v)
elseif string.sub(k, 1, 5) == "auto_" and isstring(v) then
local func
func = function()
if IsValid(self) then
local f = self.formTable.sounds[k .. "_func"]
if not f then return end
local play, time = f(ply, self)
if play then
self:PillSound(k)
end
timer.Simple(time, func)
end
end
func()
end
end
if self.loopingSounds.move and not self.formTable.moveSoundControl then
self:PillLoopSound("move")
end
end
--[[if self.formTable.health then
self:SetPillHealth(self.formTable.health)
end]]
if self.formTable.seqInit then
self:PillAnim(self.formTable.seqInit, true)
end
if visMat then
self:SetMaterial(visMat)
end
if self.formTable.subMats then
for k, v in pairs(self.formTable.subMats) do
self:SetSubMaterial(k, v)
end
end
if self.formTable.modelScale then
self:SetModelScale(self.formTable.modelScale, .1)
end
if self.formTable.trail then
local t = self.formTable.trail
local start = t.width or 40
local endd = start / 2
util.SpriteTrail(self, 0, t.color or Color(255, 255, 255), false, start, endd, t.length or 4, 1 / (start + endd) * .5, t.texture)
end
if self.formTable.bodyGroups then
for _, v in pairs(self.formTable.bodyGroups) do
self:SetBodygroup(v, 1)
end
end
local mins, maxs = self:GetCollisionBounds()
local points = {Vector(mins.x, 0, 0), Vector(0, mins.y, 0), Vector(0, 0, mins.z), Vector(maxs.x, 0, 0), Vector(0, maxs.y, 0), Vector(0, 0, maxs.z)}
self:AddFlags(FL_OBJECT)
pk_pills.setAiTeam(self, self.formTable.side or "default")
self:SetOwner(ply)
--self:SetPhysicsAttacker(ply)
self:SetPlaybackRate(1)
else
if ply == LocalPlayer() then
--Compatibility with gm+
if gmp and gmp.Enabled:GetBool() then
ply.pk_pill_gmpEnabled = true
--RunConsoleCommand("gmp_enabled","0")
end
--Compatibility with Gmod Legs
--ply.ShouldDisableLegs=true
self.camTraceFilter = {self}
end
end
end
function ENT:PhysicsUpdate()
if SERVER and self.drive.functions then
self.drive.functions.think(self:GetPillUser(), self, self.drive.options)
end
end
function ENT:OnRemove()
local ply = self:GetPillUser()
if SERVER then
self:PillLoopStopAll()
end
if not pk_pills.unmapEnt(self:GetPillUser(), self) then
if SERVER then
pk_pills.setAiTeam(ply, "default")
ply:SetRenderMode(RENDERMODE_NORMAL)
if not self.dead then
local angs = ply:EyeAngles()
ply:Spawn()
ply:SetEyeAngles(angs)
ply:SetPos(self:GetPos())
local phys = self:GetPhysicsObject()
if phys:IsValid() then
ply:SetVelocity(phys:GetVelocity())
end
else
ply:KillSilent()
end
else
if ply == LocalPlayer() then
if ply.pk_pill_gmpEnabled then
ply.pk_pill_gmpEnabled = nil
end
end
end
end
end
if CLIENT then
--Clientside think hook-used for pose params
function ENT:Think()
if self.formTable then
if self.formTable.renderOffset then
local offset = self.formTable.renderOffset(self:GetPillUser(), self)
self:SetRenderOrigin(self:GetNetworkOrigin() + offset)
end
end
self:NextThink(CurTime())
return true
end
else
function ENT:Think()
local ply = self:GetPillUser()
if not IsValid(ply) then return end
ply:SetPos(self:GetPos())
if self.formTable.pose then
for k, f in pairs(self.formTable.pose) do
local old = self:GetPoseParameter(k)
local new = f(self:GetPillUser(), self, old)
if new then
self:SetPoseParameter(k, new)
end
end
end
if self.formTable.aim and not self.formTable.aim.usesSecondaryEnt or IsValid(self:GetPillAimEnt()) then
local aimEnt = self.formTable.aim.usesSecondaryEnt and self:GetPillAimEnt() or self
if self.formTable.aim.xPose and self.formTable.aim.yPose then
if not self.formTable.canAim or self.formTable.canAim(ply, self) then
local ang = ply:EyeAngles()
local locang = aimEnt:WorldToLocalAngles(ang)
local xOffset = self.formTable.aim.xOffset or 0
if not self.formTable.aim.xInvert then
aimEnt:SetPoseParameter(self.formTable.aim.xPose, math.NormalizeAngle(locang.y + xOffset))
else
aimEnt:SetPoseParameter(self.formTable.aim.xPose, math.NormalizeAngle(-locang.y + xOffset))
end
if not self.formTable.aim.yInvert then
aimEnt:SetPoseParameter(self.formTable.aim.yPose, locang.p)
else
aimEnt:SetPoseParameter(self.formTable.aim.yPose, -locang.p)
end
elseif not self.formTable.useDefAim or self.formTable.useDefAim(ply, self) then
aimEnt:SetPoseParameter(self.formTable.aim.xPose, self.formTable.aim.xDef or 0)
aimEnt:SetPoseParameter(self.formTable.aim.yPose, 0)
end
end
end
if self.formTable.boneMorphs then
for k, v in pairs(self.formTable.boneMorphs) do
local b = self:LookupBone(k)
if b then
if isfunction(v) then
v = v(ply, self)
end
if not istable(v) then continue end
if v.pos then
self:ManipulateBonePosition(b, v.pos)
end
if v.rot then
self:ManipulateBoneAngles(b, v.rot)
end
if v.scale then
self:ManipulateBoneScale(b, v.scale)
end
end
end
end
if self.formTable.moveSoundControl then
local p = self.formTable.moveSoundControl(ply, self)
if p then
self:PillLoopSound("move", nil, p)
else
self:PillLoopStop("move")
end
end
if (self.formTable.damageFromWater and self:WaterLevel() > 1) then
if self.formTable.damageFromWater == -1 then
self:PillDie()
else
--TODO APPLY DAMAGE
end
end
if ply:KeyDown(IN_ATTACK) and self.formTable.attack and self.formTable.attack.mode == "auto" then
if not self.formTable.aim or not self.formTable.aim.usesSecondaryEnt or IsValid(self:GetPillAimEnt()) then
self:PillLoopSound("attack")
else
self:PillLoopStop("attack")
end
if (not self.lastAttack or self.formTable.attack.delay < CurTime() - self.lastAttack) then
self.formTable.attack.func(ply, self, self.formTable.attack)
self.lastAttack = CurTime()
end
else
self:PillLoopStop("attack")
end
if ply:KeyDown(IN_ATTACK2) and self.formTable.attack2 and self.formTable.attack2.mode == "auto" then
if not self.formTable.aim or not self.formTable.aim.usesSecondaryEnt or IsValid(self:GetPillAimEnt()) then
self:PillLoopSound("attack2")
else
self:PillLoopStop("attack2")
end
if not self.lastAttack2 or self.formTable.attack2.delay < CurTime() - self.lastAttack2 then
self.formTable.attack2.func(ply, self, self.formTable.attack2)
self.lastAttack2 = CurTime()
end
else
self:PillLoopStop("attack2")
end
self:NextThink(CurTime())
return true
end
function ENT:DoKeyPress(ply, key)
if self.drive.functions then
self.drive.functions.key(ply, self, self.drive.options, key)
end
if key == IN_ATTACK and self.formTable.attack and self.formTable.attack.mode == "trigger" then
self.formTable.attack.func(ply, self, self.formTable.attack)
end
if key == IN_ATTACK2 and self.formTable.attack2 and self.formTable.attack2.mode == "trigger" then
self.formTable.attack2.func(ply, self, self.formTable.attack2)
end
if key == IN_RELOAD and self.formTable.reload then
self.formTable.reload(ply, self)
end
end
function ENT:StartTouch(TouchEnt)
if not IsValid(TouchEnt:GetPhysicsObject()) then return end
if (TouchEnt:IsPlayer() or TouchEnt:IsNPC() or TouchEnt:GetClass() == "pill_ent_phys") and TouchEnt:GetPhysicsObject():GetMaterial() ~= "metal" then
if self.formTable.contact then
local dmg_amt, dmg_type, dmg_force = self.formTable.contact(self:GetPillUser(), self, TouchEnt)
if dmg_amt then
local dmg = DamageInfo()
dmg:SetDamage(20)
dmg:SetDamagePosition(self:GetPos())
dmg:SetAttacker(self:GetPillUser())
if dmg_type then
dmg:SetDamageType(dmg_type)
end
if dmg_force then
local force_vector = (TouchEnt:GetPos() - self:GetPos())
if self.formTable.contactForceHorizontal then
force_vector.z = 0
end
force_vector:Normalize()
force_vector = force_vector * dmg_force
dmg:SetDamageForce(force_vector)
self:GetPhysicsObject():ApplyForceCenter(-force_vector)
end
TouchEnt:TakeDamageInfo(dmg)
self:PillSound("contact")
end
end
end
end
function ENT:PhysicsCollide(collide, phys)
if self.formTable.collide then
self.formTable.collide(self:GetPillUser(), self, collide)
end
end
function ENT:OnTakeDamage(dmg)
if (self.formTable.diesOnExplode and dmg:GetDamageType() == DMG_BLAST) then
self:PillDie()
end
if self.formTable.health then
if not self.formTable.onlyTakesExplosiveDamage then
local newHealth = self:GetPillHealth() - dmg:GetDamage()
if newHealth <= 0 then
self:PillDie()
else
self:SetPillHealth(newHealth)
end
elseif dmg:GetDamageType() == DMG_BLAST then
local newHealth = self:GetPillHealth() - 1
if newHealth <= 0 then
self:PillDie()
else
self:SetPillHealth(newHealth)
end
end
end
end
function ENT:PillDie()
if self.dead then return end
if self.formTable.die then
self.formTable.die(self:GetPillUser(), self)
end
self:GetPillUser():SetPos(self:GetPos()) --This makes the post-death camera position correctly
self:PillSound("die")
self:Remove()
self.dead = true
pk_pills.handeDeathCommon(self)
end
function ENT:PillAnim(seq, force)
if force then
--self:ResetSequenceInfo()
self:ResetSequence(self:LookupSequence(seq))
else
self:SetSequence(self:LookupSequence(seq))
end
end
function ENT:PillFilterCam(ent)
net.Start("pk_pill_filtercam")
net.WriteEntity(self)
net.WriteEntity(ent)
net.Send(self:GetPillUser())
end
end
--The "bulk" parameter should only be used if you plan to play a ton of sounds in quick succession.
function ENT:PillSound(name, bulk)
if not self.formTable.sounds then return end
local s = self.formTable.sounds[name]
if (istable(s)) then
s = table.Random(s)
end
if isstring(s) then
if bulk then
sound.Play(s, self:GetPos(), self.formTable.sounds[name .. "_level"] or 100, self.formTable.sounds[name .. "_pitch"] or 100, 1)
else
self:EmitSound(s, self.formTable.sounds[name .. "_level"] or 100, self.formTable.sounds[name .. "_pitch"] or 100)
end
return true
end
end
function ENT:PillLoopSound(name, volume, pitch)
if not self.loopingSounds[name] then return end
local s = self.loopingSounds[name]
if s:IsPlaying() then
if volume then
s:ChangeVolume(volume)
end
if pitch then
s:ChangePitch(pitch, .1)
end
else
if volume or pitch then
s:PlayEx(volume or 1, pitch or 100)
else
s:Play()
end
end
end
function ENT:PillLoopStop(name)
if not self.loopingSounds[name] then return end
local s = self.loopingSounds[name]
s:FadeOut(.1)
end
function ENT:PillLoopStopAll()
if not self.loopingSounds then return end
for _, v in pairs(self.loopingSounds) do
v:Stop()
end
end
function ENT:Draw()
if self:GetPillUser() ~= LocalPlayer() or pk_pills.convars.cl_thirdperson:GetBool() then
if self.formTable.sprite then
if not self.spriteMat then
self.spriteMat = Material(self.formTable.sprite.mat)
end
local size = self.formTable.sprite.size or 40
cam.Start3D(EyePos(), EyeAngles())
render.SetMaterial(self.spriteMat)
render.DrawSprite(self:GetPos() + (self.formTable.sprite.offset or Vector(0, 0, 0)), size, size, self.formTable.sprite.color or Color(255, 255, 255))
cam.End3D()
else
self:DrawModel()
end
end
end

View File

@@ -0,0 +1,224 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Hopper"
--[[
Light
0 - None
1 - Blue
2 - Yellow
3 - Green
4 - Red
Legs
0 - Open
1 - Close
2 - Moving
]]
function ENT:Initialize()
if SERVER then
--Physics
self:SetModel("models/props_combine/combine_mine01.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self.armed = false
self.armCounter = 0
self.held = false
self.critical = false
self.friendly = false
self.alertSound = CreateSound(self, "npc/roller/mine/combine_mine_active_loop1.wav")
--self:SetLegs(2)
self:SetLight(1)
end
end
function ENT:SetupDataTables()
self:NetworkVar("Int", 0, "Light")
self:NetworkVar("Int", 1, "Legs")
end
function ENT:Think()
if SERVER then
--CurTime()
if not self.armed and self:GetVelocity():Length() < 10 and not self.held then
local tr = util.QuickTrace(self:GetPos(), Vector(0, 0, -15), self)
if tr.Hit then
if self.armCounter < 5 then
self.armCounter = self.armCounter + 1
else
local trUp = util.QuickTrace(self:GetPos(), self:LocalToWorldAngles(Angle(-90, 0, 0)):Forward() * 15, self)
if trUp.Hit then
self:GetPhysicsObject():ApplyForceCenter(Vector(0, 0, 3000))
self:GetPhysicsObject():AddAngleVelocity(VectorRand() * 500)
self:EmitSound("npc/roller/mine/rmine_blip3.wav", 100, 100)
else
local trDown = util.QuickTrace(self:GetPos(), self:LocalToWorldAngles(Angle(90, 0, 0)):Forward() * 15, self)
if trDown.Hit then
self.armed = true
self:SetLight(0)
self:SetLegs(1)
self:EmitSound("npc/roller/blade_cut.wav", 100, 100)
local weld = constraint.Weld(self, trDown.Entity, 0, 0, 5000, true)
if weld then
weld:CallOnRemove("DeMine", function()
if not self.held and not self.critical then
self:SetLight(1)
self:SetLegs(0)
self.armed = false
end
end)
end
end
end
self.armCounter = 0
end
end
--print("AHH")
end
if self:GetPhysicsObject():HasGameFlag(FVPHYSICS_PLAYER_HELD) ~= self.held then
if not self.held then
self:SetLight(2)
self:SetLegs(2)
self.held = true
self.armed = false
self.friendly = true
self.critical = false
self.alertSound:Stop()
else
--print(self:GetVelocity():Length())
if self:GetVelocity():Length() > 500 then
self:SetLight(4)
self.critical = true
else
self:SetLight(1)
self:SetLegs(0)
end
self.held = false
end
end
if self.armed then
local near = ents.FindInSphere(self:GetPos(), 200)
local goGreen = false
local goRed = false
for _, e in pairs(near) do
local t = pk_pills.getAiTeam(e)
if t then
if t == (self.friendly and "default" or "hl_combine") or t == "harmless" then
goGreen = true
else
goRed = true
if self:GetPos():Distance(e:GetPos()) < 100 then
constraint.RemoveAll(self)
self:SetLight(4)
self:SetLegs(0)
self.alertSound:Stop()
self.critical = true
self:EmitSound("npc/roller/blade_in.wav", 100, 100)
timer.Simple(.01, function()
self:GetPhysicsObject():ApplyForceCenter(Vector(0, 0, 5000) + (e:GetPos() + e:GetVelocity() * .8 - self:GetPos()) * 10)
self:GetPhysicsObject():AddAngleVelocity(VectorRand() * 200)
end)
end
break
end
end
end
if not self.critical then
if goRed then
self:SetLight(4)
self.alertSound:Play()
elseif goGreen then
self:SetLight(3)
self.alertSound:Stop()
else
self:SetLight(0)
self.alertSound:Stop()
end
end
end
else
local legState = self:GetLegs()
local legPose = 65
if legState == 1 then
legPose = 0
elseif legState == 2 then
legPose = (math.sin(CurTime() * 8) + 1) * 32.5
end
self:SetPoseParameter('blendstates', legPose)
end
end
function ENT:PhysicsCollide()
if self.critical then
self:Splode()
end
end
function ENT:Splode()
self:Remove()
local explode = ents.Create("env_explosion")
explode:SetPos(self:GetPos())
explode:Spawn()
--explode:SetOwner(self:GetOwner())
explode:SetKeyValue("iMagnitude", "100")
explode:SetOwner(self:GetOwner())
explode:Fire("Explode", 0, 0)
end
function ENT:Draw()
self:DrawModel()
local lightState = self:GetLight()
local lightColor
if lightState == 1 then
lightColor = Color(0, 0, 255)
elseif lightState == 2 then
lightColor = Color(255, 255, 0)
elseif lightState == 3 then
lightColor = Color(0, 255, 0)
elseif lightState == 4 then
lightColor = Color(255, 0, 0)
end
if lightColor then
--print("draw")
--PrintTable(lightColor)
cam.Start3D(EyePos(), EyeAngles())
render.SetMaterial(Material("sprites/light_glow02_add"))
render.DrawSprite(self:LocalToWorld(Vector(0, 0, 12)), 64, 64, lightColor) --color
cam.End3D()
end
end

View File

@@ -0,0 +1,96 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
ENT.Type = "anim"
ENT.PrintName = "Combine Jumper"
ENT.AutomaticFrameAdvance = true
function ENT:Initialize()
if SERVER then
--Physics
--self:SetModel("models/combine_soldier.mdl")
self:PhysicsInit(SOLID_BBOX)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_BBOX)
--self.myNpc="npc_combine_s"
--self.myWeapon="weapon_smg1"
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self.dropping = false
self.falltime = 0
self:ResetSequence(self:LookupSequence("dropship_deploy"))
timer.Simple(2.4, function()
if not IsValid(self) then return end
self:SetParent()
self:PhysicsInit(SOLID_BBOX)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:SetSequence(self:LookupSequence("jump_holding_glide"))
self.dropping = true
end)
end
end
function ENT:Think()
if SERVER then
if self.dropping then
self.falltime = self.falltime + 1
local tr = util.QuickTrace(self:GetPos(), Vector(0, 0, -15), self)
if tr.Hit then
local dude = ents.Create(self.myNpc)
dude:SetModel(self:GetModel())
dude:SetSkin(self:GetSkin())
dude:SetPos(self:GetPos())
dude:SetAngles(Angle(0, self:GetAngles().y, 0))
dude:SetKeyValue("additionalequipment", self.myWeapon)
dude:Spawn()
if self.falltime > 50 then
dude:GetActiveWeapon():Remove()
dude:Fire("BecomeRagdoll", "", 0)
else
local p = self:GetPos() + self:GetForward() * 300 + Vector(math.random(-200, 200), math.random(-200, 200), 0)
timer.Simple(.1, function()
if not IsValid(dude) then return end
dude:SetSchedule(SCHED_FORCED_GO)
end)
end
self:Remove()
end
end
end
self:NextThink(CurTime())
return true
end
function ENT:Draw()
if IsValid(self:GetParent()) then
self:SetRenderOrigin(self:GetParent():LocalToWorld(self:GetNetworkOrigin() + Vector(-200, 0, 0) * (1 - self:GetCycle())))
else
self:SetRenderOrigin(self:GetNetworkOrigin())
end
self:DrawModel()
end

View File

@@ -0,0 +1,49 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Headcrab Jumper"
ENT.AutomaticFrameAdvance = true
function ENT:Initialize()
if SERVER then
--Physics
self:SetModel("models/headcrabblack.mdl")
self:PhysicsInit(SOLID_BBOX)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_BBOX)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:ResetSequence(self:LookupSequence("drown"))
end
end
function ENT:Think()
if SERVER then
local tr = util.QuickTrace(self:GetPos(), Vector(0, 0, -15), self)
if tr.Hit then
local crab = ents.Create("npc_headcrab_black")
crab:SetPos(self:GetPos())
crab:SetAngles(Angle(0, self:GetAngles().y, 0))
crab:Spawn()
self:Remove()
end
end
self:NextThink(CurTime())
return true
end

View File

@@ -0,0 +1,46 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Rocket"
function ENT:Initialize()
if SERVER and self.particle then
ParticleEffectAttach(self.particle, PATTACH_ABSORIGIN_FOLLOW, self, 0)
end
end
if SERVER then
function ENT:Think()
if self.stuck then return end
local tr = util.QuickTrace(self:GetPos(), self:GetAngles():Forward() * (self.speed or 3000) * FrameTime(), {self, self:GetOwner()})
if tr.HitWorld then
self:StopParticles()
self.stuck = true
timer.Simple(10, function()
if IsValid(self) then
self:Remove()
end
end)
elseif tr.Hit then
tr.Entity:TakeDamage(self.damage, self:GetOwner(), self)
self:Remove()
end
self:SetPos(tr.HitPos)
self:SetAngles(self:GetAngles() + Angle(12, 0, 0) * FrameTime())
self:NextThink(CurTime())
return true
end
end

View File

@@ -0,0 +1,122 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Bomb"
function ENT:SetupDataTables()
self:NetworkVar("String", 0, "Particle")
end
function ENT:Initialize()
if SERVER then
if self.sphere then
self:PhysicsInitSphere(self.sphere)
else
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
end
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
phys:EnableDrag(false)
phys:SetDamping(0, 0)
phys:SetVelocity(self:GetAngles():Forward() * (self.speed or 1000))
end
if self.sticky then
self:SetCustomCollisionCheck(true)
end
timer.Simple(self.fuse or 3, function()
if IsValid(self) then
if self.sticky then
self.armed = true
ParticleEffect("stickybomb_pulse_red", self:GetPos(), Angle(0, 0, 0))
else
self:Remove()
end
end
end)
end
if self:GetParticle() ~= "" then
ParticleEffectAttach(self:GetParticle(), PATTACH_ABSORIGIN_FOLLOW, self, 0)
end
end
function ENT:OnRemove()
if SERVER then
if self.sticky and not self.armed then return end
if self.tf2 then
ParticleEffect("ExplosionCore_MidAir", self:GetPos(), Angle(0, 0, 0))
self:EmitSound("weapons/explode1.wav")
util.BlastDamage(self, self:GetOwner(), self:GetPos(), 100, 100)
else
local explode = ents.Create("env_explosion")
explode:SetPos(self:GetPos())
explode:Spawn()
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
explode:SetOwner(self:GetOwner())
end
end
end
function ENT:Think()
if SERVER and self.sticky then
if not IsValid(self:GetOwner()) or not self:GetOwner():Alive() then
self.armed = false
self:Remove()
end
if self.armed and self:GetOwner():KeyDown(IN_ATTACK2) then
self:Remove()
end
self:NextThink(CurTime())
return true
end
end
function ENT:StartTouch(ent)
if not self.sticky and (ent:IsNPC() or ent:IsPlayer() or ent:GetClass() == "pill_ent_phys") then
self:Remove()
end
end
function ENT:PhysicsCollide(colData, collider)
if self.sticky and self:GetPhysicsObject():IsMotionEnabled() then
self:GetPhysicsObject():EnableMotion(false)
if not colData.HitEntity:IsWorld() then
self:SetParent(colData.HitEntity)
end
end
end
hook.Add("ShouldCollide", "pk_pill_bomberman", function(bomb, other)
if bomb:GetClass() == "pill_proj_bomb" then
elseif other:GetClass() == "pill_proj_bomb" then
local temp = bomb
bomb = other
other = temp
else
return
end
if other:GetClass() == "pill_proj_bomb" or other:IsNPC() or other:IsPlayer() then return false end
end)

View File

@@ -0,0 +1,40 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Energy Grenade"
function ENT:Initialize()
if SERVER then
--Physics
self:SetModel("models/items/ar2_grenade.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
util.SpriteTrail(self, 0, Color(255, 0, 255), true, 15, 1, 5, 1 / (15 + 1) * 0.5, "trails/physbeam.vmt")
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
phys:SetVelocity(self:GetAngles():Forward() * 1200)
end
end
end
function ENT:PhysicsCollide(collide, phys)
self:Remove()
local explode = ents.Create("env_explosion")
explode:SetPos(self:GetPos())
explode:Spawn()
explode:SetOwner(self:GetOwner())
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
end

View File

@@ -0,0 +1,51 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Prop Projectile"
function ENT:Initialize()
if SERVER then
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
phys:EnableGravity(false)
phys:EnableDrag(false)
phys:SetDamping(0, 0)
phys:SetVelocity(self:GetAngles():Forward() * 3000)
end
if self.sound then
self.flySound = CreateSound(self, self.sound)
self.flySound:Play()
end
if self.trail then
util.SpriteTrail(self, 0, self.tcolor or Color(255, 255, 255), false, 40, 10, 5, 1 / 100, self.trail)
end
timer.Simple(10, function()
if IsValid(self) then
self:Remove()
end
end)
end
end
function ENT:OnRemove()
if SERVER and self.flySound then
self.flySound:Stop()
end
end

View File

@@ -0,0 +1,114 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
ENT.Type = "anim"
ENT.PrintName = "Rocket"
function ENT:SetupDataTables()
self:NetworkVar("String", 0, "Particle")
end
function ENT:Initialize()
if SERVER then
if not self.noPhys then
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
end
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
phys:EnableGravity(false)
phys:EnableDrag(false)
phys:SetDamping(0, 0)
phys:SetVelocity(self:GetAngles():Forward() * (self.speed or 3000))
end
if self.sound then
self.flySound = CreateSound(self, self.sound)
self.flySound:Play()
end
if self.trail then
util.SpriteTrail(self, 0, self.tcolor or Color(255, 255, 255), false, 40, 10, 5, 1 / 100, self.trail)
end
end
if self:GetParticle() ~= "" then
ParticleEffectAttach(self:GetParticle(), PATTACH_ABSORIGIN_FOLLOW, self, 0)
end
end
if SERVER then
function ENT:Think()
local tr
if self.noPhys then
tr = util.QuickTrace(self:GetPos(), self:GetAngles():Forward() * (self.speed or 3000) * FrameTime(), {self, self.shooter})
end
if self:WaterLevel() > 0 or tr and tr.Hit then
if self.altExplode then
ParticleEffect(self.altExplode.particle, self:GetPos(), Angle(0, 0, 0))
self:EmitSound(self.altExplode.sound)
util.BlastDamage(self, self:GetOwner(), self:GetPos(), 100 * (self.radmod or 1), 100 * (self.dmgmod or 1))
else
local explode = ents.Create("env_explosion")
explode:SetPos(self:GetPos())
--explode:SetOwner(ply)
explode:Spawn()
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
explode:SetOwner(self:GetOwner())
end
self:Remove()
end
if tr then
self:SetPos(tr.HitPos)
if self.spin then
self:SetAngles(self:GetAngles() + Angle(0, 0, 180) * FrameTime())
end
end
self:NextThink(CurTime())
return true
end
end
function ENT:OnRemove()
if SERVER and self.flySound then
self.flySound:Stop()
end
end
function ENT:PhysicsCollide(data, physobj)
if self.altExplode then
ParticleEffect(self.altExplode.particle, self:GetPos(), Angle(0, 0, 0))
self:EmitSound(self.altExplode.sound)
util.BlastDamage(self, self:GetOwner(), self:GetPos(), 100 * (self.radmod or 1), 100 * (self.dmgmod or 1))
else
local explode = ents.Create("env_explosion")
explode:SetPos(self:GetPos())
--explode:SetOwner(ply)
explode:Spawn()
explode:SetKeyValue("iMagnitude", "100")
explode:Fire("Explode", 0, 0)
explode:SetOwner(self:GetOwner())
end
self:Remove()
end

View File

@@ -0,0 +1,25 @@
--[[
| 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()
ENT.Type = "ai"
ENT.Base = "base_entity"
function ENT:Initialize()
self:SetRenderMode(RENDERMODE_TRANSALPHA)
end
function ENT:Draw()
self:DrawModel()
end
function ENT:DrawTranslucent()
self:Draw()
end

View File

@@ -0,0 +1,165 @@
--[[
| 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()
ENT.Type = "anim"
function ENT:Initialize()
self:SetModel("models/props_junk/PopCan01a.mdl")
self:DrawShadow(false)
if SERVER then
self:SetName("pill_target_" .. self:EntIndex())
end
end
function ENT:Draw()
end
--[[
function ENT:SetupDataTables()
self:NetworkVar("Entity",0,"Owner")
end
function ENT:Initialize()
local owner = self:GetOwner()
owner.pill_cam = self
if SERVER then
owner:SetViewEntity(self)
self:SetPos(owner:GetPos())
self:SetParent(owner)
end
end
function ENT:Think()
local owner = self:GetOwner()
local ent = pk_pills.getMappedEnt(owner)
if IsValid(ent) then
if CLIENT then
local mv_diff = owner:GetPos()-owner:GetNetworkOrigin()
local startpos
if ent.formTable.type=="phys" then
startpos = ent:LocalToWorld(ent.formTable.camera&&ent.formTable.camera.offset||Vector(0,0,0))
else
startpos=owner:EyePos()
end
//startpos=startpos-mv_diff
local angles = owner:EyeAngles()
if pk_pills.var_thirdperson:GetBool() then
local dist
if ent.formTable.type=="phys"&&ent.formTable.camera&&ent.formTable.camera.distFromSize then
dist = ent:BoundingRadius()*5
else
dist = ent.formTable.camera&&ent.formTable.camera.dist||100
end
local offset = LocalToWorld(Vector(-dist,0,dist/5),Angle(0,0,0),Vector(0,0,0),angles)
local basevel
if ent.formTable.type=="phys" then
basevel=ent:GetVelocity()
else
basevel = owner:GetVelocity()
end
local tr = util.TraceHull({
start=startpos,
endpos=startpos+offset,
filter=ent.camTraceFilter,
mins=Vector(-10,-10,-10),
maxs=Vector(10,10,10),
mask=MASK_VISIBLE
})
//PrintTable(ent.camTraceFilter)
local troffset = -tr.HitNormal:Dot(basevel*FrameTime())*1.2
self:SetNetworkOrigin(tr.HitPos+tr.HitNormal*troffset)
//view.vm_origin = view.origin+view.angles:Forward()*-500
else
self:SetNetworkOrigin(startpos)
end
self:SetAngles(angles)
else
//self:SetNetworkOrigin(ent:GetPos())
end
elseif SERVER then
self:Remove()
owner.pill_cam=nil
if SERVER then
owner:SetViewEntity()
end
end
self:NextThink(CurTime())
return true
end
/*
hook.Add("Think","pk_pill_cam_position",function()
local camera = CLIENT and LocalPlayer().pill_cam
if IsValid(camera) then
camera:MoveCam()
end
end)
function ENT:MoveCam()
local owner = self:GetOwner()
local ent = pk_pills.getMappedEnt(owner)
if IsValid(ent) then
//if CLIENT then
local startpos
if ent.formTable.type=="phys" then
startpos = ent:LocalToWorld(ent.formTable.camera&&ent.formTable.camera.offset||Vector(0,0,0))
else
startpos=owner:EyePos()
end
local angles = owner:EyeAngles()
if pk_pills.var_thirdperson:GetBool() then
local dist
if ent.formTable.type=="phys"&&ent.formTable.camera&&ent.formTable.camera.distFromSize then
dist = ent:BoundingRadius()*5
else
dist = ent.formTable.camera&&ent.formTable.camera.dist||100
end
local offset = LocalToWorld(Vector(-dist,0,dist/5),Angle(0,0,0),Vector(0,0,0),angles)
local tr = util.TraceHull({
start=startpos,
endpos=startpos+offset,
filter=ent.camTraceFilter,
mins=Vector(-5,-5,-5),
maxs=Vector(5,5,5),
mask=MASK_VISIBLE
})
//PrintTable(ent.camTraceFilter)
self:SetNetworkOrigin(tr.HitPos)
//view.vm_origin = view.origin+view.angles:Forward()*-500
else
self:SetNetworkOrigin(startpos)
end
self:SetAngles(angles)
//end
end
end
]]

View File

@@ -0,0 +1,72 @@
--[[
| 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()
ENT.Type = "anim"
ENT.PrintName = "Pill World Entity"
function ENT:SetupDataTables()
self:NetworkVar("String", 0, "PillForm")
end
function ENT:Initialize()
if SERVER then
--Physics
self:SetModel("models/Items/combine_rifle_ammo01.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
self:SetUseType(SIMPLE_USE)
if self.DarkRPItem then
self:SetPillForm(self.DarkRPItem.pill)
end
else
self.mat = Material("pills/" .. self:GetPillForm() .. ".png")
self.randoff = math.Rand(0, 10)
end
end
if SERVER then
function ENT:Use(ply)
if pk_pills.convars.preserve:GetBool() then
local ent = pk_pills.getMappedEnt(ply)
if IsValid(ent) then return end
end
ply:EmitSound("weapons/bugbait/bugbait_squeeze1.wav")
pk_pills.apply(ply, self:GetPillForm())
self:Remove()
end
function ENT:Think()
if self:WaterLevel() > 0 then
self:EmitSound("weapons/underwater_explode3.wav")
self:Remove()
end
end
end
function ENT:Draw()
self:DrawModel()
local ang = LocalPlayer():EyeAngles()
ang.p = 0
cam.Start3D2D(self:GetPos(), ang + Angle(-0, -90, 90), 1)
surface.SetDrawColor(255, 255, 255)
surface.SetMaterial(self.mat)
surface.DrawTexturedRect(-10, TimedSin(1, 0, 3, self.randoff) - 30, 20, 20)
cam.End3D2D()
end

View File

@@ -0,0 +1,13 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
print("MOMO MODULE DEPRECATED!")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
--[[
| 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()
-- Convars
pk_pills.convars = {}
-- Admin vars
pk_pills.convars.admin_restrict = CreateConVar("pk_pill_admin_restrict", game.IsDedicated() and 1 or 0, FCVAR_REPLICATED + FCVAR_NOTIFY, "Restrict morphing to admins.")
pk_pills.convars.admin_anyweapons = CreateConVar("pk_pill_admin_anyweapons", 0, FCVAR_REPLICATED, "Allow use of any weapon when morphed.")
pk_pills.convars.preserve = CreateConVar("pk_pill_preserve", 0, FCVAR_REPLICATED, "Makes player spit out pills when they unmorph or die.")
-- Client vars
if CLIENT then
pk_pills.convars.cl_thirdperson = CreateClientConVar("pk_pill_cl_thirdperson", 1)
pk_pills.convars.cl_hidehud = CreateClientConVar("pk_pill_cl_hidehud", 0)
end
-- Admin var setter command.
if SERVER then
local function admin_set(ply, cmd, args)
if not ply then
print("If you are using the server console, you should set the variables directly!")
return
end
if not ply:IsSuperAdmin() then
ply:PrintMessage(HUD_PRINTCONSOLE, "You must be a super admin to use this command.")
return
end
local var = args[1]
local value = args[2]
if not var then
if ply then
ply:PrintMessage(HUD_PRINTCONSOLE, "Please supply a valid convar name. Do not include 'pk_pill_admin_'.")
end
return
elseif not ConVarExists("pk_pill_admin_" .. var) then
ply:PrintMessage(HUD_PRINTCONSOLE, "Convar 'pk_pill_admin_" .. var .. "' does not exist. Please supply a valid convar name. Do not include 'pk_pill_admin_'.")
return
end
if not value then
ply:PrintMessage(HUD_PRINTCONSOLE, "Please supply a value to set the convar to.")
return
end
RunConsoleCommand("pk_pill_admin_" .. var, value)
end
concommand.Add("pk_pill_admin_set", admin_set, nil, "Helper command for setting Morph Mod admin convars. Available to super admins.")
end

View File

@@ -0,0 +1,19 @@
--[[
| 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()
if CLIENT then
function pk_pills.join_prompt(name, addr)
Derma_Query("Are you sure you want to join '" .. name .. "'?\nWARNING: You will exit your current game!", "", "Yes", function()
LocalPlayer():ConCommand("connect " .. addr)
end, "No")
end
end

View File

@@ -0,0 +1,66 @@
--[[
| 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()
custom={}
if SERVER then
function custom.meleeEx(ply,ent,tbl)
-- Small edit that can use a custom dmgType and doesn't force an animation, for morphs with multiple attacks in a single anim
if !ply:IsOnGround() then return end
timer.Simple(tbl.delay,function() if !IsValid(ent) then return end
if !IsValid(ent) then return end
if ply:TraceHullAttack(ply:EyePos(), ply:EyePos()+ply:EyeAngles():Forward()*tbl.range,
Vector(-10,-10,-10),Vector(10,10,10),tbl.dmg,tbl.dmgType,0.1,true) then
ent:PillSound("melee_hit")
else
ent:PillSound("melee_miss")
end
end)
end
function custom.LocoAnim(ply,ent,anim)
-- New function that uses animation locomotion (ish)
if !ply:IsOnGround() then return end
ent:PillAnim(anim,true)
local seq,dur = ent:GetPuppet():LookupSequence(ent.formTable.anims.default[anim])
local ga,gb,gc = ent:GetPuppet():GetSequenceMovement(seq,0,1)
if not ga then print("ga failed") return end -- The animation has no locomotion or it's invalid or we failed in some other way.
local pos = ply:GetPos()
local trin = {}
trin.maxs = Vector(16, 16, 72)
trin.mins = Vector(-16, -16, 0)
trin.start = ply:EyePos()
trin.endpos = gb
trin.filter = {ply, ent, ent:GetPuppet()}
local trout = util.TraceHull(trin)
local gd_prev = ent:GetPuppet():GetCycle()
for i=1,dur*1000 do
timer.Simple(0.001*i,function()
if !IsValid(ent) then return end
if ply:GetPos() == trout.HitPos then return end -- Avoid going through walls if possible chief.
local gd_cur = ent:GetPuppet():GetCycle()
local ga2,gb2,gc2 = ent:GetPuppet():GetSequenceMovement(seq,gd_prev,gd_cur)
gd_prev = gd_cur
if not ga2 then print("ga failed") return end
if gd_cur==0 then return end
if !util.IsInWorld(ply:LocalToWorld(gb2)) then return end
ply:SetPos(ply:LocalToWorld(gb2))
ply:SetAngles(ply:LocalToWorldAngles(gc2))
end)
end
end
end

View File

@@ -0,0 +1,103 @@
--[[
| 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/
--]]
-- Does what compat.lua used to without being so aggressive about compatability.
-- If another addon wants to break things, IT CAN!
AddCSLuaFile()
-- This will let us use the noclip key to exit morphs,
-- while letting other mods that disable noclip do their thing.
if CLIENT then
local noclip_btns = {}
for i = KEY_FIRST, BUTTON_CODE_LAST do
if input.LookupKeyBinding(i) == "noclip" then
table.insert(noclip_btns, i)
end
end
hook.Add("CreateMove", "momo_exit_check", function()
if vgui.GetKeyboardFocus() == nil and not gui.IsGameUIVisible() then
for _, key in pairs(noclip_btns) do
if input.WasKeyPressed(key) then
timer.Simple(0, function()
RunConsoleCommand("pk_pill_restore")
end)
break
end
end
end
end)
end
-- Still dont let people noclip while morphed
hook.Add("PlayerNoClip", "momo_block_noclip", function(ply)
if IsValid(pk_pills.getMappedEnt(ply)) then return false end
end)
-- Them hooks
hook.Add("CalcView", "momo_calcview", function(ply, pos, ang, fov, nearZ, farZ)
local ent = pk_pills.getMappedEnt(LocalPlayer())
if IsValid(ent) and ply:GetViewEntity() == ply then
local startpos
if ent.formTable.type == "phys" then
startpos = ent:LocalToWorld(ent.formTable.camera and ent.formTable.camera.offset or Vector(0, 0, 0))
else
startpos = pos
end
if pk_pills.convars.cl_thirdperson:GetBool() then
local dist
if ent.formTable.type == "phys" and ent.formTable.camera and ent.formTable.camera.distFromSize then
dist = ent:BoundingRadius() * 5
else
dist = ent.formTable.camera and ent.formTable.camera.dist or 100
end
local underslung = ent.formTable.camera and ent.formTable.camera.underslung
local offset = LocalToWorld(Vector(-dist, 0, underslung and -dist / 5 or dist / 5), Angle(0, 0, 0), Vector(0, 0, 0), ang)
local tr = util.TraceHull({
start = startpos,
endpos = startpos + offset,
filter = ent.camTraceFilter,
mins = Vector(-5, -5, -5),
maxs = Vector(5, 5, 5),
mask = MASK_VISIBLE
})
local view = {}
view.origin = tr.HitPos
view.angles = ang
view.fov = fov
view.drawviewer = true
--[[else
local view = {}
view.origin = startpos
view.angles = ang
view.fov = fov
return view]]
return view
end
end
end)
--[[
hook.Add("CalcViewModelView","momo_calcviewmodel",function(wep,vm,oldPos,oldAng,pos,ang)
local ent = pk_pills.getMappedEnt(LocalPlayer())
local ply = wep.Owner
if (IsValid(ent) and ply:GetViewEntity()==ply and pk_pills.convars.cl_thirdperson:GetBool()) then
return oldPos+oldAng:Forward()*-1000,ang
end
end)]]

View File

@@ -0,0 +1,70 @@
--[[
| 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 restricted
if SERVER then
util.AddNetworkString("pk_pill_restricted")
-- rename old file
if file.Exists("pill_config/restrictions.txt", "DATA") then
file.Rename("pill_config/restrictions.txt", "pill_config/restricted.txt")
end
-- load restrictions
restricted = {}
for k, v in pairs(("\n"):Explode(file.Read("pill_config/restricted.txt") or "")) do
restricted[v] = true
end
pk_pills._restricted = restricted
concommand.Add("pk_pill_restrict", function(ply, cmd, args, str)
if not ply:IsSuperAdmin() then return end
local pill = args[1]
local a = args[2]
if a == "on" then
restricted[pill] = true
elseif a == "off" then
restricted[pill] = false
end
local write_str = ""
for k, v in pairs(restricted) do
if write_str ~= "" then
write_str = write_str .. "\n"
end
write_str = write_str .. k
end
file.Write("pill_config/restricted.txt", write_str)
net.Start("pk_pill_restricted")
net.WriteTable(restricted)
net.Broadcast()
end)
hook.Add("PlayerInitialSpawn", "pk_pill_transmit_restricted", function(ply)
net.Start("pk_pill_restricted")
net.WriteTable(restricted)
net.Send(ply)
end)
else
pk_pills._restricted = {}
net.Receive("pk_pill_restricted", function(len, pl)
restricted = net.ReadTable()
pk_pills._restricted = restricted
end)
end

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/
--]]
local npc_sides = {
npc_advisor = "hl_combine",
npc_alyx = "default",
npc_antlion = "hl_antlion",
npc_antlion_grub = "hl_antlion",
npc_antlionguard = "hl_antlion",
npc_barnacle = "wild",
npc_antlion_worker = "hl_antlion",
npc_barney = "default",
npc_breen = "hl_combine",
npc_citizen = "default",
npc_clawscanner = "hl_combine",
npc_combine_camera = "hl_combine",
npc_combine_s = "hl_combine",
npc_combinedropship = "hl_combine",
npc_combinegunship = "hl_combine",
npc_crow = "harmless",
npc_cscanner = "hl_combine",
npc_dog = "default",
npc_eli = "default",
npc_fastzombie = "hl_zombie",
npc_fastzombie_torso = "hl_zombie",
npc_fisherman = "default",
npc_gman = "harmless",
npc_headcrab = "hl_zombie",
npc_headcrab_black = "hl_zombie",
npc_headcrab_fast = "hl_zombie",
npc_helicopter = "hl_combine",
npc_hunter = "hl_combine",
npc_ichthyosaur = "wild",
npc_kleiner = "default",
npc_magnusson = "default",
npc_manhack = "hl_combine",
npc_metropolice = "hl_combine",
npc_monk = "default",
npc_mossman = "default",
npc_pigeon = "harmless",
npc_poisonzombie = "hl_zombie",
npc_rollermine = "hl_combine",
npc_seagull = "harmless",
npc_sniper = "hl_combine",
npc_stalker = "hl_combine",
npc_strider = "hl_combine",
npc_turret_ceiling = "hl_combine",
npc_turret_floor = "hl_combine",
npc_turret_ground = "hl_combine",
npc_vortigaunt = "default",
npc_zombie = "hl_zombie",
npc_zombie_torso = "hl_zombie",
npc_zombine = "hl_zombie"
}
local side_relationships = {
default = {
hl_combine = D_HT,
hl_antlion = D_HT,
hl_zombie = D_HT,
hl_infiltrator = D_LI
},
hl_combine = {
default = D_HT,
hl_antlion = D_HT,
hl_zombie = D_HT,
hl_infiltrator = D_LI
},
hl_antlion = {
default = D_HT,
hl_combine = D_HT,
hl_zombie = D_HT,
hl_infiltrator = D_HT
},
hl_zombie = {
default = D_HT,
hl_combine = D_HT,
hl_antlion = D_HT,
hl_infiltrator = D_HT
}
}
local team_map = {}
--AI TEAMS
function setAiTeam(ent, side)
if ent:IsPlayer() and side == "default" then
team_map[ent] = nil
else
team_map[ent] = side
end
for _, npc in pairs(ents.FindByClass("npc_*")) do
if npc == ent or not npc.AddEntityRelationship or not IsValid(npc) then continue end
local otherSide = getAiTeam(npc)
--if otherSide==nil then continue end
if side == otherSide or side == "harmless" then
npc:AddEntityRelationship(ent, D_LI, 99)
elseif side == "wild" then
npc:AddEntityRelationship(ent, D_HT, 99)
else
local relationship = (side_relationships[otherSide] or {})[side]
if relationship then
npc:AddEntityRelationship(ent, relationship, 99)
end
end
if ent:IsNPC() then
if otherSide == side or otherSide == "harmless" then
ent:AddEntityRelationship(npc, D_LI, 99)
elseif side == "wild" then
ent:AddEntityRelationship(npc, D_HT, 99)
else
local relationship = (side_relationships[side] or {})[otherSide]
if relationship then
ent:AddEntityRelationship(npc, relationship, 99)
end
end
end
end
if ent:IsNPC() then
for _, ply in pairs(player.GetAll()) do
local otherSide = getAiTeam(ply)
if otherSide == side or otherSide == "harmless" then
ent:AddEntityRelationship(ply, D_LI, 99)
elseif side == "wild" then
ent:AddEntityRelationship(ply, D_HT, 99)
else
local relationship = (side_relationships[side] or {})[otherSide]
if relationship then
ent:AddEntityRelationship(ply, relationship, 99)
end
end
end
end
if not ent:IsPlayer() and ent:GetTable() then
ent:CallOnRemove("ClearAiTeam", function()
team_map[ent] = nil
end)
end
end
function getAiTeam(ent)
local side
side = team_map[ent]
if side then return side end
side = npc_sides[ent:GetClass()]
if side then return side end
--if ent.formTable then side=ent.formTable.side end
--if side then return side end
if ent:IsPlayer() then return "default" end
return "harmless"
end
hook.Add("OnEntityCreated", "pk_pill_npc_spawn", function(npc)
if npc.AddEntityRelationship then
local otherSide = getAiTeam(npc)
if otherSide == nil then return end
for ent, side in pairs(team_map) do
if not IsValid(ent) then continue end --This really shouldn't happen. But it does. ):
if side == otherSide or side == "harmless" then
npc:AddEntityRelationship(ent, D_LI, 99)
elseif side == "wild" then
npc:AddEntityRelationship(ent, D_HT, 99)
else
local relationship = (side_relationships[otherSide] or {})[side]
if relationship == nil then continue end
npc:AddEntityRelationship(ent, relationship, 99)
end
--TODO CHECK AGAINST ALL NPCS, NOT JUST ONES IN THIS LIST -- THIS MIGHT ACTUALLY BE RIGHT
if ent:IsNPC() then
if otherSide == side or otherSide == "harmless" then
ent:AddEntityRelationship(npc, D_LI, 99)
elseif side == "wild" then
ent:AddEntityRelationship(npc, D_HT, 99)
else
local relationship = (side_relationships[side] or {})[otherSide]
if relationship == nil then continue end
ent:AddEntityRelationship(npc, relationship, 99)
end
end
end
end
end)
hook.Add("PlayerDisconnected", "pk_pill_clearplayerteam", function(ply)
team_map[ply] = nil
end)

View File

@@ -0,0 +1,35 @@
--[[
| 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()
--Speed modifications done by tf2 weapons, effects, etc.
hook.Add("SetupMove", "momo_tf2_movemod", function(ply, mv, cmd)
local speedmod = 1
--Check weapons
for _, wep in pairs(ply:GetWeapons()) do
if wep.momo_SpeedMod then
local thismod = wep:momo_SpeedMod()
if thismod then
speedmod = speedmod * thismod
end
end
end
--Change the speed
if speedmod ~= 1 then
local basevel = mv:GetVelocity()
basevel.x = basevel.x * speedmod
basevel.y = basevel.y * speedmod
mv:SetVelocity(basevel)
end
end)

View File

@@ -0,0 +1,132 @@
--[[
| 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()
helpers = {}
function helpers.makeList(str, n1, n2)
if not n2 then
n2 = n1
n1 = 1
end
local lst = {}
for i = n1, n2 do
table.insert(lst, string.Replace(str, "#", tostring(i)))
end
return lst
end
common = {}
if SERVER then
function common.shoot(ply, ent, tbl)
local aim = ent.formTable.aim
if ent.formTable.canAim and not ent.formTable.canAim(ply, ent) then return end
if aim.usesSecondaryEnt and not IsValid(ent:GetPillAimEnt()) then return end
local aimEnt = aim.usesSecondaryEnt and ent:GetPillAimEnt() or (ent.formTable.type == "ply" and ent:GetPuppet()) or ent
local start
if aim.attachment then
start = aimEnt:GetAttachment(aimEnt:LookupAttachment(aim.attachment))
elseif aim.offset then
local a = ply:EyeAngles()
a.p = 0
start = {
Pos = ply:EyePos() + a:Forward() * aim.offset,
Ang = ply:EyeAngles()
}
else
return
end
local bullet = {}
-- PLZ FIX
if aim.overrideStart then
bullet.Src = ent:LocalToWorld(aim.overrideStart)
else
if not start then return end
bullet.Src = start.Pos
end
--debugoverlay.Sphere(bullet.Src,10,1, Color(0,0,255), true)
--[[bullet.Src = start.Pos]]
bullet.Attacker = ply
if aim.simple then
bullet.Dir = ply:EyeAngles():Forward()
else
bullet.Dir = start.Ang:Forward()
end
if tbl.spread then
bullet.Spread = Vector(tbl.spread, tbl.spread, 0)
end
bullet.Num = tbl.num
bullet.Damage = tbl.damage
bullet.Force = tbl.force
bullet.Tracer = tbl.tracer and not aim.fixTracers and 1 or 0
if aim.fixTracers then
bullet.Callback = function(_ply, tr, dmg)
local ed = EffectData()
ed:SetStart(tr.StartPos)
ed:SetOrigin(tr.HitPos)
ed:SetScale(5000)
util.Effect(tbl.tracer, ed)
end
else
bullet.TracerName = tbl.tracer
end
--[[bullet.Callback=function(ply,tr,dmg)
if tr.HitPos then
debugoverlay.Sphere(tr.HitPos,50,5, Color(0,255,0), true)
end
end]]
aimEnt:FireBullets(bullet)
--Animation
if tbl.anim then
ent:PillAnim(tbl.anim, true)
end
--Sound
ent:PillSound("shoot", true)
end
function common.melee(ply, ent, tbl)
if not ply:IsOnGround() then return end
if tbl.animCount then
ent:PillAnim("melee" .. math.random(tbl.animCount), true)
else
ent:PillAnim("melee", true)
end
ent:PillGesture("melee")
ent:PillSound("melee")
timer.Simple(tbl.delay, function()
if not IsValid(ent) then return end
if ply:TraceHullAttack(ply:EyePos(), ply:EyePos() + ply:EyeAngles():Forward() * tbl.range, Vector(-10, -10, -10), Vector(10, 10, 10), tbl.dmg, DMG_SLASH, 1, true) then
ent:PillSound("melee_hit")
else
ent:PillSound("melee_miss")
end
end)
end
end

View File

@@ -0,0 +1,201 @@
--[[
| 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 voxPacks = {}
function registerVox(name, tbl)
voxPacks[name] = tbl
end
if CLIENT then
concommand.Add("pk_pill_voxmenu", function(ply, cmd, args, str)
if pk_pills.getMappedEnt(ply) and pk_pills.getMappedEnt(ply).formTable.voxSet then
local voiceMenuSrc = [[
<head>
<style>
body {-webkit-user-select: none; font-family: Arial;}
h1 {margin: 10px 0; background-color: #CCF; border: 1px solid #00A; color: #00A; width: 150px; font-style:italic;}
.close {background: red; border: 2px solid black; float: right;}
.close:hover {background: #F44;}
#input {height: 55px; background: white; border: 1px solid gray; overflow-x: auto; white-space: nowrap; font-size: 30px;}
#picker {background: #CCC; border: 1px solid black; margin-top: 10px; overflow-y: auto; position: relative;}
#picker>div {margin: 4px;cursor: pointer;}
#cursor {display: inline-block; width: 0; height: 26px; border-left: 2px solid black; margin-top: 2px;}
#picker>div:hover {background-color: #FFC; border: 1px solid #AA0;}
#selected {background-color: #CCF; border: 1px solid #00A;}
.highlight {color: red; font-weight: bold;}
</style>
</head>
<body>
<button class="close" onclick="console.log('RUNLUA:SELF:Remove()')">X</button>
<h1>PillVox</h1>
<div id="input"></div>
<div id="picker"></div>
</body>
<script>
var picker = document.getElementById('picker')
var input = document.getElementById('input')
picker.style.height= (window.innerHeight-150)+"px"
var phrases = []
var txt=""
var cPos=0
function htmlSafe(str) {
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/ /g,'&nbsp;')
}
function render(renderpicker) {
//search
var begin = txt.substr(0,cPos)
var end = txt.substr(cPos)
input.innerHTML=htmlSafe(begin)+"<div id='cursor'></div>"+htmlSafe(end)
input.scrollLeft = input.scrollWidth
//picker
if (renderpicker) {
var out=[]
if (txt=="") {
for (var i in phrases) {
out.push("<div data-phrase='"+phrases[i]+"' onclick='pick(this)'>"+phrases[i]+"</div>")
}
} else {
var tosort=[]
for (var i in phrases) {
var phrase = phrases[i]
var fragments = txt.trim().split(' ')
var score=0
var highlighted = phrase.replace(new RegExp(fragments.join("|"),"gi"), function(matched) {
score+=matched.length
return "<span class='highlight'>"+matched+"</span>"
})
score+=1/phrase.length
if (highlighted!=phrase) {
tosort.push({html: ("<div data-phrase='"+phrase.replace(/'/g,"&#39;")+"' onclick='pick(this)'>"+highlighted+"</div>"), score: score})
}
}
tosort.sort(function(a,b) {return b.score-a.score})
for (j in tosort) {
out.push(tosort[j].html)
}
}
picker.innerHTML=out.join('')
var selectedElement = picker.childNodes[0]
if (selectedElement) {
selectedElement.setAttribute("id","selected")
selected = selectedElement.dataset.phrase
}
}
}
function pick(e) {
console.log('RUNLUA:RunConsoleCommand("pk_pill_vox","'+e.dataset.phrase+'")')
console.log('RUNLUA:SELF:Remove()')
}
function init(t) {
for (k in t) {
phrases.push(k)
}
phrases.sort()
render(true)
}
//cursor
setInterval(function() {
var cursor = document.getElementById('cursor')
if (cursor.style.visibility=='visible')
cursor.style.visibility='hidden'
else
cursor.style.visibility='visible'
},400)
document.addEventListener('keydown', function(event) {
var key = event.keyCode
if (key>=65 && key<=90) {
txt=txt.substr(0,cPos)+String.fromCharCode(key+32)+txt.substr(cPos)
cPos++
render(true)
} else if (key>=48 && key<=57 || key==32) {
txt=txt.substr(0,cPos)+String.fromCharCode(key)+txt.substr(cPos)
cPos++
render(true)
} else if (key==8) {
if (cPos>0) {
txt=txt.substr(0,cPos-1)+txt.substr(cPos)
cPos--
}
render(true)
} else if (key==13) {
var selectedElement = document.getElementById('selected')
if (selectedElement) {
pick(selectedElement)
} else {
console.log('RUNLUA:SELF:Remove()')
}
render()
} else if (key==37) {
if (cPos>0) {
cPos--
}
render()
} else if (key==39) {
if (cPos<txt.length) {
cPos++
}
render()
} else if (key==38) {
var selectedElement = document.getElementById('selected')
if (selectedElement.previousSibling) {
selectedElement.removeAttribute('id')
selectedElement=selectedElement.previousSibling
selectedElement.setAttribute("id","selected")
picker.scrollTop = selectedElement.offsetTop-225
}
} else if (key==40) {
var selectedElement = document.getElementById('selected')
if (selectedElement.nextSibling) {
selectedElement.removeAttribute('id')
selectedElement=selectedElement.nextSibling
selectedElement.setAttribute("id","selected")
picker.scrollTop = selectedElement.offsetTop-225
}
}
})
</script>
]]
local html = vgui.Create("DHTML", panel)
html:SetPos(10, ScrH() / 6)
html:SetSize(300, ScrH() * (2 / 3))
html:SetAllowLua(true)
html:SetHTML(voiceMenuSrc)
html:RunJavascript("init(" .. util.TableToJSON(voxPacks[pk_pills.getMappedEnt(ply).formTable.voxSet]) .. ")")
html:MakePopup()
end
end)
else
concommand.Add("pk_pill_vox", function(ply, cmd, args, str)
if pk_pills.getMappedEnt(ply) and pk_pills.getMappedEnt(ply).formTable.voxSet then
pk_pills.getMappedEnt(ply):EmitSound(voxPacks[pk_pills.getMappedEnt(ply).formTable.voxSet][args[1]])
end
end)
end

View File

@@ -0,0 +1,132 @@
--[[
| 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()
SWEP.ViewModel = "models/weapons/c_arms_citizen.mdl"
SWEP.WorldModel = "models/weapons/w_alyx_gun.mdl"
SWEP.Primary.ClipSize = 30
SWEP.Primary.DefaultClip = 30
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "smg1"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Alyx's Gun"
SWEP.Category = "Pill Pack Weapons"
SWEP.Slot = 1
function SWEP:SetupDataTables()
self:NetworkVar("Int", 0, "Mode")
end
function SWEP:Initialize()
self:SetHoldType("pistol")
self:SetMode(0)
end
function SWEP:PrimaryAttack()
if (not self:CanPrimaryAttack()) then return end
local spread = .01
if self:GetMode() == 0 then
spread = .02
elseif self:GetMode() == 1 then
spread = .06
end
local bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(spread, spread, 0)
bullet.Tracer = 1
bullet.TracerName = "Tracer"
bullet.Force = 5
if self:GetMode() == 0 then
bullet.Damage = 10
elseif self:GetMode() == 1 then
bullet.Damage = 5
else
bullet.Damage = 50
end
self:ShootEffects()
self.Owner:FireBullets(bullet)
if SERVER then
sound.Play("npc/sniper/echo1.wav", self:GetPos(), 100, 100, 1)
if self:GetMode() == 0 then
sound.Play("weapons/pistol/pistol_fire2.wav", self:GetPos(), 100, 100, 1)
elseif self:GetMode() == 1 then
sound.Play("weapons/smg1/smg1_fireburst1.wav", self:GetPos(), 100, 100, 1)
else
sound.Play("weapons/357/357_fire2.wav", self:GetPos(), 100, 100, 1)
end
end
self:TakePrimaryAmmo(1)
local delay = 1
if self:GetMode() == 0 then
delay = .3
elseif self:GetMode() == 1 then
delay = .1
end
self:SetNextPrimaryFire(CurTime() + delay)
end
function SWEP:SecondaryAttack()
if CLIENT then return end
if self:GetMode() < 2 then
self:SetMode(self:GetMode() + 1)
else
self:SetMode(0)
end
if self:GetMode() == 0 then
self.Owner:ChatPrint("Pistol Mode")
self:SetHoldType("pistol")
self:PillAnim("weapon_pistol")
elseif self:GetMode() == 1 then
self.Owner:ChatPrint("SMG Mode")
self:SetHoldType("smg")
self:PillAnim("weapon_smg")
elseif self:GetMode() == 2 then
self.Owner:ChatPrint("Rifle Mode")
self:SetHoldType("ar2")
self:PillAnim("weapon_rifle")
end
self.Owner:EmitSound("weapons/smg1/switch_single.wav")
end
function SWEP:Reload()
if self.ReloadingTime and CurTime() <= self.ReloadingTime then return end
if (self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount(self.Primary.Ammo) > 0) then
self:EmitSound("weapons/pistol/pistol_reload1.wav")
self:DefaultReload(ACT_VM_RELOAD)
self.ReloadingTime = CurTime() + 1
self:SetNextPrimaryFire(CurTime() + 1)
end
end
function SWEP:PillAnim(anim)
if IsValid(self.pill_proxy) then
self.pill_proxy:ResetSequence(self.pill_proxy:LookupSequence(anim))
end
end

View File

@@ -0,0 +1,59 @@
--[[
| 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()
SWEP.ViewModel = "models/weapons/c_arms_citizen.mdl"
SWEP.WorldModel = "models/weapons/w_annabelle.mdl"
SWEP.Primary.ClipSize = 2
SWEP.Primary.DefaultClip = 2
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "357"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Annabelle"
SWEP.Category = "Pill Pack Weapons"
SWEP.Slot = 3
function SWEP:Initialize()
self:SetHoldType("crossbow")
end
function SWEP:PrimaryAttack()
if (not self:CanPrimaryAttack()) then return end
local bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(.01, .01, 0)
bullet.Tracer = 1
bullet.TracerName = "Tracer"
bullet.Force = 5
bullet.Damage = 50
self:ShootEffects()
self.Owner:FireBullets(bullet)
self:EmitSound("weapons/shotgun/shotgun_fire6.wav")
self:TakePrimaryAmmo(1)
self:SetNextPrimaryFire(CurTime() + .5)
end
function SWEP:Reload()
if self.ReloadingTime and CurTime() <= self.ReloadingTime then return end
if (self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount(self.Primary.Ammo) > 0) then
self:EmitSound("weapons/shotgun/shotgun_reload1.wav")
self:DefaultReload(ACT_VM_RELOAD)
self.ReloadingTime = CurTime() + 1
self:SetNextPrimaryFire(CurTime() + 1)
end
end

View File

@@ -0,0 +1,35 @@
--[[
| 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/
--]]
--SWEP.base = "weapon_base"
AddCSLuaFile()
SWEP.ViewModel = "models/weapons/c_arms_citizen.mdl"
SWEP.WorldModel = ""
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
--[[SWEP.Spawnable=true
SWEP.AdminSpawnable=true]]
SWEP.PrintName = "Holstered"
function SWEP:Initialize()
self:SetHoldType("normal")
end
function SWEP:PrimaryAttack()
end
function SWEP:SecondaryAttack()
end

View File

@@ -0,0 +1,137 @@
--[[
| 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()
SWEP.ViewModel = "models/weapons/c_toolgun.mdl"
SWEP.WorldModel = "models/weapons/w_toolgun.mdl"
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.PrintName = "Morph Gun"
function SWEP:SetupDataTables()
self:NetworkVar("String", 1, "Form")
self:NetworkVar("Int", 1, "Mode")
end
function SWEP:Initialize()
self:SetHoldType("pistol")
self.nextreload = 0
end
function SWEP:PrimaryAttack()
if SERVER and self.Owner:IsAdmin() then
local ply = self.Owner:GetEyeTrace().Entity
if ply:GetClass() == "pill_ent_phys" then
ply:EmitSound("npc/manhack/bat_away.wav")
ply = ply:GetPillUser()
elseif not ply:IsPlayer() then
return
else
ply:EmitSound("npc/manhack/bat_away.wav")
end
local mode = self:GetMode()
if mode == 0 then
mode = "force"
elseif mode == 1 then
mode = "lock-life"
elseif mode == 2 then
mode = "lock-map"
elseif mode == 3 then
mode = "lock-perma"
end
pk_pills.apply(ply, self:GetForm(), mode)
self.Owner:EmitSound("weapons/airboat/airboat_gun_energy2.wav")
end
end
function SWEP:SecondaryAttack()
if SERVER and self.Owner:IsAdmin() then
local ply = self.Owner:GetEyeTrace().Entity
if ply:GetClass() == "pill_ent_phys" then
ply:EmitSound("npc/manhack/bat_away.wav")
ply = ply:GetPillUser()
elseif not ply:IsPlayer() then
return
else
ply:EmitSound("npc/manhack/bat_away.wav")
end
pk_pills.restore(ply, true)
self.Owner:EmitSound("weapons/airboat/airboat_gun_energy2.wav")
end
end
function SWEP:Reload()
if SERVER and self.Owner:IsAdmin() and CurTime() > self.nextreload then
local n = self:GetMode()
if n < 3 then
n = n + 1
else
n = 0
end
if n == 0 then
self.Owner:ChatPrint("FORCE MODE: Players will be forced to morph but can still change back.")
elseif n == 1 then
self.Owner:ChatPrint("LIFELOCK MODE: The player will be locked in the pill until they die.")
elseif n == 2 then
self.Owner:ChatPrint("MAPLOCK MODE: The player will be locked in the pill until the map changes.")
elseif n == 3 then
self.Owner:ChatPrint("PERMALOCK MODE: Players will be locked in the pill forever.")
end
self:SetMode(n)
self.nextreload = CurTime() + 1
self.Owner:EmitSound("weapons/slam/mine_mode.wav")
end
end
function SWEP:OnDrop()
self:Remove()
end
if CLIENT then
local matScreen = Material("models/weapons/v_toolgun/screen")
function SWEP:ViewModelDrawn(ent)
local matBg = Material("pills/" .. self:GetForm() .. ".png")
matScreen:SetTexture("$basetexture", matBg:GetTexture("$basetexture"))
local n = self:GetMode()
local color
if n == 0 then
color = Color(0, 255, 0)
elseif n == 1 then
color = Color(255, 255, 0)
elseif n == 2 then
color = Color(255, 150, 0)
elseif n == 3 then
color = Color(255, 0, 0)
end
local ap = ent:GetAttachment(ent:LookupAttachment("muzzle"))
cam.Start3D(EyePos(), EyeAngles())
render.SetMaterial(Material("sprites/light_glow02_add"))
render.DrawSprite(ap.Pos, 20, 20, color)
cam.End3D()
end
end

View File

@@ -0,0 +1,61 @@
--[[
| 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
SWEP.ViewModel = "models/weapons/c_arms_citizen.mdl"
SWEP.WorldModel = "models/weapons/w_snip_awp.mdl"
SWEP.Primary.ClipSize = 1
SWEP.Primary.DefaultClip = 1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "357"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Professional Rifle"
SWEP.Category = "Pill Pack Weapons"
SWEP.Slot = 3
function SWEP:Initialize()
self:SetHoldType("pistol")
end
function SWEP:PrimaryAttack()
if (not self:CanPrimaryAttack()) then return end
local bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector(.001, .001, 0)
bullet.Tracer = 1
bullet.TracerName = "Tracer"
bullet.Force = 9001
bullet.Damage = 9001
self:ShootEffects()
self.Owner:FireBullets(bullet)
self.Owner:EmitSound("birdbrainswagtrain/pro" .. math.random(11) .. ".wav")
self.Owner:EmitSound("weapons/awp/awp1.wav")
self:TakePrimaryAmmo(1)
end
function SWEP:Reload()
if self.ReloadingTime and CurTime() <= self.ReloadingTime then return end
if (self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount(self.Primary.Ammo) > 0) then
self:EmitSound("weapons/awp/awp_bolt.wav")
self:DefaultReload(ACT_VM_RELOAD)
self.ReloadingTime = CurTime() + 2
self:SetNextPrimaryFire(CurTime() + 2)
end
end

View File

@@ -0,0 +1,80 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
AddCSLuaFile()
SWEP.ViewModel = "models/weapons/c_irifle.mdl"
SWEP.WorldModel = "models/weapons/w_irifle.mdl"
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.PrintName = "Translocator"
SWEP.Category = "Pill Pack Weapons"
SWEP.Slot = 3
function SWEP:SetupDataTables()
self:NetworkVar("Entity", 1, "Target")
end
function SWEP:Initialize()
self:SetHoldType("ar2")
end
function SWEP:PrimaryAttack()
if CLIENT or not IsValid(self:GetTarget()) then return end
local tr = self.Owner:GetEyeTrace()
self:GetTarget():SetPos(tr.HitPos + tr.HitNormal * self:GetTarget():BoundingRadius())
if self:GetTarget():GetPhysicsObjectCount() > 0 then
self:GetTarget():PhysWake()
end
if self:GetTarget():IsPlayer() then
self:GetTarget():SetMoveType(MOVETYPE_WALK)
end
self:GetTarget():EmitSound("beams/beamstart5.wav")
self.Owner:EmitSound("npc/roller/mine/rmine_taunt1.wav")
self:SetNextPrimaryFire(CurTime() + 1)
end
function SWEP:SecondaryAttack()
if CLIENT then return end
local tr = self.Owner:GetEyeTrace()
if not tr.Entity or tr.Entity:IsWorld() or not hook.Call("PhysgunPickup", GAMEMODE, self.Owner, tr.Entity) then
self.Owner:EmitSound("buttons/button10.wav")
self:SetTarget(nil)
return
end
self:EmitSound("buttons/blip1.wav")
self:SetTarget(tr.Entity)
end
function SWEP:DrawHUD()
if not IsValid(self:GetTarget()) then return end
halo.Render{
Ents = {self:GetTarget()},
Color = Color(0, 255, 255),
BlurX = 10,
BlurY = 10,
DrawPasses = 2,
IgnoreZ = true
}
end

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

View File

Before

Width:  |  Height:  |  Size: 8 B

After

Width:  |  Height:  |  Size: 8 B

Some files were not shown because too many files have changed in this diff Show More