• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Requesting !unban "charname

Status
Not open for further replies.

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
I know a little bit how to script but i cant make this script ;)


That's why i'm requesting it..


I want a script, if a player got a special item then he can make !unban "charname and the character ban will be lifted.

Thanks.
 
Last edited:
This is a script from TFS 0.3 Beta 2:

PHP:
function onSay(cid, words, param)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
		return TRUE
	end

	local tmp = getAccountIdByName(param)
	if(tmp == 0) then
		tmp = getAccountIdByAccount(param)
		if(tmp == 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.")
			return TRUE
		end
	end

	if(isAccountBanished(tmp) == TRUE and doRemoveBanishment(tmp) == TRUE) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, tmp .. " has been unbanned.")
	end

	if(isAccountDeleted(tmp) == TRUE and doRemoveDeletion(tmp) == TRUE) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, tmp .. " has been undeleted.")
	end

	if(getPlayerViolationAccess(cid) > 2) then
		local ip = getIpByName(param)
		if(isIpBanished(ip) == TRUE and doRemoveIpBanishment(ip) == TRUE) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "IpBanishment on " .. doConvertIntegerToIp(ip) .. " has been lifted.")
		end

		if(isPlayerNamelocked(param) == TRUE and doRemoveNamelock(param) == TRUE) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Namelock from " .. param .. " has been removed.")
		end
	end
	return TRUE
end

Credits:
TFS
 
Status
Not open for further replies.
Back
Top