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

TalkAction Player Teleport (Configurable) v1.1

Code:
local destinations = {
	["temple"] = {p = {x=100, y=100, z=7}, l = 10, c = 100, v = 12345},
	["trainers"] = {p = {x=200, y=200, z=7}, l = 20, c = 200, v = 67891},
	["depot"] = {p = {x=300, y=300, z=7}, l = 50, c = 300, v = 23456}
}

function onSay(cid, words, param, channel)
	local tp = destinations[param]
	if param == "" or not tp then
		return doPlayerSendCancel(cid, "Command param required.")
	end
	if not doPlayerRemoveMoney(cid, tp.c) then
		return doPlayerSendCancel(cid, "You do not have enough money.")
	elseif(getPlayerLevel(cid) < tp.l) then
		return doPlayerSendCancel(cid, "Your level is not high enough.")
	elseif(getPlayerStorageValue(cid, tp.v) == -1) then
		return doPlayerSendCancel(cid, "You must have VIP.")
	elseif(isPlayerPzLocked(cid) == true) then
		return doPlayerSendCancel(cid, "You are currently in a fight.")
	elseif(getPlayerPremiumDays(cid) < 1) then
		return doPlayerSendCancel(cid, "You must have premium.")
	end

	return doTeleportThing(cid, tp.p) and doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have successfully teleported to " .. param .. ".")
end
 
Last edited:
its working now thank you verry much rep ++ xD
 
Last edited:
Back
Top