I was able to figure out how to make it page the gm when they fail to enter the correct catcha but I have been unable to figure out how to get the code to compile. I've narrowed it down to this but at this point i think so actual coding is required. This makes it page gm with UNHANDLED when they enter the incorrect captcha text. I would like to add to this a way to make it to where they page when they cancel the captcha, use tool again without interacting with captcha, and preferably add a number of times they can do these things before page as it will get ultra annoying to have to constantly cancel the help requests people need atleast a few tries before the stop there macro.
Sorry about that post it was done with one hand as I was eating... So THIS code compiles fine. It doesn't compile when I try to add the code that makes it page to the top section which I suspect is the place where it needs to go for it to page when canceling or re-using the tool without completing the captcha... It's getting some error about "from" and im not sure why I will keep working on it and messing around but if anyone wants to help or give me advice feel free!
Alright so I came up with another option my first choice was beyond my abilities but here is what I came up with... Basically I got it to just block you out from harvesting and nopage to gms... this is ok by me as the point is to block you out not ban you or screw you over... The solution to my desire to be notified is to make it so when you actually do solve the captcha you cancel your page to the gms! AWESOME IDEA RIGHT! so the only problem is that if they screw up more than once they generate multiple pages to the gms so now I have to figure out how to make it so you can only have one page at a time...
in captcha.cs
C#:
public override void OnResponse(NetState sender, RelayInfo info)
{
if (m_From == null || m_ActionObject == null || sender == null || info == null)
{
return;
}
Mobile from = sender.Mobile;
switch (info.ButtonID)
{
case 2:
{
TextRelay tr_captcha = info.GetTextEntry(3);
if(tr_captcha.Text.Length != 3 )
{
from.SendMessage("You failed to prove that you're not A.F.K.");
from.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
* Please check your Journal for messages every few minutes.
*/
PageQueue.Enqueue(new PageEntry(from, "text", PageType.Other));
return;
}
if (Char.ToUpper(tr_captcha.Text[0]) != m_A || Char.ToUpper(tr_captcha.Text[1]) != m_B || Char.ToUpper(tr_captcha.Text[2]) != m_C)
{
from.SendMessage("You failed to prove that you're not A.F.K. ");
from.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
* Please check your Journal for messages every few minutes.
*/
PageQueue.Enqueue(new PageEntry(from, "text", PageType.Other));
return;
}
//They Passed the Captcha!
if (from is PlayerMobile)
{
PlayerMobile pm = (PlayerMobile)from;
pm.NextCaptchaTime = DateTime.Now + TimeSpan.FromMinutes(Utility.RandomMinMax(5,25));
}
//call our delegate and pass it our mobile & argument
m_Action(m_From, m_ActionObject);
}
break;
}
}
Post automatically merged:
Sorry about that post it was done with one hand as I was eating... So THIS code compiles fine. It doesn't compile when I try to add the code that makes it page to the top section which I suspect is the place where it needs to go for it to page when canceling or re-using the tool without completing the captcha... It's getting some error about "from" and im not sure why I will keep working on it and messing around but if anyone wants to help or give me advice feel free!
Post automatically merged:
Alright so I came up with another option my first choice was beyond my abilities but here is what I came up with... Basically I got it to just block you out from harvesting and nopage to gms... this is ok by me as the point is to block you out not ban you or screw you over... The solution to my desire to be notified is to make it so when you actually do solve the captcha you cancel your page to the gms! AWESOME IDEA RIGHT! so the only problem is that if they screw up more than once they generate multiple pages to the gms so now I have to figure out how to make it so you can only have one page at a time...
in captcha.cs
C#:
public override void OnResponse(NetState sender, RelayInfo info)
{
Mobile from = sender.Mobile;
if (m_From == null || m_ActionObject == null || sender == null || info == null)
{
from.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
* Please check your Journal for messages every few minutes.
*/
PageQueue.Enqueue(new PageEntry(from, "text", PageType.Other));
return;
}
//Mobile from = sender.Mobile;
switch (info.ButtonID)
{
case 2:
{
TextRelay tr_captcha = info.GetTextEntry(3);
if(tr_captcha.Text.Length != 3 )
{
from.SendMessage("You failed to prove that you're not A.F.K.");
from.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
* Please check your Journal for messages every few minutes.
*/
PageQueue.Enqueue(new PageEntry(from, "text", PageType.Other));
return;
}
if (Char.ToUpper(tr_captcha.Text[0]) != m_A || Char.ToUpper(tr_captcha.Text[1]) != m_B || Char.ToUpper(tr_captcha.Text[2]) != m_C)
{
from.SendMessage("You failed to prove that you're not A.F.K. ");
from.SendLocalizedMessage(501234, "", 0x35); /* The next available Counselor/Game Master will respond as soon as possible.
* Please check your Journal for messages every few minutes.
*/
PageQueue.Enqueue(new PageEntry(from, "text", PageType.Other));
return;
}
//They Passed the Captcha!
if (from is PlayerMobile)
{
PlayerMobile pm = (PlayerMobile)from;
pm.NextCaptchaTime = DateTime.Now + TimeSpan.FromMinutes(Utility.RandomMinMax(5,25));
}
//call our delegate and pass it our mobile & argument
m_Action(m_From, m_ActionObject);
}
PageEntry entry = PageQueue.GetEntry(this.m_From);
PageQueue.Remove(entry);
break;
}
}
}
}
Last edited: