Ok, just started to use the NXS-3 script for my hub, but it has no hubowner\op\vip\reg join script, so i decided to make one myself.. works fine for hubowner\ops\vips, but not for regs?
function OpConnected(user)
if user.iProfile == 0 then
SendToAll(frmHub:GetHubName(), "-== Attention! The hubowner "..user.sName.." has entered the hub. ==-")
elseif user.iProfile == 1 then
SendToAll(frmHub:GetHubName(), "Attention! Operator "..user.sName.." has just connected to this hub. ")
elseif user.iProfile == 2 then
SendToAll(frmHub:GetHubName(), "The VIP "..user.sName.." has just connected to this hub")
elseif user.iProfile == 3 then
SendToAll(frmHub:GetHubName(), "The registered user "..user.sName.." has just connected")
end
end
EDIT: Coulndt get the and ?> out of the post.. its not a part of the script ;)
I am new whit script?s, but try to write this line:
"-== Attention! The hubowner "..user.sName.." has entered the hub. ==-")
like this:
"Attention! The hubowner "..user.sName.." has entered the hub.")
Can?t say if it works, but try it.
If it not working so ask eny one ens my m8!
//WickeD
Here is a quickly made script =
-- ???????????????????????
-- ? Welcome-AI 1.0 ?
-- ? Made by: blackwings ?
-- ???????????????????????
Bot="?Welcome-AI?"
hubowner = "blackwings"
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(User)
if GetProfileName(User.iProfile) == "VIP" then
SendToAll(Bot,"The VIP "..User.sName.." has just connected to this hub")
elseif GetProfileName(User.iProfile) == "Reg" then
SendToAll(Bot,"The registered user "..User.sName.." has just connected")
end
end
function UserDisconnected(User)
if GetProfileName(User.iProfile) == "VIP" then
SendToAll(Bot,"The VIP "..User.sName.." has left the hub")
end
end
function OpConnected(User)
if GetProfileName(User.iProfile) == "Master" and User.sName == hubowner then
SendToAll(Bot,"-== Attention! The hubowner "..User.sName.." has entered the hub. ==-")
elseif GetProfileName(User.iProfile) == "Master" then
SendToAll(Bot,"Attention! Master "..User.sName.." has just connected to this hub.")
elseif GetProfileName(User.iProfile) == "Moderator" then
SendToAll(Bot,"Attention! Moderator "..User.sName.." has just connected to this hub.")
elseif GetProfileName(User.iProfile) == "Operator" then
SendToAll(Bot,"Attention! Operator "..User.sName.." has just connected to this hub.")
end
end
function OpDisconnected(User)
if GetProfileName(User.iProfile) == "Master" and User.sName == hubowner then
SendToAll(Bot,"The hubowner "..User.sName.." has left the hub.")
elseif GetProfileName(User.iProfile) == "Master" then
SendToAll(Bot,"Master "..User.sName.." has left the hub.")
elseif GetProfileName(User.iProfile) == "Moderator" then
SendToAll(Bot,"Moderator "..User.sName.." has left the this hub.")
elseif GetProfileName(User.iProfile) == "Operator" then
SendToAll(Bot,"Operator "..User.sName.." has left the hub.")
end
end
or this one
I added so it was possible to have random welcome and "Good Bye" Messages
-- ?????????????????????????????????????????????????
-- ? Welcome-AI 2.0 ?
-- ? Made by blackwings ?
-- ? Added: Random Welcome and Good Bye Messages ?
-- ?????????????????????????????????????????????????
Bot="?Welcome-AI?"
hubowner="blackwings"
--######## HERE STARTS THE CONFIGURATION ########--
--????????????????????????????????????????????
------------------------------------------
-- Random welcome message for the hubowner
------------------------------------------
HOWelcome = {
"has entered the hub. ==-",
"second HubOwner welcome message",
"third HubOwner welcome message",
}
--------------------------------------------------
-- Random message for when the hubowner disconnect
--------------------------------------------------
HOByeBye = {
"has left the hub",
"second HubOwner Good Bye message",
"third HubOwner Good Bye message",
}
--????????????????????????????????????????????
--++++++++++
--????????????????????????????????????????????
--------------------------------------------------------------
-- Random welcome message for the Operators and the Moderators
--------------------------------------------------------------
OPWelcome = {
"has just connected to this hub",
"second OP & Mod welcome message",
"third OP & Mod welcome message",
}
----------------------------------------------------------------------
-- Random message for when the Operators and the Moderators disconnect
----------------------------------------------------------------------
OPByeBye = {
"has left the hub",
"second OP & Mod Good Bye message",
"third OP & Mod Good Bye message",
}
--????????????????????????????????????????????
--++++++++++
--????????????????????????????????????????????
----------------------------------------
-- Random welcome message for the VIP's
----------------------------------------
VIPWelcome = {
"has just connected to this hub",
"second VIP welcome message",
"third VIP welcome message",
}
--------------------------------------------------
-- Random message for when the VIP's disconnect
--------------------------------------------------
VIPByeBye = {
"has left the hub",
"second VIP Good Bye message",
"third VIP Good Bye message",
}
--????????????????????????????????????????????
--++++++++++
--????????????????????????????????????????????
--------------------------------------------------
-- Random welcome message for the registered users
--------------------------------------------------
REGWelcome = {
"has just connected",
"second REG welcome message",
"third REG welcome message",
}
--------------------------------------------------
-- Random message for when a registered user disconnect
--------------------------------------------------
REGByeBye = {
"has left the hub",
"second REG Good Bye message",
"third REG Good Bye message",
}
--????????????????????????????????????????????
--######## HERE ENDS THE CONFIGURATION ########--
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(User)
if GetProfileName(User.iProfile) == "VIP" then
SendToAll(Bot,"The VIP "..User.sName.." "..VIPWelcome[random(1, getn(VIPWelcome))]..".")
elseif GetProfileName(User.iProfile) == "Reg" then
SendToAll(Bot,"The registered user "..User.sName.." "..REGWelcome[random(1, getn(REGWelcome))]..".")
end
end
function UserDisconnected(User)
if GetProfileName(User.iProfile) == "VIP" then
SendToAll(Bot,"The VIP "..User.sName.." "..VIPByeBye[random(1, getn(VIPByeBye))]..".")
elseif GetProfileName(User.iProfile) == "Reg" then
SendToAll(Bot,"The registered "..User.sName.." "..REGByeBye[random(1, getn(REGByeBye))]..".")
end
end
function OpConnected(User)
if GetProfileName(User.iProfile) == "Master" and User.sName == hubowner then
SendToAll(Bot,"The hubowner "..User.sName.." "..HOWelcome[random(1, getn(HOWelcome))]..".")
elseif GetProfileName(User.iProfile) == "Master" then
SendToAll(Bot,"Master "..User.sName.." "..OPWelcome[random(1, getn(OPWelcome))]..".")
elseif GetProfileName(User.iProfile) == "Moderator" then
SendToAll(Bot,"Moderator "..User.sName.." "..OPWelcome[random(1, getn(OPWelcome))]..".")
elseif GetProfileName(User.iProfile) == "Operator" then
SendToAll(Bot,"Operator "..User.sName.." "..OPWelcome[random(1, getn(OPWelcome))]..".")
end
end
function OpDisconnected(User)
if GetProfileName(User.iProfile) == "Master" and User.sName == hubowner then
SendToAll(Bot,"The hubowner "..User.sName.." "..HOByeBye[random(1, getn(HOByeBye))]..".")
elseif GetProfileName(User.iProfile) == "Master" then
SendToAll(Bot,"Master "..User.sName.." "..OPByeBye[random(1, getn(OPByeBye))]..".")
elseif GetProfileName(User.iProfile) == "Moderator" then
SendToAll(Bot,"Moderator "..User.sName.." "..OPByeBye[random(1, getn(OPByeBye))]..".")
elseif GetProfileName(User.iProfile) == "Operator" then
SendToAll(Bot,"Operator "..User.sName.." "..OPByeBye[random(1, getn(OPByeBye))]..".")
end
end
QuoteOriginally posted by Untouchable
Ok, just started to use the NXS-3 script for my hub, but it has no hubowner\op\vip\reg join script, so i decided to make one myself.. works fine for hubowner\ops\vips, but not for regs?
function OpConnected(user)
if user.iProfile == 0 then
SendToAll(frmHub:GetHubName(), "-== Attention! The hubowner "..user.sName.." has entered the hub. ==-")
elseif user.iProfile == 1 then
SendToAll(frmHub:GetHubName(), "Attention! Operator "..user.sName.." has just connected to this hub. ")
elseif user.iProfile == 2 then
SendToAll(frmHub:GetHubName(), "The VIP "..user.sName.." has just connected to this hub")
elseif user.iProfile == 3 then
SendToAll(frmHub:GetHubName(), "The registered user "..user.sName.." has just connected")
end
end
Made a Lite version of my two earlier post, which do the thing you tried to do.
-- ???????????????????????
-- ? Welcome-AI Lite ?
-- ? Made by: blackwings ?
-- ???????????????????????
Bot="?Welcome-AI?"
hubowner = "blackwings"
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(User)
if GetProfileName(User.iProfile) == "VIP" then
SendToAll(Bot,"The VIP "..User.sName.." has just connected to this hub")
elseif GetProfileName(User.iProfile) == "Reg" then
SendToAll(Bot,"The registered user "..User.sName.." has just connected")
end
end
function OpConnected(User)
if GetProfileName(User.iProfile) == "Master" and User.sName == hubowner then
SendToAll(Bot,"-== Attention! The hubowner "..User.sName.." has entered the hub. ==-")
elseif User.bOperator then
SendToAll(Bot,"Attention! Operator "..User.sName.." has just connected to this hub.")
end
end
This seems 2 b the easiest way to do this (not tested!):
function OpConnected(user)
if user.iProfile == 0 then
SendToAll(frmHub:GetHubName(), "-== Attention! The hubowner "..user.sName.." has entered the hub. ==-")
elseif user.iProfile == 1 then
SendToAll(frmHub:GetHubName(), "Attention! Operator "..user.sName.." has just connected to this hub. ")
elseif user.iProfile == 2 then
SendToAll(frmHub:GetHubName(), "The VIP "..user.sName.." has just connected to this hub")
elseif user.iProfile == 3 then
SendToAll(frmHub:GetHubName(), "The registered user "..user.sName.." has just connected")
end
end
OpConnected=NewUserConnected