This is the latest InterCom, a script similar to nErBoS' Whisper.. ( but I'd like to think of it as being more convenient.. )
--- OpInterCom v 2.6
--- by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------
--- 10 / 8 - 2004
--- added ' [+] ' for going into permanent OpsOnly mode..
--- added ' [=] ' for going out of OpsOnly mode...
--- added ' [?] ' for listing the Ops in OpsOnly mode...
--------- --------- --------- --------- --------- --------- ---------
--- 2 / 3 - 2005
--- converted to Lua 5 for the latest PtokaX
--------- --------- --------- --------- --------- --------- ---------
--- 15 / 3 - 2005
--- added right-click menu ( request by AMediaMan )
--------- --------- --------- --------- --------- --------- ---------
tCommunicators = {}
function OpConnected(user)
if user.bUserCommand then
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Mode\\ON$<%[mynick]> [+]||")
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Mode\\OFF$<%[mynick]> [=]||")
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Msg$<%[mynick]> [-]%[line:Enter your msg here:]||")
user:SendData("$UserCommand 1 3 :InterCom:\\List OpsOnly Opers$<%[mynick]> [?]||")
user:SendData(":InterCom:", "New Right-Click for InterCom is Available..")
end
end
function ChatArrival(oper, msg)
if ( oper.bOperator ) then
local s, e, txt = string.find(msg, "%b<>%s+(.+)")
if ( string.sub(txt, 1 ,3) == "[-]" ) then
local s, e, txt = string.find(txt, "%[-%](.*)")
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
return 1
elseif ( string.sub(txt, 1 ,3) == "[+]" ) then
if (tCommunicators[oper.sName] == 1) then
oper:SendData("OpsOnly", "You are in OpsOnly mode already...")
elseif (tCommunicators[oper.sName] == nil) then
tCommunicators[oper.sName] = 1
oper:SendData("OpsOnly", "You are in OpsOnly mode now ... to go into normal type ' [=] ' ")
SendToOps("OpsOnly", "*** "..oper.sName.." went into OpsOnly mode...")
end
return 1
elseif ( string.sub(txt, 1, 3) == "[=]" ) then
if (tCommunicators[oper.sName] == nil) then
oper:SendData("OpsOnly", "You were not in OpsOnly mode ...")
elseif (tCommunicators[oper.sName] == 1) then
tCommunicators[oper.sName] = nil
oper:SendData("OpsOnly", "You are in normal mainchat mode now ... be carefull!!!")
SendToOps("OpsOnly", "*** "..oper.sName.." is in normal chat mode now")
end
return 1
elseif ( string.sub(txt, 1,3) == "[?]" ) then
local msg = ""
for nick, t in tCommunicators do msg = msg.."\n\t - "..nick end
if msg == "" then msg = " None are in OpsOnly mode..." else msg = "\n\t Operators in OpsOnly Mainchat mode :"..msg end
oper:SendData("OpsOnly", msg )
return 1
else
for name , v in tCommunicators do
if (name == oper.sName) then
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
return 1
end
end
end
end
end
Hey Herodes very nice ty. This is a great script thnx again and keep up the great work :)
AMediaMan
QuoteOriginally posted by AMediaMan
Hey Herodes very nice ty. This is a great script thnx again and keep up the great work :)
AMediaMan
yw AMediaMan,.. if you have any ideas about it feel free to post them ;)
Ok Herodes ive been thinking hahaha,
and came up with this idea. How about
adding like a reverse effect of
the [-] message command ? What
i mean is : [-] message is a op's only
message when one is not in
only mode. So how about if
you are in
type [-] message it will go in main chat
like normal. Just a thought that might
come in handy ;)
AMediaMan
Yeah,.. good idea .. should be on its way ;)
Very cool ;)
Still a great script, we use it all the time lol.
AMediaMan
There it is .. ready ( not tested, so almost certain ;)
--- OpInterCom v 2.7
--- by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------
--- 10 / 8 - 2004
--- added ' [+] ' for going into permanent OpsOnly mode..
--- added ' [=] ' for going out of OpsOnly mode...
--- added ' [?] ' for listing the Ops in OpsOnly mode...
--------- --------- --------- --------- --------- --------- ---------
--- 2 / 3 - 2005
--- converted to Lua 5 for the latest PtokaX
--------- --------- --------- --------- --------- --------- ---------
--- 15 / 3 - 2005
--- added right-click menu ( request by AMediaMan )
--------- --------- --------- --------- --------- --------- ---------
--- 28/3 - 2005
--- changed [-] mode switches does the inverse than your mode ( OpsOnly -> Normal and reverse ) ( request by AMediaMan )
--------- --------- --------- --------- --------- --------- ---------
tCommunicators = {}
function OpConnected(user)
if user.bUserCommand then
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Mode\\ON$<%[mynick]> [+]||")
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Mode\\OFF$<%[mynick]> [=]||")
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Msg$<%[mynick]> [-]%[line:Enter your msg here:]||")
user:SendData("$UserCommand 1 3 :InterCom:\\List OpsOnly Opers$<%[mynick]> [?]||")
user:SendData(":InterCom:", "New Right-Click for InterCom is Available..")
end
end
function ChatArrival(oper, msg)
if ( oper.bOperator ) then
local s, e, txt = string.find(msg, "%b<>%s+(.+)")
if ( string.sub(txt, 1 ,3) == "[-]" ) then
local s, e, txt = string.find(txt, "%[-%](.*)")
if (tCommunicators[oper.sName] == 1) then
SendToAll( oper.sName, txt )
elseif (tCommunicators[oper.sName] == nil) then
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
end
return 1
elseif ( string.sub(txt, 1 ,3) == "[+]" ) then
if (tCommunicators[oper.sName] == 1) then
oper:SendData("OpsOnly", "You are in OpsOnly mode already...")
elseif (tCommunicators[oper.sName] == nil) then
tCommunicators[oper.sName] = 1
oper:SendData("OpsOnly", "You are in OpsOnly mode now ... to go into normal type ' [=] ' ")
SendToOps("OpsOnly", "*** "..oper.sName.." went into OpsOnly mode...")
end
return 1
elseif ( string.sub(txt, 1, 3) == "[=]" ) then
if (tCommunicators[oper.sName] == nil) then
oper:SendData("OpsOnly", "You were not in OpsOnly mode ...")
elseif (tCommunicators[oper.sName] == 1) then
tCommunicators[oper.sName] = nil
oper:SendData("OpsOnly", "You are in normal mainchat mode now ... be carefull!!!")
SendToOps("OpsOnly", "*** "..oper.sName.." is in normal chat mode now")
end
return 1
elseif ( string.sub(txt, 1,3) == "[?]" ) then
local msg = ""
for nick, t in tCommunicators do msg = msg.."\n\t - "..nick end
if msg == "" then msg = " None are in OpsOnly mode..." else msg = "\n\t Operators in OpsOnly Mainchat mode :"..msg end
oper:SendData("OpsOnly", msg )
return 1
else
for name , v in tCommunicators do
if (name == oper.sName) then
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
return 1
end
end
end
end
end
funktion to talk to 1 person (like in whisper) would make it perfeckt
Greetz TT
QuoteOriginally posted by T?M??r?V?ll?R
funktion to talk to 1 person (like in whisper) would make it perfeckt
Greetz TT
How the heck did i miss that .. It is in the upcoming already ;)
;)
Done,.. :D any more feature request will be welcomed ;)
--- OpInterCom v 3
--- by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------
--- 10 / 8 - 2004
--- added ' [+] ' for going into permanent OpsOnly mode..
--- added ' [=] ' for going out of OpsOnly mode...
--- added ' [?] ' for listing the Ops in OpsOnly mode...
--------- --------- --------- --------- --------- --------- ---------
--- 2 / 3 - 2005
--- converted to Lua 5 for the latest PtokaX
--------- --------- --------- --------- --------- --------- ---------
--- 15 / 3 - 2005
--- added right-click menu ( request by AMediaMan )
--------- --------- --------- --------- --------- --------- ---------
--- 28/3 - 2005
--- changed [-] mode switches does the inverse than your mode ( OpsOnly -> Normal and reverse )
--- added [!] to talk to a single person ;) ( request by TimeTraveler )
--------- --------- --------- --------- --------- --------- ---------
tCommunicators = {}
function OpConnected(user)
if user.bUserCommand then
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Mode\\ON$<%[mynick]> [+]||")
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Mode\\OFF$<%[mynick]> [=]||")
user:SendData("$UserCommand 1 3 :InterCom:\\OpsOnly Msg$<%[mynick]> [-]%[line:Enter your msg here:]||")
user:SendData("$UserCommand 1 2 :InterCom:\\WhisperToUser$<%[mynick]> [!] %[nick] %[line:Enter your msg here:]||")
user:SendData("$UserCommand 1 3 :InterCom:\\List OpsOnly Opers$<%[mynick]> [?]||")
user:SendData(":InterCom:", "New Right-Click for InterCom is Available..")
end
end
function ChatArrival(oper, msg)
if ( oper.bOperator ) then
local s, e, txt = string.find(msg, "%b<>%s+(.+)")
if ( string.sub(txt, 1 ,3) == "[-]" ) then
local s, e, txt = string.find(txt, "%[-%]%s*(.*)")
if (tCommunicators[oper.sName] == 1) then
SendToAll( oper.sName, txt )
elseif (tCommunicators[oper.sName] == nil) then
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
end
return 1
elseif ( string.sub( txt, 1, 3 ) == "[!]" ) then
local s,e,who, txt = string.find( txt, "%[!%]%s+(%S+)%s*(.*)")
local w = GetItemByName(who)
if w then
w:SendData( "WhisperForYou", "["..oper.sName.."] "..txt)
oper:SendData("Whispered", "*** "..who.." was whispered with : "..txt)
else
oper:SendData( "OpsOnly", "There is no user named "..who..",... try again.")
end
return 1
elseif ( string.sub(txt, 1 ,3) == "[+]" ) then
if (tCommunicators[oper.sName] == 1) then
oper:SendData("OpsOnly", "You are in OpsOnly mode already...")
elseif (tCommunicators[oper.sName] == nil) then
tCommunicators[oper.sName] = 1
oper:SendData("OpsOnly", "You are in OpsOnly mode now ... to go into normal type ' [=] ' ")
SendToOps("OpsOnly", "*** "..oper.sName.." went into OpsOnly mode...")
end
return 1
elseif ( string.sub(txt, 1, 3) == "[=]" ) then
if (tCommunicators[oper.sName] == nil) then
oper:SendData("OpsOnly", "You were not in OpsOnly mode ...")
elseif (tCommunicators[oper.sName] == 1) then
tCommunicators[oper.sName] = nil
oper:SendData("OpsOnly", "You are in normal mainchat mode now ... be carefull!!!")
SendToOps("OpsOnly", "*** "..oper.sName.." is in normal chat mode now")
end
return 1
elseif ( string.sub(txt, 1,3) == "[?]" ) then
local msg = ""
for nick, t in tCommunicators do msg = msg.."\n\t - "..nick end
if msg == "" then msg = " None are in OpsOnly mode..." else msg = "\n\t Operators in OpsOnly Mainchat mode :"..msg end
oper:SendData("OpsOnly", msg )
return 1
else
for name , v in tCommunicators do
if (name == oper.sName) then
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
return 1
end
end
end
end
end
just added a response on success for the whisper-to-user function, that had been req by TimeTraveler...
The script above has been edited..
Works perfeckt :)) Thanks
Greetzzz TT
another nice script like this one saves all them soddin popups ty :D
Thanks for this one. Works perfectly in my hub.
Great work
Thanks for your comments Riptorn,Jacksons_Xone ;)
Very good script. Thank you so much. It's working perfectly. :D
any ideas why i cant get this to work with PtokaX 17.07 ? im so bummed now :(
AMediaMan
QuoteOriginally posted by AMediaMan
any ideas why i cant get this to work with PtokaX 17.07 ? im so bummed now :(
AMediaMan
Tried it a while ago and I didn't get any error. All the commands seem to be working well. Maybe if you copy the script all over again... Who knows.
Cheers