is it possible make this script only for master category??? :P
if one Op uses it, the bot he says to it "you cannot use this command"
thanks
--## Start to Say command by Herodes
--## Say command by Herodes Modded by 6Marilyn6Manson6 19/04/2007 [requested by Kastor]
sBot = frmHub:GetHubBotName()
function Main()
pCmd = "[%"..table.concat( frmHub:GetPrefixes(), "%").."]"
end
function ChatArrival(user, sData)
if user.iProfile == 0 then
local s,e, sPrefix, sCmd, sNick, sMsg = string.find( string.sub( sData, 1, -2 ), "%b<>%s*"..pCmd.."(%S+)%s*(%S*)%s*(.*)")
if sCmd == "say" then
if sNick == "" then
user:SendData(sBot, "Please provide a nick to use the say command."); return 1;
elseif sMsg == "" then
user:SendData(sBot, "Please enter a message for "..sNick.." to say."); return 1;
elseif user.iProfile ~= 0 then
user:SendData(sBot, "You cannot use this command."); return 1;
end
SendToAll(sNick, sMsg); return 1;
end
end
end
--// 6Marilyn6Manson6
I trying but it does not works ???
i writen in main !say nick message but doesen't works
--## Start to Say command by Herodes
--## Say command by Herodes Modded by 6Marilyn6Manson6 19/04/2007 [requested by Kastor]
--## Fixed Error In third line of ChatArrival function by 6Marilyn6Manson6 19/04/2007 [Thanks Kastor]
sBot = frmHub:GetHubBotName()
function ChatArrival(user, sData)
if user.iProfile == 0 then
local s,e, sCmd, sNick, sMsg = string.find(string.sub(sData, 1, -2 ),"%b<>%s*(%S+)%s+(%S+)%s*(.*)")
if sCmd == "!say" then
if sNick == "" then
user:SendData(sBot, "Please provide a nick to use the say command."); return 1;
elseif sMsg == "" then
user:SendData(sBot, "Please enter a message for "..sNick.." to say."); return 1;
elseif user.iProfile ~= 0 then
user:SendData(sBot, "You cannot use this command."); return 1;
end
SendToAll(sNick, sMsg); return 1;
end
end
end
--// 6Marilyn6Manson6
Now work, sorry for first and thanks for testing ^^. Post update :D
now it is work ;)
when an operator write " !say nick message " in mainchat , it is doesen't see the phrase :" You cannot use this command" . But it is not important
thank you soo much!!
--## Start to Say command by Herodes
--## Say command by Herodes Modded by 6Marilyn6Manson6 19/04/2007 [requested by Kastor]
--## Fixed Error In third line of ChatArrival function by 6Marilyn6Manson6 19/04/2007 [Thanks Kastor]
sBot = frmHub:GetHubBotName()
function ChatArrival(user, sData)
local s,e, sCmd, sNick, sMsg = string.find(string.sub(sData, 1, -2 ),"%b<>%s*(%S+)%s+(%S+)%s*(.*)")
if user.iProfile ~= 0 then
user:SendData(sBot, "You cannot use this command."); return 1;
elseif user.iProfile == 0 then
if sCmd == "!say" then
if sNick == "" then
user:SendData(sBot, "Please provide a nick to use the say command."); return 1;
elseif sMsg == "" then
user:SendData(sBot, "Please enter a message for "..sNick.." to say."); return 1;
end
SendToAll(sNick, sMsg); return 1;
end
end
end
--// 6Marilyn6Manson6
For you lol
thank you soo much marilyn ;)
Welcome