• 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] Ignore PM Command

Keram

Member
Joined
Jan 8, 2012
Messages
491
Reaction score
12
Location
DUBLIN
Thread can be deleted... I won't get help here I think since there are few in this section of forum.

Hello,

could someone help me with making this script work so that:
if player with group id lower then x can't send a private message but if group id higher than x then a player can send a private message.

here is the script:
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

thank you very much :)
 
Last edited:
Back
Top