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

Help with talkaction - "Cliport"

armitxe

New Member
Joined
Feb 15, 2009
Messages
65
Reaction score
1
Hello everyone!

I need your help in something!

I want a talkaction that works like "/cliport" but it only teleport you MAX "X" number of SQM and it don't let you teleport to a protection zone...

Can you do that for me guys, please!?

Thank you very much!

Here i leave the script of the /cliport that is in my server... I think it don't will help to much but maybe i'm wrong...

Code:
local ignore = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_IGNORE)
local teleport = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_TELEPORT)

function onSay(cid, words, param, channel)
	local condition = ignore
	local subId = GAMEMASTER_IGNORE
	local name = "private messages ignoring"
	if(words:sub(2, 2) == "c") then
		condition = teleport
		subId = GAMEMASTER_TELEPORT
		name = "map click teleport"
	end

	local action = "off"
	if(not getCreatureCondition(cid, CONDITION_GAMEMASTER, subId)) then
		doAddCondition(cid, condition)
		action = "on"
	else
		doRemoveCondition(cid, CONDITION_GAMEMASTER, subId)
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have turned " .. action .. " " .. name .. ".")
	return true
end

Thanks in advance!
Greetings!
 

Similar threads

Back
Top