Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Garry
- @model models/props_junk/watermelon01.mdl
- @persist [ StayPos Vector]:vector Wave Tie SongDur Partying
- @persist [O E]:entity
- @persist [PropCore CuteFace Song]:string
- @persist T:entity Ang:angle AngF:angle INC
- @persist I Load
- #Made by Pefu19, 2013
- #Do not remove the hint on the end.
- #If you're going to post the code somewhere, give me credit
- Tcone = random(255)
- Tctwo= random(255)
- Tctree = random(255)
- if( first() ) {
- Song = "music/hl1_song25_remix3.mp3"
- SongDur = 45
- Partying = 0
- ShouldHint = 0
- runOnChat(1)
- O = owner()
- E = entity()
- PropCore = "true"
- #[NOT WORKING]#
- CuteFace = "false"
- ###############
- ###CURRENT CHAT COMMANDS###
- Hints = array(
- "Made by Pefu19, 2013",
- "Optimised by Boog, 2017",
- "garry be red/green/blue - changes color",
- "garry party - parties",
- "garry reset color - resets Garry's color",
- "garry gtfo - removes Garry :( (why would you do that though)",
- "Say Garry to reset constant commands")
- if( ShouldHint == 1 ) {
- for(I=1, Hints:count() ) {
- hint( Hints[I,string], 5 )
- }
- }
- else {
- hint( "Check the E2 code for commands in the Hints array - Line 26", 5 )
- }
- }
- interval(60)
- Said = O:lastSaid():lower()
- Strings = Said:explode(" ")
- if( chatClk( O ) ) {
- switch( Strings[1,string] ) {
- default, break
- case "be",
- switch( Strings[2,string] ) {
- default, break
- case "red",
- hideChat(1)
- E:setColor( vec( 255,0,0 ) )
- break
- case "green",
- hideChat(1)
- E:setColor( vec( 0,255,0 ) )
- break
- case "blue",
- hideChat(1)
- E:setColor( vec( 0,0,255 ) )
- break
- }
- break
- case "party",
- Tcone = random(255)
- Tctwo= random(255)
- Tctree = random(255)
- hideChat(1)
- E:setTrails(5,0,5,"trails/smoke",vec(Tcone,Tctwo,Tctree),255)
- Partying = !Partying
- if( Partying ) {
- soundPlay(1,SongDur,Song)
- timer("party",15)
- }
- else {
- stoptimer("party")
- soundStop(1)
- timer("resetcolor",100)
- }
- break
- case "garry",
- if( Said == "garry change color" ) {
- hideChat(1)
- E:setColor( vec( random(255),random(255),random(255) ) )
- }
- elseif( Said == "garry reset color" ) {
- hideChat(1)
- E:setColor( vec( 255,255,255 ) )
- }
- elseif( Said == "garry gtfo" ) {
- hideChat(1)
- print("Why would you do that :[ You Monster")
- selfDestructAll()
- }
- elseif( Said == "garry stay" ) {
- hideChat(1)
- Tie = 1
- StayPos = O:pos()
- }
- elseif( Said == "garry follow" ) {
- hideChat(1)
- Tie = 0
- }
- break
- case "",
- break
- case "",
- break
- }
- }
- if( clkName() != "interval" ) {
- local Name = clkName()
- switch( Name ) {
- default, break
- case "party",
- Wave++
- Interval = 25
- timer("party",Interval)
- if( Wave >= SongDur*1000/Interval ) {
- stoptimer("party")
- timer("resetcolor",100)
- Wave = 1
- Partying = 0
- }
- local R = random(1,255)
- local G = random(1,255)
- local B = random(1,255)
- E:setColor( vec( R,G,B ) )
- break
- case "resetcolor",
- if( Wave != 1 ) { Wave = 1, stoptimer("party") }
- E:setColor( vec( 255,255,255 ) )
- break
- }
- }
- if( Tie == 0 ) {
- Vector=owner():pos()-(entity():pos()-vec(25,0,25))
- applyForce($Vector*30+Vector)
- setName("GarryPet: Following")
- }
- else {
- Vector=StayPos-(entity():pos()-vec(25,0,25))
- applyForce($Vector*30+Vector)
- setName("GarryPet: Staying")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement