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

MoveEvent [New] Training (Anti-Bot) System

Status
Not open for further replies.

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Solutions
2
Reaction score
115
Here is a script I made that can be used for training areas.
It is great actually, I thought I would release it here.

Please do not release it on other forums.
Reputation is always welcome, hope you like it.

Movements:
Lua:
<movevent type="StepIn" itemid="XXXX" event="script" value="training tile.lua"/>
<movevent type="StepOut" itemid="XXXX" event="script" value="training tile.lua"/>

Script:
Lua:
local config = {
        new_Pos = {x=95, y=117, z=7}, -- Players New Position (After teleported)
        storage = 12345, -- Players Storage
        timeToRemove = 15, -- MINUTES
	timeToResolve = 60 -- SECONDS
}

local event = 0

function onStepIn(cid, item, frompos, item2, topos)
        local playerPos = getCreaturePosition(cid)

        if(playerPos ~= config.new_Pos) then
                doPlayerPopupFYI(cid, "Training Moderator: \n \nYou now have [".. config.timeToRemove .." minutes] to train without disturbance. \nYou are noted that botting is illegal.")
                setPlayerStorageValue(cid, config.storage, 1)
                event = addEvent(_doTeleportThing, config.timeToRemove * 60000, cid)
        end
end

function onStepOut(cid, item, frompos, item2, topos)
        if(playerPos ~= config.new_Pos) then
        	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your training session has ended.")
                setPlayerStorageValue(cid, config.storage, -1)
                stopEvent(event)
        end
end

local event2 = 0

function _doTeleportThing(cid)
        if(getPlayerStorageValue(cid, config.storage) == 1) then
		doPlayerPopupFYI(cid, "Training Moderator: \n \nStep [OFF and ON] the tile to continue training. \nYou have [".. config.timeToResolve .." seconds] to complete this request.")
		event2 = addEvent(expireTime, config.timeToResolve * 1000, cid)
        end
end

function expireTime(cid)
	if(isPlayer(cid) == TRUE) then
		setPlayerStorageValue(cid, config.storage, -1)
		doPlayerPopupFYI(cid, "Training Moderator: \n \nYou did not comply with the request. \nTherefor you were teleported.")
		doTeleportThing(cid, config.new_Pos)
		stopEvent(event2)
	end
end

How It Works: (Quick Example)
  1. You step on the tile, it starts a timed session.
  2. After the time is up, a message will appear.
  3. It will tell you to step off and on the tile, to restart the time.
  4. If you do not respond within 60 seconds, it will teleport you out.
  5. If decide to stop training, when you step off, a message will appear.

Good Luck :thumbup:
 
Great idea... but... maybe randomize the time.
And anybody that knows how to script in NG would simply be able to do something like....
<not exact working code>
self.move(south)
self.move(north)
sleep(15*1000) -- 15 minutes
 
yeah easy to bypass. just created a new antibot system, took me several hours so i dunno i may release and maynot.
 
can u made a switch u must pull every 5min?
 
I think its realy cool. But i dont mind pepole train botting. Because i understand who would wanna sit by the comp and train theese days?
 
Thanks for the comments.
I did consider the "auto-walk" on the bot,
it would be hard to deal with.

Maybe instead of walking on and off, it asks for a code would be better.
Good thing is this type doesn't lag the server at all, at least not mine.
 
Last edited:
Bump.

165 views, 8 replies...2 are mine.
No one appreciates this script?
 
Its nice, but with a simple bot you can use an automove and it wont work.
 
@Topic,

You all might think,
they can use a bot, this won't work...


Use a freakin door on trainers? :thumbup:
 
Last edited:
--Great release, but, when this execute this function:

Code:
function expireTime(cid)
        if(isPlayer(cid) == TRUE) then
                setPlayerStorageValue(cid, config.storage, -1)
                doPlayerPopupFYI(cid, "Training Moderator: \n \nYou did not comply with the request. \nTherefor you were teleported.")
                doTeleportThing(cid, config.new_Pos)
                stopEvent(event2)
        end
end

-- The server CRASH.... some ideia to fix????
 
I have used this, and tested it,
I haven't had a server crash before.

I do not know why yours crashed.
 
okay, but what if you are stucked by another players?

f.ex. He wants ur spot, and specialy stay and trap you, yo the script tp you , and free his brand new spot.

?;>
 
@Up,

Place a TP in the trainers,
Place a door behind the person.
If he wants to leave, go in the TP.
 
Nice script, but I can handle with this. In TibiabotNG is a funcion named Macro Recorder, I will record 15 minutes of standing and next i click on the doors, next I will play it all time around.
 
Nice script, but I can handle with this. In TibiabotNG is a funcion named Macro Recorder, I will record 15 minutes of standing and next i click on the doors, next I will play it all time around.

Why not add a waypoint on the off tile, another one back on the training tile, and then a delay for 15*60 (900) seconds? Lol.


And for a possible way to get around the bot system, try something like this...
minTimeToRemove = 5
maxTimeToRemove = 20

realTimeToRemove = math.random(minTimeToRemove, maxTimeToRemove)

not sure on the exact code but something like that.

Probably wouldn't completely solve the bot problem but atleast the time would be completely random and there would be no way to "guess" it. I think then the only way to hack past it would be to use a tool to read the messages.
 
Last edited:
Yes, you could do that but it would annoy your players.
They might quit lol.

Edit: #1
A code system would be better, but thats already released.
(I still use this script, it works, most noobs can't master the BOT.
 
Last edited:
Yes, and I do plan on advancing this script a lot.
There will be codes needed to type, and other new features.

My computer is screwed, so I must wait until Dell fixes it.
 
Status
Not open for further replies.
Back
Top