Jump to content
Sign in to follow this  
OldHero

Request Anti Bot

Recommended Posts

Hello @OldHero!

 

Do you mean 'captcha' or script based antibot?


Share this post


Link to post
Share on other sites

Which one? 

 

There is 'captcha' antibot. It is built in GameServer.exe / Game.exe and works only on 2.x versions. In 1.3x versions antibot is disabled, need to patch .exe's.

 

Also I have seen simple antibot script, which checking how many seconds or minutes character is standing and does not move. Then player have to enter special letters in local chat or he will be kicked (requires GameServer.exe with HandleChat() function).


Share this post


Link to post
Share on other sites

""Also I have seen simple antibot script, which checking how many seconds or minutes character is standing and does not move. Then player have to enter special letters in local chat or he will be kicked (requires GameServer.exe with HandleChat() function).""

This what i mean :D you have ??? for share maybe bro and i have gamesrv with handlechat func

Share this post


Link to post
Share on other sites
10 минут назад, OldHero сказал:

""Also I have seen simple antibot script, which checking how many seconds or minutes character is standing and does not move. Then player have to enter special letters in local chat or he will be kicked (requires GameServer.exe with HandleChat() function).""

This what i mean :D you have ??? for share maybe bro and i have gamesrv with handlechat func

No, I don't have. Also I don't remember where I have seen this script, unfortunately. Maybe here, on PkoDEV.

 

I think you can write such script by yourself. It is not too hard.


Share this post


Link to post
Share on other sites

Anti bot whitout captcha and  whit   exemption whit pet farmers(miner,lumber)

 

*Note: Be sure to create or modify where the logs will be saved

 

**By: @Yudha***

 

--------------------------------------------------------------------------
--                                    --
--                                    --
--            anitbot.lua                --
--                                    --
--                                    --
--------------------------------------------------------------------------
print("* Loading <AntiBot> init.lua" )

local Chars = {}
for Loop = 0, 255 do
	Chars[Loop+1] = string.char(Loop)
end

local String = table.concat(Chars)
local Built = {['.'] = Chars}
local AddLookup = function(CharSet)
	local Substitute = string.gsub(String, '[^'..CharSet..']', '')
	local Lookup = {}

	for Loop = 1, string.len(Substitute) do
		Lookup[Loop] = string.sub(Substitute, Loop, Loop)
	end

	Built[CharSet] = Lookup
	return Lookup
end

function string.random(Length, CharSet)
	-- Length (number)
	-- CharSet (string, optional); e.g. %l%d for lower case letters and digits
	local CharSet = CharSet or '.'
	if CharSet == '' then
		return ''
	else
		local Result = {}
		local Lookup = Built[CharSet] or AddLookup(CharSet)
		local Range = table.getn(Lookup)
		for Loop = 1,Length do
			Result[Loop] = Lookup[math.random(1, Range)]
		end
		return table.concat(Result)
	end
end
   
function BotLog(name,text)
	local file = GetResPath("script/addon/AntiBot/Logs/"..name..".txt")
	LogFile = io.open(file,'a')
	LogFile:write("["..os.date().."]\t"..text.."\n")
	LogFile:close()
end

antiBot			= {}
antiBot.Enable		= false
antiBot.Avoid		= {}
antiBot.store		= GetResPath("script/addon/AntiBot/Logs/")
---Add exemptions here, if you haven't then set false all.
antiBot.Avoid[777]	= true
antiBot.Avoid[778]	= true
------
antiBot.Maps		= {}
antiBot.Maps["garner2"]		= true
antiBot.Maps["chaosicicle"]	= true
antiBot.Maps["chaosshaitan"]	= true
antiBot.Maps["deathcircle"]	= true
antiBot.Maps["warlordarena"]	= true
antiBot.Maps["massivewipeout"]	= true
antiBot.Maps["lonetower"]	= true
antiBot.Maps["babylontower"]	= true
antiBot.Maps["abandonedcity"]	= true
antiBot.Maps["abandonedcity2"]	= true
antiBot.Maps["abandonedcity3"]	= true
antiBot.Maps["darkswamp"]	= true
antiBot.Maps["puzzleworld"]	= true

function antiBot_timer(ignore,cha)
	local cha_name		= GetChaDefaultName(TurnToCha(cha))
	local now_tick		= GetChaParam(cha, 1) 
	local nearbyMonster	= GetChaSetByRange ( cha , 0 ,0 ,230 , 0)
	local zoneType		= IsChaInRegion( cha, 2 )
	local randomizer	= Percentage_Random(0.002)
	local ChaMap		= GetChaMapName(cha)

	if (antiBot.Enable == true) then
		if(antiBot.Maps[ChaMap] ~= nil) then
			if(antiBot.Maps[ChaMap] == true) then
				if randomizer == 1 then
					if antiBot[cha_name] == nil then
						local charID	= GetCharID(TurnToCha(cha))
						local cap	= string.random(5,"%u")
						table.save({cap},antiBot.store..charID..".txt","w")
						BickerNotice(cha,"Please enter the serial key to avoid getting kicked!")
						HelpInfo(cha,0,"                Enter Serial Key_                     "..cap)
						antiBot[cha_name] = true
					end
				end

				--Player antibot activates, giving him seconds to verify
				if antiBot[cha_name] ~= nil then
					if math.mod(now_tick, 5) == 0 and now_tick > 0 then
						BickerNotice(cha,"Please verify to system that you are human!")
					end

					if math.mod(now_tick, 30) == 0 and now_tick > 0 then
						local x,y = GetChaPos(cha)
						x,y = math.floor(x/100),math.floor(y/100)
						local map = GetChaMapName(cha)
						BotLog("Botters","Player "..cha_name.." was kicked from "..map.." <"..x..","..y..">")
						GiveReputation(cha,-1000)
						MoveCity(cha,"")
						antiBot[cha_name] = nil
					end
				end
			end
		end
	end
end
Hook:AddPostHook("cha_timer",antiBot_timer)

function antiBot_confirm(cha)
	local cha_name = GetChaDefaultName(cha)
	antiBot[cha_name] = nil
	os.remove(antiBot.store..(GetCharID(cha))..".txt")
end

I hope it helps! @Yosef , @OldHero


xbx3.png

Share this post


Link to post
Share on other sites
3 hours ago, Ximboliex said:

Anti bot whitout captcha and  whit   exemption whit pet farmers(miner,lumber)

 

*Note: Be sure to create or modify where the logs will be saved

 

**By: @Yudha***

 


--------------------------------------------------------------------------
--                                    --
--                                    --
--            anitbot.lua                --
--                                    --
--                                    --
--------------------------------------------------------------------------
print("* Loading <AntiBot> init.lua" )

local Chars = {}
for Loop = 0, 255 do
	Chars[Loop+1] = string.char(Loop)
end

local String = table.concat(Chars)
local Built = {['.'] = Chars}
local AddLookup = function(CharSet)
	local Substitute = string.gsub(String, '[^'..CharSet..']', '')
	local Lookup = {}

	for Loop = 1, string.len(Substitute) do
		Lookup[Loop] = string.sub(Substitute, Loop, Loop)
	end

	Built[CharSet] = Lookup
	return Lookup
end

function string.random(Length, CharSet)
	-- Length (number)
	-- CharSet (string, optional); e.g. %l%d for lower case letters and digits
	local CharSet = CharSet or '.'
	if CharSet == '' then
		return ''
	else
		local Result = {}
		local Lookup = Built[CharSet] or AddLookup(CharSet)
		local Range = table.getn(Lookup)
		for Loop = 1,Length do
			Result[Loop] = Lookup[math.random(1, Range)]
		end
		return table.concat(Result)
	end
end
   
function BotLog(name,text)
	local file = GetResPath("script/addon/AntiBot/Logs/"..name..".txt")
	LogFile = io.open(file,'a')
	LogFile:write("["..os.date().."]\t"..text.."\n")
	LogFile:close()
end

