1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Captcha! Anti-AFK checker 0.51

Allows admins to reduce afk resource gathering or other automated activities on their shards.

  1. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    Praxiiz submitted a new resource:

    Captcha! Anti-AFK checker - Allows admins to reduce afk resource gathering or other automated activities on their shards.

    Read more about this resource...
     
    • Two Thumbs Up Two Thumbs Up x 3
  2. Hank
    Offline

    Hank Active Member

    Joined:
    Nov 14, 2013
    Messages:
    972
    Likes Received:
    152
    problem fixed

    I followed the directions on the resource page, yes i added using Server.Gumps; to all the modified scripts
    I am getting the following errors

    Code (C#):
    1. Errors:
    2. + Items/- BaseClasses/BaseTool.cs:
    3.     CS0117: Line 165: 'Server.Items.BaseTool' does not contain a definition for 'OnDoubleClickRedirected'
    4. + Services/BulkOrders/SmallBOD.cs:
    5.     CS0117: Line 214: 'Server.Items.BaseTool' does not contain a definition for 'OnDoubleClickRedirected'
    6.     CS0246: Line 225: The type or namespace name 'CraftSystem' could not be found
    7.        (are you missing a using directive or an assembly reference?)
    8.     CS0246: Line 233: The type or namespace name 'CraftContext' could not be found
    9.        (are you missing a using directive or an assembly reference?)
    10.     CS0246: Line 234: The type or namespace name 'CraftGump' could not be found
    11.        (are you missing a using directive or an assembly reference?)
     
    #2 Hank, Jan 23, 2014
    Last edited: Jan 23, 2014
  3. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    Sorry about that, I added the rest of that method and corrected a couple of the others. It should be working now.
     
  4. Hank
    Offline

    Hank Active Member

    Joined:
    Nov 14, 2013
    Messages:
    972
    Likes Received:
    152
    Thank you for the quick fix, it is working now. I really like how it works. It is everything you listed in the features!
    Is it possible to show what is being typed?
     
  5. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    The shard I developed it on uses custom hues. I'll have to look at the gump and change it to something with some better contrast.
     
  6. Hank
    Offline

    Hank Active Member

    Joined:
    Nov 14, 2013
    Messages:
    972
    Likes Received:
    152
    I changed setupBackground in Captcha.cs to this and it's very visible now. I also made a small change that reduced the number of gump images.
    mychange

    example.jpg
    Code (C#):
    1. private void setupBackground()
    2.         {
    3.             AddImage(0, 3, 9274); //9274 dark Grey Background
    4.             AddImage(68, 3, 9274);
    5.             AddImage(38, 11, 9158); //9158 are the Tiny dots on the gump
    6.             AddImage(83, 11, 9158);
    7.             AddImage(137, 11, 9158);
    8.             AddImage(191, 11, 9158);
    9.             AddImage(92, 11, 9158);
    10.             AddImage(146, 11, 9158);
    11.             AddImage(38, 56, 9158);
    12.             AddImage(83, 56, 9158);
    13.             AddImage(137, 56, 9158);
    14.             AddImage(191, 56, 9158);
    15.             AddImage(92, 56, 9158);
    16.             AddImage(146, 56, 9158);
    17.             AddImage(4, 129, 9157);
    18.             AddImage(20, 129, 9157);
    19.             AddImage(36, 129, 9157);
    20.             AddImage(52, 129, 9157);
    21.             AddImage(68, 129, 9157);
    22.             AddImage(84, 129, 9157);
    23.             AddImage(100, 129, 9157);
    24.             AddImage(116, 129, 9157);
    25.             AddImage(132, 129, 9157);
    26.             AddImage(148, 129, 9157);
    27.             AddImage(164, 129, 9157);
    28.             AddImage(180, 129, 9157);
    29.             AddImage(196, 116, 9155);
    30.             AddImage(196, 100, 9155);
    31.             AddImage(196, 84, 9155);
    32.             AddImage(196, 68, 9155);
    33.             AddImage(196, 52, 9155);
    34.             AddImage(196, 36, 9155);
    35.             AddImage(196, 20, 9155);
    36.             AddImage(196, 4, 9155);
    37.             AddImage(1, 1, 9151);
    38.             AddImage(17, 1, 9151);
    39.             AddImage(33, 1, 9151);
    40.             AddImage(49, 1, 9151);
    41.             AddImage(65, 1, 9151);
    42.             AddImage(81, 1, 9151);
    43.             AddImage(97, 1, 9151);
    44.             AddImage(113, 1, 9151);
    45.             AddImage(129, 1, 9151);
    46.             AddImage(145, 1, 9151);
    47.             AddImage(161, 1, 9151);
    48.             AddImage(177, 1, 9151);
    49.             AddImage(183, 1, 9151);
    50.             AddImage(55, 101, 2443, 1153); //Image where you entry Text (1153 is the hue)
    51.             AddButton(124, 101, 247, 248, 2, GumpButtonType.Reply, 0);
    52.             AddImage(29, 34, 9158);
    53.             AddImage(23, 34, 9158);
    54.             AddImage(17, 34, 9158);
    55.             AddImage(11, 34, 9158);
    56.             AddImage(11, 40, 9158);
    57.             AddImage(11, 46, 9158);
    58.             AddImage(11, 52, 9158);
    59.             AddImage(11, 58, 9158);
    60.             AddImage(11, 64, 9158);
    61.             AddImage(11, 70, 9158);
    62.             AddImage(11, 76, 9158);
    63.             AddImage(11, 82, 9158);
    64.             AddImage(11, 88, 9158);
    65.             AddImage(11, 94, 9158);
    66.             AddImage(11, 100, 9158);
    67.             AddImage(11, 106, 9158);
    68.             AddImage(11, 112, 9158);
    69.             AddImage(17, 112, 9158);
    70.             AddImage(23, 112, 9158);
    71.             AddImage(29, 112, 9158);
    72.             AddImage(35, 112, 9158);
    73.             AddImage(41, 112, 9158);
    74.             AddImage(38, 115, 9158);
    75.             AddImage(38, 112, 9158);
    76.             AddImage(38, 109, 9158);
    77.             AddImage(35, 106, 9158);
    78.             AddImage(35, 118, 9158);
    79.             AddImage(32, 121, 9158);
    80.             AddImage(32, 103, 9158);
    81.             AddTextEntry(57, 103, 53, 20, 0, 3, @"");
    82.             AddLabel(38, 67, 1153, @"Type the three letters"); //1153 is the hue
    83.             AddImage(1, 116, 9153);
    84.             AddImage(1, 100, 9153);
    85.             AddImage(1, 84, 9153);
    86.             AddImage(1, 68, 9153);
    87.             AddImage(1, 52, 9153);
    88.             AddImage(1, 36, 9153);
    89.             AddImage(1, 20, 9153);
    90.             AddImage(1, 4, 9153);
    91.  
    92.  
    93.  
    94.         }
     
    #6 Hank, Jan 23, 2014
    Last edited: Jan 29, 2014
  7. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    I made that script a couple years ago, there are much more efficient ways to build up the gump. Feel free to improve it.
     
  8. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,430
    Likes Received:
    385
  9. IanE
    Offline

    IanE Member

    Joined:
    Dec 27, 2013
    Messages:
    220
    Likes Received:
    16
    This is great, Thanks!
     
  10. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Love this Thanks!
    Thanks Autor.
    Thanks uploader.
    Thanks Hank for background fix.
     
  11. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Worked good for a long time and now:
    Code (C#):
    1. ===================Server Crash Report===================
    2. Exception:
    3. System.NullReferenceException:Object reference not set to an instance of an object
    4. at Server.Gumps.CaptchaGump.OnResponse (Server.Network.NetState sender, Server.Gumps.RelayInfo info) [0x00000] in <filename unknown>:0
    5. at Server.Network.PacketHandlers.DisplayGumpResponse (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
    6. at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
    7. at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
    8. at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
     
  12. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    I'll try to answer this the best I can. Since the server wasn't in debug mode at the time, I won't know for sure which object was causing the null reference because we don't have a line number.

    The most likely fix is to change line 519 from
    Code (C#):
    1.   if (m_From == null || m_ActionObject == null)
    to include the method parameters:
    Code (C#):
    1.   if (m_From == null || m_ActionObject == null || sender == null || info == null)
     
    • Helpful Helpful x 1
  13. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    • Like Like x 2
  14. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Thanks for fixing this.

    Can you add a time out and auto-kick on 3fail/3timeouts?
     
  15. LordFenris
    Offline

    LordFenris Member

    Joined:
    Jul 21, 2014
    Messages:
    116
    Likes Received:
    4
    Our server players send an info that properly complete captcha does not open the BOD window for smallbulks. Captcha with large BODs works properly. We'll check it on our test server. Also, here is our smallBOD file (latest servuo) with modification shared here.

    EDIT:
    Hmmm
    I found different part of smallBOD code between shared here and placed on runuo.

    Here on ServUO
    RunUO website
     

    Attached Files:

    #15 LordFenris, Aug 24, 2014
    Last edited: Aug 24, 2014
  16. Praxiiz
    Offline

    Praxiiz Active Member

    Joined:
    Oct 22, 2013
    Messages:
    297
    Likes Received:
    82
    I apologize for the confusion on the small bod modification. I have corrected the code.

    Code (C#):
    1. public override void OnDoubleClick( Mobile from )
    2. {
    3.   if (this.IsChildOf(from.Backpack) || this.InSecureTrade || this.RootParent is PlayerVendor || this.Parent == from)
    4.   {
    5.     Gump bod_gump = new SmallBODGump(from, this);
    6.     CaptchaGump.sendCaptcha(from, CaptchaGump.SendGumpAfterCaptcha, bod_gump);
    7.  
    8.     //from.SendGump(new SmallBODGump(from, this));
    9.   }
    10.   else
    11.     from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
    12. }
     
  17. LordFenris
    Offline

    LordFenris Member

    Joined:
    Jul 21, 2014
    Messages:
    116
    Likes Received:
    4
    Thank you very much for your quick response. This is very useful script!
     
  18. LordFenris
    Offline

    LordFenris Member

    Joined:
    Jul 21, 2014
    Messages:
    116
    Likes Received:
    4
    Hi again. Here is a screen of 2 fonts captcha only. I hope the screen will help you find a place that requires modification.
    ai.imgur.com_RMvcfUF.jpg
     
    #18 LordFenris, Aug 28, 2014
    Last edited: Aug 28, 2014
  19. LordFenris
    Offline

    LordFenris Member

    Joined:
    Jul 21, 2014
    Messages:
    116
    Likes Received:
    4
     
    • Informative Informative x 1
  20. LordFenris
    Offline

    LordFenris Member

    Joined:
    Jul 21, 2014
    Messages:
    116
    Likes Received:
    4
    Praxiiz - Unfortunately I am working on mono, myserver run by monoruntime via terminal console and I can not get a full debug report for this error. But this addon is truly sensational and fully effective for the elimination of passive sourcing of raw materials and production. Really - Five Stars
    Mayby any of You know most better ubuntu and can tell me the way to run justuo through the terminal with monoruntime and debug mode?
     
    #20 LordFenris, Dec 27, 2014
    Last edited: Dec 27, 2014
Similar Threads: Captcha Anti-AFK
Forum Title Date
Shard Discussion Bad captcha letter hue Apr 7, 2016
Shard Discussion Quick captcha time question Mar 22, 2016