+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: E2 dupe protection (self destuct) - requires keyhook

  1. #1
    Wirererer Zantier's Avatar
    Join Date
    Feb 2008
    Posts
    333

    Default E2 dupe protection (self destuct) - requires keyhook

    NEEDS keyhook.lua (Download) on the server for this to work.

    I've never tested keyhook, yet alone this particular e2, in multiplayer. So if anybody hosts their own games, then I'd be intrigued to hear whether it works ^_^

    The code should destruct the e2 (and everything attached), as soon as someone right clicks it (or anything attached), with a dupe tool gun.

    Code:
    @persist [E O]:entity
    
    if(keyClk())
    {
        Ply = lastKeyPlayer()
        if(Ply != O)
        {
            Tool = Ply:tool()
            if(Tool == "adv_duplicator" | Tool == "duplicator")
            {
                AimEnt = Ply:aimEntity()
                Destruct = 0
                if(AimEnt == E){Destruct = 1}
                elseif(E:hasConstraints())
                {
                    Constraints = E:getConstraints()
                    for(I=1,Constraints:count())
                    {
                        if(AimEnt == Constraints[I,entity])
                        {
                            Destruct = 1
                            break
                        }
                    }
                }
                if(Destruct){selfDestructAll()}
            }
        }
    }
    elseif(first()|duped())
    {
        runOnKeyAll("+attack2")
        E = entity()
        O = owner()
    }

  2. #2
    Spucatum Tauri Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    6,010

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Well, ain't that great.
    So, anyone can destroy your contraption by clicking on it.
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

    Quote Originally Posted by Anticept View Post
    By the way, Bull is in charge.

  3. #3
    Wirererer Zantier's Avatar
    Join Date
    Feb 2008
    Posts
    333

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Quote Originally Posted by l3ulletje View Post
    Well, ain't that great.
    So, anyone can destroy your contraption by clicking on it.
    Unless you don't weld your e2 to it then yep! xD It's the least extreme dupe protection that can actually work though.

  4. #4
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Quote Originally Posted by l3ulletje View Post
    Well, ain't that great.
    So, anyone can destroy your contraption by clicking on it.
    Haahahaha hilarious. ^^

    Although you don't put this dupe protection on it until the contraption is finished. Then it doesn't really matter if someone destroys it because you can simply spawn it again.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  5. #5
    Wirererer Lol-Nade's Avatar
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    385

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Yeah I kinda got that > . > I'm disappointed in you |3ulletje.

    Sounds handy for showcasing something without someone going OMG! *ZAP*.
    Quote Originally Posted by l3ulletje View Post
    Quote Originally Posted by AzraelUK View Post
    We need more people like you, |3ulletje.
    I'll start working on it with my girlfriend.

  6. #6
    T3h
    T3h is offline
    Wire Amateur T3h's Avatar
    Join Date
    May 2009
    Location
    In that place.... you know...
    Posts
    84

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Its good i guess. But just for a protection its a BIT over complicated. I mean you can use a somewhat effective protection system that is one line long (even though the code CAN be edited in the adv dupe .txt file).
    NO THATS THE WRONG ANSWER.

    Chocolate: I'M HORNY
    Chocolate: SRS
    T3h: NOWAISRS
    Chocolate: YASRS
    T3h: SAME HIGH FIVE
    Chocolate: WOOT
    Chocolate: *High fives T3h*

  7. #7
    Wirererer Lol-Nade's Avatar
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    385

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    T3h, the contraption destroys itself before the person can dupe it...

    I think...
    Quote Originally Posted by l3ulletje View Post
    Quote Originally Posted by AzraelUK View Post
    We need more people like you, |3ulletje.
    I'll start working on it with my girlfriend.

  8. #8
    Spucatum Tauri Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    6,010

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Code:
    @persist TotalConstraints
    
    if( clk("check") ) {
        Constraints = E:hasConstraints()
        if ( Constraints > TotalConstraints ) {          
            selfDestructAll()
        }
        timer("check",1000)
    }
    elseif(first()|duped())
    {
        TotalConstraints = E:hasConstraints() 
        timer("check",10)
    }
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

    Quote Originally Posted by Anticept View Post
    By the way, Bull is in charge.

  9. #9
    Wire Sofaking Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,946

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Ah, |3ulletje's method is super-sneaky. But does it get run (and duped() becomes true) before the contraption has finished duping?

  10. #10
    Spucatum Tauri Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    6,010

    Default Re: E2 dupe protection (self destuct) - requires keyhook

    Nah, this was for a finished contraption.

    A finished contraption don't get more parts normally.
    So when you put this code it checks the amount of parts.. If a new prop is attached by using a certain tool exploit, it deletes itself.

    Pros:
    Doesn't need any extention.

    Cons:
    Absolute useless when an admin dupes it.
    But then you have been playing on the wrong server and you deserve it.

    Anyway, I really don't understand all that dupe-protection crap.

    What would you rather have.. some cool contraption for yourself but nobody can do more then look at it.

    Or be like Generic Default. He became a living legend inside gmod. Not just because he made cool helicopters, no, he released them and they ended up in about every servers dupe folder on the planet.
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

    Quote Originally Posted by Anticept View Post
    By the way, Bull is in charge.

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. RoflChoppa's E2 Dupe Protection
    By ColinSSX in forum Finished contraptions
    Replies: 11
    Last Post: 11-03-2009, 07:59 AM
  2. [REQ] Protection (Dupe)
    By Wodkatjuh in forum Installation and Malfunctions Support
    Replies: 10
    Last Post: 08-17-2009, 10:09 AM
  3. n00b requires help? what a surprise!
    By Mike_272 in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 07-01-2009, 11:49 AM
  4. dupe protection
    By malum in forum Expression 2 Discussion & Help
    Replies: 4
    Last Post: 03-09-2009, 04:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots