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

Hide talkaction on default

Eraghon

New Member
Joined
Mar 2, 2009
Messages
94
Reaction score
0
Location
Szczecin
Hey, I have problem with two scripts because everyone see commands of these scripts on default

first script
!aol
Code:
function onSay(cid, words, param)

local aol = 2173
local pozycja = getPlayerPosition(cid)
local position = getCreaturePosition(cid)

	if doPlayerRemoveMoney(cid, 30000) == TRUE then
		doPlayerAddItem(cid,aol,1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have bought Amulet of Loss.")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
	else
		doPlayerSendCancel(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money!")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	return true
	end
end

and "/bg text" for leader of guild
Code:
function onSay(cid, words, param)
	local playerGuild = getPlayerGuildId(cid)
	if playerGuild > 0 then
		local playerGuildLevel = getPlayerGuildLevel(cid)
		if playerGuildLevel >= GUILDLEVEL_VICE then
			local players = getOnlinePlayers()
			local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;
			for i,playerName in ipairs(players) do
				local player = getPlayerByName(playerName);
				if getPlayerGuildId(player) == playerGuild then
					doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);
				end
			end
			doPlayerSendCancel(cid, "Message sent to whole guild.");
		else
			doPlayerSendCancel(cid, "You have to be at least Vice-Leader to guildcast!");
		end
	else
		doPlayerSendCancel(cid, "Sorry, you're not in a guild.");
	end
	doPlayerSendTextMessage(cid, 25, words)
	return FALSE
end

Other players shouldn't be able to see these commands on default
How can I hide it?
 
2nd one:
Lua:
function onSay(cid, words, param)
	local playerGuild = getPlayerGuildId(cid)
	if playerGuild > 0 then
		local playerGuildLevel = getPlayerGuildLevel(cid)
		if playerGuildLevel >= GUILDLEVEL_VICE then
			local players = getOnlinePlayers()
			local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;
			for i,playerName in ipairs(players) do
				local player = getPlayerByName(playerName);
				if getPlayerGuildId(player) == playerGuild then
					doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);
				end
			end
			doPlayerSendCancel(cid, "Message sent to whole guild.");
		else
			doPlayerSendCancel(cid, "You have to be at least Vice-Leader to guildcast!");
		end
	else
		doPlayerSendCancel(cid, "Sorry, you're not in a guild.");
	end
	doPlayerSendTextMessage(cid, 25, words)
	return TRUE
end

First one try this:
Lua:
function onSay(cid, words, param)

local aol = 2173
local pozycja = getPlayerPosition(cid)
local position = getCreaturePosition(cid)

	if doPlayerRemoveMoney(cid, 30000) == TRUE then
		doPlayerAddItem(cid,aol,1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have bought Amulet of Loss.")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
	else
		doPlayerSendCancel(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money!")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	return TRUE
	end
end

Rep if it helped xDDD
 
Code:
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, 30000) then
		doPlayerAddItem(cid, 2173, 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have bought Amulet of Loss.")
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
	else
		doPlayerSendCancel(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money!")
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
	end
	return true
end
Code:
function onSay(cid, words, param)
	local playerGuild = getPlayerGuildId(cid)
	if playerGuild > 0 then
		local playerGuildLevel = getPlayerGuildLevel(cid)
		if playerGuildLevel >= GUILDLEVEL_VICE then
			local players = getOnlinePlayers()
			local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;
			for i,playerName in ipairs(players) do
				local player = getPlayerByName(playerName);
				if getPlayerGuildId(player) == playerGuild then
					doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);
				end
			end
			doPlayerSendCancel(cid, "Message sent to whole guild.");
		else
			doPlayerSendCancel(cid, "You have to be at least Vice-Leader to guildcast!");
		end
	else
		doPlayerSendCancel(cid, "Sorry, you're not in a guild.");
	end
	doPlayerSendTextMessage(cid, 25, words)
	return true
end
 
Thanks :)

But is there any ide to hide this green text:
greentxt.png

? :p
 
Code:
function onSay(cid, words, param)
	local playerGuild = getPlayerGuildId(cid)
	if playerGuild > 0 then
		local playerGuildLevel = getPlayerGuildLevel(cid)
		if playerGuildLevel >= GUILDLEVEL_VICE then
			local players = getOnlinePlayers()
			local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;
			for i,playerName in ipairs(players) do
				local player = getPlayerByName(playerName);
				if getPlayerGuildId(player) == playerGuild then
					doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);
				end
			end
			doPlayerSendCancel(cid, "Message sent to whole guild.");
		else
			doPlayerSendCancel(cid, "You have to be at least Vice-Leader to guildcast!");
		end
	else
		doPlayerSendCancel(cid, "Sorry, you're not in a guild.");
	end
	return true
end
 
Back
Top