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

anty noob char

zielok

New Member
Joined
Mar 8, 2009
Messages
66
Reaction score
0
Hello, does anyone have a command like that?

Requirements to use this command:
You must be above level 50 (no PK-protection)

On who can I use this:

You can use this command on players who have PK-protection

What does it cost:
When you use it, it takes 100 soul, this will prevent annoying players from spamming starting people to the temple.

What does it do:
When you say for example kick Test, it will teleport Test to his hometown (same coordinates as when he dies)
 
1.
PHP:
local protectionLevel = tonumber(getConfigInfo('protectionLevel'))
if getPlayerLevel(cid) < protectionLevel then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be above ".. protectionLevel .." to use this command.")
	return TRUE
end

2.
PHP:
local protectionLevel = tonumber(getConfigInfo('protectionLevel'))
if getPlayerLevel(cid) >= protectionLevel then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be bellow ".. protectionLevel .." to use this command.")
	return TRUE
end

4.
PHP:
function onSay(cid, words, param)
local player = getPlayerByNameWildcard(param)
	if not(player) or player <= 0 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player ".. param .." does not exist.")
		return TRUE
	end
	doTeleportThing(player, getTownTemplePosition(getPlayerTown(player)), TRUE)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player ".. param .." has been teleported to his temple.")
	return TRUE
end
 
Last edited:
Try this

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

	local pid = getPlayerByNameWildcard(param)
	local lvl = getConfigInfo('protectionLevel')
	local soul = 100

	if(getPlayerLevel(cid) < lvl) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need level " .. lvl .. " to use this command.")
		return TRUE
	end

	if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
		return TRUE
	end

	if(getPlayerLevel(pid) >= lvl) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can not use this command in " .. param .. ".")
		return TRUE
	end

	if(getPlayerAccess(pid) >= getPlayerAccess(cid)) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot teleport this player.")
		return TRUE
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " has been kicked.")
	doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
	doPlayerAddSoul(cid, -soul)
	return TRUE
end

Made for TFS 0.3.3 (Crying Damson) "NOT TESTED"
 
A great alternative would be players with less than level 50 which fose killed by another player with 2x more level that it (level 100). The low level player would return to the temple would not lose anything and not gain Killer Frag.

darkhaos,
not worked.
 
@HeberPcL
Sry, but your idea fails. Why? Because then players with lvl 100+ would abuse that so low lvls couldn't get experience points.

In my opinion, Zielok's idea is the best of ideas mentioned in this thread.
 
Back
Top