antiBot			= {}
antiBot.Enable		= false
antiBot.Avoid		= {}
antiBot.store		= GetResPath("script/addon/AntiBot/Logs/")
---Add exemptions here, if you haven't then set false all.
antiBot.Avoid[777]	= true
antiBot.Avoid[778]	= true
------
antiBot.Maps		= {}
antiBot.Maps["garner2"]		= true
antiBot.Maps["chaosicicle"]	= true
antiBot.Maps["chaosshaitan"]	= true
antiBot.Maps["deathcircle"]	= true
antiBot.Maps["warlordarena"]	= true
antiBot.Maps["massivewipeout"]	= true
antiBot.Maps["lonetower"]	= true
antiBot.Maps["babylontower"]	= true
antiBot.Maps["abandonedcity"]	= true
antiBot.Maps["abandonedcity2"]	= true
antiBot.Maps["abandonedcity3"]	= true
antiBot.Maps["darkswamp"]	= true
antiBot.Maps["puzzleworld"]	= true

function antiBot_timer(ignore,cha)
	local cha_name		= GetChaDefaultName(TurnToCha(cha))
	local now_tick		= GetChaParam(cha, 1) 
	local nearbyMonster	= GetChaSetByRange ( cha , 0 ,0 ,230 , 0)
	local zoneType		= IsChaInRegion( cha, 2 )
	local randomizer	= Percentage_Random(0.002)
	local ChaMap		= GetChaMapName(cha)

	if (antiBot.Enable == true) then
		if(antiBot.Maps[ChaMap] ~= nil) then
			if(antiBot.Maps[ChaMap] == true) then
				if randomizer == 1 then
					if antiBot[cha_name] == nil then
						local charID	= GetCharID(TurnToCha(cha))
						local cap	= string.random(5,"%u")
						table.save({cap},antiBot.store..charID..".txt","w")
						BickerNotice(cha,"Please enter the serial key to avoid getting kicked!")
						HelpInfo(cha,0,"                Enter Serial Key_                     "..cap)
						antiBot[cha_name] = true
					end
				end

				--Player antibot activates, giving him seconds to verify
				if antiBot[cha_name] ~= nil then
					if math.mod(now_tick, 5) == 0 and now_tick > 0 then
						BickerNotice(cha,"Please verify to system that you are human!")
					end

					if math.mod(now_tick, 30) == 0 and now_tick > 0 then
						local x,y = GetChaPos(cha)
						x,y = math.floor(x/100),math.floor(y/100)
						local map = GetChaMapName(cha)
						BotLog("Botters","Player "..cha_name.." was kicked from "..map.." <"..x..","..y..">")
						GiveReputation(cha,-1000)
						MoveCity(cha,"")
						antiBot[cha_name] = nil
					end
				end
			end
		end
	end
end
Hook:AddPostHook("cha_timer",antiBot_timer)

function antiBot_confirm(cha)
	local cha_name = GetChaDefaultName(cha)
	antiBot[cha_name] = nil
	os.remove(antiBot.store..(GetCharID(cha))..".txt")
end

I hope it helps! @Yosef , @OldHero

 

If I am correct,I remember that yudha has another one and saeed has written "anitbot" before instead of "antibot" so I believe it's Saeed not yudha.

Share this post


Link to post
Share on other sites

GameServer.exe version 1.38 with enabled /captcha/ antibot.

 

ab1.png

 

ab2.png

 

Antibot does not work if:

  • Character of the player is GM or HD (GM-level > 0);
  • The character is in a safe zone;
  • The character is in the PvP zone.

 

The reward for the correctly entered verification code is configured in the WGPrizeBegin() function, the functions.lua file.

Use at own risk. I do not carry responsibility for any crashes and other bugs.

  • Like 1

Share this post


Link to post
Share on other sites
11 часов назад, UchihaJr сказал:

But what if im using 1.36 game server? hm you can help maybe? to put it in my game srv?

1.38 server will work normally with your's 1.36 version

Share this post


Link to post
Share on other sites
On 8/24/2018 at 3:01 AM, UchihaJr said:

But what if im using 1.36 game server? hm you can help maybe? to put it in my game srv?

Hello! I do not have time and interest to enable antibot in each GameServer.exe.


Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...