• 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 CLick Map and Teleport --- LoOk

Morlad

Mega USER
Joined
Dec 22, 2010
Messages
288
Reaction score
16
Location
/P/O/L/A/N/D
talkactions.xml


PHP:
<talkaction log="yes" words="/cliport" access="3" event="script" value="gamemaster.lua"/>




data/talkactions/sripts/gamemaster.lua

PHP:
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


In the game write /cliport and klick map...
 
Last edited:
the same thing. add a description of the script. not everyone understands the how the code works.
 
why posting scripts that already come in some distributions :S?
 
Back
Top