• 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!

GlobalEvent [Potar] Fully automatic 100% anti-bot system (Lib/Creature/Talk/Glob).

You have to check the (after kill) and Globalevent interval too...

Tested on 0.4 (3XXX - 5XXX), working without error from 2 days (chaught 42 players and 5 was banned).
 
This post has been made a month ago and I only see comments like 'please add this' or 'please make that if...'.

Its an awesome work, Potar. Thanks you really.
 
how to make this script do ban player in 9.8x ?

But in my server, this script kick player
 
Just send me your ban.lua from talkactions and creaturescripts on private message (i lost all my librares, sources, datapacks etc. cause of damaged hard drive so i need it to update), i will update the code for you.
 
Potar,

I am using this script for ban players, how to make you script do accept this mode?
function dobaniraccount

Code:
<?xml version="1.0" encoding="ISO-8859-1"?> 
<mod name="Ban Command" version="1.0" author="Vodkart" contact="none.com" enabled="yes">  
<config name="ban_func"><![CDATA[
function doBanirAccount(accid, time, admin_id, comment)
return db.executeQuery("INSERT INTO `ban_table` (`account`, `added`, `expires`, `admin_id`, `comment`) VALUES ('".. accid .."', '".. os.time() .."', '".. time .."', '".. admin_id .."', '".. comment .."');")
end
function getBanAccInfo(acc)
local info,qry = {},db.getResult("SELECT `expires`, `comment`, `admin_id`  FROM `ban_table` WHERE `account` = "..acc)
if (qry:getID() ~= -1) then
info = {qry:getDataInt("expires"), qry:getDataString("comment"), qry:getDataString("admin_id")}
end
return #info > 0 and info or false
end
function isAccountBan(acc)
local qry = db.getResult("SELECT `expires` FROM `ban_table` WHERE `account` = "..acc)
if (qry:getID() ~= -1) then
if os.time() < qry:getDataInt("expires") then
return true
end
if os.time() >= qry:getDataInt("expires") then
db.executeQuery("DELETE FROM `ban_table` WHERE`account` = "..acc)
end
end
return false
end
function doRemoveBanAccount(acc)
return db.executeQuery("DELETE FROM `ban_table` WHERE `account` = "..acc)
end
]]></config>
<event type="login" name="BanLogin" event="script"><![CDATA[
domodlib('ban_func')
function onLogin(cid)
local MyAccount = getPlayerAccountId(cid)
if isAccountBan(MyAccount) then
local baninfo = getBanAccInfo(MyAccount)
doPlayerPopupFYI(cid, "You account has been banished at:\n"..os.date("%d %b %Y",baninfo[1])..".\n\nfor the following reason:\n"..baninfo[2]..".\n\nYour banishment will be lifted at:\n"..os.date("%d %b %Y %X",baninfo[1])..".")
addEvent(doRemoveCreature, 1500, cid)
end
return true
end]]></event>  
<talkaction words="/unban;/ban;/baninfo" access="4" event="buffer"><![CDATA[
domodlib('ban_func')
	if words == "/unban" then
	if not param or param == "" then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "enter a valid name.") return true
	end
	local param = param:lower()
	local player = getPlayerGUIDByName(param)
        if not player then 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this player does not exist.") return true
	elseif not isAccountBan(getAccountIdByName(param)) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "That player or account is not banished or deleted.") return true
        end
	doRemoveBanAccount(getAccountIdByName(param))
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." has unbanned successfully.")
	elseif words == "/ban" then
	local t = string.explode(string.lower(param), ",")
	if not t[1] then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true
	end
        local player = getPlayerGUIDByName(t[1])
        if not player then 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true
	elseif isAccountBan(getAccountIdByName(t[1])) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this player is already banished.") return true
        end
        local hours,comment = not tonumber(t[2]) and 24 or tonumber(t[2]),not t[3] and "No Reason" or t[3]
	doBroadcastMessage(t[1].." was banned by "..getCreatureName(cid)..": "..comment)
	doBanirAccount(getAccountIdByName(t[1]), os.time() + hours*3600, getCreatureName(cid), comment)
	if getPlayerByNameWildcard(t[1]) then
	doRemoveCreature(getPlayerByNameWildcard(t[1]))
	end
	elseif words == "/baninfo" then
	if not param or param == "" then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "enter a valid name.") return true
	end
	local param = param:lower()
	local player = getPlayerGUIDByName(param)
        if not player then 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this player does not exist.") return true
	elseif not isAccountBan(getAccountIdByName(param)) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "That player or account is not banished or deleted.") return true
        end
	local acc = getAccountIdByName(param)
	local baninfo = getBanAccInfo(acc)
	doPlayerPopupFYI(cid, "Account has been banished at:\n"..os.date("%d %b %Y",baninfo[1])..".\n\nfor the following reason:\n"..baninfo[2]..".\n\nBanned By: "..baninfo[3].."\n\nYour banishment will be lifted at:\n"..os.date("%d %b %Y %X",baninfo[1])..".")
	end
	return true
]]></talkaction>
</mod>
 
I can do that a few times shows that the anti bot checks than once?

Da się ustawić żeby się kilka razy wyświetlało to że antibot kogoś sprawdza? Bo raz to trochę za mało.
 
u know is that found on tfs 0.2.x, because that dont have globalevent.xml?
 
Using tfs 0.4 r3777, errors are not shown and it does not work. How come?

Thanks in advance!
 
Make this work for tfs 1.1 it would be awesome becouse of all botting this days. :)
 
Back
Top