I have 3 chatbots
Opchat (not the one of Ptokax)
Vipchat
RegChat.
Is there a way of hide opchat of regs and vips, and
vipchat and opchat of regs?
yep
QuoteOriginally posted by Dessamator
yep
Thanks. Wow, that's hopeful, and what you can call a
laconic response. I'm glad to know it can be maked.
Sombody can do me any idea of how do it?
PtokaX automatically hide OpChat to users not allowed to write to it :]
QuoteOriginally posted by Josecar222000
QuoteOriginally posted by Dessamator
yep
Thanks. Wow, that's hopeful, and what you can call a
laconic response. I'm glad to know it can be maked.
Sombody can do me any idea of how do it?
simple questions deserve simple answers, and if u had searched for it im sure you would have found it in the forum,
either way, all u need to do is to control the myinfo sent to the person that logs in !
QuoteOriginally posted by Dessamator
QuoteOriginally posted by Josecar222000
QuoteOriginally posted by Dessamator
yep
Thanks. Wow, that's hopeful, and what you can call a
laconic response. I'm glad to know it can be maked.
Sombody can do me any idea of how do it?
simple questions deserve simple answers, and if u had searched for it im sure you would have found it in the forum,
either way, all u need to do is to control the myinfo sent to the person that logs in !
I had searched. And had found may be 40 or 50 trheads on the matter. Nothing that do what i'd ask.
Most of them hide or unhide bots registering and unregigstering bot, so everybody or nobody can see them. Nothing like controlling myinfo to logging users.
May be i must search again. Thanks anyway for your valuable lead, Dessamator, but i'm afaid my
shortcomings in lua, (i'm a beginner in this) won't allow me do the job.
I come from neomodus 1 an vb scpritps, there was easy do that not registering the bot and
using $hello. After hours of trying and search, i asked for help.
I?ll be very thankful for some more leads like yours.
Respectfully: Josecar222000
well, here (http://board.univ-angers.fr/thread.php?threadid=2033&boardid=11&sid=78694f0f1ae72bae0437deb08408970a)
is an example of searching power, :), either way all u need is something like this:
ChatRoom = "-=<[ViP_-_ChaT]>=-"
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..strchar( 1 ).."$$0|$"
function NewUserConnected(user, data)
if user.iProfile == 1 then
user:SendData(info_chat)
end
end
QuoteOriginally posted by Dessamator
well, here (http://board.univ-angers.fr/thread.php?threadid=2033&boardid=11&sid=78694f0f1ae72bae0437deb08408970a)
is an example of searching power, :), either way all u need is something like this:
ChatRoom = "-=<[ViP_-_ChaT]>=-"
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..strchar( 1 ).."$$0|$"
function NewUserConnected(user, data)
if user.iProfile == 1 then
user:SendData(info_chat)
end
end
I'm afraid that has not worked for me. I have tryed Kepp's Guarding, it has that:
local BotInfo = "";
for i=1,table.getn(Settings.Chatbots) do
if (Settings.Chatbots
.Enabled == 1) then
if (Settings.Chatbots.Allowed[user.iProfile] == 1) then
BotInfo = BotInfo.."$MyINFO $ALL "..Settings.Chatbots.Name.." "..Settings.Chatbots.Description.."$ $"..Settings.Chatbots.Speed..string.char(1).."$"..Settings.Chatbots.Email.."$0$|";
end
end
end
if (BotInfo ~= "") then
user:SendData(BotInfo);
end
Up to where I have seen until the present, the things are this way: if you register
the bot, anyone can see it, if your unregister it, nobody can see it.
I explain my interest giving an an example: regs cannot see opchat neither vipchat, operators can see the three bots.
I have proven code like that of your example in a simpler context, and always, despite that them
can or not to use a bot, regs and unreg can SEE THEM.
The object the this is very simple: not to show people forbidden things, it is not good for the morals.
Maybe I have made it bad, I have omitted particulars, if it is the case, please tell it to me.
I have proven what PPK said, it works fine. Unfortunately this only solves the Opchat.
Let us hope the Ptokax includes a vipchat in the future.
oops there was a tiny error in the code it should be like this :
ChatRoom = "-=<[ViP_-_ChaT]>=-"
Levels = {
[0]=1,--Master
[1]=1,--Operator
[2]=0,--Vip
[4]=0,--UnKnwon
[5]=0,--UnKnwon
[6]=0--UnKnwon
}
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..string.char( 1 ).."$$0$"
function NewUserConnected(user)
if (Levels[user.iProfile] ~= nil) then
user:SendData(info_chat)
end
end
OpConnected = NewUserConnected
either way heres a working example :
-- 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
--lua 5 by Dessamator
ChatRoom = "-=<[ViP_-_ChaT]>=-"
Levels = {
[0]=1,--Master
[1]=1,--Operator
[2]=0,--Vip
[4]=0,--UnKnwon
[5]=0,--UnKnwon
[6]=0--UnKnwon
}
info_chat = "$MyINFO $ALL "..ChatRoom.." $ $Cable"..string.char( 1 ).."$$0$"
function NewUserConnected(user)
if (Levels[user.iProfile] ~= nil) then
user:SendData(info_chat)
end
end
OpConnected = NewUserConnected
function ToArrival(user,data)
local s,e,whoTo = string.find(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = string.find(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
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
Thanks Dessamator, i'm really grateful
I'll try the code as fast as possible
ur welcome !