i moddefide it to ONLY VIP's and Higher Level can chat in there but why REG users can see the chat?
can some one make it that the chat-room pop-up ONLY to VIP's And Higher level?
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
function Main()
ChatRoom = "-=<[ViP_-_ChaT]>=-"
frmHub:RegBot(ChatRoom)
end
Levels= {
- =0,[1]=0,[2]=0,[4]=0,[5]=0,[6]=0}
------------------
-- Data Arrival --
------------------
function DataArrival(user,data)
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(user,msg)
local allprofiles = GetProfiles()
local index, profile, index2, nick
for index, profile in allprofiles do
local users = GetUsersByProfile(profile)
for index2, nick in users do
local usr = GetItemByName(nick)
if usr ~= nil then
if user.sName == usr.sName then
else
if Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
Hi,
Done...
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
-- Hide Bot only to accept Users by nErBoS
ChatRoom = "-=<[ViP_-_ChaT]>=-"
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..strchar( 1 ).."$$0|$"
Levels = { [0]=0,[1]=0,[2]=0,[4]=0,[5]=0,[6]=0}
function Main()
frmHub:EnableFullData(1)
end
function NewUserConnected(user, data)
if (AcceptProfile(user) == 1) then
user:SendData(info_chat)
end
end
OpConnected = NewUserConnected
function DataArrival(user,data)
if (strsub(data,1,12) == "$GetNickList") then
if (AcceptProfile(user) == 1) then
user:SendData(info_chat)
end
end
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(user,msg)
local allprofiles = GetProfiles()
local index, profile, index2, nick
for index, profile in allprofiles do
local users = GetUsersByProfile(profile)
for index2, nick in users do
local usr = GetItemByName(nick)
if usr ~= nil then
if user.sName == usr.sName then
else
if Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
function AcceptProfile(user)
local accept = 0
local level,aux
for level, aux in Levels do
if (user.iProfile == level) then
accept = 1
break
end
end
end
Best regards, nErBoS
nope not working... the BoT is not in the hub i can't see it...
Hi,
Improved and fixed...
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
-- Hide Bot only show to iProfile from table, by nErBoS
ChatRoom = "Chat"
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..strchar( 1 ).."$$0$|"
Levels = {
[0]=0, --Master
[1]=0, --Operator
[2]=0, --Vip
[4]=0, --UnKnwon
[5]=0, --UnKnwon
[6]=0 --UnKnwon
}
function Main()
frmHub:EnableFullData(1)
end
function NewUserConnected(user)
if (Levels[user.iProfile] ~= nil) then
user:SendData(info_chat)
end
end
OpConnected = NewUserConnected
function DataArrival(user,data)
if (strsub(data,1,12) == "$GetNickList") then
if (Levels[user.iProfile] ~= nil) then
user:SendData(info_chat)
end
end
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(user,msg)
local allprofiles = GetProfiles()
local index, profile, index2, nick
for index, profile in allprofiles do
local users = GetUsersByProfile(profile)
for index2, nick in users do
local usr = GetItemByName(nick)
if usr ~= nil then
if user.sName == usr.sName then
else
if Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
Best regards, nErBoS
nice man very nice :)
but...
i wanna it to be OPBoT ond to show all the BoT if you can :)
and REG user are geting PM's From The BoT In Main...
Private message from Chat: fdxb
Hi,
About PMing other users I thing its resolved...
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
-- Hide Bot only show to iProfile from table, by nErBoS
-- Some Correction by nErBoS
ChatRoom = "Chat"
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..strchar( 1 ).."$$0$|"
Levels = {
[0]=0, --Master
[1]=0, --Operator
[2]=0, --Vip
[4]=0, --UnKnwon
[5]=0, --UnKnwon
[6]=0 --UnKnwon
}
function Main()
frmHub:EnableFullData(1)
end
function NewUserConnected(user)
if (Levels[user.iProfile] ~= nil) then
user:SendData(info_chat)
end
end
OpConnected = NewUserConnected
function DataArrival(user,data)
if (strsub(data,1,12) == "$GetNickList") then
if (Levels[user.iProfile] ~= nil) then
user:SendData(info_chat)
end
end
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(user,msg)
local allprofiles = GetProfiles()
local index, profile, index2, nick
for index, profile in allprofiles do
if (Levels[GetProfileIdx(profile)] ~= nil) then
local users = GetUsersByProfile(profile)
for index2, nick in users do
local usr = GetItemByName(nick)
if usr ~= nil then
if user.sName ~= usr.sName then
if Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
end
About the Bot appear as an OP you must register him as a OP on your ptokax.
Best regards, nErBoS
steel Only ViP can see the bot and BTW it was an OP-Chat-Bot
you maybe change it to be user :)
here is the scrit is Op-Chat-Bot
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
function Main()
ChatRoom = "ChatRoom"
frmHub:RegBot(ChatRoom)
end
Levels= {
- =0,[1]=0,[2]=0,[4]=0,[5]=0,[6]=0}
------------------
-- Data Arrival --
------------------
function DataArrival(user,data)
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(user,msg)
local allprofiles = GetProfiles()
local index, profile, index2, nick
for index, profile in allprofiles do
local users = GetUsersByProfile(profile)
for index2, nick in users do
local usr = GetItemByName(nick)
if usr ~= nil then
if user.sName == usr.sName then
else
if Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
Hi,
Your request was to hide the BOT to users who don't have permission to talk, right ?? The Bot is show to everyone else.
About the BOT appear to be an op is not possible because to send fake info its not possible to send info as an OP.
I have tested the BOT and is working ok.
Best regards, nErBoS
nope i wanted it to stop pop-up to NonViP's
Hi,
You want only the script to popup to VIPs ???
Best regards, nErBoS
yes i want it to pop-up to ViP and higher level but all can see it and it OP-BOT
Hi,
Ok i have understood bad your request, try this one...
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
-- Little Fix by nErBoS
ChatRoom = "Chat"
Levels = {
[0]=0, --Master
[1]=0, --Operator
[2]=0, --Vip
}
function Main()
frmHub:RegBot(ChatRoom)
end
function DataArrival(user,data)
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if (whoTo == ChatRoom) then
if (Levels[user.iProfile] ~= nil) then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif (Levels[user.iProfile] == nil) then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(user,msg)
local allprofiles = GetProfiles()
local index, profile, index2, nick
for index, profile in allprofiles do
if (Levels[GetProfileIdx(profile)] ~= nil) then
local users = GetUsersByProfile(profile)
for index2, nick in users do
local usr = GetItemByName(nick)
if usr ~= nil then
if user.sName ~= usr.sName then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
All Vips and Higher level can talk, The Bot is seen by everyone has a OP, and the chat is only seen be Vips and higher level.
Best regards, nErBoS
Work PERFECT! :)))))))))))))))