--[[ | 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-2017 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/newgonome1/gonome.mdl"} -- The game will pick a random model from the table when the SNPC is spawned | Add as many as you want ENT.StartHealth = GetConVarNumber("npc_vj_zomnarch_h") ENT.HullType = HULL_MEDIUM --------------------------------------------------------------------------------------------------------------------------------------------- ENT.VJ_NPC_Class = {"CLASS_ZOMBIE"} -- NPCs with the same class with be allied to each other ENT.BloodColor = "Yellow" -- The blood type, this will determine what it should use (decal, particle, etc.) ENT.HasMeleeAttack = true -- Should the SNPC have a melee attack? ENT.AnimTbl_MeleeAttack = {ACT_MELEE_ATTACK1} -- Melee Attack Animations ENT.MeleeAttackExtraTimers = {1.0} -- Extra melee attack timers | it will run the damage code after the given amount of seconds ENT.MeleeAttackDistance = 35 -- How close does it have to be until it attacks? ENT.MeleeAttackDamageDistance = 80 -- How far does the damage go? ENT.TimeUntilMeleeAttackDamage = 0.6 -- This counted in seconds | This calculates the time until it hits something //ENT.NextAnyAttackTime_Melee = 0.8 -- How much time until it can use any attack again? | Counted in Seconds ENT.MeleeAttackDamage = GetConVarNumber("npc_vj_zomnarch_d") ENT.HasSoundTrack = true ENT.FootStepTimeRun = 0.6 -- Next foot step sound when it is running ENT.FootStepTimeWalk = 0.6 -- Next foot step sound when it is walking ENT.HasRangeAttack = true -- Should the SNPC have a range attack? ENT.RangeAttackEntityToSpawn = "obj_gonome_acid" -- The entity that is spawned when range attacking ENT.RangeDistance = 1000 -- This is how far away it can shoot ENT.RangeToMeleeDistance = 400 -- How close does it have to be until it uses melee? ENT.RangeUseAttachmentForPos = false -- Should the projectile spawn on a attachment? ENT.RangeUseAttachmentForPosID = "Mouth" -- The attachment used on the range attack if RangeUseAttachmentForPos is set to true ENT.TimeUntilRangeAttackProjectileRelease = 1.8 -- How much time until the projectile code is ran? ENT.NextRangeAttackTime = 5 -- How much time until it can use a range attack? ENT.NextAnyAttackTime_Range = 0.6 -- How much time until it can use any attack again? | Counted in Seconds ENT.Immune_AcidPoisonRadiation = true -- Makes the SNPC not get damage from Acid, posion, radiation ENT.FootStepTimeRun = 0.4 -- Next foot step sound when it is running ENT.FootStepTimeWalk = 0.4 -- Next foot step sound when it is walking ENT.HasExtraMeleeAttackSounds = true -- Set to true to use the extra melee attack sounds ENT.Immune_AcidPoisonRadiation = true -- Makes the SNPC not get damage from Acid, posion, radiation ENT.SlowPlayerOnMeleeAttack = true -- If true, then the player will slow down ENT.SlowPlayerOnMeleeAttack_WalkSpeed = 100 -- Walking Speed when Slow Player is on ENT.SlowPlayerOnMeleeAttack_RunSpeed = 100 -- Running Speed when Slow Player is on ENT.SlowPlayerOnMeleeAttackTime = 5 -- How much time until player's Speed resets ENT.MeleeAttackBleedEnemy = true -- Should the player bleed when attacked by melee ENT.MeleeAttackBleedEnemyChance = 3 -- How chance there is that the play will bleed? | 1 = always ENT.MeleeAttackBleedEnemyDamage = 1 -- How much damage will the enemy get on every rep? ENT.MeleeAttackBleedEnemyTime = 1 -- How much time until the next rep? ENT.MeleeAttackBleedEnemyReps = 4 -- How many reps? ENT.HasMeleeAttackKnockBack = true -- If true, it will cause a knockback to its enemy ENT.MeleeAttackKnockBack_Forward1 = 100 -- How far it will push you forward | First in math.random ENT.MeleeAttackKnockBack_Forward2 = 130 -- How far it will push you forward | Second in math.random ENT.MeleeAttackKnockBack_Up1 = 250 -- How far it will push you up | First in math.random ENT.MeleeAttackKnockBack_Up2 = 260 -- How far it will push you up | Second in math.random -- ====== Projectile Spawn Position Variables ====== -- ENT.RangeUseAttachmentForPos = true -- Should the projectile spawn on a attachment? ENT.RangeUseAttachmentForPosID = "hand_right" -- The attachment used on the range attack if RangeUseAttachmentForPos is set to true ENT.RangeAttackPos_Up = 20 -- Up/Down spawning position for range attack ENT.RangeAttackPos_Forward = 10 -- Forward/ Backward spawning position for range attack ENT.RangeAttackPos_Right = 10 -- Right/Left spawning position for range attack -- Miscellaneous --------------------------------------------------------------------------------------------------------------------------------------------- ENT.AnimTbl_IdleStand = {"Idle1","Idle2"} -- The idle animation when AI is enabled -- ====== Flinching Code ====== -- ENT.CanFlinch = 1 -- 0 = Don't flinch | 1 = Flinch at any damage | 2 = Flinch only from certain damages ENT.AnimTbl_Flinch = {"Flinch"} -- If it uses normal based animation, use this -- ====== Sound File Paths ====== -- -- Leave blank if you don't want any sounds to play ENT.SoundTbl_BeforeRangeAttack = {"gonome/gonome_eat.wav"} ENT.SoundTbl_FootStep = {"gonome/gonome_step1.wav","gonome/gonome_step2.wav","gonome/gonome_step3.wav","gonome/gonome_step4.wav","gonome/gonome_run.wav"} ENT.SoundTbl_Idle = {"gonome/gonome_idle1.wav","gonome/gonome_idle2.wav","gonome/gonome_idle3.wav"} ENT.SoundTbl_MeleeAttack = {"gonome/gonome_melee1.wav","gonome/gonome_melee2.wav"} ENT.SoundTbl_MeleeAttackMiss = {"zombie/claw_miss1.wav","zombie/claw_miss2.wav"} ENT.SoundTbl_RangeAttack = {"gonome/gonome_melee1.wav","gonome/gonome_melee2.wav"} ENT.SoundTbl_Pain = {"gonome/gonome_pain1.wav","gonome/gonome_pain2.wav","gonome/gonome_pain3.wav","gonome/gonome_pain4.wav"} ENT.SoundTbl_Death = {"gonome/gonome_death2.wav","gonome/gonome_death3.wav","gonome/gonome_death4.wav"} ENT.SoundTbl_SoundTrack = {"music/zombieboss/hl1_song25_remix3.mp3","music/zombieboss/hl1_song15.mp3","music/zombieboss/hl1_song3.mp3","music/zombieboss/hl_song10.mp3","music/zombieboss/half_life_17.mp3"} --------------------------------------------------------------------------------------------------------------------------------------------- function ENT:CustomOnThink() if self:IsOnFire() then self.AnimTbl_Walk = {ACT_WALK_ON_FIRE} self.AnimTbl_Run = {ACT_WALK_ON_FIRE} self.AnimTbl_IdleStand = {ACT_IDLE_ON_FIRE} else self.AnimTbl_Walk = {ACT_WALK} self.AnimTbl_Run = {ACT_RUN} self.AnimTbl_IdleStand = {ACT_IDLE} end end --------------------------------------------------------------------------------------------------------------------------------------------- function ENT:CustomOnInitialize() self:SetCollisionBounds(Vector(25, 25, 90), Vector(-25, -25, 0)) end function ENT:MultipleMeleeAttacks() local randattack = math.random(1,2) if randattack == 1 then self.MeleeAttackDistance = 35 self.TimeUntilMeleeAttackDamage = 0.6 self.MeleeAttackAnimationFaceEnemy = false self.AnimTbl_MeleeAttack = {"vjseq_attack1"} self.MeleeAttackExtraTimers = {1.0} self.MeleeAttackDamage = GetConVarNumber("npc_vj_zomnarch_d") self.MeleeAttackDamageDistance = 120 self.MeleeAttackDamageType = DMG_SLASH elseif randattack == 2 then self.MeleeAttackDistance = 35 self.TimeUntilMeleeAttackDamage = 0.7 self.MeleeAttackAnimationFaceEnemy = false self.AnimTbl_MeleeAttack = {"vjseq_attack2"} self.MeleeAttackExtraTimers = {0.9,1.2,1.4} self.MeleeAttackDamage = GetConVarNumber("npc_vj_zomnarch_d") self.MeleeAttackDamageDistance = 100 self.MeleeAttackDamageType = DMG_SLASH end end --------------------------------------------------------------------------------------------------------------------------------------------- function ENT:RangeAttackCode_GetShootPos(TheProjectile) return (self:GetEnemy():GetPos() - self:LocalToWorld(Vector(math.random(-10,20),math.random(-10,20),math.random(10,20))))*2 + self:GetUp()*200 end /*----------------------------------------------- *** Copyright (c) 2012-2017 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. -----------------------------------------------*/