MoveEvent [New] Training (Anti-Bot) System

Status
Not open for further replies.

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
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:
 

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,876
Best answers
0
Reaction score
19
Location
Canada
Thats a very well done way to do it bro, Nice
 

jerryb1988

Member
Joined
Mar 10, 2008
Messages
79
Best answers
0
Reaction score
5
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
 

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,840
Best answers
0
Reaction score
201
Location
Texas
yeah easy to bypass. just created a new antibot system, took me several hours so i dunno i may release and maynot.
 

Khanio

New Member
Joined
May 4, 2009
Messages
512
Best answers
0
Reaction score
3
Location
Sweden
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?
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
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:
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
Bump.

165 views, 8 replies...2 are mine.
No one appreciates this script?
 

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,772
Best answers
1
Reaction score
210
Location
Chile, Santiago
Its nice, but with a simple bot you can use an automove and it wont work.
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
@Topic,

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


Use a freakin door on trainers? :thumbup:
 
Last edited:

[email protected]

Fudera Otserver
Joined
Jul 10, 2007
Messages
212
Best answers
0
Reaction score
0
Location
Brasil
--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????
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
I have used this, and tested it,
I haven't had a server crash before.

I do not know why yours crashed.
 

QuaS

Cykotitan Pwned =/
Joined
Sep 11, 2008
Messages
833
Best answers
0
Reaction score
26
Location
Poland/ Wroclaw
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.

?;>
 
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
@Up,

Place a TP in the trainers,
Place a door behind the person.
If he wants to leave, go in the TP.
 

ksl

New Member
Joined
Jun 26, 2009
Messages
14
Best answers
0
Reaction score
0
Location
Poland, Słupsk
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.
 

jerryb1988

Member
Joined
Mar 10, 2008
Messages
79
Best answers
0
Reaction score
5
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:
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
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:
OP
JDB

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
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.
Top