mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
84
lua/entities/npc_vj_hlr1a_bullsquid/init.lua
Normal file
84
lua/entities/npc_vj_hlr1a_bullsquid/init.lua
Normal file
@@ -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/
|
||||
--]]
|
||||
|
||||
AddCSLuaFile("shared.lua")
|
||||
include('shared.lua')
|
||||
/*-----------------------------------------------
|
||||
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
|
||||
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
|
||||
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
|
||||
-----------------------------------------------*/
|
||||
ENT.Model = {"models/vj_hlr/hla/bullsquid.mdl"} -- The game will pick a random model from the table when the SNPC is spawned | Add as many as you want
|
||||
ENT.StartHealth = 180
|
||||
ENT.SoundTbl_SoundTrack = {"vj_hlr/hla_npc/squidding.mp3"}
|
||||
|
||||
-- Custom
|
||||
ENT.Bullsquid_BullSquidding = false
|
||||
ENT.Bullsquid_BullSquiddingT = 0
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:CustomOnPreInitialize()
|
||||
self.Bullsquid_Type = 1
|
||||
|
||||
-- BullSquidding!
|
||||
if math.random(1, 100) == 1 then
|
||||
self:Bullsquid_ActivateBullSquidding()
|
||||
end
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:CustomRangeAttackCode_BeforeProjectileSpawn(projectile)
|
||||
projectile.Spit_AlphaStyle = true
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:Controller_Initialize(ply, controlEnt)
|
||||
function controlEnt:CustomOnKeyPressed(key)
|
||||
if key == KEY_SPACE && !self.VJCE_NPC.Bullsquid_BullSquidding then
|
||||
self.VJCE_NPC:Bullsquid_ActivateBullSquidding()
|
||||
end
|
||||
end
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:Controller_IntMsg(ply, controlEnt)
|
||||
ply:ChatPrint("SPACE: Transform into a BullSquidding! (Irreversible!)")
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:Bullsquid_ActivateBullSquidding()
|
||||
self.Bullsquid_BullSquidding = true
|
||||
self.Bullsquid_BullSquiddingT = CurTime()
|
||||
self.VJ_IsHugeMonster = true
|
||||
self:SetSightDistance(30000)
|
||||
self.SightAngle = 180
|
||||
self.FindEnemy_UseSphere = true
|
||||
self.FindEnemy_CanSeeThroughWalls = true
|
||||
self.StartHealth = 1500
|
||||
self.AnimTbl_IdleStand = {ACT_IDLE_AGITATED}
|
||||
self.AnimTbl_Run = {ACT_RUN_AGITATED}
|
||||
self.AnimTbl_Walk = {ACT_RUN_AGITATED}
|
||||
self.AnimTbl_RangeAttack = {ACT_RANGE_ATTACK2}
|
||||
self.DisableRangeAttackAnimation = true
|
||||
self.RangeDistance = 30000
|
||||
self.RangeAttackAngleRadius = 180
|
||||
self.RangeAttackAnimationFaceEnemy = false
|
||||
self.RangeAttackAnimationStopMovement = false
|
||||
self.NextRangeAttackTime = 0
|
||||
self.TimeUntilRangeAttackProjectileRelease = 0
|
||||
self.NoChaseAfterCertainRange = false
|
||||
self.HasSoundTrack = true
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:MultipleMeleeAttacks()
|
||||
self.AnimTbl_MeleeAttack = {ACT_MELEE_ATTACK1}
|
||||
self.MeleeAttackDamage = (self.Bullsquid_BullSquidding == true and 200) or 35
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function ENT:CustomOnThink()
|
||||
if self.Bullsquid_BullSquidding == true then
|
||||
PrintMessage(HUD_PRINTCENTER, "YOU HAVE BEEN BULLSQUIDDING FOR "..math.Round(CurTime() - self.Bullsquid_BullSquiddingT, 2).." SECONDS")
|
||||
end
|
||||
end
|
||||
18
lua/entities/npc_vj_hlr1a_bullsquid/shared.lua
Normal file
18
lua/entities/npc_vj_hlr1a_bullsquid/shared.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
--[[
|
||||
| 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.Base = "npc_vj_hlr1_bullsquid"
|
||||
ENT.Type = "ai"
|
||||
ENT.PrintName = "Alpha Bullsquid"
|
||||
ENT.Author = "DrVrej"
|
||||
ENT.Contact = "http://steamcommunity.com/groups/vrejgaming"
|
||||
ENT.Purpose = "Spawn it and fight with it!"
|
||||
ENT.Instructions = "Click on the spawnicon to spawn it."
|
||||
ENT.Category = "Half-Life Resurgence"
|
||||
Reference in New Issue
Block a user