• Gimmix - Ruin your server and make everyone hate you
    4 replies, posted
  • Gimmix is essentially an addon that randomly creates game-altering crap. You can control how frequently this crap spawns. The gimmicks range from beneficial to funny to deadly to downright annoying to ragequittingly awful. Gimmix works with essentially every gamemode. [url=http://www.garrysmod.org/downloads/?a=view&id=126525][img]http://www.garrysmod.org/img/?t=dll&id=126525[/img][/url] Here's a list of completed gimmicks: [b]Delivery Gimmicks[/b] - Not exactly gimmicks. They're used to deliver the gimmicks to the players. - Pandora's Box. A strange vibrating box spawns somewhere on the map. Nearby players will be notified of its presence. The first player to find and open the box is given a ~random gimmick~. This could be good or bad depending on which gimmick you get. - Spontaneous Fuckery. A random player is chosen and a random gimmick is imparted upon them. This one happens less frequently because it can get very fucking annoying. - Guessing Game. A random player has 3 overturned pots spawn in front of him. 1 contains a beneficial gimmick. 2 contain evil gimmicks. ARE YOU MAN ENOUGH? BIG AND BAD ENOUGH? - Communism. The least frequent delivery method. Everyone gets the same gimmick. Chaos will follow. [b]Player-based gimmicks[/b] - Gimmicks that directly affect players - Drunkness. The affected player becomes drunk. Their vision blurs and their camera wobbles around slowly. - Spontaneous Tourettes Syndrome. The affected player begins to cuss up a storm. Their view shakes violently for 30 seconds. - Memetic Kill Agent. Any players near the target player must follow the player or they will slowly die. - Full heal. Player has their health restored. [b]Weapon-based gimmicks[/b] - Weapons you can get - None yet [b]Entity gimmicks[/b] - Entities that spawn on the map - Proximity Mine. [b]Check out these Sweet Pics, Mate![/b] [img_thumb]http://i.imgur.com/OEeNB.jpg[/img_thumb][img_thumb]http://i.imgur.com/7VHUy.jpg[/img_thumb] The cussing in the second screenshot is 100% generated by the tourettes script. [img_thumb]http://i.imgur.com/QaGnr.jpg[/img_thumb] That's a combination of tourettes and drunkness. It's very unpleasant. [b]Commands:[/b] - sv_gimmix_interval (how often does the script "roll" for a new gimmick?) - sv_gimmix_chance (what are the odds a gimmick will occur on a given "roll"?) [lua]local GIMMICK = {} GIMMICK.Type = GIMMICK_PLAYER // this is used to differentiate between delivery methods and real gimmicks GIMMICK.Duration = 60 * 2 GIMMICK.Shared = true // does the client need to run any code? GIMMICK.ClientHooks = { "RenderScreenspaceEffects", "CalcView" } // which functions in this gimmick should be interpreted as clientside hooks? GIMMICK.Beneficial = false // does this gimmick benefit any players? this determines whether the guessing game considers it a good or bad gimmick. GIMMICK.Hooks = {} // which functions in this gimmick should be interpreted as serverside hooks? GIMMICK.Chance = 1.0 // what are the odds that this gimmick will be chosen (relative to the other gimmicks)? A chance of 0.2 would mean there's a 20% chance it will be chosen. function GIMMICK:OnStart() local ply = self:GetPlayer() if ValidEntity( ply ) then GIMMIX.ChatPrint( { "Looks like ", ply, " has been hitting the sauce pretty hard..." } ) end end function GIMMICK:OnEnd() local ply = self:GetPlayer() if ValidEntity( ply ) then GIMMIX.ChatPrint( { "You've sobered up!" }, ply ) end end function GIMMICK:OnClientStart() self.WobbleTime = CurTime() + self.Duration - 40 self.Ang = Angle(0,0,0) self.TargAng = Angle(1,1,1) self.Intensity = 0 end function GIMMICK:OnClientEnd() end function GIMMICK:RenderScreenspaceEffects() DrawMotionBlur( 0.05, 0.6, 0.01 ) end function GIMMICK:CalcView( ply, origin, angle, fov ) if self.WobbleTime > CurTime() then self.Intensity = math.Approach( self.Intensity, 20, FrameTime() ) else self.Intensity = math.Approach( self.Intensity, 0, FrameTime() ) end self.Ang.p = math.Approach( self.Ang.p, self.TargAng.p, 0.001 ) self.Ang.y = math.Approach( self.Ang.y, self.TargAng.y, 0.001 ) self.Ang.r = math.Approach( self.Ang.r, self.TargAng.r, 0.001 ) if self.Ang == self.TargAng then self.TargAng = Angle( math.Rand( 0, 5 ), math.Rand( 0, 5 ), math.Rand( 0, 5 ) ) end angle.roll = angle.roll + math.sin( CurTime() + self.Ang.r ) * self.Intensity angle.pitch = angle.pitch + math.sin( CurTime() + self.Ang.p ) * self.Intensity angle.yaw = angle.yaw + math.sin( CurTime() + self.Ang.y ) * self.Intensity return ply, origin, angle, fov end gimmick.Register( GIMMICK )[/lua] If anyone here wants to create their own gimmick feel free to ask me any questions about this.
  • I'm just going to paste code for more gimmicks here since i'm lazy and don't feel like updating the release. [lua] local GIMMICK = {} // This is like, worse than the communism gimmick. Every player on the server is given a random gimmick at the same time. GIMMICK.Type = GIMMICK_SPAWNER GIMMICK.Chance = 0.01 function GIMMICK:OnStart() GIMMIX.ChatPrint( { "BEEP BOOP COMPUTER" } ) for k,v in pairs( player.GetAll() ) do local gim = gimmick.GetExcludeTypes( { GIMMICK_SPAWNER } ) GIMMIX.StartGimmick( nil, v, gim ) end end gimmick.Register( GIMMICK )[/lua] e: Acid trip woo [lua]local GIMMICK = {} // ACID TRIP GIMMICK.Type = GIMMICK_PLAYER GIMMICK.Duration = 60 GIMMICK.Shared = true GIMMICK.ClientHooks = { "HUDPaint", "CalcView" } GIMMICK.Intensity = 0 function GIMMICK:OnStart() local ply = self:GetPlayer() if ValidEntity( ply ) then GIMMIX.ChatPrint( { ply, " is tripping the fuck out..." } ) end end function GIMMICK:OnEnd() local ply = self:GetPlayer() if ValidEntity( ply ) then GIMMIX.ChatPrint( { "You've sobered up!" }, ply ) end end function GIMMICK:OnClientStart() self.WobbleTime = CurTime() + self.Duration - 40 self.Ang = Angle(0,0,0) self.TargAng = Angle(1,1,1) self.ColTime = 0 self.Col = Color(255,0,0,50) end function GIMMICK:GetColor() local col = Color(255,0,0,50) col.r = table.Random{ 255, 0 } col.g = table.Random{ 255, 0 } col.b = table.Random{ 255, 0 } if col.r == 0 and col.g == 0 and col.b == 0 then col.r = 255 end return col end function GIMMICK:HUDPaint() if self.ColTime < CurTime() then self.ColTime = CurTime() + 0.2 self.Col = self:GetColor() end draw.RoundedBox( 4, 0, 0, ScrW(), ScrH(), self.Col ) end function GIMMICK:CalcView( ply, origin, angle, fov ) if self.WobbleTime > CurTime() then self.Intensity = math.Approach( self.Intensity, 10, FrameTime() ) else self.Intensity = math.Approach( self.Intensity, 0, FrameTime() ) end self.Ang.p = math.Approach( self.Ang.p, self.TargAng.p, 0.001 ) self.Ang.y = math.Approach( self.Ang.y, self.TargAng.y, 0.001 ) self.Ang.r = math.Approach( self.Ang.r, self.TargAng.r, 0.001 ) if self.Ang == self.TargAng then self.TargAng = Angle( math.Rand( 0, 5 ), math.Rand( 0, 5 ), math.Rand( 0, 5 ) ) end angle.roll = angle.roll + math.sin( CurTime() + self.Ang.r ) * self.Intensity angle.pitch = angle.pitch + math.sin( CurTime() + self.Ang.p ) * self.Intensity angle.yaw = angle.yaw + math.sin( CurTime() + self.Ang.y ) * self.Intensity return ply, origin, angle, fov end gimmick.Register( GIMMICK )[/lua]
  • Making another trippy one. [img_thumb]http://i.imgur.com/QfvQM.jpg[/img_thumb] Clientside models randomly appearing to creep you the fuck out.