Captcha! Anti-AFK checker

Captcha! Anti-AFK checker 0.51

No permission to download

Praxiiz

Well-Known Member
Oct 22, 2013
311
91
Shard Name
Allure of the Unknown
Donate
Donate money to this user
Praxiiz submitted a new resource:

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

Introduction

This captcha system allows admins to reduce afk resource gathering or other automated activities on their shards.

It is setup so that it prompts a player maximum of once an hour when they use a skill tool or try to harvest something. This one hour minimum delay can be customized.

Features
  • Designed to be minimally invasive to players
  • Adjustable minimum delay (defaults to an hour, which means players will only see it once an hour and only if they harvest...
Read more about this resource...
 

Hank

Well-Known Member
Nov 14, 2013
947
151
Earth
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:
Errors:
+ Items/- BaseClasses/BaseTool.cs:
    CS0117: Line 165: 'Server.Items.BaseTool' does not contain a definition for 'OnDoubleClickRedirected'
+ Services/BulkOrders/SmallBOD.cs:
    CS0117: Line 214: 'Server.Items.BaseTool' does not contain a definition for 'OnDoubleClickRedirected'
    CS0246: Line 225: The type or namespace name 'CraftSystem' could not be found
       (are you missing a using directive or an assembly reference?)
    CS0246: Line 233: The type or namespace name 'CraftContext' could not be found
       (are you missing a using directive or an assembly reference?)
    CS0246: Line 234: The type or namespace name 'CraftGump' could not be found
       (are you missing a using directive or an assembly reference?)
 
Last edited:

Praxiiz

Well-Known Member
Oct 22, 2013
311
91
Shard Name
Allure of the Unknown
Donate
Donate money to this user
Sorry about that, I added the rest of that method and corrected a couple of the others. It should be working now.
 

Hank

Well-Known Member
Nov 14, 2013
947
151
Earth
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?
 

Praxiiz

Well-Known Member
Oct 22, 2013
311
91
Shard Name
Allure of the Unknown
Donate
Donate money to this user
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.
 

Hank

Well-Known Member
Nov 14, 2013
947
151
Earth
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.
example.jpg
Code:
private void setupBackground()
        {
            AddImage(0, 3, 9274); //9274 dark Grey Background
            AddImage(68, 3, 9274);
            AddImage(38, 11, 9158); //9158 are the Tiny dots on the gump
            AddImage(83, 11, 9158);
            AddImage(137, 11, 9158);
            AddImage(191, 11, 9158);
            AddImage(92, 11, 9158);
            AddImage(146, 11, 9158);
            AddImage(38, 56, 9158);
            AddImage(83, 56, 9158);
            AddImage(137, 56, 9158);
            AddImage(191, 56, 9158);
            AddImage(92, 56, 9158);
            AddImage(146, 56, 9158);
            AddImage(4, 129, 9157);
            AddImage(20, 129, 9157);
            AddImage(36, 129, 9157);
            AddImage(52, 129, 9157);
            AddImage(68, 129, 9157);
            AddImage(84, 129, 9157);
            AddImage(100, 129, 9157);
            AddImage(116, 129, 9157);
            AddImage(132, 129, 9157);
            AddImage(148, 129, 9157);
            AddImage(164, 129, 9157);
            AddImage(180, 129, 9157);
            AddImage(196, 116, 9155);
            AddImage(196, 100, 9155);
            AddImage(196, 84, 9155);
            AddImage(196, 68, 9155);
            AddImage(196, 52, 9155);
            AddImage(196, 36, 9155);
            AddImage(196, 20, 9155);
            AddImage(196, 4, 9155);
            AddImage(1, 1, 9151);
            AddImage(17, 1, 9151);
            AddImage(33, 1, 9151);
            AddImage(49, 1, 9151);
            AddImage(65, 1, 9151);
            AddImage(81, 1, 9151);
            AddImage(97, 1, 9151);
            AddImage(113, 1, 9151);
            AddImage(129, 1, 9151);
            AddImage(145, 1, 9151);
            AddImage(161, 1, 9151);
            AddImage(177, 1, 9151);
            AddImage(183, 1, 9151);
            AddImage(55, 101, 2443, 1153); //Image where you entry Text (1153 is the hue)
            AddButton(124, 101, 247, 248, 2, GumpButtonType.Reply, 0);
            AddImage(29, 34, 9158);
            AddImage(23, 34, 9158);
            AddImage(17, 34, 9158);
            AddImage(11, 34, 9158);
            AddImage(11, 40, 9158);
            AddImage(11, 46, 9158);
            AddImage(11, 52, 9158);
            AddImage(11, 58, 9158);
            AddImage(11, 64, 9158);
            AddImage(11, 70, 9158);
            AddImage(11, 76, 9158);
            AddImage(11, 82, 9158);
            AddImage(11, 88, 9158);
            AddImage(11, 94, 9158);
            AddImage(11, 100, 9158);
            AddImage(11, 106, 9158);
            AddImage(11, 112, 9158);
            AddImage(17, 112, 9158);
            AddImage(23, 112, 9158);
            AddImage(29, 112, 9158);
            AddImage(35, 112, 9158);
            AddImage(41, 112, 9158);
            AddImage(38, 115, 9158);
            AddImage(38, 112, 9158);
            AddImage(38, 109, 9158);
            AddImage(35, 106, 9158);
            AddImage(35, 118, 9158);
            AddImage(32, 121, 9158);
            AddImage(32, 103, 9158);
            AddTextEntry(57, 103, 53, 20, 0, 3, @"");
            AddLabel(38, 67, 1153, @"Type the three letters"); //1153 is the hue
            AddImage(1, 116, 9153);
            AddImage(1, 100, 9153);
            AddImage(1, 84, 9153);
            AddImage(1, 68, 9153);
            AddImage(1, 52, 9153);
            AddImage(1, 36, 9153);
            AddImage(1, 20, 9153);
            AddImage(1, 4, 9153);



        }
 
Last edited:

Praxiiz

Well-Known Member
Oct 22, 2013
311
91
Shard Name
Allure of the Unknown
Donate
Donate money to this user
I made that script a couple years ago, there are much more efficient ways to build up the gump. Feel free to improve it.
 

RedDragon

Active Member
Dec 19, 2013
34
1
31
Shard Name
RedDragonUO
Donate
Donate money to this user
Love this Thanks!
Thanks Autor.
Thanks uploader.
Thanks Hank for background fix.
 

RedDragon

Active Member
Dec 19, 2013
34
1
31
Shard Name
RedDragonUO
Donate
Donate money to this user
Worked good for a long time and now:
Code:
===================Server Crash Report===================
Exception:
System.NullReferenceException:Object reference not set to an instance of an object
at Server.Gumps.CaptchaGump.OnResponse (Server.Network.NetState sender, Server.Gumps.RelayInfo info) [0x00000] in <filename unknown>:0
at Server.Network.PacketHandlers.DisplayGumpResponse (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
 

Praxiiz

Well-Known Member
Oct 22, 2013
311
91
Shard Name
Allure of the Unknown
Donate
Donate money to this user
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:
  if (m_From == null || m_ActionObject == null)
to include the method parameters:
Code:
  if (m_From == null || m_ActionObject == null || sender == null || info == null)
 

RedDragon

Active Member
Dec 19, 2013
34
1
31
Shard Name
RedDragonUO
Donate
Donate money to this user
Thanks for fixing this.

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

LordFenris

Well-Known Member
Jul 21, 2014
417
7
43
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
if (tool.IsChildOf(from.Backpack) || tool.InSecureTrade || tool.RootParent is PlayerVendor || tool.Parent == from)
{
CraftSystem system = tool.CraftSystem;
RunUO website
if (tool.IsChildOf(from.Backpack) || tool.Parent == from)
{
CraftSystem system = tool.CraftSystem;
 

Attachments

Last edited:

Praxiiz

Well-Known Member
Oct 22, 2013
311
91
Shard Name
Allure of the Unknown
Donate
Donate money to this user
I apologize for the confusion on the small bod modification. I have corrected the code.

Code:
public override void OnDoubleClick( Mobile from )
{
  if (this.IsChildOf(from.Backpack) || this.InSecureTrade || this.RootParent is PlayerVendor || this.Parent == from)
  {
    Gump bod_gump = new SmallBODGump(from, this);
    CaptchaGump.sendCaptcha(from, CaptchaGump.SendGumpAfterCaptcha, bod_gump);

    //from.SendGump(new SmallBODGump(from, this));
  }
  else
    from.SendLocalizedMessage(1045156); // You must have the deed in your backpack to use it.
}
 

LordFenris

Well-Known Member
Jul 21, 2014
417
7
43
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
 
Last edited:

LordFenris

Well-Known Member
Jul 21, 2014
417
7
43
Server Crash Report
===================

RunUO Version 0.5, Build 5357.16143
Operating System: Unix 3.10.23.6
.NET Framework: 4.0.30319.17020
Time: 2014-09-05 13:43:44
Mobiles: 45261
Items: 229966
Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at Server.Gumps.CaptchaGump.OnResponse (Server.Network.NetState sender, Server.Gumps.RelayInfo info) [0x00000] in <filename unknown>:0
at Server.Network.PacketHandlers.DisplayGumpResponse (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
 

LordFenris

Well-Known Member
Jul 21, 2014
417
7
43
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?
 
Last edited: