ENT.Type = "anim" ENT.Base = "durgz_base" ENT.PrintName = "Ketamine" ENT.Nicknames = {"ketamine", "horse tranq", "dope for dogs and other light animals"} ENT.OverdosePhrase = {"ingested too much", "entered a permanent coma from overdosing", "'s respiratory system collapsed from going too hard on"} ENT.Author = "Charles Darwin" ENT.Spawnable = true ENT.AdminSpawnable = true ENT.Information = "" ENT.Category = "Drugs" --ENT.TRANSITION_TIME = 6 if(CLIENT)then killicon.Add("durgz_ketamine","killicons/durgz_ketamine_killicon",Color( 80, 0, 80, 255 )) local TRANSITION_TIME = 6; --transition effect from sober to high, high to sober, in seconds how long it will take etc. local HIGH_INTENSITY=0.05 -- don't let the name fool you , this value dictates the refract value of shaders; it's best to not just jam a random value here since whole numbers tend to look awful local function DoKetamine() if(!DURGZ_LOST_VIRGINITY)then return end local pl = LocalPlayer(); local tranq = {};local pf = 0 if( pl:GetNWFloat("durgz_ketamine_high_start") && pl:GetNWFloat("durgz_ketamine_high_end") > CurTime() )then if( pl:GetNWFloat("durgz_ketamine_high_start") + TRANSITION_TIME > CurTime() )then local s = pl:GetNWFloat("durgz_ketamine_high_start"); local e = s + TRANSITION_TIME; local c = CurTime(); local pf = (c-s) / (e-s); tranq["$pp_colour_addr"] = 0 tranq["$pp_colour_addg"] = 0 tranq["$pp_colour_addb"] = 0 tranq["$pp_colour_brightness"] = 0 tranq["$pp_colour_contrast"] = 1 tranq["$pp_colour_colour"] = 1 tranq["$pp_colour_colour"] = 1 + pf*2 DrawColorModify( tranq ) DrawSharpen(1*pf,pf*4.20) --DrawBloom( 0, pf*.74, 3.18, 2.97, 2, 3.14, 1, 1, 1 ) DrawBloom(.9, pf*3.65, 4, 4, 12, 2, 1, 1, 1 ) DrawMotionBlur( 0.2, pf*0.99, pf*0.1 ) DrawMaterialOverlay( "effects/strider_pinch_dudv", pf * HIGH_INTENSITY) --DrawMaterialOverlay( "models/props_c17/fisheyelens", pf * HIGH_INTENSITY ) --DrawMaterialOverlay( "models/shadertest/shader3", pf * HIGH_INTENSITY) pl:SetDSP(59,false) --15 elseif( pl:GetNWFloat("durgz_ketamine_high_end") - TRANSITION_TIME < CurTime() )then local e = pl:GetNWFloat("durgz_ketamine_high_end"); local s = e - TRANSITION_TIME; local c = CurTime(); local pf = 1 - (c-s) / (e-s); tranq["$pp_colour_addr"] = 0 tranq["$pp_colour_addg"] = 0 tranq["$pp_colour_addb"] = 0 tranq["$pp_colour_brightness"] = 0 tranq["$pp_colour_contrast"] = 1 tranq["$pp_colour_colour"] = 1 tranq["$pp_colour_colour"] = 1 + pf*2 DrawColorModify( tranq ) DrawSharpen(1*pf,pf*4.20) --DrawBloom( 0, pf*.74, 3.18, 2.97, 2, 3.14, 1, 1, 1 ) DrawBloom(.9, pf*3.65, 4, 4, 12, 2, 1, 1, 1 ) DrawMotionBlur( 0.2, pf*0.99, pf*0.1 ) --DrawMaterialOverlay( "models/shadertest/shader3", pf * HIGH_INTENSITY) DrawMaterialOverlay( "effects/strider_pinch_dudv", pf * HIGH_INTENSITY) --DrawMaterialOverlay( "models/props_c17/fisheyelens", pf * HIGH_INTENSITY ) if pf < 0.1 then pl:SetDSP(1,false) end else tranq["$pp_colour_addr"] = 0 tranq["$pp_colour_addg"] = 0 tranq["$pp_colour_addb"] = 0 tranq["$pp_colour_brightness"] = 0 tranq["$pp_colour_contrast"] = 1 tranq["$pp_colour_colour"] = 3 DrawColorModify( tranq ) DrawSharpen(1,4.20) DrawBloom(.9, 3.65, 4, 4, 12, 2, 1, 1, 1 ) DrawMotionBlur( 0.2, 0.99, 0.1 ) DrawMaterialOverlay( "effects/strider_pinch_dudv", HIGH_INTENSITY ) --DrawMaterialOverlay( "models/props_c17/fisheyelens", HIGH_INTENSITY ) --DrawMaterialOverlay( "models/shadertest/shader3", HIGH_INTENSITY ) end end end hook.Add("RenderScreenspaceEffects", "durgz_ketamine_high", DoKetamine) end