New Plugin, Anti-afk And Anti-stuck In One.

voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
<div class="IPBDescription">Yet another plugin... lol</div> I made another small plugin (has a few requests for this one) but its a basic system for kicker AFK'ers and a unexploitable "unstuck" feature.

How it works:

If a player doesnt move for 30 seconds, he is presented with a menu, asking him if he is stuck. if he says yes, then the plugin will move him either to the nearest command console or nearest hive (depending on what he is alien or marine) if he answers no nothing is done, but his idle time resets to 0 becuase he is obvoiusly there.

The cvar to control the time before a player is kicked is nsa_max_idletime, the cvar to control the delay between the stuck menu showing up is nsa_max_stucktime.

nsa_max_idletime is 180 by default.
nsa_max_stucktime is 30 by default.

The only thing, this plugin is not open source. no worries tho your players are not bombarded with connection messages.

Link: <a href='http://www.voogru.net/www/plugins/antiafk_mm.zip' target='_blank'>http://www.voogru.net/www/plugins/antiafk_mm.zip</a>
(its compiled for linux and windows)

- voogru.
«13

Comments

  • Tcquest78Tcquest78 Join Date: 2002-12-17 Member: 10949Members
    Any particular reason it's not open-source? I really don't care or anything, just wondering if you had a reason.
  • voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
    edited January 2003
    I rather not share how I send the players back to the correct spawn points. Im Greedy <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' valign='absmiddle' alt='biggrin.gif'><!--endemo-->
    <!--emo&::gorge::--><img src='http://www.unknownworlds.com/forums/html/emoticons/pudgy.gif' border='0' valign='absmiddle' alt='pudgy.gif'><!--endemo-->

    (if enough people ask for the source ill just give up and give it out)
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    edited January 2003
    I still think you can make this work without a menu.

    hook dispatchtouch, check distances of the origins, if they conflict, compute a x,y (since z seems to be up and down in hl) vector that would move the player away from the object at a 180 degree angle. do a traceline out a player unit (i assume it's like 32 for width), if it resolves without conflicts, do a a 5 direction traceline from there(since we already know #6 puts the guy back in the object he's stuck in), if it has a space for the player then do a teleport.

    otherwise I think u could probably do a supercede on dispatchblock to let the player do a noclip effect on that one object (not quite sure how dispatchblock worx),
  • voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
    But a menu is much much more simple to do, IMHO.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
  • BioHazardBioHazard Join Date: 2002-11-07 Member: 7495Members
    voogru you da man...
    thank you for a well needed toy <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
    i got stuck just about 10 mins ago blinking into satcom and got stuck above the doorway in a light.

    and umm.. bugging for open source.. there i bugged you. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • KingKahuna[KKG]™KingKahuna[KKG]™ Join Date: 2002-11-21 Member: 9507Members, Constellation, Reinforced - Shadow
    <!--QuoteBegin--voogru+Jan 7 2003, 11:04 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (voogru @ Jan 7 2003, 11:04 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->But a menu is much much more simple to do, IMHO.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    And w/NO menu, you can't preserve the CLOAK ability for aliens.

    That's main reason for the menu. If your cloaked, you can still press 2; and avoid the kick; without moving.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    well afk is an entirely different concept than being stuck, just the same symptoms, but you might want to reset the afk counter if the player's angle has changed at all. Even when someone is in hiding they usually look around at least a little bit
  • voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
    edited January 2003
    Im gonna add that right now.

    EDIT: Added the checking of the players viewing angle in. Its a cvar as well.

    From the readme:

    nsa_check_angles allows you to check the players viewing angle, so if a player doesnt move but there looking around they wont be counted as idle, this may cause problems with getting stuck tho since players may look around a lot.
  • Teufel_EldritchTeufel_Eldritch Join Date: 2002-01-28 Member: 124Members
    I want to bear Voogru's children.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    even code can't solve that anatomical problem
  • NeroNero Join Date: 2002-12-20 Member: 11236Members
    another great plugin voogru, congrats
    i will test in my server and give feedback if i got any problem
  • NeroNero Join Date: 2002-12-20 Member: 11236Members
    my first notes
    i played ns_eclipse as marine
    * unstuck just stuck me near the comm station, sometimes just kill me, duno why
    i think it need to change the point of the teleport
  • GoleXGoleX Join Date: 2002-11-07 Member: 7681Members
    Couldn't this still be exploited somehow? As an easy way to get back to the hive/cc? I guess maybe 30 seconds is a long time to wait.
  • Teufel_EldritchTeufel_Eldritch Join Date: 2002-01-28 Member: 124Members
    <!--QuoteBegin--[WHO]Them+Jan 7 2003, 09:01 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([WHO]Them @ Jan 7 2003, 09:01 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->even code can't solve that anatomical problem<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    teehee
  • voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
    edited January 2003
    <!--QuoteBegin--GoleX+Jan 7 2003, 03:24 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (GoleX @ Jan 7 2003, 03:24 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Couldn't this still be exploited somehow? As an easy way to get back to the hive/cc? I guess maybe 30 seconds is a long time to wait.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    30 seconds of not moving at all, 30 seconds is a ETERNITY in NS, or in ANY mod for that matter <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->

    Im gonna have an update that fixes some bugs in a bit.

    Update: fixed the bug Nero was talking about for marines, it should work great now.

    Also now, if a building is put where a player is going to be spawned it will be "killed", same if there is a player in the way. Just like the teledeath. this is so the stuck player doesnt get stuck once again into a building or a player.
  • tlarmontlarmon Join Date: 2002-11-15 Member: 8701Members
    A few typos (misspellings)...

    'Because' is spelled wrong in the AFK kick, and there was another spelling error.. I don't remember it, though.
  • GelantiousGelantious Join Date: 2002-11-01 Member: 2576Members, Constellation
    Thx, but I'll stick with J0nas Destuck script. Like it better <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • Max1Max1 Join Date: 2002-11-08 Member: 7730Members
    edited January 2003
    Hmm, I put this plugin on and sat in the readyroom on my server for well over 30 seconds and no message came up. Does the plugin only work when you're on a team? Most of my afkers sit in the readyroom, so it'd be nice if it kicked them too.
  • voogruvoogru Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
    edited January 2003
    If your in the readyroom it will kick you after 3 mins (with 15 second warning) but it cant send you to a team spawn point if your in the readyroom now can it! <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->

    ROFL, And i ALWAYS misspell "because", its corrected now. lol
  • Max1Max1 Join Date: 2002-11-08 Member: 7730Members
    Does it need to be loaded before adminmod?
  • NeroNero Join Date: 2002-12-20 Member: 11236Members
    <!--QuoteBegin--|Max|+Jan 8 2003, 01:55 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (|Max| @ Jan 8 2003, 01:55 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Does it need to be loaded before adminmod?<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    nope heh
  • Max1Max1 Join Date: 2002-11-08 Member: 7730Members
    Didn't think that mattered, hehe. There was a bug in it, voogru fixed it though. Works great now
  • ECA_ShocK-TroopeRECA_ShocK-TroopeR Join Date: 2002-12-24 Member: 11472Banned
    edited January 2003
    <span style='color:purple'>I just earned myself a ban by spamming multiple threads. I don't know a single thing about what I was posting, but I decided that my ONE voice might make a difference. Please, learn from my mistake.</span>
  • HtNickoliHtNickoli Join Date: 2002-11-24 Member: 9786Members
    Anyone for linux ever get this pluggin to load? Just sits endlessly waiting to load at the next changelevel but never does.

    Redownloaded it, after I read the bug fix post. Still does same thing.
  • BioHazardBioHazard Join Date: 2002-11-07 Member: 7495Members
    mine didnt load with map change either. i had to restart the server.
  • GoleXGoleX Join Date: 2002-11-07 Member: 7681Members
    Yep, had to restart server to get it loaded right. And then it was still kinda flaky <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->
  • Eternal_BlissEternal_Bliss Join Date: 2002-11-07 Member: 7633Members, NS1 Playtester, Contributor
    <!--QuoteBegin--[Ht]Nickoli+Jan 8 2003, 02:54 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([Ht]Nickoli @ Jan 8 2003, 02:54 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Anyone for linux ever get this pluggin to load? Just sits endlessly waiting to load at the next changelevel but never does.

    Redownloaded it, after I read the bug fix post. Still does same thing.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    works fine here.
  • BioHazardBioHazard Join Date: 2002-11-07 Member: 7495Members
    ive had no issues with it.. i especially like when you move the menu goes away.. nice <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • GoleXGoleX Join Date: 2002-11-07 Member: 7681Members
    For some reason, I can not get it to work on my server. It works for the first time (unsticking someone), but then the menu never comes up again.

    Currently loaded plugins:
    description stat pend file vers src load unlod
    [ 1] Adminmod RUN - admin_MM_i386.so v2.50.50 ini Start Start
    [ 2] NS Commander Mo RUN - bugfix.so v1.00.00 ini ANY ANY
    [ 3] WebMod RUN - w_mm_i386.so v0.46 ini Start Never
    [ 4] NS Anti-AFK RUN - antiafk_MM.so v1.00.00 ini Chlvl Chlvl
    [ 5] NS StripEnt RUN - stripent_mm.so v1.00.00 ini Chlvl Chlvl
    5 plugins, 5 running
Sign In or Register to comment.