masteuszx
OtsList.eu
- Joined
- Aug 3, 2008
- Messages
- 784
- Reaction score
- 45
I forgot registerCreatureEvent <rotfl>
Add to login.lua:
Add to login.lua:
registerCreatureEvent(cid, "AntyBot")
registerCreatureEvent(cid, "AntyBot")
I forgot registerCreatureEvent <rotfl>
Add to login.lua:
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...
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;
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 . 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:
To TFS Developers: if you can, add this function to your own source codes. Thanks.
idiot. [*]
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.
idiot. [*]
To TFS Developers: if you can, add this function to your own source codes. Thanks.
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 [...]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.
@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 [...]