PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Cêñoßy†ê on 29 April, 2005, 23:19:42

Title: MainBotHider
Post by: Cêñoßy†ê on 29 April, 2005, 23:19:42
Want to hide your main bot like robocop?
Here is right tool for you  :D

--//-- Bothider --------------------//--
--//--Made by C??o?y?? 29.04.05-----//--
--//--------------------------------//--

sBot = frmHub:GetHubBotName()         --Takes main botname from hub
sMenu = "Bothider"                    --Name for rightclick menu

--//-- Who can use/get commands 1/yes 0/no --//--
CanDo = {
[0] = 1, -- Master
[1] = 1, -- Operator
[2] = 0, -- VIP
[3] = 0, -- Reg
[4] = 1, -- Moderator
[5] = 1, -- Netfounder
}

OpConnected = function(user)
if user.bUserCommand then  
if CanDo[user.iProfile] == 1 then
user:SendData("$UserCommand 1 3 "..sMenu.."\\Hide "..sBot.." from user list$<%[mynick]> !hidebot|")
user:SendData("$UserCommand 1 3 "..sMenu.."\\Unhide "..sBot.." from user list$<%[mynick]> !unhidebot|")
end
end
end

ChatArrival = function(user, data)
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if(cmd == "!unhidebot") then
if CanDo[user.iProfile] == 1 then
user:SendData(sBot,"Bot added to userlist!")
frmHub:SetHubBot(1)
else
user:SendData(sBot, "No,No,NO... You are not allowed to use this command!")
end
return 1
end
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if(cmd == "!hidebot") then
if CanDo[user.iProfile] == 1 then
user:SendData(sBot,"Bot removed from userlist!")
frmHub:SetHubBot(0)
else
user:SendData(sBot, "No,No,NO... You are not allowed to use this command!")
end
return 1
end
end
Title:
Post by: imby on 29 April, 2005, 23:29:18
If you hide your bot your users wont get any messages of problems in PM - bad idea.
Title:
Post by: 6Marilyn6Manson6 on 29 April, 2005, 23:36:29
Good script ;)
Title:
Post by: Cêñoßy†ê on 29 April, 2005, 23:44:45
QuoteOriginally posted by imby
If you hide your bot your users wont get any messages of problems in PM - bad idea.

I made this for my private hub so no need for problem messages  :P

QuoteOriginally posted by 6Marilyn6Manson6
Good script ;)

thx.. still trying to learn all this  :D
Title:
Post by: Cêñoßy†ê on 02 May, 2005, 21:45:49
v1.1
Added hide/unhide to Op-Chat

--//-- Bothider v1.1----------------//--
--//--Made by C??o?y?? 29.04.05-----//--
--//--------------------------------//--

sBot = frmHub:GetHubBotName()         --Takes main botname from hub
oBot = frmHub:GetOpChatName()         --Takes OP-Chatname from hub
sMenu = "Bothider"                    --Name for rightclick menu

--//-- Who can use/get commands 1/yes 0/no --//--
CanDo = {
[0] = 1, -- Master
[1] = 1, -- Operator
[2] = 0, -- VIP
[3] = 0, -- Reg
[4] = 1, -- Moderator
[5] = 1, -- Netfounder
}

OpConnected = function(user)
if user.bUserCommand then  
if CanDo[user.iProfile] == 1 then
user:SendData("$UserCommand 1 3 "..sMenu.."\\Hide "..sBot.." from user list$<%[mynick]> !hidebot|")
user:SendData("$UserCommand 1 3 "..sMenu.."\\Unhide "..sBot.." from user list$<%[mynick]> !unhidebot|")
user:SendData("$UserCommand 1 3 "..sMenu.."\\Hide "..oBot.." from user list$<%[mynick]> !hideopchat|")
user:SendData("$UserCommand 1 3 "..sMenu.."\\Unhide "..oBot.." from user list$<%[mynick]> !unhideopchat|")
end
end
end

ChatArrival = function(user, data)
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if(cmd == "!unhidebot") then
if CanDo[user.iProfile] == 1 then
user:SendData(sBot,"Bot added to userlist!")
frmHub:SetHubBot(1)
else
user:SendData(sBot, "No,No,NO... You are not allowed to use this command!")
end
return 1
end
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if(cmd == "!hidebot") then
if CanDo[user.iProfile] == 1 then
user:SendData(sBot,"Bot removed from userlist!")
frmHub:SetHubBot(0)
else
user:SendData(sBot, "No,No,NO... You are not allowed to use this command!")
end
return 1
end
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if(cmd == "!unhideopchat") then
if CanDo[user.iProfile] == 1 then
user:SendData(sBot,"Op-Chat added to userlist!")
frmHub:SetOpChat(1)
else
user:SendData(sBot, "No,No,NO... You are not allowed to use this command!")
end
return 1
end
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if(cmd == "!hideopchat") then
if CanDo[user.iProfile] == 1 then
user:SendData(sBot,"Op-Chat removed from userlist!")
frmHub:SetOpChat(0)
else
user:SendData(sBot, "No,No,NO... You are not allowed to use this command!")
end
return 1
end
end