mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
370
gamemodes/darkrp/plugins/vortigaunts/cl_hooks.lua
Normal file
370
gamemodes/darkrp/plugins/vortigaunts/cl_hooks.lua
Normal file
@@ -0,0 +1,370 @@
|
||||
--[[
|
||||
| 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 PLUGIN = PLUGIN
|
||||
|
||||
PLUGIN.vortalVision = PLUGIN.vortalVision or false
|
||||
PLUGIN.conterminousAgenda = PLUGIN.conterminousAgenda or nil
|
||||
|
||||
local function firstUpper(str)
|
||||
return str:gsub("^%l", string.utf8upper)
|
||||
end
|
||||
|
||||
net.Receive("ixVortNotes", function(len)
|
||||
local count = net.ReadUInt(32)
|
||||
local send = net.ReadUInt(32)
|
||||
local received = send
|
||||
|
||||
if (received == 1) then
|
||||
PLUGIN.vortnotes = {}
|
||||
end
|
||||
|
||||
for i = send, math.min(count, send + PLUGIN.BATCH - 1) do
|
||||
local k = net.ReadUInt(32)
|
||||
PLUGIN.vortnotes[k] = net.ReadTable()
|
||||
if (received == count) then
|
||||
PLUGIN:OpenVortMenu(net.ReadUInt(32))
|
||||
return
|
||||
end
|
||||
received = received + 1
|
||||
end
|
||||
end)
|
||||
|
||||
netstream.Hook("OpenVortessenceMenu", function(notes, lastSelected)
|
||||
|
||||
end)
|
||||
|
||||
netstream.Hook("conterminousSetConfirm", function(characterName, bool)
|
||||
Derma_Query(
|
||||
"You are about to set " .. characterName .. "'s conterminous state to " .. tostring(bool) .. ". Are you sure?",
|
||||
"Confirmation:",
|
||||
"Yes",
|
||||
function()
|
||||
netstream.Start("conterminousSetState", characterName, bool)
|
||||
end,
|
||||
"No",
|
||||
nil
|
||||
)
|
||||
end)
|
||||
|
||||
netstream.Hook("conterminousSetAgenda", function(message)
|
||||
if (message != "Vortigaunt sessiz.") then
|
||||
if (PLUGIN.conterminousAgenda) then
|
||||
PLUGIN.conterminousAgenda:Remove()
|
||||
PLUGIN.conterminousAgenda = nil
|
||||
end
|
||||
|
||||
PLUGIN.conterminousAgenda = vgui.Create("ixconterminousAgenda")
|
||||
end
|
||||
|
||||
text = message:gsub("^%l", string.upper)
|
||||
|
||||
local lastChar = message:sub(-1)
|
||||
|
||||
if (!lastChar:match("[%p%s]")) then
|
||||
text = text .. "."
|
||||
end
|
||||
|
||||
chat.AddText(Color(25, 138, 17), "[ ! ]: " .. text)
|
||||
end)
|
||||
|
||||
netstream.Hook("conterminousRetrieveAgenda", function(message)
|
||||
chat.AddText(Color(25, 138, 17), "[ ! ] : " .. message)
|
||||
end)
|
||||
|
||||
netstream.Hook("ToggleVortalVision", function()
|
||||
if (!PLUGIN.vortalVision) then
|
||||
hook.Add("RenderScreenspaceEffects", "vortalVision", function()
|
||||
if (!LocalPlayer():IsVortigaunt()) then
|
||||
PLUGIN.vortalVision = false
|
||||
|
||||
hook.Remove("RenderScreenspaceEffects", "vortalVision")
|
||||
end
|
||||
|
||||
local dlight = DynamicLight(LocalPlayer():EntIndex())
|
||||
if (dlight) then
|
||||
dlight.pos = LocalPlayer():GetShootPos() + LocalPlayer():EyeAngles():Forward() * -100
|
||||
dlight.r = 255
|
||||
dlight.g = 255
|
||||
dlight.b = 255
|
||||
dlight.brightness = 1
|
||||
dlight.Decay = 20000
|
||||
dlight.Size = 2000
|
||||
dlight.DieTime = CurTime() + 0.1
|
||||
end
|
||||
|
||||
local tab = {}
|
||||
|
||||
tab[ "$pp_colour_addr" ] = 0
|
||||
tab[ "$pp_colour_addg" ] = 0
|
||||
tab[ "$pp_colour_addb" ] = 0
|
||||
tab[ "$pp_colour_brightness" ] = 0
|
||||
tab[ "$pp_colour_contrast" ] = 1
|
||||
tab[ "$pp_colour_colour" ] = 0
|
||||
tab[ "$pp_colour_mulr" ] = 0
|
||||
tab[ "$pp_colour_mulg" ] = 0
|
||||
tab[ "$pp_colour_mulb" ] = 0
|
||||
|
||||
DrawColorModify(tab)
|
||||
end)
|
||||
|
||||
hook.Add("PostDraw2DSkyBox", "StormFox2.SkyBoxRender", function()
|
||||
if (!LocalPlayer():IsVortigaunt() or !PLUGIN.vortalVision) then return end
|
||||
|
||||
if (!StormFox2 or !StormFox2.Loaded or !StormFox2.Setting.SFEnabled()) then return end
|
||||
if (!StormFox2.util or !StormFox2.Sun or !StormFox2.Moon or !StormFox2.Moon.GetAngle) then return end
|
||||
|
||||
local c_pos = StormFox2.util.RenderPos()
|
||||
local sky = StormFox2.Setting.GetCache("enable_skybox", true)
|
||||
local use_2d = StormFox2.Setting.GetCache("use_2dskybox",false)
|
||||
cam.Start3D(Vector(0, 0, 0), EyeAngles(), nil, nil, nil, nil, nil, 1, 32000) -- 2d maps fix
|
||||
render.OverrideDepthEnable(false,false)
|
||||
render.SuppressEngineLighting(true)
|
||||
render.SetLightingMode(2)
|
||||
if (!use_2d or !sky) then
|
||||
hook.Run("StormFox2.2DSkybox.StarRender", c_pos)
|
||||
|
||||
-- hook.Run("StormFox2.2DSkybox.BlockStarRender",c_pos)
|
||||
hook.Run("StormFox2.2DSkybox.SunRender", c_pos) -- No need to block, shrink the sun.
|
||||
|
||||
hook.Run("StormFox2.2DSkybox.Moon", c_pos)
|
||||
end
|
||||
hook.Run("StormFox2.2DSkybox.CloudBox", c_pos)
|
||||
hook.Run("StormFox2.2DSkybox.CloudLayer", c_pos)
|
||||
hook.Run("StormFox2.2DSkybox.FogLayer", c_pos)
|
||||
render.SuppressEngineLighting(false)
|
||||
render.SetLightingMode(0)
|
||||
render.OverrideDepthEnable( false, false )
|
||||
cam.End3D()
|
||||
|
||||
render.SetColorMaterial()
|
||||
end)
|
||||
|
||||
PLUGIN.vortalVision = true
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
hook.Remove("RenderScreenspaceEffects", "vortalVision")
|
||||
|
||||
PLUGIN.vortalVision = false
|
||||
end)
|
||||
|
||||
function PLUGIN:GetHookCallPriority(hook)
|
||||
if (hook == "GetCharacterName" or hook == "PopulateCharacterInfo") then
|
||||
return 1500
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:GetCharacterName(target, chatType)
|
||||
if (!target) then return end
|
||||
|
||||
if (target == LocalPlayer()) then return end
|
||||
|
||||
local character = target:GetCharacter()
|
||||
|
||||
if (target:IsVortigaunt() and character:GetConterminous()) then
|
||||
return "Vortigaunt"
|
||||
end
|
||||
|
||||
if LocalPlayer():IsVortigaunt() then
|
||||
local vortrecognition = ix.data.Get("vortrecog", {}, false, true)
|
||||
|
||||
if target:GetCharacter() then
|
||||
local fakeName = vortrecognition[target:GetCharacter():GetID()]
|
||||
|
||||
if (fakeName and fakeName != true) then
|
||||
return fakeName
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PopulateCharacterInfo(client, character, container)
|
||||
timer.Simple(0.01, function()
|
||||
local description = container:GetRow("description")
|
||||
local fullDescription = container:GetRow("fullDescription")
|
||||
|
||||
if (IsValid(description) and character:GetConterminous()) then
|
||||
description:Remove()
|
||||
end
|
||||
|
||||
if (IsValid(fullDescription) and character:GetConterminous()) then
|
||||
fullDescription:Remove()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function PLUGIN:OpenVortMenu(lastSelected)
|
||||
if IsValid(PLUGIN.ixVortessenceMenu) then
|
||||
PLUGIN.ixVortessenceMenu:Remove()
|
||||
end
|
||||
|
||||
PLUGIN.ixVortessenceMenu = vgui.Create("VortessenceMenu")
|
||||
|
||||
if lastSelected > 0 and PLUGIN.ixVortessenceMenu.buttonList and PLUGIN.ixVortessenceMenu.buttonList[lastSelected] then
|
||||
PLUGIN.ixVortessenceMenu.buttonList[lastSelected].DoClick()
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:IsPlayerRecognized(target)
|
||||
if LocalPlayer():IsVortigaunt() then
|
||||
local vortrecognition = ix.data.Get("vortrecog", {}, false, true)
|
||||
|
||||
if (target:GetCharacter() and vortrecognition[target:GetCharacter():GetID()]) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
PLUGIN.minDist = 500 * 500
|
||||
PLUGIN.maxDist = 20000 ^ 2
|
||||
PLUGIN.traceFilter = {nil, nil}
|
||||
local mat1 = CreateMaterial("GA0249aSFJ3","VertexLitGeneric",{
|
||||
["$basetexture"] = "models/debug/debugwhite",
|
||||
["$model"] = 1,
|
||||
["$translucent"] = 1,
|
||||
["$alpha"] = 1,
|
||||
["$nocull"] = 1,
|
||||
["$ignorez"] = 1
|
||||
})
|
||||
|
||||
function PLUGIN:HUDPaint()
|
||||
local client = LocalPlayer()
|
||||
local isVortigaunt = client:IsVortigaunt()
|
||||
|
||||
if (client:GetMoveType() == MOVETYPE_NOCLIP and !client:InVehicle() and !isVortigaunt) then return end
|
||||
if (!client:GetCharacter()) then return end
|
||||
|
||||
if (client:GetNetVar("ixVortNulled")) then return end
|
||||
|
||||
if client:GetNetVar("ixVortMeditation") then
|
||||
surface.SetDrawColor( Color(38, 106, 46, (math.sin(CurTime() * 2) + 1) / 2 * 80) )
|
||||
surface.SetMaterial(ix.util.GetMaterial("vgui/gradient-d"))
|
||||
surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
|
||||
end
|
||||
|
||||
if (ix.option.Get("vortSensingDisable")) then return end
|
||||
|
||||
if (isVortigaunt) then
|
||||
self.names = {}
|
||||
|
||||
local minDist, maxDist = self.minDist, self.maxDist
|
||||
if (ix.char.loaded[self.voidChar] and IsValid(ix.char.loaded[self.voidChar]:GetPlayer())) then
|
||||
local voidClient = ix.char.loaded[self.voidChar]:GetPlayer()
|
||||
if (voidClient:GetMoveType() != MOVETYPE_NOCLIP or voidClient:InVehicle()) then
|
||||
local pos = voidClient:GetPos()
|
||||
local dist = pos:DistToSqr(voidClient:GetPos())
|
||||
|
||||
local offset = math.min(math.Remap(math.max(dist, 50 * 50), 50 * 50, 300 * 300, 0, 1), 1)
|
||||
minDist, maxDist = minDist * offset, maxDist * offset
|
||||
end
|
||||
end
|
||||
|
||||
cam.Start3D()
|
||||
local pos = client:EyePos()
|
||||
self.traceFilter[1] = client
|
||||
|
||||
for _ , p in ipairs(player.GetAll()) do
|
||||
if (p == client) then continue end
|
||||
if (!p:GetCharacter()) then continue end
|
||||
if (!IsValid(p) or !p:Alive() or (p:GetMoveType() == MOVETYPE_NOCLIP and !p:InVehicle())) then continue end
|
||||
|
||||
local vEyePos = p:EyePos()
|
||||
local dist = vEyePos:DistToSqr(pos)
|
||||
|
||||
local voidChar = p:GetCharacter():GetID() == self.voidChar
|
||||
local isVort = p:IsVortigaunt() and !p:GetNetVar("ixVortNulled")
|
||||
if (voidChar or (dist < maxDist and isVort)) then
|
||||
render.SuppressEngineLighting(true)
|
||||
if (p:IsVortigaunt()) then
|
||||
render.SetColorModulation(138/255, 181/255, 40/255)
|
||||
else
|
||||
render.SetColorModulation(0, 0, 0)
|
||||
end
|
||||
|
||||
if (isVort) then
|
||||
self.traceFilter[2] = p
|
||||
local trace = util.QuickTrace(pos, vEyePos - pos, self.traceFilter)
|
||||
if (util.QuickTrace(pos, vEyePos - pos, self.traceFilter).Fraction < 0.95 or client:FlashlightIsOn()) then
|
||||
render.SetBlend(math.Remap(math.Clamp(dist, minDist, maxDist), minDist, maxDist, 1, 0))
|
||||
else
|
||||
render.SetBlend(math.Remap(math.Clamp(dist, minDist, maxDist), minDist, maxDist, 0.01, 0))
|
||||
end
|
||||
elseif (voidChar) then
|
||||
render.SetBlend(math.Remap(math.max(dist, 100 * 100), 100 * 100, 600 * 600, 0.8, 0))
|
||||
end
|
||||
render.MaterialOverride(mat1)
|
||||
p:DrawModel()
|
||||
|
||||
render.MaterialOverride()
|
||||
render.SuppressEngineLighting(false)
|
||||
|
||||
if (!voidChar) then
|
||||
self.names[#self.names + 1] = {p, dist}
|
||||
end
|
||||
end
|
||||
end
|
||||
cam.End3D()
|
||||
|
||||
self:RenderESPNames(minDist, maxDist)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CharacerLoaded(character)
|
||||
if self.dlight then
|
||||
self.dlight = nil
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CharacterAdjustModelPanelLookupBone(character)
|
||||
if (character:IsVortigaunt()) then
|
||||
return "ValveBiped.head"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function PLUGIN:GetCharacterGeneticDescription(character)
|
||||
if (character:IsVortigaunt()) then
|
||||
local geneticAge = string.utf8lower(LocalPlayer():GetCharacter():GetAge())
|
||||
local geneticHeight = string.utf8lower(LocalPlayer():GetCharacter():GetHeight())
|
||||
return firstUpper(geneticAge).." | "..firstUpper(geneticHeight), "genetics"
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CreateStoreViewContents(panel, data, entity)
|
||||
if (entity and IsValid(entity)) then
|
||||
if (entity:IsPlayer() and entity:IsVortigaunt()) then
|
||||
panel.storageInventory.isVortigauntOwner = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local path = "willardnetworks/tabmenu/inventory/equipslots/icon-"
|
||||
local partPaintsVort = {
|
||||
[1] = {icon = ix.util.GetMaterial(path.."vorthead.png"), category = "Head"},
|
||||
[3] = {icon = ix.util.GetMaterial(path.."collar.png"), category = "Face"},
|
||||
[5] = {icon = ix.util.GetMaterial(path.."meat.png"), category = "Hands"},
|
||||
[6] = {icon = ix.util.GetMaterial(path.."shackles.png"), category = "Legs"},
|
||||
[7] = {icon = ix.util.GetMaterial(path.."hooks.png"), category = "Shoes"}
|
||||
}
|
||||
function PLUGIN:GetEquipSlotsPartPaints(panel, openedStorage)
|
||||
local isVortigaunt = openedStorage and LocalPlayer():IsVortigaunt() or panel.isVortigauntOwner
|
||||
if (isVortigaunt) then
|
||||
return partPaintsVort
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CanEquipSlot(panel, openedStorage, slot)
|
||||
local isVortigaunt = openedStorage and LocalPlayer():IsVortigaunt() or panel.isVortigauntOwner
|
||||
if (isVortigaunt and slot == 10) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
44
gamemodes/darkrp/plugins/vortigaunts/cl_plugin.lua
Normal file
44
gamemodes/darkrp/plugins/vortigaunts/cl_plugin.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
function PLUGIN:RenderESPNames(minDist, maxDist)
|
||||
local right = LocalPlayer():GetRight() * 25
|
||||
local scrW, scrH = ScrW(), ScrH()
|
||||
local marginX, marginY = scrH * .1, scrH * .1
|
||||
|
||||
for _, v in ipairs(self.names) do
|
||||
local ply, distance = v[1], math.Clamp(v[2], minDist, maxDist)
|
||||
local plyPos = ply:GetPos()
|
||||
local character = ply:GetCharacter()
|
||||
|
||||
local min, max = ply:GetModelRenderBounds()
|
||||
min = min + plyPos + right
|
||||
max = max + plyPos + right
|
||||
|
||||
local barMin = Vector((min.x + max.x) / 2, (min.y + max.y) / 2, min.z):ToScreen()
|
||||
local barMax = Vector((min.x + max.x) / 2, (min.y + max.y) / 2, max.z):ToScreen()
|
||||
local eyePos = ply:EyePos():ToScreen()
|
||||
local rightS = math.min(math.max(barMin.x, barMax.x), eyePos.x + 150)
|
||||
|
||||
local barWidth = math.Remap(distance, minDist, maxDist, 120, 75)
|
||||
local barHeight = math.abs(barMax.y - barMin.y)
|
||||
local barX, barY = math.Clamp(rightS, marginX, scrW - marginX - barWidth), math.Clamp(barMin.y - barHeight + 18, marginY, scrH - marginY)
|
||||
|
||||
surface.SetFont("ixGenericFont")
|
||||
local width, height = surface.GetTextSize(!character:GetConterminous() and ply:Name() or "Vortigaunt")
|
||||
|
||||
surface.SetDrawColor(0, 0, 0, math.Remap(distance, minDist, maxDist, 175, 50))
|
||||
surface.DrawRect(barX - 5, barY - 13 - height / 2, width + 10, height + 2)
|
||||
ix.util.DrawText(!character:GetConterminous() and ply:Name() or "Vortigaunt", barX, barY - 13, Color(138, 181, 40, math.Remap(distance, minDist, maxDist, 255, 50)), TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, "ixGenericFont", 255)
|
||||
end
|
||||
end
|
||||
59
gamemodes/darkrp/plugins/vortigaunts/derma/cl_agenda.lua
Normal file
59
gamemodes/darkrp/plugins/vortigaunts/derma/cl_agenda.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
surface.CreateFont("VortAgendaFont", {
|
||||
font = "Norse",
|
||||
extended = false,
|
||||
size = math.Clamp(SScaleMin(24), 0, 72),
|
||||
weight = 550,
|
||||
antialias = true,
|
||||
scanlines = 0,
|
||||
shadow = true
|
||||
})
|
||||
|
||||
local PANEL = {}
|
||||
|
||||
function PANEL:Init()
|
||||
self:SetSize(SScaleMin(900 / 3), -1)
|
||||
self:Center()
|
||||
self:CenterVertical(0.25)
|
||||
|
||||
surface.PlaySound("ambience/3d-sounds/xen-vorts/whispertrail2.mp3")
|
||||
|
||||
self.agendaText = self:Add("DLabel")
|
||||
self.agendaText:Dock(FILL)
|
||||
self.agendaText:SetFont("VortAgendaFont")
|
||||
self.agendaText:SetContentAlignment(5)
|
||||
self.agendaText:SetTextColor(Color(11, 205, 18, 157))
|
||||
self.agendaText:SetText("VORTIGAUNT BUYURUYOR...")
|
||||
|
||||
self:SizeTo(SScaleMin(900 / 3), SScaleMin(150 / 3), 1, 0, 0.5, function()
|
||||
self:SizeTo(SScaleMin(900 / 3), 0, 1, 4, 0.5, function()
|
||||
PLUGIN.conterminousAgenda = nil
|
||||
self:Remove()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
function PANEL:Paint(w, h)
|
||||
if (!LocalPlayer():IsVortigaunt() or LocalPlayer():IsVortigaunt() and LocalPlayer():GetNetVar("ixVortNulled")) then
|
||||
return
|
||||
end
|
||||
|
||||
local mat = Material("willardnetworks/vortessence.png")
|
||||
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.SetMaterial(mat)
|
||||
surface.DrawTexturedRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
vgui.Register("ixconterminousAgenda", PANEL, "Panel")
|
||||
314
gamemodes/darkrp/plugins/vortigaunts/derma/cl_vortessence.lua
Normal file
314
gamemodes/darkrp/plugins/vortigaunts/derma/cl_vortessence.lua
Normal file
@@ -0,0 +1,314 @@
|
||||
--[[
|
||||
| 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 PANEL = {}
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
function PANEL:Init()
|
||||
self:SetSize(ScrW(), ScrH())
|
||||
self.Paint = function(self, w, h)
|
||||
surface.SetDrawColor(Color(58, 115, 71, 80))
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
Derma_DrawBackgroundBlur( self, 1 )
|
||||
|
||||
surface.SetDrawColor(ColorAlpha(color_white, 5))
|
||||
surface.SetMaterial(ix.util.GetMaterial("willardnetworks/vortessence.png"))
|
||||
surface.DrawTexturedRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
self.main = self:Add("EditablePanel")
|
||||
self.main:SetSize(SScaleMin(700 / 3), SScaleMin(600 / 3))
|
||||
self.main:Center()
|
||||
self.main:MakePopup()
|
||||
Schema:AllowMessage(self.main)
|
||||
self.main.Paint = function(self, w, h)
|
||||
surface.SetDrawColor(0, 0, 0, 130)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
self:CreateTopTitle(self.main)
|
||||
self:CreateButtons(self.main)
|
||||
end
|
||||
|
||||
function PANEL:CreateTopTitle(parent)
|
||||
local topbar = parent:Add("Panel")
|
||||
topbar:SetSize(parent:GetWide(), SScaleMin(50 / 3))
|
||||
topbar:Dock(TOP)
|
||||
topbar.Paint = function( self, w, h )
|
||||
surface.SetDrawColor(0, 0, 0, 130)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
local titleText = topbar:Add("DLabel")
|
||||
titleText:SetFont("CharCreationBoldTitleNoClamp")
|
||||
titleText:Dock(LEFT)
|
||||
titleText:SetText("The Vortessence")
|
||||
titleText:DockMargin(SScaleMin(10 / 3), 0, 0, 0)
|
||||
titleText:SetContentAlignment(4)
|
||||
titleText:SizeToContents()
|
||||
|
||||
local exit = topbar:Add("DImageButton")
|
||||
exit:SetImage("willardnetworks/tabmenu/navicons/exit.png")
|
||||
exit:SetSize(SScaleMin(20 / 3), SScaleMin(20 / 3))
|
||||
exit:DockMargin(SScaleMin(-200 / 3), SScaleMin(15 / 3), SScaleMin(10 / 3), SScaleMin(15 / 3))
|
||||
exit:Dock(RIGHT)
|
||||
exit.DoClick = function()
|
||||
self:Remove()
|
||||
surface.PlaySound("helix/ui/press.wav")
|
||||
end
|
||||
end
|
||||
|
||||
local function GreenOutlineButton(self, w, h)
|
||||
surface.SetDrawColor(Color(0, 0, 0, 100))
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
surface.SetDrawColor(Color(112, 135, 111, (255 / 100 * 30)))
|
||||
surface.DrawOutlinedRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
function PANEL:CreateButtons(parent)
|
||||
local buttonPanel = parent:Add("Panel")
|
||||
buttonPanel:Dock(LEFT)
|
||||
buttonPanel:SetWide(parent:GetWide() / 3.5)
|
||||
buttonPanel.Paint = function(self, w, h)
|
||||
surface.SetDrawColor(0, 0, 0, 50)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
local searchBar = buttonPanel:Add("DTextEntry")
|
||||
searchBar:Dock(TOP)
|
||||
searchBar:SetFont("MenuFontNoClamp")
|
||||
searchBar:SetSize(SScaleMin(200 / 3), SScaleMin(30 / 3))
|
||||
searchBar:DockMargin(0, 0, 0, SScaleMin(10 / 3))
|
||||
searchBar:SetPlaceholderText("Search note title...")
|
||||
searchBar:SetTextColor(Color(200, 200, 200, 255))
|
||||
searchBar:SetCursorColor(Color(200, 200, 200, 255))
|
||||
searchBar:SetFont("MenuFontNoClamp")
|
||||
searchBar:SetText(value or "")
|
||||
searchBar.Paint = function(panel, w, h)
|
||||
surface.SetDrawColor(Color(0, 0, 0, 100))
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
surface.SetDrawColor(Color(111, 111, 136, (255 / 100 * 30)))
|
||||
surface.DrawOutlinedRect(0, 0, w, h)
|
||||
|
||||
if ( panel.GetPlaceholderText and panel.GetPlaceholderColor and panel:GetPlaceholderText() and
|
||||
panel:GetPlaceholderText():Trim() != "" and panel:GetPlaceholderColor() and ( !panel:GetText() or panel:GetText() == "" ) ) then
|
||||
|
||||
local oldText = panel:GetText()
|
||||
|
||||
local str = panel:GetPlaceholderText()
|
||||
if ( str:StartWith( "#" ) ) then str = str:sub( 2 ) end
|
||||
str = language.GetPhrase( str )
|
||||
|
||||
panel:SetText( str )
|
||||
panel:DrawTextEntryText( panel:GetPlaceholderColor(), panel:GetHighlightColor(), panel:GetCursorColor() )
|
||||
panel:SetText( oldText )
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
panel:DrawTextEntryText( panel:GetTextColor(), panel:GetHighlightColor(), panel:GetCursorColor() )
|
||||
end
|
||||
|
||||
searchBar.OnChange = function(searchSelf)
|
||||
local text = searchSelf:GetValue()
|
||||
|
||||
if self.content and text != nil then
|
||||
-- Clear existing rows
|
||||
self.content:Clear()
|
||||
|
||||
local category = self.content.category -- Get the selected category from the content panel
|
||||
|
||||
for _, v in SortedPairs(PLUGIN.vortnotes, true) do
|
||||
if v.note_category and tonumber(v.note_category) == category then
|
||||
if string.find(string.lower(v.note_title), string.lower(text), 1, true) then
|
||||
self:CreateRow(self.content, v, category)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self:CreateAdd(self.content, category)
|
||||
end
|
||||
end
|
||||
|
||||
self.buttonList = {}
|
||||
|
||||
for i = 1, 3 do
|
||||
local charInfoButton = i == 1
|
||||
local eventButton = i == 2
|
||||
local charOrEvent = (charInfoButton or eventButton)
|
||||
|
||||
local info = buttonPanel:Add("DButton")
|
||||
info:SetTall(SScaleMin(50 / 3))
|
||||
info:SetFont("TitlesFontNoClamp")
|
||||
info:Dock(TOP)
|
||||
info:DockMargin(0, 0, 0, -1)
|
||||
info:SetText(charInfoButton and "Character Notes" or eventButton and "Event Notes" or "General Notes")
|
||||
info.Paint = function(self, w, h)
|
||||
GreenOutlineButton(self, w, h)
|
||||
end
|
||||
|
||||
info.DoClick = function()
|
||||
surface.PlaySound("helix/ui/press.wav")
|
||||
if self.content then
|
||||
self.content:Remove()
|
||||
end
|
||||
|
||||
searchBar:SetText("")
|
||||
self:CreateContent(self.main, i)
|
||||
end
|
||||
|
||||
table.insert(self.buttonList, info)
|
||||
end
|
||||
end
|
||||
|
||||
function PANEL:CreateContent(parent, info)
|
||||
self.content = parent:Add("DScrollPanel")
|
||||
self.content:Dock(FILL)
|
||||
self.content.name = info == 1 and "Character Notes" or info == 2 and "Event Notes" or "General Notes"
|
||||
self.content.category = info
|
||||
|
||||
self:CreateTitleLabel(self.content)
|
||||
|
||||
for _, v in SortedPairs(PLUGIN.vortnotes, true) do
|
||||
if v.note_category and tonumber(v.note_category) == info then
|
||||
self:CreateRow(self.content, v, info)
|
||||
end
|
||||
end
|
||||
|
||||
self:CreateAdd(self.content, info)
|
||||
end
|
||||
|
||||
function PANEL:CreateTitleLabel(parent, text)
|
||||
self.titleLabel = parent:Add("DLabel")
|
||||
self.titleLabel:Dock(TOP)
|
||||
self.titleLabel:SetText(text or parent.name or "")
|
||||
self.titleLabel:DockMargin(0, SScaleMin(15 / 3), 0, SScaleMin(14 / 3))
|
||||
self.titleLabel:SetFont("TitlesFontNoClamp")
|
||||
self.titleLabel:SetContentAlignment(5)
|
||||
end
|
||||
|
||||
function PANEL:CreateDivider(parent)
|
||||
local divider = parent:Add("DShape")
|
||||
divider:SetType("Rect")
|
||||
divider:Dock(RIGHT)
|
||||
divider:SetWide(1)
|
||||
divider:DockMargin(0, SScaleMin(10 / 3), SScaleMin(10 / 3), SScaleMin(10 / 3))
|
||||
divider:SetColor(Color(112, 135, 111, (255 / 100 * 30)))
|
||||
|
||||
end
|
||||
|
||||
function PANEL:CreateRow(parent, rowInfo, category)
|
||||
local row = parent:Add("DButton")
|
||||
row:Dock(TOP)
|
||||
row:SetTall(SScaleMin(50 / 3))
|
||||
row:SetText(rowInfo["note_title"] or "")
|
||||
row:SetContentAlignment(4)
|
||||
row:SetFont("TitlesFontNoClamp")
|
||||
row:SetTextInset(SScaleMin(10 / 3), 0)
|
||||
row:DockMargin(0, 0, 0, -1)
|
||||
row.Paint = function(self, w, h)
|
||||
GreenOutlineButton(self, w, h)
|
||||
end
|
||||
|
||||
if CAMI.PlayerHasAccess(client, "Helix - Manage Vortessence Menu") then
|
||||
local delete = row:Add("DImageButton")
|
||||
delete:SetImage("willardnetworks/tabmenu/navicons/exit.png")
|
||||
delete:SetSize(SScaleMin(20 / 3), SScaleMin(20 / 3))
|
||||
delete:DockMargin(0, SScaleMin(15 / 3), SScaleMin(10 / 3), SScaleMin(15 / 3))
|
||||
delete:Dock(RIGHT)
|
||||
delete.DoClick = function()
|
||||
netstream.Start("RemoveNoteVortessence", rowInfo["note_id"], category)
|
||||
surface.PlaySound("helix/ui/press.wav")
|
||||
end
|
||||
|
||||
self:CreateDivider(row)
|
||||
end
|
||||
|
||||
local date = row:Add("DLabel")
|
||||
date:Dock(RIGHT)
|
||||
date:SetFont("TitlesFontNoClamp")
|
||||
date:SetText(rowInfo["note_date"] or "")
|
||||
date:SetContentAlignment(6)
|
||||
date:SizeToContents()
|
||||
date:DockMargin(0, 0, SScaleMin(10 / 3), 0)
|
||||
|
||||
self:CreateDivider(row)
|
||||
|
||||
local name = row:Add("DLabel")
|
||||
name:Dock(RIGHT)
|
||||
name:SetFont("TitlesFontNoClamp")
|
||||
name:SetText(rowInfo["note_poster"] or "")
|
||||
name:SetContentAlignment(6)
|
||||
name:SizeToContents()
|
||||
name:DockMargin(0, 0, SScaleMin(10 / 3), 0)
|
||||
|
||||
row.DoClick = function()
|
||||
surface.PlaySound("helix/ui/press.wav")
|
||||
parent:Clear()
|
||||
self:CreateTitleLabel(parent, rowInfo["note_title"])
|
||||
self:CreateNoteText(parent, rowInfo)
|
||||
end
|
||||
end
|
||||
|
||||
function PANEL:CreateNoteText(parent, rowInfo)
|
||||
local wrappedText = parent:Add("DLabel")
|
||||
wrappedText:SetFont("MenuFontNoClamp")
|
||||
wrappedText:SetText(rowInfo["note_text"] or "")
|
||||
wrappedText:SetWrap(true)
|
||||
wrappedText:Dock(TOP)
|
||||
wrappedText:SetAutoStretchVertical(true)
|
||||
wrappedText:DockMargin(SScaleMin(10 / 3), 0, SScaleMin(10 / 3), 0)
|
||||
end
|
||||
|
||||
function PANEL:CreateAdd(parent, category)
|
||||
local add = parent:Add("DButton")
|
||||
add:Dock(TOP)
|
||||
add:SetTall(SScaleMin(50 / 3))
|
||||
add:SetText("Add Note")
|
||||
add:SetFont("TitlesFontNoClamp")
|
||||
add.Paint = function(self, w, h)
|
||||
surface.SetDrawColor(Color(112, 135, 111, (255 / 100 * 10)))
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
GreenOutlineButton(self, w, h)
|
||||
end
|
||||
|
||||
add.DoClick = function()
|
||||
surface.PlaySound("helix/ui/press.wav")
|
||||
Derma_StringRequest(
|
||||
"Add Note | "..parent.name,
|
||||
"Set the title of your note:",
|
||||
"",
|
||||
function(title)
|
||||
if string.len(title) <= 0 then
|
||||
LocalPlayer():NotifyLocalized("You cannot input an empty title!")
|
||||
return false
|
||||
end
|
||||
|
||||
surface.PlaySound("helix/ui/press.wav")
|
||||
|
||||
Derma_StringRequest(
|
||||
"Add Note | "..parent.name,
|
||||
"Set the text of your note:",
|
||||
"",
|
||||
function(text)
|
||||
netstream.Start("AddNoteVortessence", title, text, category)
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
vgui.Register("VortessenceMenu", PANEL, "EditablePanel")
|
||||
@@ -0,0 +1,84 @@
|
||||
--[[
|
||||
| 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 smoke = {
|
||||
"particle/smokesprites_0001",
|
||||
"particle/smokesprites_0002",
|
||||
"particle/smokesprites_0003",
|
||||
"particle/smokesprites_0004",
|
||||
"particle/smokesprites_0005",
|
||||
"particle/smokesprites_0006",
|
||||
"particle/smokesprites_0007",
|
||||
"particle/smokesprites_0008",
|
||||
"particle/smokesprites_0009",
|
||||
"particle/smokesprites_0010",
|
||||
"particle/smokesprites_0011",
|
||||
"particle/smokesprites_0012",
|
||||
"particle/smokesprites_0013",
|
||||
"particle/smokesprites_0014",
|
||||
"particle/smokesprites_0015",
|
||||
"particle/smokesprites_0016"
|
||||
}
|
||||
|
||||
function EFFECT:Init( data )
|
||||
local vOffset = data:GetOrigin()
|
||||
|
||||
local emitter = ParticleEmitter( vOffset, false )
|
||||
|
||||
for i = 1, 80 do
|
||||
local Pos = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0)
|
||||
local particle = emitter:Add( smoke[math.random(1, #smoke)], vOffset + Pos * 4 )
|
||||
if ( particle ) then
|
||||
particle:SetVelocity( Pos * 320 )
|
||||
|
||||
particle:SetLifeTime( 0 )
|
||||
particle:SetDieTime( 8 )
|
||||
|
||||
particle:SetStartAlpha( 8 )
|
||||
particle:SetEndAlpha( 0 )
|
||||
|
||||
particle:SetColor(60, 193, 255)
|
||||
particle:SetRoll( math.Rand( -1, 1 ) )
|
||||
|
||||
local Size = math.random( 100, 150 )
|
||||
particle:SetStartSize( Size )
|
||||
particle:SetEndSize( Size )
|
||||
|
||||
particle:SetAirResistance( 50 )
|
||||
particle:SetGravity( Vector( math.Rand( -1, 1 ) * 50, math.Rand( -1, 1 ) * 50, 10 ) )
|
||||
|
||||
end
|
||||
end
|
||||
timer.Simple(4.2, function()
|
||||
for i = 0, 80 do
|
||||
local exp = emitter:Add( smoke[math.random(1, #smoke)], vOffset)
|
||||
|
||||
if exp then
|
||||
exp:SetVelocity( Vector(math.Rand(-1, 1), math.Rand(-1, 1), 0) * 300 )
|
||||
exp:SetDieTime( 3 )
|
||||
exp:SetStartAlpha( 68 )
|
||||
exp:SetStartSize( 150 )
|
||||
exp:SetEndSize( 80 )
|
||||
exp:SetEndAlpha( 0 )
|
||||
exp:SetRoll( math.Rand( -1, 1 ) )
|
||||
exp:SetColor(60, 193, 255)
|
||||
exp:SetGravity( Vector( math.Rand( -1, 1 ) * 50, math.Rand( -1, 1 ) * 50, 10 ) )
|
||||
end
|
||||
end
|
||||
emitter:Finish()
|
||||
end)
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
|
||||
function EFFECT:Render()
|
||||
end
|
||||
@@ -0,0 +1,83 @@
|
||||
--[[
|
||||
| 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 smoke = {
|
||||
"particle/smokesprites_0001",
|
||||
"particle/smokesprites_0002",
|
||||
"particle/smokesprites_0003",
|
||||
"particle/smokesprites_0004",
|
||||
"particle/smokesprites_0005",
|
||||
"particle/smokesprites_0006",
|
||||
"particle/smokesprites_0007",
|
||||
"particle/smokesprites_0008",
|
||||
"particle/smokesprites_0009",
|
||||
"particle/smokesprites_0010",
|
||||
"particle/smokesprites_0011",
|
||||
"particle/smokesprites_0012",
|
||||
"particle/smokesprites_0013",
|
||||
"particle/smokesprites_0014",
|
||||
"particle/smokesprites_0015",
|
||||
"particle/smokesprites_0016"
|
||||
}
|
||||
|
||||
function EFFECT:Init( data )
|
||||
local vOffset = data:GetOrigin()
|
||||
|
||||
local emitter = ParticleEmitter( vOffset, false )
|
||||
|
||||
for i = 0, 15 do
|
||||
local exp = emitter:Add( "particles/flamelet"..math.random(1,5), vOffset)
|
||||
|
||||
if exp then
|
||||
exp:SetVelocity( VectorRand() * 250 )
|
||||
exp:SetDieTime( 0.2 )
|
||||
exp:SetStartAlpha( 255 )
|
||||
exp:SetStartSize( 20 )
|
||||
exp:SetEndSize( 150 )
|
||||
exp:SetEndAlpha( 50 )
|
||||
exp:SetRoll( math.Rand( -1, 1 ) )
|
||||
exp:SetColor(60, 193, 255)
|
||||
exp:SetGravity( Vector( 50, 50, 10 ) )
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local Pos = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0)
|
||||
local particle = emitter:Add( smoke[math.random(1, #smoke)], vOffset + Pos * 4 )
|
||||
if ( particle ) then
|
||||
particle:SetVelocity( Pos * 120 )
|
||||
|
||||
particle:SetLifeTime( 0 )
|
||||
particle:SetDieTime( 2 )
|
||||
|
||||
particle:SetStartAlpha( 8 )
|
||||
particle:SetEndAlpha( 0 )
|
||||
|
||||
particle:SetColor(60, 193, 255)
|
||||
particle:SetRoll( math.Rand( -1, 1 ) )
|
||||
|
||||
local Size = math.random( 100, 150 )
|
||||
particle:SetStartSize( Size )
|
||||
particle:SetEndSize( Size )
|
||||
|
||||
particle:SetAirResistance( 50 )
|
||||
particle:SetGravity( Vector( math.Rand( -1, 1 ) * 50, math.Rand( -1, 1 ) * 50, 10 ) )
|
||||
|
||||
end
|
||||
end
|
||||
emitter:Finish()
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
|
||||
function EFFECT:Render()
|
||||
end
|
||||
@@ -0,0 +1,82 @@
|
||||
--[[
|
||||
| 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 smoke = {
|
||||
"particle/smokesprites_0001",
|
||||
"particle/smokesprites_0002",
|
||||
"particle/smokesprites_0003",
|
||||
"particle/smokesprites_0004",
|
||||
"particle/smokesprites_0005",
|
||||
"particle/smokesprites_0006",
|
||||
"particle/smokesprites_0007",
|
||||
"particle/smokesprites_0008",
|
||||
"particle/smokesprites_0009",
|
||||
"particle/smokesprites_0010",
|
||||
"particle/smokesprites_0011",
|
||||
"particle/smokesprites_0012",
|
||||
"particle/smokesprites_0013",
|
||||
"particle/smokesprites_0014",
|
||||
"particle/smokesprites_0015",
|
||||
"particle/smokesprites_0016"
|
||||
}
|
||||
|
||||
function EFFECT:Init( data )
|
||||
local vOffset = data:GetOrigin()
|
||||
|
||||
local emitter = ParticleEmitter( vOffset, false )
|
||||
|
||||
for i = 0, 80 do
|
||||
local exp = emitter:Add( "particles/flamelet"..math.random(1,5), vOffset)
|
||||
|
||||
if exp then
|
||||
exp:SetVelocity( Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0) * 320 )
|
||||
exp:SetDieTime( 0.8 )
|
||||
exp:SetStartAlpha( 200 )
|
||||
exp:SetStartSize( 20 )
|
||||
exp:SetEndSize( 40 )
|
||||
exp:SetEndAlpha( 0 )
|
||||
exp:SetRoll( math.Rand( -1, 1 ) )
|
||||
exp:SetGravity( Vector( 50, 50, 8 ) )
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 80 do
|
||||
local Pos = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0)
|
||||
local particle = emitter:Add( smoke[math.random(1, #smoke)], vOffset + Pos * 4 )
|
||||
if ( particle ) then
|
||||
particle:SetVelocity( Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0) * 150 + Vector(0, 0, 8))
|
||||
|
||||
particle:SetLifeTime( 0 )
|
||||
particle:SetDieTime( 4 )
|
||||
|
||||
particle:SetStartAlpha( 80 )
|
||||
particle:SetEndAlpha( 0 )
|
||||
|
||||
particle:SetColor(32, 185, 50)
|
||||
particle:SetRoll( math.Rand( -1, 1 ) )
|
||||
|
||||
local Size = math.random( 20, 40 )
|
||||
particle:SetStartSize( Size )
|
||||
particle:SetEndSize( Size )
|
||||
|
||||
particle:SetAirResistance( 100 )
|
||||
particle:SetGravity( Vector( math.Rand( -1, 1 ) * 50, math.Rand( -1, 1 ) * 50, 0 ) )
|
||||
|
||||
end
|
||||
end
|
||||
emitter:Finish()
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
|
||||
function EFFECT:Render()
|
||||
end
|
||||
@@ -0,0 +1,145 @@
|
||||
--[[
|
||||
| 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 ringMats = {
|
||||
"particle/particle_ring_blur",
|
||||
"particle/particle_ring_wave_additive",
|
||||
"particle/particle_ring_wave_addnofog",
|
||||
"particle/particle_ring_sharp_additive",
|
||||
"particle/particle_ring_sharp",
|
||||
"particle/particle_ring_refract_01",
|
||||
"particle/particle_ring_blur",
|
||||
"particle/particle_noisesphere"
|
||||
}
|
||||
local smoke = {
|
||||
"particle/smokesprites_0001",
|
||||
"particle/smokesprites_0002",
|
||||
"particle/smokesprites_0003",
|
||||
"particle/smokesprites_0004",
|
||||
"particle/smokesprites_0005",
|
||||
"particle/smokesprites_0006",
|
||||
"particle/smokesprites_0007",
|
||||
"particle/smokesprites_0008",
|
||||
"particle/smokesprites_0009",
|
||||
"particle/smokesprites_0010",
|
||||
"particle/smokesprites_0011",
|
||||
"particle/smokesprites_0012",
|
||||
"particle/smokesprites_0013",
|
||||
"particle/smokesprites_0014",
|
||||
"particle/smokesprites_0015",
|
||||
"particle/smokesprites_0016"
|
||||
}
|
||||
|
||||
function EFFECT:Init( data )
|
||||
local vOffset = data:GetOrigin()
|
||||
|
||||
local NumParticles = 32
|
||||
|
||||
local emitter = ParticleEmitter( vOffset, false )
|
||||
local ringSize = math.random( 80, 90 )
|
||||
|
||||
for i = 1, #ringMats do
|
||||
local ring = emitter:Add(ringMats[i], vOffset + Vector(0, 0, 20))
|
||||
if (ring) then
|
||||
ring:SetStartSize( ringSize )
|
||||
ring:SetEndSize( 0 )
|
||||
ring:SetLifeTime( 0 )
|
||||
ring:SetDieTime( 0.5 )
|
||||
ring:SetStartAlpha( 150 )
|
||||
ring:SetEndAlpha( 0 )
|
||||
ring:SetAirResistance( 100 )
|
||||
ring:SetGravity( Vector( 0, 0, 10 ) )
|
||||
ring:SetRoll( 90 )
|
||||
ring:SetColor(32, 185, 50)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 0, 40 do
|
||||
local exp = emitter:Add( "particle/particle_glow_03", vOffset + Vector(0, 0, 20) )
|
||||
|
||||
if exp then
|
||||
exp:SetVelocity( Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0) * 30 )
|
||||
exp:SetDieTime( 0.5 )
|
||||
exp:SetStartAlpha( 255 )
|
||||
exp:SetStartSize( 75 )
|
||||
exp:SetEndSize( 120 )
|
||||
exp:SetEndAlpha( 0 )
|
||||
exp:SetRoll( math.Rand( -1, 1 ) )
|
||||
exp:SetColor(32, 185, 50)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local Pos = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), 0)
|
||||
local particle = emitter:Add( smoke[math.random(1, #smoke)], vOffset + Pos * 4 )
|
||||
if ( particle ) then
|
||||
particle:SetVelocity( Pos * 30 )
|
||||
|
||||
particle:SetLifeTime( 0 )
|
||||
particle:SetDieTime( 5 )
|
||||
|
||||
particle:SetStartAlpha( 8 )
|
||||
particle:SetEndAlpha( 0 )
|
||||
|
||||
particle:SetColor(32, 185, 50)
|
||||
particle:SetRoll( math.Rand( -1, 1 ) )
|
||||
|
||||
local Size = math.random( 100, 150 )
|
||||
particle:SetStartSize( Size )
|
||||
particle:SetEndSize( Size )
|
||||
|
||||
particle:SetAirResistance( 50 )
|
||||
particle:SetGravity( Vector( math.Rand( -1, 1 ) * 15, math.Rand( -1, 1 ) * 15, 18 ) )
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for i = 0, NumParticles do
|
||||
|
||||
local Pos = Vector( math.Rand( -1, 1 ), math.Rand( -1, 1 ), math.Rand( -1, 1 ) )
|
||||
|
||||
local particle = emitter:Add( "particle/particle_ring_wave_8", vOffset + Pos * 4 )
|
||||
if ( particle ) then
|
||||
|
||||
particle:SetVelocity( Pos * 340 )
|
||||
|
||||
particle:SetLifeTime( 0 )
|
||||
particle:SetDieTime( 3 )
|
||||
|
||||
particle:SetStartAlpha( 255 )
|
||||
particle:SetEndAlpha( 0 )
|
||||
|
||||
particle:SetColor(32, 185, 50)
|
||||
|
||||
|
||||
local Size = math.random( 5, 15 )
|
||||
particle:SetStartSize( Size )
|
||||
particle:SetEndSize( 0 )
|
||||
|
||||
particle:SetRoll( math.Rand( 0, 360 ) )
|
||||
particle:SetRollDelta( math.Rand( -25, 25 ) )
|
||||
|
||||
particle:SetAirResistance( 150 )
|
||||
particle:SetGravity( Vector( math.Rand( -1, 1 ) * 15, math.Rand( -1, 1 ) * 15, 30 ) )
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
emitter:Finish()
|
||||
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
|
||||
function EFFECT:Render()
|
||||
end
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
include("shared.lua");
|
||||
|
||||
function ENT:Think()
|
||||
local dlight = DynamicLight( self:EntIndex() );
|
||||
|
||||
cam.Start3D( EyePos(), EyeAngles() );
|
||||
for k, v in ipairs( player.GetAll() ) do
|
||||
if (v:Alive()) then
|
||||
if ( dlight and v == self.Owner ) then
|
||||
local lightVector = self:GetPos();
|
||||
lightVector:Add(Vector(0,2,0));
|
||||
|
||||
dlight.Pos = lightVector;
|
||||
dlight.r = 30;
|
||||
dlight.g = 255;
|
||||
dlight.b = 30;
|
||||
dlight.Brightness = 0;
|
||||
dlight.Size = 700;
|
||||
dlight.Decay = 5;
|
||||
dlight.DieTime = CurTime() + 0.1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
cam.End3D();
|
||||
end;
|
||||
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
include("shared.lua");
|
||||
|
||||
AddCSLuaFile("cl_init.lua");
|
||||
AddCSLuaFile("shared.lua");
|
||||
|
||||
function ENT:Initialize()
|
||||
self:SetMoveType( MOVETYPE_NONE );
|
||||
self:SetSolid( SOLID_NONE );
|
||||
self:SetCollisionGroup( COLLISION_GROUP_NONE );
|
||||
ent:SetModel("models/error.mdl");
|
||||
ent:SetColor( Color(0,0,0,0) );
|
||||
ent:DrawShadow(false);
|
||||
end;
|
||||
|
||||
function ENT:SetOwnerVariable(owner)
|
||||
self.Owner = owner;
|
||||
end;
|
||||
|
||||
function ENT:RemoveLight(owner)
|
||||
local worldmodel = ents.FindInSphere(owner:GetPos(), 0.6);
|
||||
|
||||
for k, v in pairs(worldmodel) do
|
||||
if (v:GetClass() == "ix_nvlight" and v:GetOwner() == owner) then
|
||||
v:Remove();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -0,0 +1,17 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
DEFINE_BASECLASS("base_gmodentity");
|
||||
|
||||
ENT.Type = "anim";
|
||||
ENT.Author = "RJ";
|
||||
ENT.PrintName = "Vision Light";
|
||||
ENT.Spawnable = false;
|
||||
ENT.AdminSpawnable = false;
|
||||
@@ -0,0 +1,116 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.PrintName = "Vortigaunt Small Shield"
|
||||
ENT.Category = "HL2RP"
|
||||
ENT.Spawnable = true
|
||||
ENT.bNoPersist = true
|
||||
ENT.AutomaticFrameAdvance = true
|
||||
|
||||
if (SERVER) then
|
||||
function ENT:Initialize()
|
||||
self:SetModel("models/props_phx/construct/metal_plate2x2.mdl")
|
||||
self:PhysicsInit(SOLID_VPHYSICS)
|
||||
|
||||
local physObj = self:GetPhysicsObject()
|
||||
if (IsValid(physObj)) then
|
||||
physObj:Wake()
|
||||
end
|
||||
|
||||
self:SetCollisionGroup(COLLISION_GROUP_DEBRIS_TRIGGER)
|
||||
self:SetSolid(SOLID_VPHYSICS)
|
||||
self:AddEffects(EF_NOSHADOW)
|
||||
self:AddEFlags(EFL_DONTBLOCKLOS)
|
||||
self:SetRenderMode(RENDERMODE_WORLDGLOW)
|
||||
|
||||
self:SetMaterial("models/props_combine/stasisshield_sheet")
|
||||
self:SetColor(Color(0, 255, 55, 255))
|
||||
self:SetModelScale(1)
|
||||
self:SetMaxHealth(200)
|
||||
self:SetHealth(200)
|
||||
|
||||
timer.Simple(0.25, function()
|
||||
ParticleEffectAttach("vort_shield_parent", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
end)
|
||||
end
|
||||
|
||||
function ENT:OnTakeDamage(dmginfo)
|
||||
self:EmitSound("ambient/energy/ion_cannon_shot"..math.random(1, 3)..".wav")
|
||||
|
||||
ParticleEffect("vortigaunt_glow_beam_cp0", dmginfo:GetDamagePosition(), Angle(0, 0, 0), self)
|
||||
|
||||
self:SetHealth(math.Clamp(self:Health() - dmginfo:GetDamage(), 0, 350))
|
||||
|
||||
if self:Health() <= 0 then
|
||||
|
||||
local owner = self:GetOwner()
|
||||
|
||||
local percentage = 10 / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
if !owner:HasVortalEnergy(10 + (percentage * owner:Armor())) then
|
||||
self:Die()
|
||||
else
|
||||
owner:TakeVortalEnergy(10 + (percentage * owner:Armor()))
|
||||
self:SetHealth(200)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:ImpactTrace(trace, dmgtype, customimpactname)
|
||||
if (trace.HitSky) then
|
||||
return
|
||||
end
|
||||
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin(trace.HitPos + trace.HitNormal)
|
||||
effectdata:SetNormal(trace.HitNormal)
|
||||
util.Effect("AR2Impact", effectdata)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function ENT:Die()
|
||||
ParticleEffect("vortigaunt_charge_token", self:GetPos()*15, Angle(0, 0, 0))
|
||||
|
||||
self:EmitSound("ambient/levels/labs/electric_explosion1.wav", 80, 100, 1, CHAN_WEAPON)
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ENT:Think()
|
||||
if (!IsValid(self:GetOwner()) or !self:GetOwner():IsVortigaunt()) then
|
||||
self:Remove()
|
||||
end
|
||||
self:NextThink(CurTime() + 0.1)
|
||||
|
||||
return true
|
||||
end
|
||||
else
|
||||
function ENT:Think()
|
||||
if IsValid(self:GetOwner()) and self:GetOwner():Alive() then
|
||||
local lightVector = self:GetPos() + self:GetUp()*15
|
||||
local dlight = DynamicLight(self:EntIndex())
|
||||
dlight.Pos = lightVector
|
||||
dlight.r = 30
|
||||
dlight.g = 255
|
||||
dlight.b = 30
|
||||
dlight.Brightness = 0
|
||||
dlight.Size = 700
|
||||
dlight.Decay = 5
|
||||
dlight.DieTime = CurTime() + 0.1
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:Draw()
|
||||
self:DrawModel()
|
||||
self:RemoveAllDecals()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,105 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.PrintName = "Vortigaunt Shield"
|
||||
ENT.Category = "HL2RP"
|
||||
ENT.Spawnable = true
|
||||
ENT.bNoPersist = true
|
||||
ENT.AutomaticFrameAdvance = true
|
||||
|
||||
if (SERVER) then
|
||||
function ENT:Initialize()
|
||||
self:SetModel("models/props_phx/construct/metal_dome360.mdl")
|
||||
self:PhysicsInit(SOLID_VPHYSICS)
|
||||
|
||||
local physObj = self:GetPhysicsObject()
|
||||
if (IsValid(physObj)) then
|
||||
physObj:Wake()
|
||||
end
|
||||
|
||||
self:SetCollisionGroup(COLLISION_GROUP_DEBRIS_TRIGGER)
|
||||
self:SetSolid(SOLID_VPHYSICS)
|
||||
self:AddEffects(EF_NOSHADOW)
|
||||
self:AddEFlags(EFL_DONTBLOCKLOS)
|
||||
self:SetRenderMode(RENDERMODE_WORLDGLOW)
|
||||
|
||||
self:SetMaterial("models/props_combine/stasisshield_sheet")
|
||||
self:SetColor(Color(0, 255, 55, 255))
|
||||
self:SetModelScale(1.2)
|
||||
self:SetHealth(ix.config.Get("VortShieldHealth", 500))
|
||||
|
||||
timer.Simple(0.25, function()
|
||||
ParticleEffectAttach("vort_shield_parent", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
end)
|
||||
end
|
||||
|
||||
function ENT:OnTakeDamage(dmginfo)
|
||||
self:EmitSound("ambient/energy/ion_cannon_shot"..math.random(1, 3)..".wav")
|
||||
|
||||
ParticleEffect("vortigaunt_glow_beam_cp0", dmginfo:GetDamagePosition(), Angle(0, 0, 0), self)
|
||||
|
||||
self:SetHealth(math.Clamp(self:Health() - dmginfo:GetDamage(), 0, 350))
|
||||
|
||||
if self:Health() <= 0 then
|
||||
self:Die()
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:ImpactTrace(trace, dmgtype, customimpactname)
|
||||
if (trace.HitSky) then
|
||||
return
|
||||
end
|
||||
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin(trace.HitPos + trace.HitNormal)
|
||||
effectdata:SetNormal(trace.HitNormal)
|
||||
util.Effect("AR2Impact", effectdata)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function ENT:Die()
|
||||
ParticleEffect("vortigaunt_charge_token", self:GetPos()*15, Angle(0, 0, 0))
|
||||
|
||||
self:EmitSound("ambient/levels/labs/electric_explosion1.wav", 80, 100, 1, CHAN_WEAPON)
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ENT:Think()
|
||||
if (!IsValid(self:GetOwner()) or !self:GetOwner():IsVortigaunt()) then
|
||||
self:Remove()
|
||||
end
|
||||
self:NextThink(CurTime() + 0.1)
|
||||
|
||||
return true
|
||||
end
|
||||
else
|
||||
function ENT:Think()
|
||||
if IsValid(self:GetOwner()) and self:GetOwner():Alive() then
|
||||
local lightVector = self:GetPos() + self:GetUp()*15
|
||||
local dlight = DynamicLight(self:EntIndex())
|
||||
dlight.Pos = lightVector
|
||||
dlight.r = 30
|
||||
dlight.g = 255
|
||||
dlight.b = 30
|
||||
dlight.Brightness = 0
|
||||
dlight.Size = 700
|
||||
dlight.Decay = 5
|
||||
dlight.DieTime = CurTime() + 0.1
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:Draw()
|
||||
self:DrawModel()
|
||||
self:RemoveAllDecals()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,204 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if (SERVER) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 1
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortilight"
|
||||
SWEP.DrawCrosshair = true
|
||||
end
|
||||
|
||||
SWEP.Purpose = "Allows you to create green light around your character."
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "Adolphus"
|
||||
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "fist"
|
||||
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Ammo = ""
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.IsAlwaysRaised = true
|
||||
SWEP.vePerUse = 1
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
function SWEP:Initialize()
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- A function to set whether the SWEP is activated.
|
||||
function SWEP:SetActivated(bActivated)
|
||||
self.Activated = bActivated
|
||||
end
|
||||
|
||||
-- A function to get whether the SWEP is activated.
|
||||
function SWEP:IsActivated()
|
||||
return self.Activated
|
||||
end
|
||||
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
if (SERVER) then
|
||||
local ent = ents.Create("ix_nvlight")
|
||||
|
||||
if (!self.Activated) then
|
||||
local percentage = self.vePerUse / 100
|
||||
if !self:GetOwner():HasVortalEnergy(self.vePerUse + (percentage * self:GetOwner():Armor())) then
|
||||
return
|
||||
end
|
||||
self:GetOwner():TakeVortalEnergy(self.vePerUse + (percentage * self:GetOwner():Armor()))
|
||||
self:GetOwner():EmitSound("npc/vort/health_charge.wav")
|
||||
self.Activated = true
|
||||
|
||||
ent:SetOwner(self:GetOwner())
|
||||
ent:SetParent(self:GetOwner())
|
||||
ent:SetPos(self:GetOwner():GetPos())
|
||||
ent:SetOwnerVariable(self:GetOwner())
|
||||
else
|
||||
self:GetOwner():EmitSound("npc/vort/health_charge.wav")
|
||||
self.Activated = false
|
||||
ent:RemoveLight(self:GetOwner())
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
self:SetNextPrimaryFire(CurTime() + 4)
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (CLIENT or !IsValid(self:GetOwner())) then return end
|
||||
|
||||
local worldmodel = ents.FindInSphere(self:GetOwner():GetPos(), 1);
|
||||
|
||||
for _, v in pairs(worldmodel) do
|
||||
if (v:GetClass() == "ix_nvlight" and v:GetOwner() == self:GetOwner()) then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the player attempts to secondary fire.
|
||||
function SWEP:SecondaryAttack() end
|
||||
@@ -0,0 +1,404 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if (SERVER) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 1
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortimelee"
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
game.AddParticles("particles/Vortigaunt_FX.pcf")
|
||||
end
|
||||
|
||||
PrecacheParticleSystem("vortigaunt_glow_beam_cp1")
|
||||
PrecacheParticleSystem("vortigaunt_glow_beam_cp1b")
|
||||
PrecacheParticleSystem("vortigaunt_charge_token")
|
||||
|
||||
SWEP.Purpose = "Melee and Shield"
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "Adolphus (& M!NT)"
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "fist"
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Ammo = ""
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
SWEP.Primary.Damage = 7 --Fuck this rounding piece
|
||||
SWEP.Primary.Delay = 0.75
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.IsAlwaysRaised = true
|
||||
|
||||
SWEP.vePerShield = 10
|
||||
SWEP.vePerSlap = 5
|
||||
|
||||
SWEP.shieldActive = false
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
function SWEP:Initialize()
|
||||
self.lastHand = 0
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
local owner = self:GetOwner()
|
||||
if (!IsValid(owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, owner, self:GetOwner():LookupAttachment("leftclaw"))
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, owner, self:GetOwner():LookupAttachment("rightclaw"))
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:Think()
|
||||
local owner = self:GetOwner()
|
||||
if (self.vSHIELD and !IsValid(owner)) then
|
||||
self.vSHIELD:Remove()
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
local owner = self:GetOwner()
|
||||
if (!IsValid(owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
owner:StopParticles()
|
||||
|
||||
if (self.shieldActive) then
|
||||
if (SERVER) then
|
||||
if IsValid(self.vSHIELD) then
|
||||
self:GetOwner():EmitSound("npc/vort/health_charge.wav")
|
||||
maxHealth = self.vSHIELD:GetMaxHealth()
|
||||
currentHealth = self.vSHIELD:Health()
|
||||
self:GetOwner():GetCharacter():AddVortalEnergy(self.vePerShield * (currentHealth / maxHealth))
|
||||
self.vSHIELD:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.shieldActive = false
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:ValidateShield()
|
||||
for _, shield in ipairs(ents.FindByClass("ix_vortmeleeshield")) do
|
||||
if shield:GetOwner() == self:GetOwner() then
|
||||
shield:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoPunchAnimation()
|
||||
self.lastHand = math.abs(1 - self.lastHand)
|
||||
|
||||
local sequence = 3 + self.lastHand
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(0.5)
|
||||
viewModel:SetSequence(sequence)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration() * 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
if (!IsFirstTimePredicted()) then
|
||||
return
|
||||
end
|
||||
|
||||
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
|
||||
|
||||
if (SERVER) then
|
||||
self:GetOwner():EmitSound("npc/vort/claw_swing"..math.random(1, 2)..".wav")
|
||||
end
|
||||
|
||||
--self:DoPunchAnimation()
|
||||
|
||||
self:GetOwner():SetAnimation(PLAYER_ATTACK1)
|
||||
self:GetOwner():ViewPunch(Angle(self.lastHand + 2, self.lastHand + 5, 0.125))
|
||||
|
||||
if ix.plugin.Get("vortigaunts") then
|
||||
if (ix.config.Get("pushOnly")) and !self:GetOwner():IsVortigaunt() then
|
||||
local data = {}
|
||||
data.start = self.Owner:GetShootPos()
|
||||
data.endpos = data.start + self.Owner:GetAimVector() * 84
|
||||
data.filter = {self, self.Owner}
|
||||
local trace = util.TraceLine(data)
|
||||
local entity = trace.Entity
|
||||
|
||||
if (entity:IsPlayer() and ix.config.Get("allowPush", true)) then
|
||||
self:PushEntity(entity)
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
else
|
||||
if (ix.config.Get("pushOnly")) then
|
||||
local data = {}
|
||||
data.start = self.Owner:GetShootPos()
|
||||
data.endpos = data.start + self.Owner:GetAimVector() * 84
|
||||
data.filter = {self, self.Owner}
|
||||
local trace = util.TraceLine(data)
|
||||
local entity = trace.Entity
|
||||
|
||||
if (entity:IsPlayer() and ix.config.Get("allowPush", true)) then
|
||||
self:PushEntity(entity)
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
timer.Simple(0.055, function()
|
||||
if (IsValid(self) and IsValid(self:GetOwner())) then
|
||||
local damage = self.Primary.Damage
|
||||
local vortalSlash = false
|
||||
local percentage = self.vePerSlap / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
if ix.plugin.Get("vortigaunts") then
|
||||
if self:GetOwner():IsVortigaunt() then
|
||||
if (self.Owner:HasVortalEnergy(self.vePerSlap + (percentage * self.Owner:Armor()))) and !self.shieldActive then
|
||||
vortalSlash = true
|
||||
end
|
||||
damage = damage + self:GetOwner():GetCharacter():GetSkillLevel("melee")
|
||||
if (vortalSlash) then
|
||||
damage = damage + (self:GetOwner():GetCharacter():GetSkillLevel("vort") * 0.6)
|
||||
end
|
||||
end
|
||||
if (SERVER and self:GetOwner():IsPlayer() and self:GetOwner().GetCharacter and self:GetOwner():GetCharacter() and self:GetOwner():IsVortigaunt()) then
|
||||
self:GetOwner():GetCharacter():DoAction("melee_slash")
|
||||
end
|
||||
end
|
||||
local context = {damage = damage}
|
||||
local result = hook.Run("GetPlayerPunchDamage", self:GetOwner(), damage, context)
|
||||
if (result != nil) then
|
||||
damage = result
|
||||
else
|
||||
damage = context.damage
|
||||
end
|
||||
-- damage = damage * 1.7 --For some reason, punching only does 60% of the damage. 60% * 1.7 = 102%
|
||||
|
||||
local pos = self:GetOwner():GetShootPos()
|
||||
local ang = self:GetOwner():GetAimVector()
|
||||
|
||||
self:GetOwner():LagCompensation(true)
|
||||
|
||||
local data = {}
|
||||
data.start = pos
|
||||
data.endpos = pos + (ang * 100)
|
||||
data.filter = {self:GetOwner(), self.vSHIELD}
|
||||
data.mins = Vector(-5, -5, 0)
|
||||
data.maxs = Vector(5, 5, 5)
|
||||
local trace = util.TraceHull(data)
|
||||
|
||||
if (SERVER and trace.Hit) then
|
||||
local entity = trace.Entity
|
||||
|
||||
if (IsValid(entity)) then
|
||||
if ix.plugin.Get("vortigaunts") then
|
||||
if (self:GetOwner():IsPlayer() and self:GetOwner().GetCharacter and self:GetOwner():GetCharacter() and self:GetOwner():IsVortigaunt()) then
|
||||
self:GetOwner():GetCharacter():DoAction("melee_hit")
|
||||
end
|
||||
end
|
||||
local damageInfo = DamageInfo()
|
||||
damageInfo:SetAttacker(self:GetOwner())
|
||||
damageInfo:SetInflictor(self)
|
||||
damageInfo:SetDamage(damage)
|
||||
if (vortalSlash) then
|
||||
damageInfo:SetDamageType(DMG_SHOCK)
|
||||
else
|
||||
damageInfo:SetDamageType(DMG_GENERIC)
|
||||
end
|
||||
damageInfo:SetDamagePosition(trace.HitPos)
|
||||
damageInfo:SetDamageForce(self:GetOwner():GetAimVector() * 1024)
|
||||
entity:DispatchTraceAttack(damageInfo, data.start, data.endpos)
|
||||
|
||||
if (vortalSlash) then
|
||||
self.Owner:TakeVortalEnergy(self.vePerSlap + (percentage * self.Owner:Armor()))
|
||||
ParticleEffect("vortigaunt_glow_beam_cp1", trace.HitPos, Angle(0, 0, 0), entity)
|
||||
ParticleEffect("vortigaunt_glow_beam_cp1b", trace.HitPos, Angle(0, 0, 0), entity)
|
||||
if (entity:IsPlayer()) then
|
||||
if (!(entity:GetCharacter():GetBleedout() > 0) ) then
|
||||
entity:SetLocalVar("blur", 50)
|
||||
entity:SetEyeAngles(Angle(math.random(-89,89),math.random(0,359),0))
|
||||
entity:SetWalkSpeed(ix.config.Get("walkSpeed")/2)
|
||||
entity:SetRunSpeed(ix.config.Get("runSpeed")/2)
|
||||
timer.Simple(3, function()
|
||||
entity:SetLocalVar("blur", nil)
|
||||
entity:SetWalkSpeed(ix.config.Get("walkSpeed"))
|
||||
entity:SetRunSpeed(ix.config.Get("runSpeed"))
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (vortalSlash) then
|
||||
self:GetOwner():EmitSound("npc/vort/attack_shoot.wav", 80)
|
||||
else
|
||||
self:GetOwner():EmitSound("physics/body/body_medium_impact_hard"..math.random(1, 6)..".wav", 80)
|
||||
end
|
||||
end
|
||||
end
|
||||
hook.Run("PlayerThrowPunch", self:GetOwner(), trace)
|
||||
self:GetOwner():LagCompensation(false)
|
||||
|
||||
if (CLIENT and trace.Hit) then
|
||||
local entity = trace.Entity
|
||||
if (!vortalSlash and !self.shieldActive) then
|
||||
chat.AddText(Color(26, 171, 69), "[VORTESSENCE] You were too tired to empower your strikes!")
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
|
||||
if (!self.shieldActive) then
|
||||
local owner = self:GetOwner()
|
||||
|
||||
local percentage = self.vePerShield / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
if !self.Owner:HasVortalEnergy(self.vePerShield + (percentage * self.Owner:Armor())) then
|
||||
return
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (!IsValid(self.vSHIELD)) then
|
||||
self:SetNextSecondaryFire(CurTime() + 1)
|
||||
|
||||
self.Owner:TakeVortalEnergy(self.vePerShield + (percentage * self.Owner:Armor()))
|
||||
|
||||
self:ValidateShield()
|
||||
|
||||
self.vSHIELD = ents.Create("ix_vortmeleeshield")
|
||||
self.vSHIELD:SetPos(owner:GetPos() + owner:GetUp()*45)
|
||||
self.vSHIELD:Spawn()
|
||||
self.vSHIELD:Activate()
|
||||
self.vSHIELD:SetOwner(owner)
|
||||
self.vSHIELD:FollowBone(owner, 11)
|
||||
self.vSHIELD:SetLocalAngles(Angle(0, 0, -90))
|
||||
self.vSHIELD:SetLocalPos(Vector(0, 50, 0))
|
||||
owner:EmitSound("npc/vort/health_charge.wav")
|
||||
end
|
||||
end
|
||||
self.shieldActive = true
|
||||
return false
|
||||
else
|
||||
if (SERVER) then
|
||||
if IsValid(self.vSHIELD) then
|
||||
self:GetOwner():EmitSound("npc/vort/health_charge.wav")
|
||||
maxHealth = self.vSHIELD:GetMaxHealth()
|
||||
currentHealth = self.vSHIELD:Health()
|
||||
self:GetOwner():GetCharacter():AddVortalEnergy(self.vePerShield * (currentHealth / maxHealth))
|
||||
self.vSHIELD:Remove()
|
||||
end
|
||||
self:SetNextSecondaryFire(CurTime() + 1)
|
||||
end
|
||||
self.shieldActive = false
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,363 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if ( SERVER ) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortibeam Advanced"
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
game.AddParticles("particles/Vortigaunt_FX.pcf")
|
||||
end
|
||||
|
||||
PrecacheParticleSystem("wn_vortigaunt_beam_colored")
|
||||
PrecacheParticleSystem("wn_vortigaunt_beam_charge_colored")
|
||||
PrecacheParticleSystem("wn_vortigaunt_hand_glow_colored")
|
||||
|
||||
SWEP.Instructions = "Primary Fire: Fire your beam."
|
||||
SWEP.Purpose = "Immediately kills the target that you fire it at."
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "RJ"
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
player_manager.AddValidModel("vortigaunt_arms2", "models/willardnetworks/vortigaunt.mdl")
|
||||
player_manager.AddValidHands("vortigaunt_arms2", "models/willardnetworks/c_arms_vortigaunt.mdl", 1, "0000000")
|
||||
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.WorldModel = ""
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
|
||||
SWEP.Primary.IsAlwaysRaised = true
|
||||
SWEP.IsAlwaysRaised = true
|
||||
SWEP.HoldType = "pistol"
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Damage = 40
|
||||
SWEP.Primary.Delay = 3
|
||||
SWEP.Primary.Ammo = ""
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Delay = 0
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.vePerShot = 100
|
||||
SWEP.aoeRadius = 90
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
-- Called when the SWEP is deployed.
|
||||
function SWEP:Deploy()
|
||||
self:SendWeaponAnim(ACT_VM_DRAW)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the SWEP is holstered.
|
||||
function SWEP:Holster(switchingTo)
|
||||
self:SendWeaponAnim(ACT_VM_HOLSTER)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (SERVER) then
|
||||
if self:GetOwner() then
|
||||
if self:GetOwner().DrawViewModel then
|
||||
self:GetOwner():DrawViewModel(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (self:GetOwner().broomModel) then
|
||||
if (self:GetOwner().broomModel:IsValid()) then
|
||||
self:GetOwner().broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the SWEP is initialized.
|
||||
function SWEP:Initialize()
|
||||
self.Primary.Damage = ix.config.Get("advancedBeamDamage", 200)
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
end
|
||||
|
||||
function SWEP:CanPrimaryAttack()
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
return v
|
||||
end
|
||||
|
||||
if !self:GetOwner():HasVortalEnergy(self.vePerShot) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():GetCharacter():CanDoAction("vort_beam_shoot")) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():OnGround()) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
if (self.bIsFiring or !self:CanPrimaryAttack()) then return end
|
||||
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
|
||||
self.bIsFiring = true
|
||||
|
||||
if (CLIENT) then
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
self.IronSightsPos = Vector(-10, -5, -70)
|
||||
self.IronSightsAng = Vector(-5, 100, 10)
|
||||
end
|
||||
|
||||
self:GetOwner():SetAnimation( PLAYER_ATTACK1 )
|
||||
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
|
||||
|
||||
local chargeSound = CreateSound(self:GetOwner(), "npc/vort/attack_charge.wav")
|
||||
chargeSound:SetSoundLevel( 60 )
|
||||
chargeSound:Play()
|
||||
|
||||
ParticleEffectAttach("wn_vortigaunt_hand_glow_colored", PATTACH_POINT_FOLLOW, self:GetOwner(), self:GetOwner():LookupAttachment("leftclaw"))
|
||||
ParticleEffectAttach("wn_vortigaunt_hand_glow_colored", PATTACH_POINT_FOLLOW, self:GetOwner(), self:GetOwner():LookupAttachment("rightclaw"))
|
||||
util.ScreenShake( self:GetOwner():GetPos(), 8, 15, 1, 1000 )
|
||||
timer.Simple(0.6, function()
|
||||
chargeSound:Stop()
|
||||
|
||||
if (!IsValid(self)) then return end
|
||||
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
self.bIsFiring = false
|
||||
return
|
||||
end
|
||||
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
self.bIsFiring = false
|
||||
return v
|
||||
end
|
||||
self:GetOwner():EmitSound("npc/vort/attack_shoot.wav", 40)
|
||||
|
||||
local forward = self:GetOwner():EyeAngles():Forward()
|
||||
local tr = util.QuickTrace(self:GetOwner():EyePos(), (forward + VectorRand(-0.005, 0.005)) * 5000, self:GetOwner())
|
||||
|
||||
self:GetOwner():StopParticles()
|
||||
|
||||
local leftClaw = self:GetOwner():LookupAttachment("leftclaw")
|
||||
|
||||
if (leftClaw) then
|
||||
util.ParticleTracerEx(
|
||||
"wn_vortigaunt_beam_colored", self:GetOwner():GetAttachment(leftClaw).Pos, tr.HitPos, true, self:GetOwner():EntIndex(), leftClaw
|
||||
)
|
||||
end
|
||||
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin( tr.HitPos + Vector(0, 0, 50) )
|
||||
util.Effect( "vortibeam_explosion", effectdata )
|
||||
|
||||
if SERVER then
|
||||
self:GetOwner():TakeVortalEnergy(self.vePerShot)
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
local damage = self:GetOwner():GetCharacter():GetSkillScale("vort_beam") + self.Primary.Damage
|
||||
local damageInfo = DamageInfo()
|
||||
if self:GetOwner():GetNetVar("ixVortExtract") then
|
||||
damage = 999
|
||||
end
|
||||
damageInfo:SetAttacker(self:GetOwner())
|
||||
damageInfo:SetInflictor(self)
|
||||
damageInfo:SetDamage(damage)
|
||||
damageInfo:SetDamageForce(forward * damage)
|
||||
damageInfo:SetReportedPosition(leftClaw and self:GetOwner():GetAttachment(leftClaw).Pos or self:GetOwner():EyePos())
|
||||
damageInfo:SetDamagePosition(tr.HitPos)
|
||||
damageInfo:SetDamageType(DMG_SHOCK)
|
||||
for k, target in pairs(ents.FindInSphere(tr.HitPos, self.aoeRadius)) do
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if !target:IsLineOfSightClear(tr.HitPos) then
|
||||
continue
|
||||
end
|
||||
|
||||
if (damageInfo:GetDamage() >= 1) then
|
||||
target:TakeDamageInfo(damageInfo)
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
hook.Run("PostCalculatePlayerDamage", target, damageInfo, HITGROUP_GENERIC)
|
||||
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has damaged " .. target:Name() .. " dealing " .. damage .. " with vortadvancedbeam")
|
||||
|
||||
ix.chat.Send(self:GetOwner(), "vortbeam", "has damaged " .. target:Name() .. ", dealing " .. damage .. " points of damage", false, attacker)
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has damaged " .. target:GetClass() .. ", dealing " .. damage .. " with vortadvancedbeam")
|
||||
end
|
||||
|
||||
if (target:IsNPC() or target:IsPlayer()) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_shoot")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
for k, target in pairs(ents.FindInSphere(tr.HitPos, self.aoeRadius)) do
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if !target:IsLineOfSightClear(tr.HitPos) then
|
||||
continue
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
--chat.AddText(Color(217, 83, 83), "You have damaged " .. target:Name() .. ", dealing " .. self:GetOwner():GetCharacter():GetSkillScale("vort_beam") + self.Primary.Damage .. " points of damage.")
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
--chat.AddText(Color(217, 83, 83), "You have damaged " .. target:GetClass() .. ", dealing " .. self:GetOwner():GetCharacter():GetSkillScale("vort_beam") + self.Primary.Damage .. " points of damage.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
timer.Simple(1, function()
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
|
||||
self.IronSightsPos = Vector(-5, -5, -105)
|
||||
self.IronSightsAng = Vector(35, 15, 10)
|
||||
end
|
||||
end)
|
||||
|
||||
timer.Simple(2, function()
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
self.IronSightsPos = Vector(-5, -5, -55)
|
||||
end)
|
||||
|
||||
hook.Run("TFA_PostSecondaryAttack", self)
|
||||
|
||||
if (SERVER) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_practice")
|
||||
end
|
||||
|
||||
self.bIsFiring = false
|
||||
end)
|
||||
hook.Run("TFA_PostSecondaryAttack", self, true)
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,474 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if ( SERVER ) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortibeam"
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
game.AddParticles("particles/Vortigaunt_FX.pcf")
|
||||
end
|
||||
|
||||
PrecacheParticleSystem("vortigaunt_beam")
|
||||
PrecacheParticleSystem("vortigaunt_beam_b")
|
||||
PrecacheParticleSystem("vortigaunt_charge_token")
|
||||
|
||||
SWEP.Instructions = "Primary Fire: Fire your beam."
|
||||
SWEP.Purpose = "Immediately kills the target that you fire it at."
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "RJ"
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
player_manager.AddValidModel("vortigaunt_arms2", "models/willardnetworks/vortigaunt.mdl")
|
||||
player_manager.AddValidHands("vortigaunt_arms2", "models/willardnetworks/c_arms_vortigaunt.mdl", 1, "0000000")
|
||||
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "pistol"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = true
|
||||
|
||||
SWEP.Primary.IsAlwaysRaised = true
|
||||
SWEP.IsAlwaysRaised = true
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Damage = 40
|
||||
SWEP.Primary.Delay = 1.5
|
||||
SWEP.Primary.Ammo = ""
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Delay = 0
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.vePerShot = 5
|
||||
SWEP.aoeRadius = 50
|
||||
|
||||
SWEP.lockAngle = 5
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
-- Called when the SWEP is deployed.
|
||||
function SWEP:Deploy()
|
||||
self:SendWeaponAnim(ACT_VM_DRAW)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the SWEP is holstered.
|
||||
function SWEP:Holster(switchingTo)
|
||||
self:SendWeaponAnim(ACT_VM_HOLSTER)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (SERVER) then
|
||||
if self:GetOwner() then
|
||||
if self:GetOwner().DrawViewModel then
|
||||
self:GetOwner():DrawViewModel(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (self:GetOwner().broomModel) then
|
||||
if (self:GetOwner().broomModel:IsValid()) then
|
||||
self:GetOwner().broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the SWEP is initialized.
|
||||
function SWEP:Initialize()
|
||||
self.Primary.Damage = ix.config.Get("vortBeamAdditionalDamage", 40)
|
||||
self.lockAngle = ix.config.Get("VortbeamAngle", 5)
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
end
|
||||
|
||||
function SWEP:CanPrimaryAttack()
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
return v
|
||||
end
|
||||
|
||||
local percentage = self.vePerShot / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
if !self:GetOwner():HasVortalEnergy(self.vePerShot + (percentage * self:GetOwner():Armor())) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():GetCharacter():CanDoAction("vort_beam_shoot")) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():OnGround()) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:InterestingHit(entity)
|
||||
if entity:IsPlayer() or entity:IsNextBot() or entity:IsNPC() or entity:IsVehicle() then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
if (self.bIsFiring or !self:CanPrimaryAttack() or self:GetOwner():IsSprinting()) then return end
|
||||
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
|
||||
|
||||
self.bIsFiring = true
|
||||
|
||||
if (CLIENT) then
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
self.IronSightsPos = Vector(-10, -5, -70)
|
||||
self.IronSightsAng = Vector(-5, 100, 10)
|
||||
end
|
||||
|
||||
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
|
||||
self:GetOwner():SetAnimation( PLAYER_ATTACK1 )
|
||||
|
||||
local chargeSound = CreateSound(self:GetOwner(), "npc/vort/attack_charge.wav")
|
||||
chargeSound:SetSoundLevel( 60 )
|
||||
chargeSound:Play()
|
||||
|
||||
if (SERVER) then
|
||||
self:GetOwner():SprintDisable()
|
||||
end
|
||||
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, self:GetOwner(), self:GetOwner():LookupAttachment("leftclaw"))
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, self:GetOwner(), self:GetOwner():LookupAttachment("rightclaw"))
|
||||
|
||||
timer.Simple(0.6, function()
|
||||
chargeSound:Stop()
|
||||
if (SERVER) then
|
||||
self:GetOwner():SprintEnable()
|
||||
end
|
||||
|
||||
if (!IsValid(self)) then return end
|
||||
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
self.bIsFiring = false
|
||||
return
|
||||
end
|
||||
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
self.bIsFiring = false
|
||||
return v
|
||||
end
|
||||
self:GetOwner():EmitSound("npc/vort/attack_shoot.wav", 40)
|
||||
|
||||
local distance = nil;
|
||||
local closest = nil;
|
||||
local directAim = false;
|
||||
|
||||
local ang = self:GetOwner():GetAimVector()
|
||||
local pos = self:GetOwner():GetShootPos()
|
||||
|
||||
local trace = {}
|
||||
trace.start = pos
|
||||
trace.endpos = pos + (ang * 65535)
|
||||
trace.filter = {self:GetOwner()}
|
||||
trace.mask = 33570817
|
||||
local trace = util.TraceLine(trace)
|
||||
|
||||
local finalHitPos = trace.HitPos;
|
||||
|
||||
if (trace.Entity and (trace.Entity:IsPlayer() or trace.Entity:IsNPC())) then
|
||||
-- we are looking right at something, that is the closest thing for sure
|
||||
closest = trace.Entity;
|
||||
directAim = true;
|
||||
else
|
||||
local x1 = self.Owner:GetShootPos();
|
||||
local x2 = trace.HitPos;
|
||||
local x12 = x2 - x1;
|
||||
local difflength = x12:LengthSqr();
|
||||
|
||||
local maxangle = math.cos(3.14159265 * self.lockAngle / 180)
|
||||
maxangle = maxangle * maxangle --Square all the way
|
||||
|
||||
local entities = ents.GetAll();
|
||||
|
||||
for k, v in pairs(entities) do
|
||||
--loop through everything, skip invalid stuff
|
||||
if (!v:IsValid()) then
|
||||
continue;
|
||||
elseif (!v:IsPlayer() and !v:IsNPC() and !v:IsNextBot()) then
|
||||
continue;
|
||||
elseif ((v.Health and v:Health() <= 0) or (v.Alive and !v:Alive())) then
|
||||
continue;
|
||||
elseif (v == self.Owner or (v.IsNoClipping and v:IsNoClipping())) then
|
||||
continue;
|
||||
end;
|
||||
|
||||
local targetFeet = v:GetPos()
|
||||
local targetShootPos = v:EyePos()
|
||||
-- we grab something roughly between their eyes and feet
|
||||
local x0 = (targetShootPos + Vector(0, 0, -5)) * 0.80 + targetFeet * 0.20;
|
||||
|
||||
-- determine angle from our LOS to our LOS to them, if they are really close to us it might be they are too far off to the side, we don't want to snap someone hugging our shoulder because he is ~30 units away from the start of our LOS
|
||||
local x10 = x0 - x1;
|
||||
local x10x12Dot = x10:Dot(x12)
|
||||
x10x12Dot = x10x12Dot * x10x12Dot
|
||||
local angle = x10x12Dot / (difflength * x10:LengthSqr());
|
||||
if (angle < maxangle) then
|
||||
continue;
|
||||
end;
|
||||
|
||||
local x20 = x10 - x12;
|
||||
local angle2 = x20:Dot(x12 * -1)
|
||||
-- also determine the angle with the end hit marker, to be sure they aren't beyond where the trace hit
|
||||
if (angle2 < 0) then
|
||||
continue;
|
||||
end;
|
||||
|
||||
-- cool vector math to calculate distance to a line
|
||||
local dist = (x0 - x1):Cross(x0 - x2):LengthSqr() / difflength;
|
||||
|
||||
local maxDistBase = ix.config.Get("VortbeamBorders", 100)
|
||||
if dist > (maxDistBase * maxDistBase) then continue end
|
||||
|
||||
if (!distance or distance > dist) then
|
||||
local centerTrace = {};
|
||||
centerTrace.start = x1;
|
||||
centerTrace.endpos = x0;
|
||||
centerTrace.filter = {self:GetOwner()}
|
||||
centerTrace.mask = 33570817
|
||||
local centerTraceResult = util.TraceLine(centerTrace)
|
||||
|
||||
if (!centerTraceResult.Hit or (centerTraceResult.Entity and centerTraceResult.Entity == v)) then
|
||||
closest = v;
|
||||
distance = dist;
|
||||
finalHitPos = x0;
|
||||
else
|
||||
local feetTrace = {}
|
||||
feetTrace.start = x1
|
||||
feetTrace.endpos = targetFeet
|
||||
feetTrace.filter = {self:GetOwner()}
|
||||
feetTrace.mask = 33570817
|
||||
local feetTraceResult = util.TraceLine(feetTrace)
|
||||
|
||||
if (!feetTraceResult.Hit or (feetTraceResult.Entity and feetTraceResult.Entity == v)) then
|
||||
closest = v;
|
||||
distance = dist;
|
||||
finalHitPos = targetFeet
|
||||
else
|
||||
local headTrace = {}
|
||||
headTrace.start = x1
|
||||
headTrace.endpos = targetShootPos
|
||||
headTrace.filter = {self:GetOwner()}
|
||||
headTrace.mask = 33570817
|
||||
local headTraceResult = util.TraceLine(headTrace)
|
||||
|
||||
if (!headTraceResult.Hit or (headTraceResult.Entity and headTraceResult.Entity == v)) then
|
||||
closest = v;
|
||||
distance = dist;
|
||||
finalHitPos = targetShootPos;
|
||||
end
|
||||
end
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if (closest) then
|
||||
if (SERVER) then
|
||||
local target = closest
|
||||
local damage = self:GetOwner():GetCharacter():GetSkillScale("vort_beam") + self.Primary.Damage
|
||||
-- damage = damage * 1.7
|
||||
local damageInfo = DamageInfo()
|
||||
if self:GetOwner():GetNetVar("ixVortExtract") then
|
||||
damage = 999
|
||||
end
|
||||
damageInfo:SetAttacker(self:GetOwner())
|
||||
damageInfo:SetInflictor(self)
|
||||
damageInfo:SetDamage(damage)
|
||||
damageInfo:SetDamageForce(ang * damage)
|
||||
damageInfo:SetReportedPosition(leftClaw and self:GetOwner():GetAttachment(leftClaw).Pos or self:GetOwner():EyePos())
|
||||
damageInfo:SetDamagePosition(finalHitPos)
|
||||
damageInfo:SetDamageType(DMG_SHOCK)
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if (damageInfo:GetDamage() >= 1) then
|
||||
target:TakeDamageInfo(damageInfo)
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
hook.Run("PostCalculatePlayerDamage", target, damageInfo, HITGROUP_GENERIC)
|
||||
|
||||
ix.log.AddRaw("[VORT] " .. self:GetOwner():Name() .. " has damaged " .. target:Name() .. ", dealing " .. damage .. " with vortbeam")
|
||||
|
||||
ix.chat.Send(self:GetOwner(), "vortbeam", "has damaged " .. target:Name() .. ", dealing " .. damage .. " points of damage", false, attacker)
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
ix.log.AddRaw("[VORT] " .. self:GetOwner():Name() .. " has damaged " .. target:GetClass() .. ", dealing " .. damage .. " with vortbeam")
|
||||
|
||||
ix.chat.Send(self:GetOwner(), "vortbeam", "has damaged " .. target:GetClass() .. ", dealing " .. damage .. " points of damage", false, attacker)
|
||||
end
|
||||
|
||||
if (target:IsNPC() or target:IsPlayer()) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_shoot")
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
-- When you don't hit shit you don't hit shit.
|
||||
end;
|
||||
|
||||
self:GetOwner():StopParticles()
|
||||
|
||||
local leftClaw = self:GetOwner():LookupAttachment("leftclaw")
|
||||
|
||||
if (leftClaw) then
|
||||
util.ParticleTracerEx(
|
||||
"vortigaunt_beam", self:GetOwner():GetAttachment(leftClaw).Pos, finalHitPos, true, self:GetOwner():EntIndex(), leftClaw
|
||||
)
|
||||
end
|
||||
|
||||
if SERVER then
|
||||
local percentage = self.vePerShot / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
self:GetOwner():TakeVortalEnergy(self.vePerShot + (percentage * self:GetOwner():Armor()))
|
||||
end
|
||||
self.bIsFiring = false
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
timer.Simple(1, function()
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
|
||||
self.IronSightsPos = Vector(-5, -5, -105)
|
||||
self.IronSightsAng = Vector(35, 15, 10)
|
||||
end
|
||||
end)
|
||||
|
||||
timer.Simple(1, function()
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
self.IronSightsPos = Vector(-5, -5, -55)
|
||||
end)
|
||||
|
||||
hook.Run("TFA_PostSecondaryAttack", self)
|
||||
|
||||
if (SERVER) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_practice")
|
||||
end
|
||||
end)
|
||||
hook.Run("TFA_PostSecondaryAttack", self, true)
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,295 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if ( SERVER ) then
|
||||
AddCSLuaFile( "shared.lua" )
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 5
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Channel Energy"
|
||||
SWEP.DrawCrosshair = true
|
||||
end
|
||||
|
||||
SWEP.Author = "Fruity"
|
||||
SWEP.Instructions = "Primary Fire: Heal/Overcharge Lock"
|
||||
SWEP.Purpose = "To heal people or overcharge combine equipment."
|
||||
SWEP.Contact = ""
|
||||
|
||||
SWEP.Primary.IsAlwaysRaised = true
|
||||
SWEP.IsAlwaysRaised = true
|
||||
SWEP.Category = "Vort Swep"
|
||||
SWEP.Slot = 5
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.Weight = 5
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "smg"
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
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.vePerHP = 0.5
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetHoldType(self.HoldType)
|
||||
end
|
||||
|
||||
|
||||
function SWEP:Deploy()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (!self.HealSound) then
|
||||
self.HealSound = CreateSound( self.Weapon, "npc/vort/health_charge.wav" )
|
||||
end
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DispatchEffect(EFFECTSTR)
|
||||
local pPlayer=self:GetOwner()
|
||||
if !pPlayer then return end
|
||||
local view
|
||||
if CLIENT then view=GetViewEntity() else view=pPlayer:GetViewEntity() end
|
||||
|
||||
if ( !pPlayer:IsNPC() and view:IsPlayer() ) then
|
||||
ParticleEffectAttach( EFFECTSTR, PATTACH_POINT_FOLLOW, pPlayer, pPlayer:LookupAttachment( "leftclaw" ) )
|
||||
else
|
||||
ParticleEffectAttach( EFFECTSTR, PATTACH_POINT_FOLLOW, pPlayer, pPlayer:LookupAttachment( "leftclaw" ) )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
if (!self:GetOwner():Alive()) then return false end
|
||||
if (!self:GetOwner():GetCharacter():IsVortigaunt()) then return false end
|
||||
|
||||
if (!self:GetOwner():GetCharacter():CanDoAction("vort_channel")) then return false end
|
||||
|
||||
local eye = self:GetOwner():GetEyeTrace()
|
||||
if (!eye.Entity:IsPlayer()) and (eye.Entity:GetClass() != "prop_ragdoll" and eye.Entity:GetClass() != "ix_combinelock" and eye.Entity:GetClass() != "ix_combinelock_cmru" and eye.Entity:GetClass() != "ix_combinelock_cwu" and eye.Entity:GetClass() != "ix_combinelock_dob" and eye.Entity:GetClass() != "ix_combinelock_moe") then return end
|
||||
if (eye.Entity:GetClass() == "prop_ragdoll" and !eye.Entity.ixPlayer) then return end
|
||||
|
||||
local target = eye.Entity
|
||||
if (!IsValid(target)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (self:GetOwner():Health() <= 50) then
|
||||
if (SERVER) then
|
||||
self:GetOwner():NotifyLocalized("You are too weak to channel your energy!")
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
if (IsValid(target.ixPlayer)) then
|
||||
target = target.ixPlayer
|
||||
end
|
||||
|
||||
if (target:GetPos():DistToSqr(self:GetOwner():GetShootPos()) > 105 * 105) then return end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
if (target:Health() >= target:GetMaxHealth()) then
|
||||
if (SERVER) then
|
||||
self:GetOwner():NotifyLocalized("The target is perfectly healthy!")
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
if (target:GetCharacter() and target:GetCharacter():GetBleedout()) then
|
||||
if target:GetCharacter().SetBleedout then
|
||||
target:GetCharacter():SetBleedout(-1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self:SetNextPrimaryFire( 10 )
|
||||
self:SendWeaponAnim( ACT_VM_SECONDARYATTACK )
|
||||
|
||||
if (CLIENT) then
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
self.IronSightsPos = Vector(0, -5, -55)
|
||||
self.IronSightsAng = Vector(35, 15, 10)
|
||||
end
|
||||
local healAmount = self:GetOwner():GetCharacter():GetSkillScale("vort_heal_amount")
|
||||
local veToApply = healAmount * self.vePerHP
|
||||
local percentage = self.vePerHP / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
percentage = healAmount * percentage
|
||||
|
||||
if !self:GetOwner():HasVortalEnergy(veToApply + (percentage * self:GetOwner():Armor())) then
|
||||
self:GetOwner():NotifyLocalized("You don't have enough vortal energy!")
|
||||
return
|
||||
end
|
||||
if (SERVER) then
|
||||
self:GetOwner():ForceSequence("heal_start", function()
|
||||
self:DispatchEffect("vortigaunt_charge_token")
|
||||
self:GetOwner():EmitSound( "npc/vort/health_charge.wav", 100, 150, 1, CHAN_AUTO )
|
||||
self:SendWeaponAnim( ACT_VM_RELOAD )
|
||||
self:GetOwner():ForceSequence("heal_cycle", function()
|
||||
if (!self:GetOwner():Alive()) then return end
|
||||
if (target:GetPos():DistToSqr(self:GetOwner():GetShootPos()) <= 105 * 105) then
|
||||
if (target:IsPlayer()) then
|
||||
self:GetOwner():TakeVortalEnergy(veToApply + (percentage * self:GetOwner():Armor()))
|
||||
target:SetHealth(math.Clamp(target:Health() + healAmount, 0, target:GetMaxHealth()))
|
||||
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has healed " .. target:Name())
|
||||
else
|
||||
ix.combineNotify:AddNotification("LOG:// Bio-Restrictor " .. (target:GetLocked() and "unlocked" or "locked") .. " by %USER-ERROR%", nil, self:GetOwner())
|
||||
|
||||
target:SetLocked(!target:GetLocked())
|
||||
|
||||
self:GetOwner():GetCharacter():DoAction("vort_channel")
|
||||
end
|
||||
else
|
||||
self:GetOwner():StopSound("npc/vort/health_charge.wav")
|
||||
end
|
||||
|
||||
self:GetOwner():StopParticles()
|
||||
self:SendWeaponAnim( ACT_VM_PULLBACK )
|
||||
self:GetOwner():ForceSequence("heal_end", function()
|
||||
self:SetNextPrimaryFire( 0 )
|
||||
self:GetOwner():StopSound("npc/vort/health_charge.wav")
|
||||
self:GetOwner():Freeze(false)
|
||||
|
||||
self:GetOwner().lastVortHeal = CurTime() + 30
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
self:GetOwner():Freeze(true)
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
timer.Simple(8, function()
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
self.IronSightsPos = Vector(-5, -5, -55)
|
||||
self.IronSightsAng = Vector(35, 15, 10)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,347 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if ( SERVER ) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortipyro"
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
game.AddParticles("particles/Vortigaunt_FX.pcf")
|
||||
end
|
||||
|
||||
PrecacheParticleSystem("vortigaunt_beam")
|
||||
PrecacheParticleSystem("vortigaunt_beam_b")
|
||||
PrecacheParticleSystem("vortigaunt_charge_token")
|
||||
|
||||
SWEP.Instructions = "Primary Fire: Let them burn."
|
||||
SWEP.Purpose = "Immediately kills the target that you fire it at."
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "RJ"
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
player_manager.AddValidModel("vortigaunt_arms2", "models/willardnetworks/vortigaunt.mdl")
|
||||
player_manager.AddValidHands("vortigaunt_arms2", "models/willardnetworks/c_arms_vortigaunt.mdl", 1, "0000000")
|
||||
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "pistol"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
|
||||
SWEP.Primary.IsAlwaysRaised = true
|
||||
SWEP.IsAlwaysRaised = true
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Damage = 15
|
||||
SWEP.Primary.Delay = 3
|
||||
SWEP.Primary.Ammo = ""
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Delay = 0
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.vePerShot = 40
|
||||
SWEP.aoeRadius = 320
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
-- Called when the SWEP is deployed.
|
||||
function SWEP:Deploy()
|
||||
self:SendWeaponAnim(ACT_VM_DRAW)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the SWEP is holstered.
|
||||
function SWEP:Holster(switchingTo)
|
||||
self:SendWeaponAnim(ACT_VM_HOLSTER)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (SERVER) then
|
||||
if self:GetOwner() then
|
||||
if self:GetOwner().DrawViewModel then
|
||||
self:GetOwner():DrawViewModel(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (self:GetOwner().broomModel) then
|
||||
if (self:GetOwner().broomModel:IsValid()) then
|
||||
self:GetOwner().broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the SWEP is initialized.
|
||||
function SWEP:Initialize()
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
end
|
||||
|
||||
function SWEP:CanPrimaryAttack()
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
return v
|
||||
end
|
||||
|
||||
local percentage = self.vePerShot / 100
|
||||
|
||||
if !self:GetOwner():HasVortalEnergy(self.vePerShot + (percentage * self:GetOwner():Armor())) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():GetCharacter():CanDoAction("vort_beam_shoot")) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():OnGround()) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
|
||||
|
||||
if (self.bIsFiring or !self:CanPrimaryAttack()) then return end
|
||||
self.bIsFiring = true
|
||||
|
||||
ParticleEffectAttach("vort_meditation", PATTACH_ABSORIGIN_FOLLOW, self:GetOwner(), 0)
|
||||
ParticleEffectAttach("vort_shield_parent", PATTACH_ABSORIGIN_FOLLOW, self:GetOwner(), 0)
|
||||
|
||||
if SERVER then
|
||||
local owner = self:GetOwner()
|
||||
owner:SetVelocity(-owner:GetVelocity())
|
||||
owner:SetRunSpeed(1)
|
||||
owner:SetWalkSpeed(1)
|
||||
owner:SetJumpPower(1)
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
if !IsValid(owner) then return end
|
||||
owner:ForceSequence("Stomp", function()
|
||||
owner:SetRunSpeed(ix.config.Get("runSpeed") * 1.25)
|
||||
owner:SetWalkSpeed(ix.config.Get("walkSpeed"))
|
||||
owner:SetJumpPower(250)
|
||||
end, nil, true)
|
||||
end)
|
||||
end
|
||||
timer.Simple(0.2, function()
|
||||
if !IsValid(self:GetOwner()) then return end
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, self:GetOwner(), 12)
|
||||
end)
|
||||
local chargeSound = CreateSound(self:GetOwner(), "npc/vort/attack_charge.wav")
|
||||
chargeSound:SetSoundLevel( 90 )
|
||||
chargeSound:Play()
|
||||
|
||||
timer.Simple(1, function()
|
||||
chargeSound:Stop()
|
||||
if (!IsValid(self)) then return end
|
||||
|
||||
if (!IsValid(self:GetOwner()) or !self:GetOwner():Alive()) then
|
||||
self.bIsFiring = false
|
||||
return
|
||||
end
|
||||
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
self.bIsFiring = false
|
||||
return v
|
||||
end
|
||||
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin( self:GetOwner():GetPos() )
|
||||
util.Effect( "vortipyro_explosion", effectdata )
|
||||
self:GetOwner():EmitSound("npc/vort/attack_shoot.wav", 40, 90)
|
||||
|
||||
local forward = self:GetOwner():EyeAngles():Forward()
|
||||
|
||||
self:GetOwner():StopParticles()
|
||||
|
||||
if SERVER then
|
||||
local percentage = self.vePerShot / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
self:GetOwner():TakeVortalEnergy(self.vePerShot + (percentage * self:GetOwner():Armor()))
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
local damage = self.Primary.Damage
|
||||
local damageInfo = DamageInfo()
|
||||
damageInfo:SetAttacker(self:GetOwner())
|
||||
damageInfo:SetInflictor(self)
|
||||
damageInfo:SetDamage(damage)
|
||||
damageInfo:SetDamageForce(forward * damage)
|
||||
damageInfo:SetReportedPosition(self:GetOwner():GetPos())
|
||||
damageInfo:SetDamagePosition(self:GetOwner():GetPos())
|
||||
damageInfo:SetDamageType(DMG_BURN)
|
||||
for k, target in pairs(ents.FindInSphere(self:GetOwner():GetPos(), self.aoeRadius)) do
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if !self:GetOwner():IsLineOfSightClear(target) then
|
||||
continue
|
||||
end
|
||||
target:Ignite(12)
|
||||
|
||||
if (damageInfo:GetDamage() >= 1) then
|
||||
target:TakeDamageInfo(damageInfo)
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
hook.Run("PostCalculatePlayerDamage", target, damageInfo, HITGROUP_GENERIC)
|
||||
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has damaged " .. target:Name() .. " dealing " .. damage .. " with vortpyro")
|
||||
|
||||
ix.chat.Send(self:GetOwner(), "vortbeam", "has damaged " .. target:Name() .. ", dealing " .. damage .. " points of damage", false, attacker)
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has damaged " .. target:GetClass() .. ", dealing " .. damage .. " with vortpyro")
|
||||
end
|
||||
|
||||
if (target:IsNPC() or target:IsPlayer()) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_shoot")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
for k, target in pairs(ents.FindInSphere(self:GetOwner():GetPos(), self.aoeRadius)) do
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if !self:GetOwner():IsLineOfSightClear(target) then
|
||||
continue
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
--chat.AddText(Color(217, 83, 83), "You have damaged " .. target:Name() .. ", dealing " .. self.Primary.Damage .. " points of damage.")
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
--chat.AddText(Color(217, 83, 83), "You have damaged " .. target:GetClass() .. ", dealing " .. self.Primary.Damage .. " points of damage.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Run("TFA_PostSecondaryAttack", self)
|
||||
|
||||
if (SERVER) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_practice")
|
||||
end
|
||||
|
||||
self.bIsFiring = false
|
||||
end)
|
||||
hook.Run("TFA_PostSecondaryAttack", self, true)
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,346 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if ( SERVER ) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortislam"
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
game.AddParticles("particles/Vortigaunt_FX.pcf")
|
||||
end
|
||||
|
||||
PrecacheParticleSystem("vortigaunt_beam")
|
||||
PrecacheParticleSystem("vortigaunt_beam_b")
|
||||
PrecacheParticleSystem("vortigaunt_charge_token")
|
||||
|
||||
SWEP.Instructions = "Primary Fire: Breaks the surface."
|
||||
SWEP.Purpose = "Immediately kills the target that you fire it at."
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "RJ"
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
player_manager.AddValidModel("vortigaunt_arms2", "models/willardnetworks/vortigaunt.mdl")
|
||||
player_manager.AddValidHands("vortigaunt_arms2", "models/willardnetworks/c_arms_vortigaunt.mdl", 1, "0000000")
|
||||
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "pistol"
|
||||
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
|
||||
SWEP.Primary.IsAlwaysRaised = true
|
||||
SWEP.IsAlwaysRaised = true
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Damage = 40
|
||||
SWEP.Primary.Delay = 3
|
||||
SWEP.Primary.Ammo = ""
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Delay = 0
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.vePerShot = 10
|
||||
SWEP.aoeRadius = 350
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
-- Called when the SWEP is deployed.
|
||||
function SWEP:Deploy()
|
||||
self:SendWeaponAnim(ACT_VM_DRAW)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Called when the SWEP is holstered.
|
||||
function SWEP:Holster(switchingTo)
|
||||
self:SendWeaponAnim(ACT_VM_HOLSTER)
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self:GetOwner())) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self:GetOwner():GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (SERVER) then
|
||||
if self:GetOwner() then
|
||||
if self:GetOwner().DrawViewModel then
|
||||
self:GetOwner():DrawViewModel(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (self:GetOwner().broomModel) then
|
||||
if (self:GetOwner().broomModel:IsValid()) then
|
||||
self:GetOwner().broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the SWEP is initialized.
|
||||
function SWEP:Initialize()
|
||||
self.Primary.Damage = ix.config.Get("vortSlamBaseDamage", 40)
|
||||
self:SetWeaponHoldType(self.HoldType)
|
||||
end
|
||||
|
||||
function SWEP:CanPrimaryAttack()
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
return v
|
||||
end
|
||||
|
||||
local percentage = self.vePerShot / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
|
||||
if !self:GetOwner():HasVortalEnergy(self.vePerShot + (percentage * self:GetOwner():Armor())) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():GetCharacter():CanDoAction("vort_beam_shoot")) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!self:GetOwner():OnGround()) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
|
||||
|
||||
if (self.bIsFiring or !self:CanPrimaryAttack()) then return end
|
||||
self.bIsFiring = true
|
||||
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, self:GetOwner(), self:GetOwner():LookupAttachment("leftclaw"))
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, self:GetOwner(), self:GetOwner():LookupAttachment("rightclaw"))
|
||||
ParticleEffectAttach("vort_meditation", PATTACH_ABSORIGIN_FOLLOW, self:GetOwner(), 0)
|
||||
ParticleEffectAttach("vort_shield_parent", PATTACH_ABSORIGIN_FOLLOW, self:GetOwner(), 0)
|
||||
|
||||
if SERVER then
|
||||
local owner = self:GetOwner()
|
||||
owner:SetVelocity(-owner:GetVelocity())
|
||||
owner:SetRunSpeed(1)
|
||||
owner:SetWalkSpeed(1)
|
||||
owner:SetJumpPower(1)
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
if !IsValid(owner) then return end
|
||||
owner:ForceSequence("Dispel", function()
|
||||
owner:SetRunSpeed(ix.config.Get("runSpeed") * 1.25)
|
||||
owner:SetWalkSpeed(ix.config.Get("walkSpeed"))
|
||||
owner:SetJumpPower(250)
|
||||
end, nil, true)
|
||||
end)
|
||||
end
|
||||
|
||||
timer.Simple(0.5, function()
|
||||
if !IsValid(self) or !IsValid(self:GetOwner()) then return end
|
||||
self:GetOwner():EmitSound("wn/vortigaunts/vort_dispell.wav", 95)
|
||||
end)
|
||||
|
||||
timer.Simple(2, function()
|
||||
if (!IsValid(self)) then return end
|
||||
|
||||
if (!IsValid(self:GetOwner()) or !self:GetOwner():Alive()) then
|
||||
self.bIsFiring = false
|
||||
return
|
||||
end
|
||||
|
||||
local v = hook.Run("TFA_CanSecondaryAttack", self)
|
||||
if v ~= nil then
|
||||
self.bIsFiring = false
|
||||
return v
|
||||
end
|
||||
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin( self:GetOwner():GetPos() )
|
||||
util.Effect( "vortislam_impact", effectdata )
|
||||
|
||||
local forward = self:GetOwner():EyeAngles():Forward()
|
||||
self:GetOwner():StopParticles()
|
||||
|
||||
if SERVER then
|
||||
local percentage = self.vePerShot / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
self:GetOwner():TakeVortalEnergy(self.vePerShot + (percentage * self:GetOwner():Armor()))
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
local damage = self.Primary.Damage
|
||||
if self:GetOwner():GetNetVar("ixVortExtract") then
|
||||
damage = 999
|
||||
end
|
||||
local damageInfo = DamageInfo()
|
||||
damageInfo:SetAttacker(self:GetOwner())
|
||||
damageInfo:SetInflictor(self)
|
||||
damageInfo:SetDamage(damage)
|
||||
damageInfo:SetDamageForce(forward * damage)
|
||||
damageInfo:SetReportedPosition(self:GetOwner():GetPos())
|
||||
damageInfo:SetDamagePosition(self:GetOwner():GetPos())
|
||||
damageInfo:SetDamageType(DMG_SHOCK)
|
||||
for k, target in pairs(ents.FindInSphere(self:GetOwner():GetPos(), self.aoeRadius)) do
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if !self:GetOwner():IsLineOfSightClear(target) then
|
||||
continue
|
||||
end
|
||||
|
||||
if (damageInfo:GetDamage() >= 1) then
|
||||
target:TakeDamageInfo(damageInfo)
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
hook.Run("PostCalculatePlayerDamage", target, damageInfo, HITGROUP_GENERIC)
|
||||
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has damaged " .. target:Name() .. " dealing " .. damage .. " with vortslam")
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
ix.log.AddRaw("[VORT] ".. self:GetOwner():Name() .." has damaged " .. target:GetClass() .. ", dealing " .. damage .. " with vortslam")
|
||||
end
|
||||
|
||||
if (target:IsNPC() or target:IsPlayer()) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_shoot")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
for k, target in pairs(ents.FindInSphere(self:GetOwner():GetPos(), self.aoeRadius)) do
|
||||
if target != self:GetOwner() and
|
||||
target:IsPlayer() or
|
||||
target:IsNextBot() or
|
||||
target:IsNPC() or
|
||||
target:IsVehicle() then
|
||||
if !self:GetOwner():IsLineOfSightClear(target) then
|
||||
continue
|
||||
end
|
||||
|
||||
if (target:IsPlayer()) then
|
||||
--chat.AddText(Color(217, 83, 83), "You have damaged " .. target:Name() .. ", dealing " .. self.Primary.Damage .. " points of damage.")
|
||||
end
|
||||
|
||||
if (target:IsNPC()) then
|
||||
--chat.AddText(Color(217, 83, 83), "You have damaged " .. target:GetClass() .. ", dealing " .. self.Primary.Damage .. " points of damage.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Run("TFA_PostSecondaryAttack", self)
|
||||
|
||||
if (SERVER) then
|
||||
self:GetOwner():GetCharacter():DoAction("vort_beam_practice")
|
||||
end
|
||||
|
||||
self.bIsFiring = false
|
||||
end)
|
||||
hook.Run("TFA_PostSecondaryAttack", self, true)
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,207 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if ( SERVER ) then
|
||||
AddCSLuaFile( "shared.lua" )
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 3
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Broom"
|
||||
SWEP.DrawCrosshair = true
|
||||
end
|
||||
|
||||
SWEP.Author = "JohnyReaper"
|
||||
SWEP.Instructions = "Primary Fire: Sweep"
|
||||
SWEP.Purpose = "To sweep up dirt and trash."
|
||||
SWEP.Contact = ""
|
||||
|
||||
SWEP.Category = "Vort Swep"
|
||||
SWEP.Slot = 3
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.Weight = 5
|
||||
SWEP.IsAlwaysRaised = true
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
SWEP.HoldType = "shotgun"
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.ViewModelFOV = 110
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
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"
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetHoldType(self.HoldType)
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
if (!IsValid(self.Owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (!self.Owner:Alive()) then return false end
|
||||
if (!self.Owner:GetCharacter():IsVortigaunt()) then return false end
|
||||
|
||||
|
||||
self.Owner.broomModel = ents.Create("prop_dynamic")
|
||||
self.Owner.broomModel:SetModel("models/props_c17/pushbroom.mdl")
|
||||
self.Owner.broomModel:SetMoveType(MOVETYPE_NONE)
|
||||
self.Owner.broomModel:SetSolid(SOLID_NONE)
|
||||
self.Owner.broomModel:SetParent(self.Owner)
|
||||
self.Owner.broomModel:DrawShadow(true)
|
||||
self.Owner.broomModel:Spawn()
|
||||
self.Owner.broomModel:Fire("setparentattachment", "cleaver_attachment", 0.01)
|
||||
end
|
||||
|
||||
local viewModel = self.Owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
if (!IsValid(self.Owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
if (self.Owner.broomModel) then
|
||||
if (self.Owner.broomModel:IsValid()) then
|
||||
self.Owner.broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
local viewModel = self.Owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:Think()
|
||||
if (!IsValid(self.Owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = self.Owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SWEP:OnRemove()
|
||||
if (SERVER) then
|
||||
if self.Owner then
|
||||
if self.Owner.DrawViewModel then
|
||||
self.Owner:DrawViewModel(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (self.Owner.broomModel) then
|
||||
if (self.Owner.broomModel:IsValid()) then
|
||||
self.Owner.broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
|
||||
if (!self.Owner:Alive()) then return false end
|
||||
if (!self.Owner:GetCharacter():IsVortigaunt()) then return false end
|
||||
|
||||
self:SetNextPrimaryFire( CurTime() + 2 )
|
||||
-- self.Owner:SetAnimation( PLAYER_ATTACK1 )
|
||||
|
||||
if (SERVER) then
|
||||
self.Owner:ForceSequence("sweep", nil,nil, false)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,208 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
if (SERVER) then
|
||||
AddCSLuaFile("shared.lua")
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
SWEP.Slot = 1
|
||||
SWEP.SlotPos = 5
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.PrintName = "Vortishield"
|
||||
SWEP.DrawCrosshair = true
|
||||
end
|
||||
|
||||
SWEP.Purpose = "Allows you to create a shield from Vortal Energies"
|
||||
SWEP.Contact = ""
|
||||
SWEP.Author = "Adolphus (& M!NT)"
|
||||
SWEP.WorldModel = ""
|
||||
SWEP.HoldType = "fist"
|
||||
SWEP.Category = "Vort Swep"
|
||||
|
||||
SWEP.Primary.DefaultClip = 0
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.Ammo = ""
|
||||
SWEP.Spawnable = true
|
||||
SWEP.AdminSpawnable = false
|
||||
|
||||
SWEP.Secondary.DefaultClip = 0
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.Ammo = ""
|
||||
|
||||
SWEP.ViewModelFOV = 110
|
||||
SWEP.ViewModel = Model("models/willardnetworks/c_arms_vortigaunt.mdl")
|
||||
SWEP.IsAlwaysRaised = true
|
||||
|
||||
SWEP.vePerUse = 20
|
||||
|
||||
if CLIENT then
|
||||
SWEP.NextAllowedPlayRateChange = 0
|
||||
end
|
||||
|
||||
function SWEP:Initialize()
|
||||
return
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
local owner = self:GetOwner()
|
||||
if (!IsValid(owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_DRAW)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:Think()
|
||||
local owner = self:GetOwner()
|
||||
if (self.vSHIELD and !IsValid(owner)) then
|
||||
self.vSHIELD:Remove()
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel) and self.NextAllowedPlayRateChange < CurTime()) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Holster()
|
||||
local owner = self:GetOwner()
|
||||
if (!IsValid(owner)) then
|
||||
return
|
||||
end
|
||||
|
||||
local viewModel = owner:GetViewModel()
|
||||
|
||||
if (IsValid(viewModel)) then
|
||||
viewModel:SetPlaybackRate(1)
|
||||
viewModel:ResetSequence(ACT_VM_FISTS_HOLSTER)
|
||||
if CLIENT then
|
||||
self.NextAllowedPlayRateChange = CurTime() + viewModel:SequenceDuration()
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function SWEP:ValidateShield()
|
||||
for _, shield in ipairs(ents.FindByClass("ix_vortshield")) do
|
||||
if shield:GetOwner() == self:GetOwner() then
|
||||
shield:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Called when the player attempts to primary fire.
|
||||
function SWEP:PrimaryAttack()
|
||||
local owner = self:GetOwner()
|
||||
|
||||
if (!owner:GetCharacter():HasFlags("q")) then
|
||||
if CLIENT then
|
||||
owner:NotifyLocalized("You do not have the required (q) flag!")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local percentage = self.vePerUse / 100
|
||||
percentage = percentage * ix.config.Get("additionalVortalEnergyDrainPerPointOfArmor", 1)
|
||||
if !self.Owner:HasVortalEnergy(self.vePerUse + (percentage * self.Owner:Armor())) then
|
||||
return
|
||||
end
|
||||
|
||||
if (SERVER) then
|
||||
if (!IsValid(self.vSHIELD)) then
|
||||
self:SetNextPrimaryFire(CurTime() + ix.config.Get("VortShieldRecharge", 20))
|
||||
|
||||
self.Owner:TakeVortalEnergy(self.vePerUse + (percentage * self.Owner:Armor()))
|
||||
|
||||
self:ValidateShield()
|
||||
|
||||
self.vSHIELD = ents.Create("ix_vortshield")
|
||||
self.vSHIELD:SetPos(owner:GetPos() + owner:GetUp()*45)
|
||||
self.vSHIELD:Spawn()
|
||||
self.vSHIELD:Activate()
|
||||
self.vSHIELD:SetOwner(owner)
|
||||
self.vSHIELD:FollowBone(owner, 11)
|
||||
self.vSHIELD:SetLocalAngles(Angle(0, 0, -90))
|
||||
self.vSHIELD:SetLocalPos(Vector(-20, 10, 0))
|
||||
owner:EmitSound("npc/vort/health_charge.wav")
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
function SWEP:SecondaryAttack()
|
||||
if (SERVER) then
|
||||
if IsValid(self.vSHIELD) then
|
||||
self:GetOwner():EmitSound("npc/vort/health_charge.wav")
|
||||
self.vSHIELD:Remove()
|
||||
end
|
||||
self:SetNextSecondaryFire(CurTime() + 4)
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
if (CLIENT) then
|
||||
function SWEP:PreDrawViewModel(viewModel, weapon, client)
|
||||
local hands = player_manager.TranslatePlayerHands(player_manager.TranslateToPlayerModelName(client:GetModel()))
|
||||
|
||||
if (hands and hands.model) then
|
||||
viewModel:SetModel(hands.model)
|
||||
viewModel:SetSkin(hands.skin)
|
||||
viewModel:SetBodyGroups(hands.body)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:DoDrawCrosshair(x, y)
|
||||
surface.SetDrawColor(255, 255, 255, 66)
|
||||
surface.DrawRect(x - 2, y - 2, 4, 4)
|
||||
end
|
||||
|
||||
-- Adjust these variables to move the viewmodel's position
|
||||
SWEP.IronSightsPos = Vector(-5, -5, -55)
|
||||
SWEP.IronSightsAng = Vector(35, 15, 10)
|
||||
|
||||
function SWEP:GetViewModelPosition(EyePos, EyeAng)
|
||||
local Mul = 1.0
|
||||
|
||||
local Offset = self.IronSightsPos
|
||||
|
||||
if (self.IronSightsAng) then
|
||||
EyeAng = EyeAng * 1
|
||||
|
||||
EyeAng:RotateAroundAxis(EyeAng:Right(), self.IronSightsAng.x * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Up(), self.IronSightsAng.y * Mul)
|
||||
EyeAng:RotateAroundAxis(EyeAng:Forward(), self.IronSightsAng.z * Mul)
|
||||
end
|
||||
|
||||
local Right = EyeAng:Right()
|
||||
local Up = EyeAng:Up()
|
||||
local Forward = EyeAng:Forward()
|
||||
|
||||
EyePos = EyePos + Offset.x * Right * Mul
|
||||
EyePos = EyePos + Offset.y * Forward * Mul
|
||||
EyePos = EyePos + Offset.z * Up * Mul
|
||||
|
||||
return EyePos, EyeAng
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Bandajları"
|
||||
ITEM.description = "Yaralı ya da başka türlü, bu bandajlar amacına hizmet edecektir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_bandage.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["hooks"] = 2 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
ITEM.colorAppendix = {
|
||||
blue = "Fits on the shackles slot",
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Bandana"
|
||||
ITEM.description = "Sağduyu son derece önemlidir. Kimsenin burada bir Vortigaunt'ın olduğunu bilmesini istemez."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/head_facewrap.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-0.76, -0.13, 200),
|
||||
ang = Angle(90.05, 189.72, 0),
|
||||
fov = 2.5
|
||||
}
|
||||
ITEM.outfitCategory = "Glasses"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.bodyGroups = {
|
||||
["face"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kemeri"
|
||||
ITEM.description = "İnsan kullanımı için yapılmış bir kemer, ancak meraklı bir vortigaunt bunu deneyebilir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_belt.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Hands"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["meat"] = 3 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
ITEM.colorAppendix = {
|
||||
blue = "Et kemeri yuvasına uyar",
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Boonie"
|
||||
ITEM.description = "Geniş çerçeveli bir şapka. Güneşi vort kafanızdan uzak tutar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/head_boonie.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.iconCam = {
|
||||
ang = Angle(25.370000839233,399.98999023438,0),
|
||||
pos = Vector(-138.86999511719,-116.79000091553,85.76000213623),
|
||||
fov = 3.82,
|
||||
}
|
||||
ITEM.outfitCategory = "Head"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["head"] = 6 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Şef Şapkası"
|
||||
ITEM.description = "Vortigauntlar, Vortessence ile olan bağlantıları nedeniyle mutfak sanatlarındaki katıksız yetenekleriyle tanınırlar. Bir Vortigaunt'un geçici olarak uzman bir şef gibi davranması için geriye kalan tek adım, bu aptal şapkalardan birini takmaktır."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/head_chefhat.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-138.87, -116.79, 85.76),
|
||||
ang = Angle(25.28, 400.12, 0),
|
||||
fov = 4.26
|
||||
}
|
||||
ITEM.outfitCategory = "Head"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["head"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Fedora"
|
||||
ITEM.description = "Geçmiş zamanları anımsatan nadir ve şık bir şapka, kesinlikle hiçbir canlı varlık bunlardan birine sahip bir vortigaunt görmeyi beklemez."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/fedora_item.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Head"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.iconCam = {
|
||||
ang = Angle(25,220.0299987793,0),
|
||||
pos = Vector(509.64001464844,427.60998535156,310.23999023438),
|
||||
fov = 1.06,
|
||||
}
|
||||
ITEM.bodyGroups = {
|
||||
["head"] = 5 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Düz Şapka"
|
||||
ITEM.description = "Kafada düz olan şık bir eski tarz şapka. Bazı vortların kendine özgü bir tarzı vardır."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/head_hat2.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Head"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["head"] = 4 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt İnşaat Şapkası"
|
||||
ITEM.description = "Sırtında Combine işareti bulunan bu inşaat şapkaları genellikle Sivil İşçi Birliği tarafından giyilir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/workercap_item.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Head"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["head"] = 3 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kaskı"
|
||||
ITEM.description = "Pratiklikten önce koruma. Şansınız yaver giderse, düşman biraz daha yükseğe nişan almaya çalışabilir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/head_helmet.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-117.67, -98.6, 71.58),
|
||||
ang = Angle(25, 400, 0),
|
||||
fov = 4.42
|
||||
}
|
||||
ITEM.outfitCategory = "Head"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["head"] = 2 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Besin Kemeri"
|
||||
ITEM.description = "Her köşeden toplanmış lezzetli, ağız sulandıran headcrab derilerinden oluşan bir koleksiyon."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/n7/vorti_outfit/meat01.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Hands"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["meat"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Outlands Et Kemeri"
|
||||
ITEM.description = "Combine'ın perdesi altında bulunması zor bir ürün ve bulunduğunda hoş karşılanan bir lezzet."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/n7/vorti_outfit/meat02.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Hands"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["meat"] = 2 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Tasması"
|
||||
ITEM.description = "İçinde uzaylı teknolojisi olan ağır, metalik bir yaka. Bir vortigaunt'un etrafındaki enerjileri manipüle etme yeteneğini tamamen etkisiz hale getirir. Bir kez giyildikten sonra, uygun aletler olmadan çıkarılamaz."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/vortigaunt_collar.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Face"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = true
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["collar"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
function ITEM:GetColorAppendix()
|
||||
return {
|
||||
["red"] = "Tasma No: " .. self:GetData("collarID", "UNKNOWN")
|
||||
}
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced()
|
||||
self:SetData("Locked", false)
|
||||
end
|
||||
|
||||
function ITEM:OnEquip(client)
|
||||
local vortPlugin = ix.plugin.Get("vortigaunts")
|
||||
local character = client:GetCharacter()
|
||||
local genericdata = character:GetGenericdata()
|
||||
|
||||
if character:GetFaction() != FACTION_VORT then return end
|
||||
|
||||
if self:GetData("collarID") == nil then
|
||||
self:SetData("collarID", tostring(vortPlugin:GenerateCollarID(character.id)))
|
||||
end
|
||||
|
||||
self:SetData("Locked", true)
|
||||
|
||||
character:SetCollarID(self:GetData("collarID"))
|
||||
character:SetCollarItemID(self:GetID())
|
||||
|
||||
if genericdata and genericdata.collarID == "N/A" then
|
||||
genericdata.collarID = character:GetCollarID()
|
||||
|
||||
character:SetGenericdata(genericdata)
|
||||
character:Save()
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_nightvision") then
|
||||
client:StripWeapon( "ix_nightvision" )
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortbeam") then
|
||||
client:StripWeapon( "ix_vortbeam" )
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortheal") then
|
||||
client:StripWeapon( "ix_vortheal" )
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vshield") then
|
||||
client:StripWeapon( "ix_vshield" )
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vmelee") then
|
||||
client:StripWeapon("ix_vmelee")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortpyro") then
|
||||
client:StripWeapon( "ix_vortpyro" )
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortslam") then
|
||||
client:StripWeapon( "ix_vortslam" )
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortadvancedbeam") then
|
||||
client:StripWeapon( "ix_vortadvancedbeam" )
|
||||
end
|
||||
|
||||
client:Give("ix_vortsweep")
|
||||
|
||||
if (character:GetBackground() != "İşbirlikçi") then
|
||||
character:SetBackground("Biyotik")
|
||||
end
|
||||
|
||||
local worldmodel = ents.FindInSphere(client:GetPos(), 1);
|
||||
|
||||
for _, v in pairs(worldmodel) do
|
||||
if (v:GetClass() == "ix_nvlight" and v:GetOwner() == client) then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:OnLoadout()
|
||||
if (self:GetData("equip")) then
|
||||
local client = self.player
|
||||
local character = client:GetCharacter()
|
||||
character:SetCollarID(self:GetData("collarID"))
|
||||
character:SetCollarItemID(self:GetID())
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:OnUnEquip(client)
|
||||
local character = client:GetCharacter()
|
||||
|
||||
if character:GetFaction() != FACTION_VORT then return end
|
||||
|
||||
self:SetData("Locked", false)
|
||||
|
||||
character:SetCollarID(nil)
|
||||
character:SetCollarItemID(nil)
|
||||
|
||||
if client:HasWeapon("ix_vortsweep") then
|
||||
client:StripWeapon( "ix_vortsweep" )
|
||||
|
||||
if client.broomModel then
|
||||
client.broomModel:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
client:Give("ix_nightvision")
|
||||
client:Give("ix_vortbeam")
|
||||
client:Give("ix_vortheal")
|
||||
client:Give("ix_vshield")
|
||||
client:Give("ix_vortslam")
|
||||
|
||||
if (character:GetBackground() != "İşbirlikçi") then
|
||||
character:SetBackground("Kurtarılmış")
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:CanEquipOutfit(client)
|
||||
local player = self.player or client
|
||||
local bgItems = player:GetCharacter():GetInventory():GetItemsByBase("base_bgclothes", true)
|
||||
for _, v in ipairs(bgItems) do
|
||||
if (v:GetData("equip") and v.maxArmor) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
if !player:HasWhitelist(ix.faction.teams["vortigaunt"].index) then
|
||||
player:NotifyLocalized("Vortigaunt factionu için beyaz listeye alınmadınız, bu yüzden bu sizin için kullanılamaz!")
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
ITEM:Hook("drop", function(item)
|
||||
if item:GetData("Locked") == true then
|
||||
item.player:NotifyLocalized("Tasmanız kilitli, bu yüzden bunu bırakamazsınız!")
|
||||
return false
|
||||
end
|
||||
|
||||
if (item:GetData("equip")) then
|
||||
item:OnUnEquip(item.player)
|
||||
item:RemoveOutfit(item:GetOwner())
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,112 @@
|
||||
--[[
|
||||
| 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 PLUGIN = PLUGIN
|
||||
|
||||
ITEM.name = "Vortigaunt Tasması (sahte)"
|
||||
ITEM.description = "İçinde uzaylı teknolojisi olan ağır, metalik bir yaka. Bir vortigaunt'un etrafındaki enerjileri manipüle etme yeteneğini tamamen etkisiz hale getirir. Bir kez giyildikten sonra, uygun aletler olmadan çıkarılamaz."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/vortigaunt_collar.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Face"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = true
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["collar"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:GetName()
|
||||
if LocalPlayer():GetCharacter() then
|
||||
if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP or LocalPlayer():GetCharacter():GetFaction() == FACTION_VORT then
|
||||
return self.name
|
||||
end
|
||||
end
|
||||
|
||||
return string.sub( self.name, 1, string.len(self.name) - 7 )
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetColorAppendix()
|
||||
return {
|
||||
["red"] = "Collar ID: " .. self:GetData("collarID", "UNKNOWN")
|
||||
}
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced()
|
||||
self:SetData("Locked", false)
|
||||
end
|
||||
|
||||
function ITEM:OnEquip(client)
|
||||
local character = client:GetCharacter()
|
||||
|
||||
if (character:GetFaction() != FACTION_VORT) then
|
||||
return
|
||||
end
|
||||
|
||||
if (!self:GetData("collarOriginalOwnerCharacterID", nil) or self:GetData("collarID", nil) != character:GetCollarID() and self:GetData("collarOriginalOwnerCharacterID", nil)) then
|
||||
if (!self:GetData("collarID", nil)) then
|
||||
self:SetData("collarID", tostring(PLUGIN:GenerateCollarID(character.id)))
|
||||
self:SetData("collarOriginalOwnerCharacterID", character.id)
|
||||
elseif (character:GetData("CanResetFakeCollarDatafile") != false) then
|
||||
ix.plugin.list.combineutilities:CreateDatafile(client)
|
||||
|
||||
character:SetCollarID(self:GetData("collarID"))
|
||||
character:SetCollarItemID(self:GetID())
|
||||
|
||||
character:SetData("CanResetFakeCollarDatafile", false)
|
||||
|
||||
client:Notify("Previous datafile information wiped, generating new data...")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:OnLoadout()
|
||||
if (self:GetData("equip")) then
|
||||
local client = self:GetOwner()
|
||||
local character = client:GetCharacter()
|
||||
|
||||
if (character:GetFaction() != FACTION_VORT) then return end
|
||||
|
||||
if (self:GetData("collarID", nil) and character:GetCollarID() != self:GetData("collarID") and character:GetData("CanResetFakeCollarDatafile") != false) then
|
||||
character:SetCollarID(self:GetData("collarID"))
|
||||
character:SetCollarItemID(self:GetID())
|
||||
end
|
||||
|
||||
self:Unequip(self:GetOwner())
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:CanEquipOutfit(client)
|
||||
local character = client:GetCharacter()
|
||||
|
||||
if (client:Team() != FACTION_VORT) then
|
||||
client:NotifyLocalized("You are not whitelisted for the vortigaunt faction, so this is unuseable to you!")
|
||||
return false
|
||||
elseif (self:GetData("collarID", "N/A") != character:GetCollarID() and character:GetData("CanResetFakeCollarDatafile") == false) then
|
||||
client:Notify("You equip a different fake collar, but datafile information is not regenerated.")
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function ITEM:OnUnEquip(client)
|
||||
end
|
||||
|
||||
ITEM:Hook("drop", function(item)
|
||||
local owner = item:GetOwner()
|
||||
|
||||
if (item:GetData("equip")) then
|
||||
item:OnUnEquip(owner)
|
||||
item:RemoveOutfit(owner)
|
||||
end
|
||||
end)
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kancaları"
|
||||
ITEM.description = "Hem pranga hem de tasmaların temel bileşeni. Bacakların etrafına çok sıkı otururlar. Yerine kilitli. Bir kez uygulandıktan sonra çıkarılamazlar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/vortigaunt_hooks.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Shoes"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = true
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["hooks"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
function ITEM:OnInstanced()
|
||||
self:SetData("Locked", false)
|
||||
end
|
||||
|
||||
function ITEM:OnEquip(client)
|
||||
self:SetData("Locked", true)
|
||||
end
|
||||
|
||||
function ITEM:OnUnEquip()
|
||||
self:SetData("Locked", false)
|
||||
end
|
||||
|
||||
ITEM:Hook("drop", function(item)
|
||||
if item:GetData("Locked") == true then
|
||||
item.player:NotifyLocalized("Tasmanız kilitli, bu yüzden bunu bırakamazsınız!")
|
||||
return false
|
||||
end
|
||||
|
||||
if (item:GetData("equip")) then
|
||||
item:RemoveOutfit(item:GetOwner())
|
||||
end
|
||||
end)
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kancaları (sahte)"
|
||||
ITEM.description = "Hem pranga hem de tasmaların temel bileşeni. Bacakların etrafına çok sıkı otururlar. Yerine kilitli. Bir kez uygulandıktan sonra çıkarılamazlar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/vortigaunt_hooks.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Shoes"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = true
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["hooks"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:GetName()
|
||||
if LocalPlayer():GetCharacter() then
|
||||
if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP or LocalPlayer():GetCharacter():GetFaction() == FACTION_VORT then
|
||||
return self.name
|
||||
end
|
||||
end
|
||||
|
||||
return string.sub( self.name, 1, string.len(self.name) - 7 )
|
||||
end
|
||||
end
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Prangaları"
|
||||
ITEM.description = "Metal, uzuvları daraltan ve hareket etmeyi ağrılı hale getiren bağlar ve teller. Yerine kilitlenirler ve uygulandıktan sonra çıkarılamazlar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/vortigaunt_shackles.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = true
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["shackles"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
function ITEM:OnInstanced()
|
||||
self:SetData("Locked", false)
|
||||
end
|
||||
|
||||
function ITEM:OnEquip(client)
|
||||
self:SetData("Locked", true)
|
||||
end
|
||||
|
||||
function ITEM:OnUnEquip()
|
||||
self:SetData("Locked", false)
|
||||
end
|
||||
|
||||
ITEM:Hook("drop", function(item)
|
||||
if item:GetData("Locked") == true then
|
||||
item.player:NotifyLocalized("Tasmanız kilitli, bu yüzden bunu bırakamazsınız!")
|
||||
return false
|
||||
end
|
||||
|
||||
if (item:GetData("equip")) then
|
||||
item:RemoveOutfit(item:GetOwner())
|
||||
end
|
||||
end)
|
||||
@@ -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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Prangaları (sahte)"
|
||||
ITEM.description = "Metal, uzuvları daraltan ve hareket etmeyi ağrılı hale getiren bağlar ve teller. Yerine kilitlenirler ve uygulandıktan sonra çıkarılamazlar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/vortigaunt_shackles.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = true
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["shackles"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:GetName()
|
||||
if LocalPlayer():GetCharacter() then
|
||||
if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP or LocalPlayer():GetCharacter():GetFaction() == FACTION_VORT then
|
||||
return self.name
|
||||
end
|
||||
end
|
||||
|
||||
return string.sub( self.name, 1, string.len(self.name) - 7 )
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Antlion Muhafız Plakası"
|
||||
ITEM.description = "Mağlup edilmiş Antlion muhafızlarının kalın zırhlı derilerinden yapılan bu zırh sadece sağlam değil, aynı zamanda deneyimli bir savaşçının işaretidir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/n7/vorti_outfit/armor.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.maxArmor = 50
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 8 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt İşçi Üniforması"
|
||||
ITEM.description = "Combine amblemleri ile süslenmiş bir tür kazak. İşçi vortları tanımlamak için uygundur."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_sweater_cwu.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 10 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Rozetli Laboratuvar Önlüğü"
|
||||
ITEM.description = "Daha bilimsel bir yaşam tarzı arayan vortigauntlar için bilimsel bir üniforma. Bu varyant bir rozet ile birlikte gelir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_doc.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 3 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Laboratuvar Önlüğü"
|
||||
ITEM.description = "Daha bilimsel bir yaşam tarzı arayan vortigauntlar için bilimsel bir üniforma."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_doc.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 2 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kapüşonlu"
|
||||
ITEM.description = "Daha uzun bir boyun için uzun bir kapüşonlu. En zorlu koşullarda bile bir vortigaunt'u sıcak tutmak için mükemmeldir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_sweater.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 7 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Zarif Vortigaunt Panço"
|
||||
ITEM.description = "Güvenilir ve sağlam bir kaplama, tipik insan giysilerinden elde edilen bileşimdir. Gevşek oturan tasarım ve kullanışlı kesikler, konfor ve hareket özgürlüğü sağlar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/n7/vorti_outfit/light01.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 4 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "El Yapımı Vortigaunt Kaplaması"
|
||||
ITEM.description = "Basit, sade bir kaplama. Soğuk bir gecede sizi rahat tutmak için iyi, başka bir şey değil."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/n7/vorti_outfit/light02.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 5 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kahverengi Trençkot"
|
||||
ITEM.description = "Güneşten yanmış, yenilenmiş bir trençkot. Vücudun sıcak ve biraz kuru olmasını sağlar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/clothingitems/torso_refugee_coat.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-39.23, -7.19, 195.95),
|
||||
ang = Angle(77.11, 10.12, 0),
|
||||
fov = 4.05
|
||||
}
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.maxArmor = 25
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 1 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kazak"
|
||||
ITEM.description = "Normalde insanlar için yapılmış bir kazak. En zorlu koşullarda bile bir vortigaunt'ı sıcak tutmak için mükemmeldir."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_sweater.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 9 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kevlar"
|
||||
ITEM.description = "Standart bir insan kevlar seti, kabaca vortigaunt kullanımına uygun."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/props_c17/BriefCase001a.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Torso"
|
||||
ITEM.maxArmor = 25
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["torso"] = 6 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Kahverengi Pantolon"
|
||||
ITEM.description = "Ekstra boyutlu uzaylılar bile, kumaş malzemelerin büyük ölçüde rahat giysiler oluşturduğunu bilirler."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_pants.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = false
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["shackles"] = 2 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
ITEM.colorAppendix = {
|
||||
blue = "Fits on the meat shackles slot",
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Koyu Pantolon"
|
||||
ITEM.description = "Ekstra boyutlu uzaylılar bile, kumaş malzemelerin büyük ölçüde rahat giysiler oluşturduğunu bilirler."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_pants2.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = false
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["shackles"] = 3 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Lacivert Pantolon"
|
||||
ITEM.description = "Ekstra boyutlu uzaylılar bile, kumaş malzemelerin büyük ölçüde rahat giysiler oluşturduğunu bilirler."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_pants3.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = false
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["shackles"] = 4 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Vortigaunt Koyu Gri Pantolon"
|
||||
ITEM.description = "Ekstra boyutlu uzaylılar bile, kumaş malzemelerin büyük ölçüde rahat giysiler oluşturduğunu bilirler."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.model = "models/willardnetworks/vort_clothingitems/vort_pants4.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.outfitCategory = "Legs"
|
||||
ITEM.factionList = {FACTION_VORT}
|
||||
ITEM.KeepOnDeath = false
|
||||
|
||||
ITEM.bodyGroups = {
|
||||
["shackles"] = 5 -- The actual name of the bodypart, then number in that bodypart (model-wise)
|
||||
}
|
||||
126
gamemodes/darkrp/plugins/vortigaunts/items/sh_shackleskey.lua
Normal file
126
gamemodes/darkrp/plugins/vortigaunts/items/sh_shackleskey.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Pranga Anahtarı"
|
||||
ITEM.model = "models/willardnetworks/props/vortkey.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
ITEM.description = "Vortigaunt'ın prangalarının kilidini açmak için bir anahtar."
|
||||
ITEM.category = "Vortigaunt"
|
||||
ITEM.colorAppendix = {["red"] = "Bu yalnızca Nexus'ta kullanılabilir! Bu tek kullanımlık bir öğedir."}
|
||||
|
||||
local usedOnItems = {"Vortigaunt Tasması", "Vortigaunt Prangaları", "Vortigaunt Kancaları"}
|
||||
|
||||
ITEM.functions.use = {
|
||||
name = "Kendinde kullan",
|
||||
tip = "applyTip",
|
||||
icon = "icon16/key.png",
|
||||
OnCanRun = function(item)
|
||||
if (item.entity) then return false end
|
||||
|
||||
local client = item.player
|
||||
if (client:GetMoveType() != MOVETYPE_NOCLIP or client:InVehicle()) then return false end
|
||||
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Shackles Self Release")
|
||||
end,
|
||||
OnRun = function(item)
|
||||
local character = item.player:GetCharacter()
|
||||
local foundSomething = false
|
||||
local collarID = false
|
||||
if character:IsVortigaunt() then
|
||||
for _, v in pairs(character:GetInventory():GetItems()) do
|
||||
if table.HasValue( usedOnItems, v.name ) and v:GetData("equip") == true and v:GetData("Locked") then
|
||||
if v:GetData("collarID") then
|
||||
collarID = v:GetData("collarID")
|
||||
end
|
||||
v:SetData("Locked", false)
|
||||
foundSomething = true
|
||||
end
|
||||
end
|
||||
|
||||
if foundSomething then
|
||||
ix.combineNotify:AddImportantNotification(collarID and "WRN:// Key has been used on biotic with collar ID: #" .. collarID or "WRN:// Key has been used on biotic with unknown collar ID.", Color(255, 81, 0), item.player, item.player:GetPos())
|
||||
item.player:NotifyLocalized("Prangalarınız artık kilitli değil ve çıkarılabilir.")
|
||||
return false
|
||||
else
|
||||
item.player:NotifyLocalized("Herhangi bir kilitli pranga takmıyorsunuz.")
|
||||
return false
|
||||
end
|
||||
else
|
||||
item.player:NotifyLocalized("Sen Vortigaunt değilsin!")
|
||||
return false
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
ITEM.functions.give = {
|
||||
name = "Baktığın kişide kullan",
|
||||
tip = "giveTip",
|
||||
icon = "icon16/key_go.png",
|
||||
OnCanRun = function(item)
|
||||
if (item.entity) then return false end
|
||||
|
||||
local trace = item.player:GetEyeTraceNoCursor()
|
||||
local target = trace.Entity
|
||||
if (!IsValid(target)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (CLIENT and target:GetClass() == "prop_ragdoll") then
|
||||
return true
|
||||
end
|
||||
|
||||
if (IsValid(target.ixPlayer)) then
|
||||
target = target.ixPlayer
|
||||
end
|
||||
|
||||
if (!target:IsPlayer() or !target:GetCharacter()) then
|
||||
return false
|
||||
end
|
||||
end,
|
||||
OnRun = function(item)
|
||||
local target = item.player:GetEyeTraceNoCursor().Entity
|
||||
if (!IsValid(target)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (IsValid(target.ixPlayer)) then
|
||||
target = target.ixPlayer
|
||||
end
|
||||
|
||||
local targetChar = target:GetCharacter()
|
||||
local foundSomething = false
|
||||
local collarID = false
|
||||
|
||||
if targetChar:IsVortigaunt() then
|
||||
for _, v in pairs(targetChar:GetInventory():GetItems()) do
|
||||
if table.HasValue( usedOnItems, v.name ) and v:GetData("equip") and v:GetData("Locked") then
|
||||
if v:GetData("collarID") then
|
||||
collarID = v:GetData("collarID")
|
||||
end
|
||||
v:SetData("Locked", false)
|
||||
foundSomething = true
|
||||
end
|
||||
end
|
||||
|
||||
if foundSomething then
|
||||
ix.combineNotify:AddImportantNotification(collarID and "WRN:// Key has been used on biotic with collar ID: #" .. collarID or "WRN:// Key has been used on biotic with unknown collar ID.", Color(255, 81, 0), item.player, item.player:GetPos())
|
||||
item.player:NotifyLocalized("Prangaları artık kilitli değil ve çıkarılabilir.")
|
||||
else
|
||||
item.player:NotifyLocalized("Herhangi bir kilitli pranga takmıyorlar.")
|
||||
end
|
||||
else
|
||||
item.player:NotifyLocalized("Vortigaunt değil!")
|
||||
end
|
||||
|
||||
item.player:EmitSound("physics/metal/metal_box_strain1.wav", 110)
|
||||
end,
|
||||
}
|
||||
253
gamemodes/darkrp/plugins/vortigaunts/libs/sh_voices.lua
Normal file
253
gamemodes/darkrp/plugins/vortigaunts/libs/sh_voices.lua
Normal file
@@ -0,0 +1,253 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "ACCEPT CHARGE", "Accept the charge.", "vortigaunt/ep2/acceptcharge.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ACCEPT ENERGY", "Accept energy.", "vortigaunt/ep2/acceptenergy.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GLADLY ACCOMPANY", "Gladly we accompany.", "vortigaunt/ep2/accompany.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ALERT", "Alert!", "vortigaunt/ep2/alert.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ALL FOR NOW", "That is all for now.", "vortigaunt/ep2/allfornow.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ALL IN ONE", "All in one and one in all!", "vortigaunt/ep2/allinoneinall.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ALLOW RECHARGE", "Allow us to recharge your cells.", "vortigaunt/ep2/allowrecharge.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ALL WE CAN SPARE", "That is all we can spare.", "vortigaunt/ep2/allwecanspare.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ALL WE HAVE", "All we have is yours.", "vortigaunt/ep2/allwehave.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ASSENT", "Assent.", "vortigaunt/ep2/assent.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THIS BODY", "This body is yours to command.", "vortigaunt/ep2/bodyyours.wav")
|
||||
Schema.voices.Add("Vortigaunt", "CAUTION", "Caution!", "vortigaunt/ep2/caution.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE DEDICATE", "We dedicate ourselves to your purpose!", "vortigaunt/ep2/dedicate.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DONE", "Done!", "vortigaunt/ep2/done.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DREAMED", "We have dreamed of this moment!", "vortigaunt/ep2/dreamed.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EMPOWER US", "Empower us!", "vortigaunt/ep2/empowerus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ENERGY EMPOWERS US", "It's energy empowers us!", "vortigaunt/ep2/energyempower.wav")
|
||||
Schema.voices.Add("Vortigaunt", "FOR FREEDOM", "For freedom!", "vortigaunt/ep2/forfreedom.wav")
|
||||
Schema.voices.Add("Vortigaunt", "FORWARD", "Forward.", "vortigaunt/ep2/forward.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GIVE OVER", "Give over your essence!", "vortigaunt/ep2/giveover.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GLADLY", "Gladly.", "vortigaunt/ep2/gladly.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GLORIOUS END", "To our glorious end!", "vortigaunt/ep2/gloriousend.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HALT", "Halt!", "vortigaunt/ep2/halt.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HERE", "Here.", "vortigaunt/ep2/here.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HERE WE STAY", "Here we stay.", "vortigaunt/ep2/herewestay.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HOLD", "Hold.", "vortigaunt/ep2/hold.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HOLD STILL CANNOT CHARGE", "Hold still, or we cannot charge you!", "vortigaunt/ep2/holdorcantcharge.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HOLD STILL", "Hold still.", "vortigaunt/ep2/holdstill.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HONOR WE FOLLOW", "To our honor, we follow you.", "vortigaunt/ep2/honorfollow.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HONOR IS OURS", "The honor is ours.", "vortigaunt/ep2/honorours.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IF YOU MOVE", "If you move, we cannot help you.", "vortigaunt/ep2/ifyoumove.wav")
|
||||
Schema.voices.Add("Vortigaunt", "LEAD ON", "Lead on.", "vortigaunt/ep2/leadon.wav")
|
||||
Schema.voices.Add("Vortigaunt", "LEAD US", "Lead us.", "vortigaunt/ep2/leadus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MOVING TARGET", "We cannot heal a moving target.", "vortigaunt/ep2/movingtarget.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MUTUAL", "Our purpose is mutual.", "vortigaunt/ep2/mutual.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NODE NEXUS", "Node Nexus, feed upon this life!", "vortigaunt/ep2/nodenexus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ONWARD", "Onward!", "vortigaunt/ep2/onward.wav")
|
||||
Schema.voices.Add("Vortigaunt", "OUR PLACE", "Our place is here.", "vortigaunt/ep2/ourplacehere.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PASS ON", "Pass on!", "vortigaunt/ep2/passon.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WITH PLEASURE", "With pleasure.", "vortigaunt/ep2/pleasure.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PREPARE TO RECEIVE", "Prepare to receive energy.", "vortigaunt/ep2/prepare.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PREVAIL", "We shall prevail!", "vortigaunt/ep2/prevail.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PROPITIOUS", "Propitious alliance.", "vortigaunt/ep2/propitious.wav")
|
||||
Schema.voices.Add("Vortigaunt", "REGRETTABLE", "This is regrettable.", "vortigaunt/ep2/regrettable.wav")
|
||||
Schema.voices.Add("Vortigaunt", "RETURN TO AlL", "Return to the all in one!", "vortigaunt/ep2/returntoall.wav")
|
||||
Schema.voices.Add("Vortigaunt", "RETURN TO VOID", "Return to the void!", "vortigaunt/ep2/returnvoid.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SATISFACTION", "Satisfaction!", "vortigaunt/ep2/satisfaction.wav")
|
||||
Schema.voices.Add("Vortigaunt", "STAND CLEAR", "Stand clear!", "vortigaunt/ep2/standclear.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SURGE", "We surge!", "vortigaunt/ep2/surge.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TETHER CUT", "The tether is cut!", "vortigaunt/ep2/tethercut.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THAT IS ALL", "That is all.", "vortigaunt/ep2/thatisall.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TO THE VOID", "To the void with you!", "vortigaunt/ep2/tothevoid.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TROUBLE US NO MORE", "That one shall trouble us no more.", "vortigaunt/ep2/troubleus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "UNDESERVING", "Undeserving of consciousness!", "vortigaunt/ep2/undeserving.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXCELLENT", "Excellent!", "vortigaunt/ep2/vort_excellent.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXCELLENT SHOOTING", "Excellent shooting!", "vortigaunt/ep2/vort_excellentshooting.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXCELLENT SHOT", "Excellent shot!", "vortigaunt/ep2/vort_excellentshot.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXCEPTIONAL", "Exceptional.", "vortigaunt/ep2/vort_exceptional.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GOOD TO FIGHT", "It is good that you now fight with us.", "vortigaunt/ep2/vort_goodfightwithus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GOOD TOGETHER", "It is good now that we work together.", "vortigaunt/ep2/vort_goodtogether.wav")
|
||||
Schema.voices.Add("Vortigaunt", "JUST SO", "Just so.", "vortigaunt/ep2/vort_grp_agree01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "AGREED", "Agreed.", "vortigaunt/ep2/vort_grp_agree02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HMMM", "Hmmm.", "vortigaunt/ep2/vort_grp_agree03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "AH", "Ah...", "vortigaunt/ep2/vort_grp_agree04.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YES2", "Yes...", "vortigaunt/ep2/vort_grp_agree05.wav")
|
||||
Schema.voices.Add("Vortigaunt", "INDEED", "Indeed...", "vortigaunt/ep2/vort_grp_agree06.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WELL STATED", "Well stated.", "vortigaunt/ep2/vort_grp_agree07.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SKILLS FORMIDABLE", "Your skills are formidable!", "vortigaunt/ep2/vort_skillsformidable.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WARE", "Ware!", "vortigaunt/ep2/ware.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE ARE YOURS", "We are yours!", "vortigaunt/ep2/weareyours.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE CLAIM YOU", "We claim you!", "vortigaunt/ep2/weclaimyou.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE SHARE", "We will share the vortessance.", "vortigaunt/ep2/weshare.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE WILL CHARGE", "We will charge you.", "vortigaunt/ep2/wewillcharge.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE WILL HELP", "We will help you.", "vortigaunt/ep2/wewillhelp.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YES!", "Yes!", "vortigaunt/ep2/yes.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YES FORWARD", "Yes, forward.", "vortigaunt/ep2/yesforward.wav")
|
||||
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "I WILL TAKE HER", "I will take her to my kin by another path.", "vo/outland_01/intro/vort_rbed_byanotherpath.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SHELTERED LOCATION", "My kin will meet us at a sheltered location beneath the surface.", "vo/outland_01/intro/vort_rbed_companions01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MUST MOVE HER", "We must move her there quickly.", "vo/outland_01/intro/vort_rbed_companions02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOU ARE UNHARMED", "I am pleased to see at least you are unharmed.", "vo/outland_01/intro/vort_rbed_freeman02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HEALING HER WILL REQUIRE", "Healing her will require more than what I alone can conjure.", "vo/outland_01/intro/vort_rbed_freeman04.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SUMMON MY KIN", "Let me summon my kin.", "vo/outland_01/intro/vort_rbed_freeman05.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HELP IN THE MINES", "Help awaits us in the mines.", "vo/outland_01/intro/vort_rbed_intomines02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HANDS OCCUPIED", "Our hands are occupied.", "vo/outland_01/intro/vort_rbed_letsgo01b.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DESTROY ALL OBSTACLES", "Destroy all obstacles!", "vo/outland_01/intro/vort_rbed_letsgo01c.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE MUST HASTEN", "We must hasten.", "vo/outland_01/intro/vort_rbed_letsgo04a.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HER STATE IS DELICATE", "Her state is delicate.", "vo/outland_01/intro/vort_rbed_letsgo04b.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V9", "Chung... corrrrl... malae.", "vo/outland_01/intro/vort_rbed_vemotings01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WHAT HARM HAS COME", "What harm has come...", "vo/outland_01/intro/vort_rbed_whatharm.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE ARE MANY ROUTES BELOW", "There are many routes to the dungeon below! I trust you can find your way to join us there.", "vo/outland_01/intro/vort_separation_goodbye02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IF NOT SACRIFICE NOT BE FORGOTTEN", "If not, your sacrifice shall not be forgotten!", "vo/outland_01/intro/vort_separation_goodbye03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOU MUST DRAW THEIR AGGRESSION", "You must draw their aggression so I can hurry her to shelter.", "vo/outland_01/intro/vort_separation_leave03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SUCCESS", "Success!", "vo/outland_01/intro/vort_separation_success02.wav")
|
||||
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "ALMOST VORTAL", "Almost vortal, this bound between you...", "vo/outland_02/junction/vort_junc_almostvortal.wav")
|
||||
Schema.voices.Add("Vortigaunt", "KIN SOME DISTANCE", "My kin are still some distance away.", "vo/outland_02/junction/vort_junc_assistance02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MUST NOT BE DISTURBED", "For now we must not be disturbed.", "vo/outland_02/junction/vort_junc_assistance03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "COMBINE HUNTERS", "The Combine hunters cause dramatic injury.", "vo/outland_02/junction/vort_junc_badlyinjured02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "BEHOLD", "Behold!", "vo/outland_02/junction/vort_junc_behold.wav")
|
||||
Schema.voices.Add("Vortigaunt", "FAREWELL", "Farewell!", "vo/outland_02/junction/vort_junc_bye01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GO SAFELY", "Go safely!", "vo/outland_02/junction/vort_junc_bye02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TRAVEL WELL", "Travel well!", "vo/outland_02/junction/vort_junc_bye03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXHAUSTED THEIR NUMBER", "We have exhausted their immediate number.", "vo/outland_02/junction/vort_junc_exhausted.wav")
|
||||
Schema.voices.Add("Vortigaunt", "REQUIRE YOUR SIGNATURE", "We require your vortal signature!", "vo/outland_02/junction/vort_junc_fmsignature04.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IMMEASURABLE LOSS", "We have a very immeasurable loss.", "vo/outland_02/junction/vort_junc_immeasurable.wav")
|
||||
Schema.voices.Add("Vortigaunt", "KILLED MANY ANTLIONS", "We killed many antlions.", "vo/outland_02/junction/vort_junc_killedmanyyet01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YET MORE REMAIN", "Yet many more remain.", "vo/outland_02/junction/vort_junc_killedmanyyet02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE KNIT SHATTERED BONE", "We knit shattered bone, and restored circulatory integrity.", "vo/outland_02/junction/vort_junc_knit.wav")
|
||||
Schema.voices.Add("Vortigaunt", "LIE STILL", "Lie still...", "vo/outland_02/junction/vort_junc_liestill.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MATTER OF HOURS", "A matter of hours.", "vo/outland_02/junction/vort_junc_matterhours.wav")
|
||||
Schema.voices.Add("Vortigaunt", "A MOMENT LONGER", "A moment longer.", "vo/outland_02/junction/vort_junc_momentlonger.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NEXT MATTER", "Now to the next matter of urgency!", "vo/outland_02/junction/vort_junc_nextmatter.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NO PULSE", "No pulse!", "vo/outland_02/junction/vort_junc_nopulse01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HER HEART HAS STOPPED", "Her heart has stopped!", "vo/outland_02/junction/vort_junc_nopulse02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE IS A QUICKENING", "Yes... there is a quickening!", "vo/outland_02/junction/vort_junc_quicken.wav")
|
||||
Schema.voices.Add("Vortigaunt", "QUIET THEM", "We shall quiet them.", "vo/outland_02/junction/vort_junc_quietthem.wav")
|
||||
Schema.voices.Add("Vortigaunt", "RIGHT ROAD", "No fear... we will put you on the right road.", "vo/outland_02/junction/vort_junc_rightroad.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TRY TO RIsE", "Now, try carefully to rise.", "vo/outland_02/junction/vort_junc_rise.wav")
|
||||
Schema.voices.Add("Vortigaunt", "REGAINED INTEGRITY", "Her vortal form has regained integrity.", "vo/outland_02/junction/vort_junc_stabilizing02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SHE STIRS", "She stirs.", "vo/outland_02/junction/vort_junc_stirs.wav")
|
||||
Schema.voices.Add("Vortigaunt", "OUR DELAY", "Our delay... regrettable.", "vo/outland_02/junction/vort_junc_weweredelayed.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DEFEND US", "Defend us!", "vo/outland_02/junction/vort_turret_defendus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE NEED HELP", "We need help!", "vo/outland_02/junction/vort_turret_helpcall01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE ARE UNDER ATTACK", "We are under attack!", "vo/outland_02/junction/vort_turret_helpcall04.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PROTECT US", "Protect us!", "vo/outland_02/junction/vort_turret_protectus.wav")
|
||||
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "I DESCEND", "I descend.", "vo/outland_03_04/tunnels/vort_04_elevator_descend_01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ANTLIONS", "Antlions!", "vo/outland_03_04/tunnels/vort_antlions_arrive_01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SAD FATE OF OTHERS", "The sad fate of these others... is our good fortune.", "vo/outland_03_04/tunnels/vort_breakweb02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GRIM PINATA", "Grim pinata.", "vo/outland_03_04/tunnels/vort_breakweb03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "AGREED2", "Agreed.", "vo/outland_03_04/tunnels/vort_extract_agreed.wav")
|
||||
Schema.voices.Add("Vortigaunt", "AH YES", "Ah, yes!", "vo/outland_03_04/tunnels/vort_extract_ahyes.wav")
|
||||
Schema.voices.Add("Vortigaunt", "BARE SOME TRAITS", "You bare some traits we thought inate to vortikind.", "vo/outland_03_04/tunnels/vort_extract_bond02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ANTLION HUSBANDRY", "Antlion husbandry was once our ancestral practice.", "vo/outland_03_04/tunnels/vort_extract_bond03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXTRACT MOST PRIZED", "The creatures exude many valuable compounds. But the extract is the most prized by far.", "vo/outland_03_04/tunnels/vort_extract_bond04.wav")
|
||||
Schema.voices.Add("Vortigaunt", "LARVAL EXTRACT", "Ah, excellent. A bounty of larval extract!", "vo/outland_03_04/tunnels/vort_extract_bounty01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TAKE A MOMENT", "This should only take a moment.", "vo/outland_03_04/tunnels/vort_extract_bounty02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "CONSTANT OBSTACLES", "What next in the parade of constant obstacles?", "vo/outland_03_04/tunnels/vort_extract_constantobst.wav")
|
||||
Schema.voices.Add("Vortigaunt", "OUR DREAMS DO NOT FOLLOW", "I only hope our dreams do not follow them.", "vo/outland_03_04/tunnels/vort_extract_dreamsdonotfollow02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SECRETIONS", "Secretions of the finest quality!", "vo/outland_03_04/tunnels/vort_extract_finequality01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "RIPE PERFECTION", "The scent of ripe perfection beckons.", "vo/outland_03_04/tunnels/vort_extract_hardwork01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "A HUMAN IS NEEDED", "A human is needed!", "vo/outland_03_04/tunnels/vort_extract_humanmark.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IMBIDE THE EXTRACT", "Join, now, as we imbide the extract!", "vo/outland_03_04/tunnels/vort_extract_imbibe.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DEEP SUBMERSION", "This will necessitate deep submersion in the vortessance.", "vo/outland_03_04/tunnels/vort_extract_injuriesdeep02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "JOIN ME", "Join me.", "vo/outland_03_04/tunnels/vort_extract_joinmefm02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "EXPECT GREATER RESISTANCE", "Expect ever greater resistance as we proceed!", "vo/outland_03_04/tunnels/vort_extract_keen02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GREAT ANTICIPATION", "I will observe with great anticipation.", "vo/outland_03_04/tunnels/vort_extract_puzzling02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NO FINER COMPANION", "There is no finer companion.", "vo/outland_03_04/tunnels/vort_extract_yescompanion02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "QUITE PLEASANT UNDER FOOT", "They are quite pleasant under foot, are they not?", "vo/outland_03_04/tunnels/vort_squishgrub01.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PLEASING SOUND", "Ah... such a pleasing sound and sensation!", "vo/outland_03_04/tunnels/vort_squishgrub02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NO SENTRIES", "I do not see their sentries.", "vo/outland_05/canyon/vort_canyon_enclavesentries02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "FAR FETCHED", "Such a theory is hardly far-fetched...", "vo/outland_05/canyon/vort_canyon_farfetch.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SCATTERED COMBINE FORCES", "They gather and unite the scattered Combine forces...", "vo/outland_05/canyon/vort_canyon_podparade02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THEY MOVE NORTH", "They move north with great purpose!", "vo/outland_05/canyon/vort_canyon_purpose.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SENTRIES SHOULD HAVE SPOTTED", "Puzzling. The sentries should have spotted us by now.", "vo/outland_05/canyon/vort_canyon_puzzling.wav")
|
||||
Schema.voices.Add("Vortigaunt", "OUR URGENT NEED", "They will understand our urgent need.", "vo/outland_05/canyon/vort_canyon_reside02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "KILL IT WITHOUT CONSEQUENCE", "At this time you may kill it without consequence.", "vo/outland_05/canyon/vort_guard_killit.wav")
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "MINDS IN YOUR MIND", "Could you but see the eyes inside your own, the minds in your mind, you would see how much we share.", "vo/npc/vortigaunt/vmono_29.wav")
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "GUN POWERLESS", "The gun would appear to be powerless.", "vo/outland_06/bridge/vort_bridge_depleted02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IT HAS BEEN AN HONOR", "Likewise! And farewell... it has been an honor!", "vo/outland_06/bridge/vort_bridge_farewell.wav")
|
||||
Schema.voices.Add("Vortigaunt", "BONDS ARE OF NATURE", "Our bonds are of nature, and require no gratitude.", "vo/outland_06/bridge/vort_bridge_honored.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MORE URGENT ERRAND", "I fear more urgent errand demands our attention.", "vo/outland_06/bridge/vort_bridge_hunt01.wav")
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "REGRETTABLY TRUE", "Regrettably true.", "vo/outland_11a/silo/vort_silo_regrettablytrue.wav")
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "COME", "Come!", "HLAComVoice/vortigaunt/come.wav")
|
||||
Schema.voices.Add("Vortigaunt", "COME ENTER", "Come! Enter.", "HLAComVoice/vortigaunt/comeenter.wav")
|
||||
Schema.voices.Add("Vortigaunt", "COME IN", "Come in, come in!", "HLAComVoice/vortigaunt/comeincomein.wav")
|
||||
Schema.voices.Add("Vortigaunt", "COOKING", "Cooking.", "HLAComVoice/vortigaunt/cooking.wav")
|
||||
Schema.voices.Add("Vortigaunt", "FOR GUIDANCE", "For guidance!", "HLAComVoice/vortigaunt/forguidance.wav")
|
||||
Schema.voices.Add("Vortigaunt", "GO", "Go!", "HLAComVoice/vortigaunt/go.wav")
|
||||
Schema.voices.Add("Vortigaunt", "BRAIN INJURY", "I have a brain injury.", "HLAComVoice/vortigaunt/ihaveabraininjury.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WHY I BROUGHT YOU", "I must show you why I have brought you here.", "HLAComVoice/vortigaunt/imustshowyouwhy.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IN HERE", "In here!", "HLAComVoice/vortigaunt/inhere.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IT IS IMPORTANT", "It is important!", "HLAComVoice/vortigaunt/itisimportant.wav")
|
||||
Schema.voices.Add("Vortigaunt", "CLEAR THE PATH", "I will clear the path.", "HLAComVoice/vortigaunt/iwillclearthepath.wav")
|
||||
Schema.voices.Add("Vortigaunt", "LOOK HERE", "Look here!", "HLAComVoice/vortigaunt/lookhere.wav")
|
||||
Schema.voices.Add("Vortigaunt", "BRAIN INJURED", "My brain is injured!", "HLAComVoice/vortigaunt/mybrainisinjured.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HE WILL BE", "Or... he will be...", "HLAComVoice/vortigaunt/orhewillbe.wav")
|
||||
Schema.voices.Add("Vortigaunt", "OW", "Ow.", "HLAComVoice/vortigaunt/ow.wav")
|
||||
Schema.voices.Add("Vortigaunt", "PLEASE COME", "Please! Come...", "HLAComVoice/vortigaunt/pleasecome.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SUSTENANCE", "Sustenance!", "HLAComVoice/vortigaunt/sustenance.wav")
|
||||
Schema.voices.Add("Vortigaunt", "COMBINE HAVE OTHER", "The Combine have other of my kin.", "HLAComVoice/vortigaunt/thecombinehaveother.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THEEE", "The...", "HLAComVoice/vortigaunt/theee.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THEN YOU WILL", "Then you will.", "HLAComVoice/vortigaunt/thenyouwill.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE", "There!", "HLAComVoice/vortigaunt/there.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE2", "There!", "HLAComVoice/vortigaunt/there2.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE3", "There!", "HLAComVoice/vortigaunt/there3.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE4", "There!", "HLAComVoice/vortigaunt/there4.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THIS WAY", "This way.", "HLAComVoice/vortigaunt/thisway.wav")
|
||||
Schema.voices.Add("Vortigaunt", "RIPPED FROM OURSELVES", "We are ripped from ourselves...", "HLAComVoice/vortigaunt/wearerippedfromourselves.wav")
|
||||
Schema.voices.Add("Vortigaunt", "TRAPPED IN THE DARK", "We have been trapped... in the dark.", "HLAComVoice/vortigaunt/wehavebeentrapped.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WHAT THEY DO TO US ALL", "What they do to us all.", "HLAComVoice/vortigaunt/whattheydotousall.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YESSS2", "Yes...", "HLAComVoice/vortigaunt/yesss.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOU ARE WELCOME", "You are welcome!", "HLAComVoice/vortigaunt/youarewelcome.wav")
|
||||
Schema.voices.Add("Vortigaunt", "SAVED MY KIN", "You have saved my kin!", "HLAComVoice/vortigaunt/youhavesavedmykin.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOU MUST GO", "You must go!", "HLAComVoice/vortigaunt/youmustgo.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOU RECEIVED MY MESSAGES", "You received my messages!", "HLAComVoice/vortigaunt/youreceived.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOU WILL BE WELCOME", "You will be welcome!", "HLAComVoice/vortigaunt/youwillbewelcome.wav")
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "COURAGE", "Courage!", "HLAComVoice/vortigaunt/courage.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DO NOT GO", "Do not go yet!", "HLAComVoice/vortigaunt/donotgoyet.wav")
|
||||
Schema.voices.Add("Vortigaunt", "ENTER", "Enter...", "HLAComVoice/vortigaunt/enter.wav")
|
||||
Schema.voices.Add("Vortigaunt", "HE IS DEAD", "He is dead.", "HLAComVoice/vortigaunt/heisdead.wav")
|
||||
Schema.voices.Add("Vortigaunt", "I AM ALONE", "I am alone in my head...", "HLAComVoice/vortigaunt/iamalone.wav")
|
||||
Schema.voices.Add("Vortigaunt", "I AM DIMINISHED", "I am... diminished.", "HLAComVoice/vortigaunt/iamdiminished.wav")
|
||||
Schema.voices.Add("Vortigaunt", "I AM SEVERED", "I am severed from the vortessance...", "HLAComVoice/vortigaunt/iamsevered.wav")
|
||||
Schema.voices.Add("Vortigaunt", "I HAVE COME TO HELP", "I have come to help!", "HLAComVoice/vortigaunt/ihavecometohelp.wav")
|
||||
Schema.voices.Add("Vortigaunt", "I MUST SHOW YOU SOMETHING", "I must show you something...", "HLAComVoice/vortigaunt/imustshowyou.wav")
|
||||
Schema.voices.Add("Vortigaunt", "MATTER OF PERSPECTIVE", "It is a matter of perspective.", "HLAComVoice/vortigaunt/itisamatterofperspective.wav")
|
||||
Schema.voices.Add("Vortigaunt", "IVE BEEN WAITING", "I've been waiting for you.", "HLAComVoice/vortigaunt/ivebeenwaitingforyou.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NO RIDDLES", "No riddles!", "HLAComVoice/vortigaunt/noriddles.wav")
|
||||
Schema.voices.Add("Vortigaunt", "NOW GO", "Now go.", "HLAComVoice/vortigaunt/nowgo.wav")
|
||||
Schema.voices.Add("Vortigaunt", "OUR PATHS DIVERGE", "Our paths diverge.", "HLAComVoice/vortigaunt/ourpathsdiverge.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THE COMBINE", "The Combine, yes!", "HLAComVoice/vortigaunt/thecombineyes.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THERE IS NO DISTANCE", "There is no distance between us.", "HLAComVoice/vortigaunt/thereisnodistancebetweenus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "DISTANT FROM ME", "The vortessance is distant from me...", "HLAComVoice/vortigaunt/thevortessanceisdistant.wav")
|
||||
Schema.voices.Add("Vortigaunt", "THROUGH THERE", "Through there!", "HLAComVoice/vortigaunt/throughthere.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE ARE COTERMINOUS", "We are... coterminous.", "HLAComVoice/vortigaunt/wearecoterminus.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE CANNOT FAIL", "We cannot fail.", "HLAComVoice/vortigaunt/wecannotfail.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE EACH HAVE OUR PATHS", "We each have our paths.", "HLAComVoice/vortigaunt/weeachhaveourpaths.wav")
|
||||
Schema.voices.Add("Vortigaunt", "WE WILL NOT ALLOW IT", "We will not allow it.", "HLAComVoice/vortigaunt/wewillnotallow.wav")
|
||||
Schema.voices.Add("Vortigaunt", "YOUR JOURNEY", "Your journey brings you this far.", "HLAComVoice/vortigaunt/yourjourneybrings.wav")
|
||||
|
||||
Schema.voices.Add("Vortigaunt", "V1", "Gerr...", "vortigaunt/ep2/vortigese02.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V2", "Turr...", "vortigaunt/ep2/vortigese03.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V3", "Lurr...", "vortigaunt/ep2/vortigese04.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V4", "Lung...", "vortigaunt/ep2/vortigese05.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V5", "Gung...", "vortigaunt/ep2/vortigese07.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V6", "Gah'lung...", "vortigaunt/ep2/vortigese08.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V7", "Galla'lung...", "vortigaunt/ep2/vortigese09.wav")
|
||||
Schema.voices.Add("Vortigaunt", "V8", "Turr, lung gurr challa'cher, gung, gong... lurr...", "vortigaunt/ep2/vortigese13.wav")
|
||||
|
||||
Schema.voices.AddClass("Vortigaunt", function(client)
|
||||
return client:IsVortigaunt()
|
||||
end)
|
||||
39
gamemodes/darkrp/plugins/vortigaunts/meta/sh_character.lua
Normal file
39
gamemodes/darkrp/plugins/vortigaunts/meta/sh_character.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
local CHAR = ix.meta.character
|
||||
|
||||
function CHAR:IsVortigaunt()
|
||||
local faction = self:GetFaction()
|
||||
|
||||
if (faction == FACTION_VORT) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function CHAR:HasVortalEnergy(amount)
|
||||
if self:GetVortalEnergy() and self:GetVortalEnergy() >= amount then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function CHAR:TakeVortalEnergy(amount)
|
||||
if self:GetPlayer():GetNetVar("ixVortExtract") then return end
|
||||
self:SetVortalEnergy(math.Clamp(self:GetVortalEnergy() - amount, 0, ix.config.Get("maxVortalEnergy", 100)))
|
||||
end
|
||||
|
||||
function CHAR:AddVortalEnergy(amount)
|
||||
if self:GetPlayer():GetNetVar("ixVortExtract") then return end
|
||||
self:SetVortalEnergy(math.Clamp(self:GetVortalEnergy() + amount, 0, ix.config.Get("maxVortalEnergy", 100)))
|
||||
end
|
||||
36
gamemodes/darkrp/plugins/vortigaunts/meta/sh_player.lua
Normal file
36
gamemodes/darkrp/plugins/vortigaunts/meta/sh_player.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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 playerMeta = FindMetaTable("Player")
|
||||
|
||||
function playerMeta:IsVortigaunt()
|
||||
return self:GetCharacter() and self:GetCharacter():IsVortigaunt()
|
||||
end
|
||||
|
||||
function playerMeta:HasVortalEnergy(amount)
|
||||
local character = self:GetCharacter()
|
||||
if character:GetVortalEnergy() and character:GetVortalEnergy() >= amount then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function playerMeta:TakeVortalEnergy(amount)
|
||||
if self:GetNetVar("ixVortExtract") then return end
|
||||
local character = self:GetCharacter()
|
||||
character:SetVortalEnergy(math.Clamp(character:GetVortalEnergy() - amount, 0, ix.config.Get("maxVortalEnergy", 100)))
|
||||
end
|
||||
|
||||
function playerMeta:AddVortalEnergy(amount)
|
||||
if self:GetNetVar("ixVortExtract") then return end
|
||||
local character = self:GetCharacter()
|
||||
character:SetVortalEnergy(math.Clamp(character:GetVortalEnergy() + amount, 0, ix.config.Get("maxVortalEnergy", 100)))
|
||||
end
|
||||
64
gamemodes/darkrp/plugins/vortigaunts/sh_hooks.lua
Normal file
64
gamemodes/darkrp/plugins/vortigaunts/sh_hooks.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
--[[
|
||||
| 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 PLUGIN = PLUGIN
|
||||
|
||||
function PLUGIN:PlayerHurt(client, attacker, health, damage)
|
||||
if (client:GetCharacter():IsVortigaunt()) then
|
||||
if ((client.ixNextPain or 0) < CurTime() and health > 0) then
|
||||
local PainVort = {
|
||||
"vo/npc/vortigaunt/vortigese07.wav",
|
||||
"vo/npc/vortigaunt/vortigese11.wav",
|
||||
"vo/npc/vortigaunt/vortigese03.wav"
|
||||
}
|
||||
|
||||
local vort_pain = table.Random(PainVort)
|
||||
|
||||
client:EmitSound(vort_pain, 75, math.random(95, 105))
|
||||
|
||||
if vort_pain == "vo/npc/vortigaunt/vortigese11.wav" then
|
||||
client.ixNextPain = CurTime() + 3
|
||||
else
|
||||
client.ixNextPain = CurTime() + 1.5
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:GetPlayerDeathSound(client)
|
||||
if (client:GetCharacter():IsVortigaunt()) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CheckCanTransferToEquipSlots(itemTable, oldInv, inventory)
|
||||
local client = itemTable.player or (oldInv and oldInv.GetOwner and oldInv:GetOwner()) or itemTable.GetOwner and itemTable:GetOwner()
|
||||
if client and IsValid(client) then
|
||||
if client:IsVortigaunt() and itemTable:GetData("Locked", false) then
|
||||
return false, "Tasmanız kilitli, bu yüzden çıkaramazsınız!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PostCanTransferToEquipSlots(owner, itemTable, oldInv, inventory)
|
||||
if owner.IsVortigaunt and owner:IsVortigaunt() then
|
||||
if y == 10 then
|
||||
return false, "Vortigauntlar bu slotta kıyafet kuşanamaz!"
|
||||
end
|
||||
|
||||
local factionList = itemTable.factionList and istable(itemTable.factionList) and itemTable.factionList or false
|
||||
if !factionList or factionList and !table.HasValue(factionList, FACTION_VORT) then
|
||||
if !itemTable.isBag then
|
||||
return false, "Bu Vortigaunt'lar için tasarlanmış bir kıyafet değil!"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
775
gamemodes/darkrp/plugins/vortigaunts/sh_plugin.lua
Normal file
775
gamemodes/darkrp/plugins/vortigaunts/sh_plugin.lua
Normal file
@@ -0,0 +1,775 @@
|
||||
--[[
|
||||
| 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 PLUGIN = PLUGIN
|
||||
local ix = ix
|
||||
local CAMI = CAMI
|
||||
|
||||
PLUGIN.name = "Vortigaunt Features"
|
||||
PLUGIN.description = "Adds certain features to vortigaunt."
|
||||
PLUGIN.author = "Fruity, Adolphus"
|
||||
|
||||
PLUGIN.BATCH = 50
|
||||
|
||||
PLUGIN.vortalEnergyPerAntlion = 5
|
||||
PLUGIN.vortalEnergyPerPlayer = 15
|
||||
PLUGIN.passiveVortalEnergyIncome = 0.1
|
||||
PLUGIN.passiveVortalEnergyTime = 8
|
||||
|
||||
PLUGIN.vortnotes = {}
|
||||
|
||||
PLUGIN.voidChar = 13827
|
||||
PLUGIN.voidKey = 34217
|
||||
|
||||
game.AddParticles( "particles/wn_vortigaunt_fx_blue.pcf" )
|
||||
game.AddParticles( "particles/wn7_vort_shield.pcf" )
|
||||
PrecacheParticleSystem( "vort_shield_parent" )
|
||||
PrecacheParticleSystem("vort_meditation")
|
||||
|
||||
CAMI.RegisterPrivilege({
|
||||
Name = "Helix - Manage Vortessence Menu",
|
||||
MinAccess = "admin"
|
||||
})
|
||||
|
||||
CAMI.RegisterPrivilege({
|
||||
Name = "Helix - Set Vortigaunt Allow Reset Collar",
|
||||
MinAccess = "admin"
|
||||
})
|
||||
|
||||
CAMI.RegisterPrivilege({
|
||||
Name = "Helix - Set Vortigaunt Conterminous",
|
||||
MinAccess = "admin"
|
||||
})
|
||||
|
||||
CAMI.RegisterPrivilege({
|
||||
Name = "Helix - Shackles Self Release",
|
||||
MinAccess = "superadmin"
|
||||
})
|
||||
|
||||
ix.flag.Add("N", "Vortigaunt nulled", function(client, isGiven)
|
||||
client:SetNetVar("ixVortNulled", isGiven)
|
||||
end)
|
||||
|
||||
ix.flag.Add("q", "Can Use Vortigaunt Shield", function(client, isGiven) return end)
|
||||
|
||||
ix.flag.Add("f", "Can unlock shackles.", function(client, isGiven)
|
||||
client:SetNetVar("ixVortUnlock", isGiven and isGiven or nil)
|
||||
end)
|
||||
|
||||
|
||||
ix.lang.AddTable("english", {
|
||||
optVortSensingDisable = "Vortal Hissetmeyi Devre Dışı Bırak",
|
||||
optdVortSensingDisable = "Vortal Hissetme devre dışı olmalı mı?",
|
||||
})
|
||||
|
||||
ix.option.Add("vortSensingDisable", ix.type.bool, true, {
|
||||
category = "other",
|
||||
hidden = function()
|
||||
return !LocalPlayer():IsVortigaunt()
|
||||
end,
|
||||
bNetworked = true
|
||||
})
|
||||
|
||||
ix.option.Add("conterminousSay", ix.type.bool, true, {
|
||||
category = "other",
|
||||
hidden = function()
|
||||
local character = LocalPlayer():GetCharacter()
|
||||
|
||||
return !LocalPlayer():IsVortigaunt() and character:GetConterminous()
|
||||
end,
|
||||
bNetworked = true
|
||||
})
|
||||
|
||||
ix.config.Add("conterminousCommands", "", "A list of SteamIDs allowed to use major conterminous commands, separated by a comma.", nil, {
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("maxVortalEnergy", 100, "Maximum vortal energy amount available for vortigaunts.", nil, {
|
||||
data = {min = 1, max = 500},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("maxVortEnergyPerMinuteOfDefaultMeditation", 10, "Default VE income per every minute of meditation in percents.", nil, {
|
||||
data = {min = 1, max = 100},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("maxVortEnergyPerMinuteOfAdvancedMeditation", 30, "Default VE income per every minute of meditation in percents for 50lvl vortessence vorts.", nil, {
|
||||
data = {min = 1, max = 100},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("additionalVortalEnergyDrainPerPointOfArmor", 1, "Additional VE drain per point of armor.", nil, {
|
||||
data = {min = 0, max = 100},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("vortalEnergyTickTime", 8, "How many seconds it takes to update vortal energy data for vorts.", nil, {
|
||||
data = {min = 1, max = 8},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("ConterminusHealingIncrease", 1, "How much faster a conterminus vort can passively heal their wounds (1 = default, 2 = double, 10 = 10 times etc etc)", nil, {
|
||||
data = {min = 1, max = 100},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("VortbeamAngle", 5, "The arc in degrees for the cone of a vortbeam to hit.", function(oldValue, newValue)
|
||||
for _, v in ipairs(ents.FindByClass("ix_vortbeam")) do
|
||||
v.lockAngle = newValue
|
||||
end
|
||||
end, {
|
||||
data = {min = 1, max = 15},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("VortbeamBorders", 100, "The maximum distance away from the beam itself a target can be to be considered hit.", nil, {
|
||||
data = {min = 1, max = 500},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("vortBeamAdditionalDamage", 1, "Vort beam damage.", function(oldValue, newValue)
|
||||
for _, v in ipairs(ents.FindByClass("ix_vortbeam")) do
|
||||
v.Primary.Damage = newValue
|
||||
end
|
||||
end, {
|
||||
data = {min = 1, max = 250},
|
||||
category = "Vortigaunt Beam SWEP"
|
||||
})
|
||||
|
||||
ix.config.Add("advancedBeamDamage", 1, "Advanced beam damage.", function(oldValue, newValue)
|
||||
for _, v in ipairs(ents.FindByClass("ix_vortbeam")) do
|
||||
v.Primary.Damage = newValue
|
||||
end
|
||||
end, {
|
||||
data = {min = 1, max = 500},
|
||||
category = "Advanced Vortigaunt Beam SWEP"
|
||||
})
|
||||
|
||||
ix.config.Add("vortSlamBaseDamage", 40, "Vort slam damage.", function(oldValue, newValue)
|
||||
for _, v in ipairs(ents.FindByClass("ix_vortslam")) do
|
||||
v.Primary.Damage = newValue
|
||||
end
|
||||
end, {
|
||||
data = {min = 40, max = 250},
|
||||
category = "Vortigaunt Slam SWEP"
|
||||
})
|
||||
|
||||
local theFluxIcon = ix.util.GetMaterial("willardnetworks/chat/the_flux.png")
|
||||
local theVortigauntIcon = ix.util.GetMaterial("willardnetworks/chat/thevortigaunt.png")
|
||||
|
||||
ix.chat.Register("the_flux", {
|
||||
CanSay = function(self, speaker, text)
|
||||
local character = speaker:GetCharacter()
|
||||
|
||||
if (!speaker:IsVortigaunt() or speaker:IsVortigaunt() and !character:GetConterminous()) then
|
||||
speaker:NotifyLocalized("notAllowed")
|
||||
|
||||
return false
|
||||
end
|
||||
end,
|
||||
CanHear = function(self, speaker, listener)
|
||||
local character = listener:GetCharacter()
|
||||
|
||||
return listener:IsVortigaunt() and character:GetConterminous()
|
||||
end,
|
||||
OnChatAdd = function(self, speaker, text)
|
||||
text = text:gsub("^%l", string.upper)
|
||||
|
||||
local lastChar = text:sub(-1)
|
||||
|
||||
if (!lastChar:match("[%p%s]")) then
|
||||
text = text .. "."
|
||||
end
|
||||
|
||||
local rText = string.format("[FLUX] " .. speaker:Name() .. ":" .. " \"%s\"", text)
|
||||
|
||||
chat.AddText(theFluxIcon, Color(54, 160, 52), rText)
|
||||
end
|
||||
})
|
||||
|
||||
ix.chat.Register("conterminity", {
|
||||
CanSay = function(self, speaker, text)
|
||||
local character = speaker:GetCharacter()
|
||||
|
||||
if (!speaker:IsVortigaunt() or speaker:IsVortigaunt() and !character:GetConterminous()) then
|
||||
|
||||
return false
|
||||
end
|
||||
end,
|
||||
CanHear = function(self, speaker, listener)
|
||||
local character = listener:GetCharacter()
|
||||
local distance = speaker:GetPos():Distance(listener:GetPos())
|
||||
|
||||
return speaker != listener and listener:IsVortigaunt() and character:GetConterminous() and distance > ix.config.Get("chatRange", 280)
|
||||
end,
|
||||
OnChatAdd = function(self, speaker, text)
|
||||
text = text:gsub("^%l", string.upper)
|
||||
|
||||
if (!text:sub(-1):match("[%p%s]")) then
|
||||
text = text .. "."
|
||||
end
|
||||
|
||||
local rText = string.format(speaker:Name() .. ":" .. " \"%s\"", text)
|
||||
|
||||
chat.AddText(theFluxIcon, Color(54, 160, 52), rText)
|
||||
end
|
||||
})
|
||||
|
||||
ix.chat.Register("thevortigaunt", {
|
||||
CanSay = function(self, speaker, text)
|
||||
local character = speaker:GetCharacter()
|
||||
local steamIDs = string.Explode(",", ix.config.Get("conterminousCommands", ""), false)
|
||||
|
||||
return CAMI.PlayerHasAccess(speaker, "Helix - Set Vortigaunt Conterminous", nil) or speaker:IsVortigaunt() and character:GetConterminous() and table.HasValue(steamIDs, speaker:SteamID())
|
||||
end,
|
||||
CanHear = function(self, speaker, listener)
|
||||
return listener:IsVortigaunt() and !listener:GetNetVar("ixVortNulled")
|
||||
end,
|
||||
OnChatAdd = function(self, speaker, text)
|
||||
text = text:gsub("^%l", string.upper)
|
||||
|
||||
if (!text:sub(-1):match("[%p%s]")) then
|
||||
text = text .. "."
|
||||
end
|
||||
|
||||
local rText = string.format("[VORTİKÜL]" .. ":" .. " \"%s\"", string.upper(text))
|
||||
|
||||
chat.AddText(theVortigauntIcon, Color(217, 212, 62), rText)
|
||||
end
|
||||
})
|
||||
|
||||
ix.char.RegisterVar("collarID", {
|
||||
field = "collarID",
|
||||
fieldType = ix.type.string,
|
||||
default = nil,
|
||||
bNoDisplay = true,
|
||||
OnSet = function(self, value)
|
||||
local client = self:GetPlayer()
|
||||
|
||||
if (IsValid(client)) then
|
||||
local character = client:GetCharacter()
|
||||
local genericdata = character:GetGenericdata()
|
||||
|
||||
self.vars.collarID = value
|
||||
|
||||
if (genericdata) then
|
||||
genericdata.collarID = value
|
||||
character:SetGenericdata(genericdata)
|
||||
character:Save()
|
||||
end
|
||||
end
|
||||
end,
|
||||
OnGet = function(self, default)
|
||||
local collarID = self.vars.collarID
|
||||
|
||||
return collarID
|
||||
end
|
||||
})
|
||||
|
||||
ix.char.RegisterVar("collarItemID", {
|
||||
field = "collarItemID",
|
||||
fieldType = ix.type.number,
|
||||
default = nil,
|
||||
bNoDisplay = true
|
||||
})
|
||||
|
||||
ix.char.RegisterVar("vortalEnergy", {
|
||||
field = "vortalEnergy",
|
||||
fieldType = ix.type.number,
|
||||
default = ix.config.Get("maxVortalEnergy", 100),
|
||||
isLocal = true,
|
||||
bNoDisplay = true,
|
||||
OnSet = function(self, value)
|
||||
local client = self:GetPlayer()
|
||||
|
||||
if !client:IsVortigaunt() then
|
||||
return "No."
|
||||
end
|
||||
|
||||
if (IsValid(client)) then
|
||||
self.vars.vortalEnergy = value
|
||||
|
||||
net.Start("ixCharacterVarChanged")
|
||||
net.WriteUInt(self:GetID(), 32)
|
||||
net.WriteString("vortalEnergy")
|
||||
net.WriteType(self.vars.vortalEnergy)
|
||||
net.Send(client)
|
||||
end
|
||||
end,
|
||||
OnAdjust = function(self, client, data, value, newData)
|
||||
if !client:IsVortigaunt() then return "No." end
|
||||
newData.vortalEnergy = value
|
||||
end
|
||||
})
|
||||
|
||||
ix.char.RegisterVar("BioticPDA", {
|
||||
field = "BioticPDA",
|
||||
fieldType = ix.type.string,
|
||||
default = "N/A",
|
||||
bNoDisplay = true,
|
||||
OnSet = function(self, value)
|
||||
local client = self:GetPlayer()
|
||||
|
||||
if (!client:IsVortigaunt()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (IsValid(client)) then
|
||||
self.vars.BioticPDA = value
|
||||
|
||||
net.Start("ixCharacterVarChanged")
|
||||
net.WriteUInt(self:GetID(), 32)
|
||||
net.WriteString("BioticPDA")
|
||||
net.WriteType(self.vars.BioticPDA)
|
||||
net.Send(client)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
ix.char.RegisterVar("Conterminous", {
|
||||
field = "Conterminous",
|
||||
fieldType = ix.type.bool,
|
||||
default = false,
|
||||
bNoDisplay = true,
|
||||
OnSet = function(self, value)
|
||||
local client = self:GetPlayer()
|
||||
|
||||
if (!client:IsVortigaunt()) then
|
||||
return
|
||||
end
|
||||
|
||||
if (IsValid(client)) then
|
||||
self.vars.Conterminous = value
|
||||
|
||||
net.Start("ixCharacterVarChanged")
|
||||
net.WriteUInt(self:GetID(), 32)
|
||||
net.WriteString("conterminous")
|
||||
net.WriteType(self.vars.Conterminous)
|
||||
net.Send(client)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("ToggleVortalSensing", {
|
||||
description = "Toggle vortal sensing.",
|
||||
OnRun = function(self, client, arguments)
|
||||
local bDisabled = ix.option.Get(client, "vortSensingDisable", true)
|
||||
|
||||
ix.option.Set(client, "vortSensingDisable", !bDisabled)
|
||||
|
||||
client:Notify("Vortal hissetmeyi " .. (bDisabled and "açtınız" or "kapadınız"))
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
return client:IsVortigaunt()
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("VortSetConterminous", {
|
||||
alias = "VortSetCoterminous",
|
||||
description = "Sets a Vortigaunt to be conterminous.",
|
||||
adminOnly = true,
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
ix.type.bool
|
||||
},
|
||||
OnRun = function(self, client, character, bool)
|
||||
netstream.Start(client, "conterminousSetConfirm", character:GetName(), bool)
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Set Vortigaunt Conterminous", nil)
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("VortSetAgenda", {
|
||||
description = "Sets the conterminous Vortigaunt agenda.",
|
||||
adminOnly = false,
|
||||
arguments = {
|
||||
bit.bor(ix.type.text, ix.type.optional)
|
||||
},
|
||||
OnRun = function(self, client, message)
|
||||
local textDefault = "Vortigaunt sessiz."
|
||||
for _, v in pairs(ix.char.loaded) do
|
||||
if (v:IsVortigaunt() and v:GetConterminous()) then
|
||||
netstream.Start(v, "conterminousSetAgenda", message and #message >= 1 and message or textDefault)
|
||||
end
|
||||
end
|
||||
|
||||
PLUGIN.conterminousAgendaMessage = message and #message > 1 and message or textDefault
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
local character = client:GetCharacter()
|
||||
local steamIDs = string.Explode(",", ix.config.Get("conterminousCommands", ""), false)
|
||||
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Set Vortigaunt Conterminous", nil) or table.HasValue(steamIDs, client:SteamID()) or client:IsVortigaunt() and character:GetConterminous()
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("VortCheckAgenda", {
|
||||
description = "Checks the conterminous Vortigaunt agenda.",
|
||||
adminOnly = false,
|
||||
OnRun = function(self, client, message)
|
||||
netstream.Start(client, "conterminousRetrieveAgenda", PLUGIN.conterminousAgendaMessage)
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
local character = client:GetCharacter()
|
||||
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Set Vortigaunt Conterminous", nil) or client:IsVortigaunt() and character:GetConterminous()
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("rvort", {
|
||||
description = "Transmit important information to fellow conterminous Vortigaunts.",
|
||||
adminOnly = false,
|
||||
arguments = {
|
||||
ix.type.text
|
||||
},
|
||||
OnRun = function(self, client, message)
|
||||
if (#message >= 1) then
|
||||
ix.chat.Send(client, "the_flux", message)
|
||||
end
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
local character = client:GetCharacter()
|
||||
|
||||
return client:IsVortigaunt() and character:GetConterminous() and !client:GetNetVar("ixVortNulled")
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("thevortigaunt", {
|
||||
description = "Speak to all connected vorts as the voice of The Vortigaunt.",
|
||||
adminOnly = false,
|
||||
arguments = {
|
||||
ix.type.text
|
||||
},
|
||||
OnRun = function(self, client, message)
|
||||
if (#message > 1) then
|
||||
ix.chat.Send(client, "thevortigaunt", message)
|
||||
end
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
local character = client:GetCharacter()
|
||||
local steamIDs = string.Explode(",", ix.config.Get("conterminousCommands", ""), false)
|
||||
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Set Vortigaunt Conterminous", nil) or client:IsVortigaunt() and character:GetConterminous() and table.HasValue(steamIDs, client:SteamID()) and !client:GetNetVar("ixVortNulled")
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("ToggleVortalVision", {
|
||||
description = "Toggle vortal vision.",
|
||||
OnRun = function(self, client, arguments)
|
||||
netstream.Start(client, "ToggleVortalVision")
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
return client:IsVortigaunt()
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("VortStun", {
|
||||
description = "Stun someone in front of you.",
|
||||
OnRun = function(self, client)
|
||||
local percentage = 10 / 100
|
||||
if !client:HasVortalEnergy(10 + (percentage * client:Armor())) then
|
||||
return client:NotifyLocalized("Yeterli vortal enerjiniz yok.")
|
||||
end
|
||||
local forward = client:EyeAngles():Forward()
|
||||
local tr = util.QuickTrace(client:EyePos(), forward * 128, client)
|
||||
if !IsValid(tr.Entity) or !tr.Entity:IsPlayer() or tr.Entity.ixRagdoll or !tr.Entity:Alive() then
|
||||
return client:NotifyLocalized("Geçersiz hedef!")
|
||||
end
|
||||
if tr.Entity:IsVortigaunt() and tr.Entity:GetNetVar("ixVortMeditation") then
|
||||
return client:NotifyLocalized("Meditasyon yapan Vort'u sersemletemezsiniz!")
|
||||
end
|
||||
if client:GetNetVar("ixVortMeditation") then
|
||||
return client:NotifyLocalized("Meditasyon yaparken sersemletemezsiniz!")
|
||||
end
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, client, client:LookupAttachment("rightclaw"))
|
||||
client:PlayGestureAnimation(client:LookupSequence("gest_heal"))
|
||||
timer.Simple(2.25, function()
|
||||
if (!IsValid(client) or !IsValid(tr.Entity) or tr.Entity.ixRagdoll) or !tr.Entity:Alive() then
|
||||
if IsValid(client) then
|
||||
client:StopParticles()
|
||||
end
|
||||
return
|
||||
end
|
||||
if tr.Entity:IsVortigaunt() and tr.Entity:GetNetVar("ixVortMeditation") then
|
||||
client:StopParticles()
|
||||
return client:NotifyLocalized("Meditasyon yapan Vort'u sersemletemezsiniz!")
|
||||
end
|
||||
if client:GetNetVar("ixVortMeditation") then
|
||||
client:StopParticles()
|
||||
return client:NotifyLocalized("Meditasyon yaparken sersemletemezsiniz!")
|
||||
end
|
||||
client:TakeVortalEnergy(10 + (percentage * client:Armor()))
|
||||
tr.Entity:SetRagdolled(true, 30)
|
||||
client:GetCharacter():DoAction("vort_beam_practice")
|
||||
client:EmitSound( "npc/vort/health_charge.wav", 100, 150, 1, CHAN_AUTO )
|
||||
client:StopParticles()
|
||||
end)
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
if client:IsVortigaunt() and !client:GetNetVar("ixVortNulled") then return true end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("VortUnlock", {
|
||||
description = "Unlock someone's shackles.",
|
||||
OnRun = function(self, client)
|
||||
local forward = client:EyeAngles():Forward()
|
||||
local tr = util.QuickTrace(client:EyePos(), forward * 128, client)
|
||||
if !IsValid(tr.Entity) or !tr.Entity:IsPlayer() or !tr.Entity:IsVortigaunt() or !tr.Entity:Alive() then
|
||||
return client:NotifyLocalized("Invalid target!")
|
||||
end
|
||||
ParticleEffectAttach("vortigaunt_charge_token", PATTACH_POINT_FOLLOW, client, client:LookupAttachment("rightclaw"))
|
||||
client:PlayGestureAnimation(client:LookupSequence("gest_heal"))
|
||||
timer.Simple(2.25, function()
|
||||
if (!IsValid(client) or !IsValid(tr.Entity) or !tr.Entity:IsVortigaunt()) or !tr.Entity:Alive() then
|
||||
if IsValid(client) then
|
||||
client:StopParticles()
|
||||
end
|
||||
return
|
||||
end
|
||||
client:EmitSound( "npc/vort/health_charge.wav", 100, 150, 1, CHAN_AUTO )
|
||||
client:StopParticles()
|
||||
local character = tr.Entity:GetCharacter()
|
||||
local usedOnItems = {"Vortigaunt Tasması", "Vortigaunt Prangaları", "Vortigaunt Kancaları"}
|
||||
local foundSomething = false
|
||||
local collarID = false
|
||||
for _, v in pairs(character:GetInventory():GetItems()) do
|
||||
if table.HasValue( usedOnItems, v.name ) and v:GetData("equip") == true and v:GetData("Locked") then
|
||||
if v:GetData("collarID") then
|
||||
collarID = v:GetData("collarID")
|
||||
end
|
||||
v:SetData("Locked", false)
|
||||
foundSomething = true
|
||||
end
|
||||
end
|
||||
|
||||
if foundSomething then
|
||||
ix.combineNotify:AddImportantNotification(collarID and "WRN:// Vortigaunt prangaları kritik hasar aldı. Yaka Kimliği: #" .. collarID or "WRN:// Vortigaunt prangaları kritik hasar aldı. Yaka Kimliği: BİLİNMİYOR.", Color(255, 81, 0), tr.Entity, tr.Entity:GetPos())
|
||||
tr.Entity:NotifyLocalized("Prangalarınız artık kilitli değildir ve çıkarılabilir.")
|
||||
else
|
||||
tr.Entity:NotifyLocalized("Kilitli pranga takmıyorsunuz..")
|
||||
return
|
||||
end
|
||||
client:GetCharacter():DoAction("vort_beam_practice")
|
||||
end)
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
if client:IsVortigaunt() and client:GetNetVar("ixVortUnlock") then return true end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("EnterMeditation", {
|
||||
description = "Toggle vortal meditation and restore your vortal energy.",
|
||||
OnRun = function(self, client)
|
||||
if client:GetNetVar("ixVortMeditation") then
|
||||
PLUGIN:ExitVortalMeditation(client)
|
||||
else
|
||||
PLUGIN:EnterVortalMeditation(client)
|
||||
end
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
if client:IsVortigaunt() and !client:GetNetVar("ixVortNulled") then return true end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("SetBioticPDA", {
|
||||
description = "Set access to either CWU or CMU datapad.",
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
ix.type.string
|
||||
},
|
||||
adminOnly = true,
|
||||
OnRun = function(self, client, character, data)
|
||||
if character:IsVortigaunt() then
|
||||
if (data and data == "CWU" or data and data == "CMU") then
|
||||
character:SetBioticPDA(data)
|
||||
character:SetData("BioticPDA", data)
|
||||
|
||||
client:NotifyLocalized("Biyotik PDA erişimi şu şekilde ayarlandı: " .. data)
|
||||
else
|
||||
client:NotifyLocalized("'CMU' veya 'CWU' belirtmelisiniz!")
|
||||
return false
|
||||
end
|
||||
else
|
||||
client:NotifyLocalized("Belirtilen karakter bir Vortigaunt değil!")
|
||||
return false
|
||||
end
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Manage Vortessence Menu")
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("SetVortAllowResetCollar", {
|
||||
description = "Allows a Vortigaunt to reset their datafile from previous data after equipping a fake collar.",
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
ix.type.bool
|
||||
},
|
||||
adminOnly = true,
|
||||
OnRun = function(self, client, character, bool)
|
||||
if (character:GetFaction() == FACTION_VORT and character:GetBackground() != "Biyotik" and character:GetBackground() != "İşbirlikçi") then
|
||||
if (bool) then
|
||||
character:SetData("CanResetFakeCollarDatafile", true)
|
||||
else
|
||||
character:SetData("CanResetFakeCollarDatafile", false)
|
||||
end
|
||||
|
||||
ix.log.AddRaw("[FAKE COLLAR] " .. client:Nick() .. " changed SetVortAllowResetCollar for " .. character:GetName() .. " to " .. tostring(bool))
|
||||
end
|
||||
end,
|
||||
OnCheckAccess = function(self, client)
|
||||
return CAMI.PlayerHasAccess(client, "Helix - Set Vortigaunt Allow Reset Collar")
|
||||
end
|
||||
})
|
||||
|
||||
ix.anim.SetModelClass("models/willardnetworks/vortigaunt.mdl", "vortigaunt")
|
||||
ix.util.Include("sh_hooks.lua")
|
||||
ix.util.Include("cl_hooks.lua")
|
||||
ix.util.Include("cl_plugin.lua")
|
||||
ix.util.Include("sv_hooks.lua")
|
||||
ix.util.Include("meta/sh_character.lua")
|
||||
ix.util.Include("meta/sh_player.lua")
|
||||
|
||||
ix.config.Add("VortHealMin", 5, "Minimum health value that can be healed by vortigaunt" , nil, {
|
||||
data = {min = 1, max = 100},
|
||||
category = "Vortigaunt Healing Swep"
|
||||
})
|
||||
|
||||
ix.config.Add("VortHealMax", 20, "Maximum health value that can be healed by vortigaunt" , nil, {
|
||||
data = {min = 1, max = 100},
|
||||
category = "Vortigaunt Healing Swep"
|
||||
})
|
||||
|
||||
ix.config.Add("VortShieldRecharge", 20, "How long it takes for the vort shield to recharge" , nil, {
|
||||
data = {min = 1, max = 200},
|
||||
category = "Vortigaunt Shield Swep"
|
||||
})
|
||||
|
||||
ix.config.Add("VortShieldHealth", 500, "How much health the vort sheld has" , nil, {
|
||||
data = {min = 1, max = 1000},
|
||||
category = "Vortigaunt Shield Swep"
|
||||
})
|
||||
|
||||
ix.config.Add("extractEffectDuration", 1800, "How many seconds stays extract effect." , nil, {
|
||||
data = {min = 1, max = 3800},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.config.Add("blacklistSCAmount", 50, "If vort collar have a negative SC point and its below this value - vort collar being blacklisted." , nil, {
|
||||
data = {min = 1, max = 999},
|
||||
category = "Vortigaunts"
|
||||
})
|
||||
|
||||
ix.command.Add("vortessence", {
|
||||
description = "Open vortessence menu as Vortigaunt.",
|
||||
OnCheckAccess = function(self, client)
|
||||
local faction = client:GetCharacter():GetFaction()
|
||||
if (faction == FACTION_VORT and !client:GetNetVar("ixVortNulled")) or CAMI.PlayerHasAccess(client, "Helix - Manage Vortessence Menu") then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end,
|
||||
OnRun = function(self, client)
|
||||
PLUGIN:RefreshVortessence(client)
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("UnlockShackles", {
|
||||
description = "Silently unlock shackles of a certain vort.",
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
},
|
||||
adminOnly = true,
|
||||
OnRun = function(self, client, character)
|
||||
local foundSomething = false
|
||||
local usedOnItems = {"Vortigaunt Tasması", "Vortigaunt Prangaları", "Vortigaunt Kancaları"}
|
||||
if character:IsVortigaunt() then
|
||||
for _, v in pairs(character:GetInventory():GetItems()) do
|
||||
if table.HasValue( usedOnItems, v.name ) and v:GetData("equip") == true and v:GetData("Locked") then
|
||||
v:SetData("Locked", false)
|
||||
foundSomething = true
|
||||
end
|
||||
end
|
||||
|
||||
if foundSomething then
|
||||
character:GetPlayer():NotifyLocalized("Prangalarınız artık kilitli değildir ve çıkarılabilir.")
|
||||
return false
|
||||
else
|
||||
character:GetPlayer():NotifyLocalized("Kilitli pranga takmıyorsunuz..")
|
||||
return false
|
||||
end
|
||||
else
|
||||
character:GetPlayer():NotifyLocalized("Vortigaunt değilsin!")
|
||||
return false
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("SetVortalEnergy", {
|
||||
description = "Sets vortal energy to certain vortigaunt.",
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
ix.type.number,
|
||||
},
|
||||
adminOnly = true,
|
||||
OnRun = function(self, client, character, value)
|
||||
if character:IsVortigaunt() then
|
||||
client:NotifyLocalized("You just setted " .. value .. " of vortal energy to " .. character:GetName())
|
||||
character:SetVortalEnergy(math.Clamp(value, 0, 100))
|
||||
else
|
||||
client:NotifyLocalized("Hedefiniz bir Vortigaunt değil!")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("AddVortalEnergy", {
|
||||
description = "Adds vortal energy to certain vortigaunt.",
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
ix.type.number,
|
||||
},
|
||||
adminOnly = true,
|
||||
OnRun = function(self, client, character, value)
|
||||
if character:IsVortigaunt() then
|
||||
client:NotifyLocalized("You just added " .. value .. " of vortal energy to " .. character:GetName())
|
||||
character:AddVortalEnergy(math.Clamp(value, 0, 100))
|
||||
else
|
||||
client:NotifyLocalized("Hedefiniz bir Vortigaunt değil!")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
ix.command.Add("TakeVortalEnergy", {
|
||||
description = "Takes vortal energy from certain vortigaunt.",
|
||||
arguments = {
|
||||
ix.type.character,
|
||||
ix.type.number,
|
||||
},
|
||||
adminOnly = true,
|
||||
OnRun = function(self, client, character, value)
|
||||
if character:IsVortigaunt() then
|
||||
client:NotifyLocalized("You just took " .. value .. " of vortal energy from " .. character:GetName())
|
||||
character:TakeVortalEnergy(math.Clamp(value, 0, 100))
|
||||
else
|
||||
client:NotifyLocalized("Hedefiniz bir Vortigaunt değil!")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
function PLUGIN:CharacterLoaded(character)
|
||||
if (SERVER) then
|
||||
character:SetBioticPDA(character:GetData("BioticPDA", "N/A"))
|
||||
end
|
||||
end
|
||||
461
gamemodes/darkrp/plugins/vortigaunts/sv_hooks.lua
Normal file
461
gamemodes/darkrp/plugins/vortigaunts/sv_hooks.lua
Normal file
@@ -0,0 +1,461 @@
|
||||
--[[
|
||||
| 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 PLUGIN = PLUGIN
|
||||
local ix = ix
|
||||
local timer = timer
|
||||
|
||||
PLUGIN.conterminousAgendaMessage = PLUGIN.conterminousAgendaMessage or "Vortigaunt sessiz."
|
||||
|
||||
util.AddNetworkString("ixVortNotes")
|
||||
|
||||
function PLUGIN:DatabaseConnected()
|
||||
local query = mysql:Create("ix_vortessence")
|
||||
query:Create("note_id", "INT(11) UNSIGNED NOT NULL AUTO_INCREMENT")
|
||||
query:Create("note_title", "TEXT")
|
||||
query:Create("note_text", "TEXT")
|
||||
query:Create("note_date", "TEXT")
|
||||
query:Create("note_poster", "TEXT")
|
||||
query:Create("note_category", "TEXT")
|
||||
query:PrimaryKey("note_id")
|
||||
query:Execute()
|
||||
|
||||
end
|
||||
|
||||
function PLUGIN:RefreshVortessence(client, lastSelected)
|
||||
PLUGIN:GetVortessenceUpdates(client, lastSelected)
|
||||
end
|
||||
|
||||
function PLUGIN:SaveData()
|
||||
ix.data.Set("VortigauntAgenda", PLUGIN.conterminousAgendaMessage)
|
||||
end
|
||||
|
||||
function PLUGIN:LoadData()
|
||||
PLUGIN.conterminousAgendaMessage = ix.data.Get("VortigauntAgenda") or "Vortigaunt sessiz."
|
||||
end
|
||||
|
||||
function PLUGIN:GetVortessenceUpdates(client, lastSelected)
|
||||
if (!client:IsVortigaunt() and !CAMI.PlayerHasAccess(client, "Helix - Manage Vortessence Menu")) then
|
||||
return false
|
||||
end
|
||||
|
||||
local query = mysql:Select("ix_vortessence")
|
||||
query:Select("note_id")
|
||||
query:Select("note_title")
|
||||
query:Select("note_text")
|
||||
query:Select("note_date")
|
||||
query:Select("note_poster")
|
||||
query:Select("note_category")
|
||||
query:Callback(function(result)
|
||||
if (!istable(result)) then
|
||||
self:OpenVortessenceMenu(client)
|
||||
return
|
||||
end
|
||||
|
||||
if (!table.IsEmpty(PLUGIN.vortnotes)) then
|
||||
table.Empty(PLUGIN.vortnotes)
|
||||
end
|
||||
|
||||
PLUGIN.vortnotes = result
|
||||
self:OpenVortessenceMenu(client, lastSelected)
|
||||
end)
|
||||
|
||||
query:Execute()
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerSay(sender, text)
|
||||
local allowedTypes = {"/vort", "/wvort", "/yvort", "/r", "/radio", "/w", "/y", "/xen", "/wxen", "/yxen"}
|
||||
local anyAllowedTypeFound = false
|
||||
|
||||
if (text[1] == "/") then
|
||||
for _, atype in ipairs(allowedTypes) do
|
||||
if (string.sub(text, 1, #atype + 1) == atype .. " ") then
|
||||
text = string.sub(text, #atype + 2)
|
||||
|
||||
anyAllowedTypeFound = true
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (!anyAllowedTypeFound) then
|
||||
return
|
||||
end
|
||||
elseif (text[1] == "!" or text[1] == "@" or string.sub(text, 1, 3) == ".//") then
|
||||
return
|
||||
end
|
||||
|
||||
for _, v in ipairs(player.GetAll()) do
|
||||
if (IsValid(v) and ix.option.Get(v, "conterminousSay", false)) then
|
||||
local character = v:GetCharacter()
|
||||
|
||||
if (v != sender and v:IsVortigaunt() and character:GetConterminous()) then
|
||||
ix.chat.Send(sender, "conterminity", text)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CreateVortalTimer(client, character, uniqueID)
|
||||
timer.Create(uniqueID, ix.config.Get("vortalEnergyTickTime", 1), 0, function()
|
||||
if (IsValid(client)) then
|
||||
PLUGIN:HandleVortalTimer(client, character)
|
||||
else
|
||||
timer.Remove(uniqueID)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerLoadedCharacter(client, character, lastChar)
|
||||
if client:GetNetVar("ixVortMeditation") then
|
||||
client:SetNetVar("ixVortMeditation", nil)
|
||||
client:StopParticles()
|
||||
end
|
||||
|
||||
if client:GetNetVar("ixVortExtract") then
|
||||
client:SetNetVar("ixVortExtract", nil)
|
||||
end
|
||||
|
||||
local uniqueID = "ixVortalEnergy" .. client:SteamID64()
|
||||
if (timer.Exists(uniqueID)) then
|
||||
timer.Remove(uniqueID)
|
||||
end
|
||||
if !character:IsVortigaunt() and client.ixNextVortalEnergy then
|
||||
client.ixNextVortalEnergy = nil
|
||||
return
|
||||
elseif !character:IsVortigaunt() then
|
||||
return
|
||||
end
|
||||
client.ixNextVortalEnergy = CurTime()
|
||||
PLUGIN:CreateVortalTimer(client, character, uniqueID)
|
||||
end
|
||||
|
||||
function PLUGIN:HandleVortalTimer(client, character)
|
||||
if CurTime() > client.ixNextVortalEnergy then
|
||||
client.ixNextVortalEnergy = CurTime() + PLUGIN.passiveVortalEnergyTime
|
||||
character:AddVortalEnergy(PLUGIN.passiveVortalEnergyIncome)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:OnNPCKilled(npc, attacker, inflictor)
|
||||
if !attacker:IsPlayer() then return end
|
||||
if attacker.IsVortigaunt and !attacker:IsVortigaunt() then return end
|
||||
if npc:GetClass() == "npc_antlion" or npc:GetClass() == "npc_antlion_schizo_fireant" or npc:GetClass() == "npc_antlion_schizo_drone" or npc:GetClass() == "npc_antlion_schizo_soldier" then
|
||||
local character = attacker:GetCharacter()
|
||||
character:AddVortalEnergy(PLUGIN.vortalEnergyPerAntlion)
|
||||
attacker:ScreenFade(SCREENFADE.IN, Color(38, 106, 46, 128), 1, 1)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:ExtractConsume(client, character)
|
||||
if client:GetNetVar("ixVortExtract") or timer.Exists("ixVortigauntExtract" .. client:SteamID64()) then return end
|
||||
local overpoweredVorts = {}
|
||||
local eff = EffectData()
|
||||
eff:SetOrigin(client:GetPos())
|
||||
util.Effect("extract_use", eff)
|
||||
client:EmitSound("ambience/3d-sounds/xen-vorts/vort_09.mp3", 120)
|
||||
client:SetSkin(1)
|
||||
client:ForceSequence("eat_nectar", function()
|
||||
client:EmitSound("ambience/3d-sounds/xen-vorts/vort_06.mp3", 120)
|
||||
for _, vort in pairs(ents.FindInSphere(client:GetPos(), 500)) do
|
||||
if vort:IsPlayer() and vort:IsVortigaunt() and !vort:GetNetVar("ixVortNulled") then
|
||||
vort:SetSkin(1)
|
||||
vort:AddVortalEnergy(ix.config.Get("maxVortalEnergy", 100))
|
||||
vort:SetNetVar("ixVortExtract", true)
|
||||
vort:ScreenFade(SCREENFADE.IN, Color(140, 0, 183, 128), 1, 1)
|
||||
overpoweredVorts[#overpoweredVorts + 1] = vort
|
||||
end
|
||||
end
|
||||
timer.Create("ixVortigauntExtract" .. client:SteamID64(), ix.config.Get("extractEffectDuration"), 1, function()
|
||||
for _, vort in pairs(overpoweredVorts) do
|
||||
if vort:IsVortigaunt() then
|
||||
vort:SetSkin(vort:GetCharacter():GetData("skin", 0))
|
||||
vort:SetNetVar("ixVortExtract", nil)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end, nil, nil)
|
||||
end
|
||||
|
||||
function PLUGIN:HandlePlayerKill(client, vort)
|
||||
vort:ScreenFade(SCREENFADE.IN, Color(38, 106, 46, 128), 1, 1)
|
||||
vort:AddVortalEnergy(PLUGIN.vortalEnergyPerPlayer)
|
||||
end
|
||||
|
||||
function PLUGIN:EnterVortalMeditation(client)
|
||||
local character = client:GetCharacter()
|
||||
client:SelectWeapon("ix_hands")
|
||||
client:SetNetVar("ixVortMeditation", true)
|
||||
client:SetRunSpeed(1)
|
||||
client:SetWalkSpeed(1)
|
||||
client:SetJumpPower(1)
|
||||
ParticleEffectAttach("vort_meditation", PATTACH_ABSORIGIN_FOLLOW, client, 0)
|
||||
client:EmitSound("ambience/3d-sounds/xen-vorts/vort_0" .. math.random(1, 5) .. ".mp3")
|
||||
local uniqueID = "ixMeditation" .. client:SteamID64()
|
||||
timer.Create(uniqueID, 60, 0, function()
|
||||
if !IsValid(client) or !client:IsVortigaunt() or !client:GetNetVar("ixVortMeditation") then
|
||||
if IsValid(client) then
|
||||
client:SetNetVar("ixVortMeditation", nil)
|
||||
end
|
||||
timer.Remove(uniqueID)
|
||||
return
|
||||
end
|
||||
local percentage = ix.config.Get("maxVortalEnergy") / 100
|
||||
local randSound = math.random(1, 10)
|
||||
client:EmitSound(randSound <= 9 and "ambience/3d-sounds/xen-vorts/vort_0" .. randSound .. ".mp3" or "ambience/3d-sounds/xen-vorts/vort_" .. randSound .. ".mp3")
|
||||
client:ScreenFade(SCREENFADE.IN, Color(38, 106, 46, 128), 1, 1)
|
||||
character:AddVortalEnergy(character:GetSkillLevel("vort") != 50 and (percentage * ix.config.Get("maxVortEnergyPerMinuteOfDefaultMeditation", 10)) or (percentage * ix.config.Get("maxVortEnergyPerMinuteOfAdvancedMeditation", 30)))
|
||||
end)
|
||||
end
|
||||
|
||||
function PLUGIN:ExitVortalMeditation(client)
|
||||
client:SetNetVar("ixVortMeditation", nil)
|
||||
client:SetRunSpeed(ix.config.Get("runSpeed") * 1.25)
|
||||
client:SetWalkSpeed(ix.config.Get("walkSpeed"))
|
||||
client:SetJumpPower(250)
|
||||
client:StopParticles()
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerSwitchWeapon( client, oldWeapon, newWeapon )
|
||||
if client:GetNetVar("ixVortMeditation") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:OpenVortessenceMenu(client, lastSelected)
|
||||
if client:IsVortigaunt() or CAMI.PlayerHasAccess(client, "Helix - Manage Vortessence Menu") then
|
||||
local count = table.Count(self.vortnotes)
|
||||
local send = 1
|
||||
for k, v in pairs(self.vortnotes) do
|
||||
if (send % PLUGIN.BATCH == 1) then
|
||||
if (send > 1) then
|
||||
net.Send(client)
|
||||
end
|
||||
net.Start("ixVortNotes")
|
||||
net.WriteUInt(count, 32)
|
||||
net.WriteUInt(send, 32)
|
||||
end
|
||||
net.WriteUInt(k, 32)
|
||||
net.WriteTable(v)
|
||||
send = send + 1
|
||||
end
|
||||
|
||||
net.WriteUInt(lastSelected or 0, 32)
|
||||
net.Send(client)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerDisconnected(client)
|
||||
for _, v in pairs(ents.FindByClass("ix_nvlight")) do
|
||||
if (v:GetOwner() == client) then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
netstream.Hook("conterminousSetState", function(ply, characterName, bool)
|
||||
local targetPlayer = ix.util.FindPlayer(characterName)
|
||||
local targetCharacter = targetPlayer:GetCharacter()
|
||||
|
||||
if (!CAMI.PlayerHasAccess(ply, "Helix - Set Vortigaunt Conterminous", nil)) then
|
||||
return
|
||||
end
|
||||
|
||||
if (IsValid(targetPlayer) and !targetCharacter:IsVortigaunt()) then
|
||||
ply:Notify("There character you are targeting is not a Vortigaunt!")
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
targetCharacter:SetConterminous(bool)
|
||||
|
||||
ix.log.AddRaw(ply:Name() .. " has set conterminous state for " .. targetCharacter:GetName() .. " to " .. tostring(bool))
|
||||
end)
|
||||
|
||||
netstream.Hook("AddNoteVortessence", function(client, title, text, category)
|
||||
if !client:IsVortigaunt() then client:NotifyLocalized("You are not a vortigaunt!") return false end
|
||||
|
||||
local timestamp = os.date( "%d.%m.%Y" )
|
||||
local queryObj = mysql:Insert("ix_vortessence")
|
||||
queryObj:Insert("note_title", title)
|
||||
queryObj:Insert("note_text", text)
|
||||
queryObj:Insert("note_date", timestamp)
|
||||
queryObj:Insert("note_poster", client:Name())
|
||||
queryObj:Insert("note_category", category)
|
||||
queryObj:Execute()
|
||||
|
||||
PLUGIN:RefreshVortessence(client, category)
|
||||
client:NotifyLocalized("You have added a note!")
|
||||
ix.log.Add(client, "vortessenceEntry", "added a vortessence entry")
|
||||
client:GetCharacter():DoAction("vort_beam_practice")
|
||||
end)
|
||||
|
||||
netstream.Hook("RemoveNoteVortessence", function(client, id, category)
|
||||
if !CAMI.PlayerHasAccess(client, "Helix - Manage Vortessence Menu") then return end
|
||||
local queryObj = mysql:Delete("ix_vortessence")
|
||||
queryObj:Where("note_id", id)
|
||||
queryObj:Execute()
|
||||
|
||||
PLUGIN:RefreshVortessence(client, category)
|
||||
ix.log.Add(client, "vortessenceEntry", "removed a vortessence entry")
|
||||
end)
|
||||
|
||||
function PLUGIN:CharacterRecognized(client, recogCharID, targets)
|
||||
local fakeName = client:GetCharacter():GetFakeName()
|
||||
|
||||
for _, v in ipairs(targets) do
|
||||
if v:IsVortigaunt() then
|
||||
local vortrecognition = ix.data.Get("vortrecog", {}, false, true)
|
||||
|
||||
if vortrecognition[recogCharID] == true then
|
||||
break
|
||||
end
|
||||
|
||||
if (fakeName and fakeName != "") then
|
||||
vortrecognition[recogCharID] = fakeName
|
||||
else
|
||||
vortrecognition[recogCharID] = true
|
||||
end
|
||||
|
||||
ix.data.Set("vortrecog", vortrecognition, false, true)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PostPlayerLoadout(client)
|
||||
local background = client:GetCharacter():GetBackground()
|
||||
local character = client:GetCharacter()
|
||||
|
||||
if (background == "Kurtarılmış" or background == "Özgür") then
|
||||
timer.Simple(1, function()
|
||||
if client then
|
||||
client:Give("ix_vortsweep")
|
||||
client:Give("ix_nightvision")
|
||||
client:Give("ix_vortbeam")
|
||||
client:Give("ix_vortheal")
|
||||
client:Give("ix_vshield")
|
||||
client:Give("ix_vortslam")
|
||||
if character:GetSkillLevel("vort") >= 50 then
|
||||
client:Give("ix_vortpyro")
|
||||
client:Give("ix_vortadvancedbeam")
|
||||
end
|
||||
if character:GetSkillLevel("vort") >= 30 and character:GetSkillLevel("melee") >= 30 then
|
||||
client:Give("ix_vmelee")
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if background == "Biyotik" then
|
||||
timer.Simple(1, function()
|
||||
if client then
|
||||
client:Give("ix_vortsweep")
|
||||
if client:HasWeapon("ix_nightvision") then
|
||||
client:StripWeapon("ix_nightvision")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortbeam") then
|
||||
client:StripWeapon("ix_vortbeam")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortheal") then
|
||||
client:StripWeapon("ix_vortheal")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vshield") then
|
||||
client:StripWeapon("ix_vshield")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vmelee") then
|
||||
client:StripWeapon("ix_vmelee")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortslam") then
|
||||
client:StripWeapon("ix_vortslam")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortpyro") then
|
||||
client:StripWeapon("ix_vortpyro")
|
||||
end
|
||||
|
||||
if client:HasWeapon("ix_vortadvancedbeam") then
|
||||
client:StripWeapon("ix_vortadvancedbeam")
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:FirefightTurnStart(fight, fightInfo)
|
||||
if (fightInfo.bVortShotLastTurn) then
|
||||
fightInfo.turn.bNoVortShoot = true
|
||||
fightInfo.bVortShotLastTurn = nil
|
||||
end
|
||||
end
|
||||
|
||||
local runSounds = {[0] = "NPC_Vortigaunt.FootstepLeft", [1] = "NPC_Vortigaunt.FootstepRight"}
|
||||
function PLUGIN:PlayerFootstep(client, position, foot, soundName, volume)
|
||||
if (client:IsVortigaunt()) then
|
||||
client:EmitSound(runSounds[foot])
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:CanButcherWithoutTool(client, entity, drop)
|
||||
if (IsValid(client) and client:IsPlayer() and client:IsVortigaunt()) then
|
||||
local weapon = client:GetActiveWeapon()
|
||||
|
||||
if (IsValid(weapon) and weapon:GetClass() == "ix_hands") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ix.log.AddType("vortessenceEntry", function(client, name)
|
||||
return string.format("%s just %s in the vortessence menu.", client:SteamName(), name)
|
||||
end)
|
||||
|
||||
function PLUGIN:OnPlayerObserve(client, state)
|
||||
local broom = client.broomModel
|
||||
|
||||
if (broom and IsValid(broom)) then
|
||||
if (state) then
|
||||
broom:SetNoDraw(true)
|
||||
else
|
||||
broom:SetNoDraw(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- CID GENERATION BY GRASS, IMPLEMENTED FOR VORT SHACKLES!!!
|
||||
local prime = 99787 -- prime % 4 = 3! DO NOT CHANGE EVER
|
||||
local offset = 320 -- slightly larger than sqrt(prime) is ok. DO NOT CHANGE EVER
|
||||
local block = 1000
|
||||
function PLUGIN:GenerateCollarID(id)
|
||||
id = (id + offset) % prime
|
||||
|
||||
local cid = 0
|
||||
|
||||
local randomness = math.random(1, 1000)
|
||||
|
||||
for _ = 1, math.floor(id/block) do
|
||||
cid = (cid + (id * block) % prime) % prime
|
||||
end
|
||||
|
||||
cid = (cid + (id * (id % block) % prime)) % prime
|
||||
|
||||
if (2 * id < prime) then
|
||||
return Schema:ZeroNumber(cid - randomness, 5)
|
||||
else
|
||||
return Schema:ZeroNumber(prime - cid - randomness, 5)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user