• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Feature Anti-Idle Auto Detect Tool

I forgot registerCreatureEvent <rotfl>

Add to login.lua:

I have done it before i posted... doesn't work for me if you mean bot dancing, like tasker. It's not banishing the storage keep being 1, not 3.
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
Last edited:
Because it compares the difference between two turns. And no, it detect that, because script start detection after 3 minutes of first turn. And If player 'dance' more than 3 * 3 = 9 minutes, he got ban. The problem is tasker. You can write and write - script will never detect all bots...
 
Because it compares the difference between two turns. And no, it detect that, because script start detection after 3 minutes of first turn. And If player 'dance' more than 3 * 3 = 9 minutes, he got ban. The problem is tasker. You can write and write - script will never detect all bots...

Ok, testing. Give me 10 mins.
EDIT: Ok, tested, worked perfectly, thanks.
__________________
klekSu.png

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
Last edited:
Thank you so much for this feature! (whispers).
Now, i added an random timing to my bot.

Delphi Script said:
Procedure FAntiIdle();
begin
Packet[0] := $00;
Packet[1] := $01;
Packet[2] := $00 + Random(dir, dirMax);
ThreadTiming(Random(6000,PTime * FInteger + Random(PTime));
SendPacket(Tibia.Handle, @Packet);
end;

So in fact what it does, is to send the packet after a given random threadtiming, so i have to say, this wont work on my personal bot ^^

However, this feature is usefull for people that use noob bots like...
You R0X!
 
Last edited:
It's FORBIDDEN and ILLEGAL to copy this anywhere!

Hello all!

This script won't be useful for me anymore, so I give that you. ;)

What this script does?
Very good question :D. This detects anti-idle anywhere and ban automatically. Let's say, that this is little part of Cipsoft detection. ;)

This script requires TheForgottenServer in version 0.3.4+!

How to install
====================================
Open file creatureevents.cpp
====================================

Find
Code:
case CREATURE_EVENT_KILL:
			return "onKill";

After it paste:
Code:
case CREATURE_EVENT_DIR:
			return "onDir";

Find
Code:
else if(tmpStr == "kill")
		m_type = CREATURE_EVENT_KILL;

After it paste
Code:
else if(tmpStr == "dir")
		m_type = CREATURE_EVENT_DIR;

Find
Code:
case CREATURE_EVENT_KILL:
			return "cid, target";

After it paste
Code:
case CREATURE_EVENT_DIR:
			return "cid, dir";

At the end of file paste
Code:
uint32_t CreatureEvent::executeOnDir(Creature* creature, const Direction& dir)
{
	//onDir(cid, dir)
	if(m_scriptInterface->reserveScriptEnv())
	{
		ScriptEnviroment* env = m_scriptInterface->getScriptEnv();
		if(m_scripted == EVENT_SCRIPT_BUFFER)
		{
			env->setRealPos(creature->getPosition());

			std::stringstream scriptstream;
			scriptstream << "cid = " << env->addThing(creature) << std::endl;

			scriptstream << m_scriptData;
			int32_t result = LUA_NO_ERROR;
			if(m_scriptInterface->loadBuffer(scriptstream.str()) != -1)
			{
				lua_State* L = m_scriptInterface->getLuaState();
				result = m_scriptInterface->getField(L, "_result");
			}

			m_scriptInterface->releaseScriptEnv();
			return (result == LUA_TRUE);
		}
		else
		{
			#ifdef __DEBUG_LUASCRIPTS__
			std::stringstream desc;
			desc << creature->getName();
			env->setEventDesc(desc.str());
			#endif

			env->setScriptId(m_scriptId, m_scriptInterface);
			env->setRealPos(creature->getPosition());

			lua_State* L = m_scriptInterface->getLuaState();
			m_scriptInterface->pushFunction(m_scriptId);

			lua_pushnumber(L, env->addThing(creature));
			lua_pushnumber(L, dir);

			int32_t result = m_scriptInterface->callFunction(2);
			m_scriptInterface->releaseScriptEnv();
			return (result == LUA_TRUE);
		}
	}
	else
	{
		std::cout << "[Error - CreatureEvent::executeOnLook] Call stack overflow." << std::endl;
		return 0;
	}
}
==========================
Open file creatureevent.h
==========================

Find
Code:
CREATURE_EVENT_KILL,

After it paste
Code:
CREATURE_EVENT_DIR,

Find
Code:
uint32_t executeKill(Creature* creature, Creature* target);

After it paste
Code:
uint32_t executeOnDir(Creature* creature, const Direction& dir);

==========================
Open file game.cpp
==========================

Find
Code:
//event method
	for(it = list.begin(); it != list.end(); ++it)
		(*it)->onCreatureTurn(creature, stackpos);

After it paste
Code:
bool deny = false;
	CreatureEventList dirEvents = creature->getCreatureEvents(CREATURE_EVENT_DIR);
	for(CreatureEventList::iterator it = dirEvents.begin(); it != dirEvents.end(); ++it)
	{
		if(!(*it)->executeOnDir(creature, dir))
		deny = true;		
	}	
		if(deny)
		return false;

Then you can close all and compile.

Lua Files
The lua part is only one file of creatureevents.

Open file creaturescripts/creaturescrtips.xml and paste:


Create file creaturescripts/scripts/anti-bot.lua and paste:


Add to login.lua:


It's FORBIDDEN and ILLEGAL to copy this anywhere!

Please repp++ me ;).

To TFS Developers: if you can, add this function to your own source codes. Thanks.

As soon as you released it to the public it is no longer illegal to share it.
 
so basically, with this script, you automatically ban anyone who turns to stop being AFK every 3 minutes or longer?

seems like you'll be banning some innocents. I myself did this manually when training back in the day when I actually played Tibia/OT seriously.
 
As you CAN SEE, script automatically finds botters that are using ANTI-IDLE and punish them or whatever you want. It's simple, but powerful.
 
As you CAN SEE, script automatically finds botters that are using ANTI-IDLE and punish them or whatever you want. It's simple, but powerful.

and I'm saying that it could punish innocents who are not botting, just training for a long time.
 
actually, I am a probably the most skilled programmer using this site and I have analyzed the code, which is how I came to the conclusion that it bans anyone who turns at greater than 3 minute intervals more than 3 times.

If I'm missing something, forgive me, I'm not used to reading poorly formatted code with variables in a language I do not understand. Especially so for Lua code.
 
To TFS Developers: if you can, add this function to your own source codes. Thanks.

elf, stian and all the other please dont add this....
 
@up
They did.

slawkens said:
Why are you so rude? He just stated that your solution may ban innocents players, this is not the reason to offensive behavior.
I prefer READING THEN WRITING. He, I see that, writes without first step. Tested, and no innocents banned... I don't want to argue with you all, that makes no sense [...]
 
@up
They did.


I prefer READING THEN WRITING. He, I see that, writes without first step. Tested, and no innocents banned... I don't want to argue with you all, that makes no sense [...]

You didn't say you had tested it to see if it would ban innocents.
I'm also curious as to how you tested it. What if you wait for the 14-min (IIRC) AFK warning?
 
Player changes his direction -> script detects it and saves TIME -> player changes dir again after 10 minutes or whatever -> script saves time again and saves also time difference between two changes (current time - last dir change) -> again and again if difference time is equally to previous three, player gets banished.

simple, but very useful.

aa, I bet that nobody is perfect and couldn't changes his dir three times equally every same time ...
 
Back
Top