• 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.
Same probleam here.. when execute teleport action server crash... anything to do??
 
this wont work wen there is more than one training monk box :/
 
Yes it will, change
PHP:
itemid="XXXX"
to
PHP:
uniqueid="XXXX"
 
Its easy to avoid this, but I will use it since I don't have door in my training room.

repek++
 
@Up,
I planned on changing the "POP_Up" to a Code message.
You must type it.

Kinda like Slawkens script, but not exactly the same.
 
For TFS 0.3.5. AFK players will be teleported to temple and kicked ;)

PHP:
local config = {
	storage = 12681, -- storage
	timeToRemoveMin = 8, -- minutes min
	timeToRemoveMax = 15, -- minutes max
	timeToResolve = 30 -- seconds
}

local event = 0
local event2 = 0

function onStepIn(cid, item, frompos, item2, topos)
	timeToRemove = math.random(config.timeToRemoveMin, config.timeToRemoveMax)
	
	doPlayerPopupFYI(cid, "Training moderator:\n\nYou now have ".. timeToRemove .." minutes to train without disturbance.\n\nYou are noted that botting is illegal.")
		
	setPlayerStorageValue(cid, config.storage, 1)
	event = addEvent(_doTeleportThing, timeToRemove * 60000, cid)
end

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

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)
		doTeleportThing(cid, getClosestFreeTile(cid, getTownTemplePosition(getPlayerTown(cid))))
		doRemoveCreature(cid)
	end
end
 
the bots can move the player.
useless getting your script.
 
the bots can move the player.
useless getting your script.

Yes, I know...
This script is kind of out dated and made poorly.

Thread closed until update arrives.
 
Status
Not open for further replies.
Back
Top