Hey.. it's me again.. ;-)
I need a script that allows me to have a single welcome text for each user .... I have to be able to insert nick and then make the welcome text.
Plz help me out....
there we go..
botname = "whatever"
welcome = {
-- ["nick"] = "message",
["DoD_Owner"] = "wheee!",
}
function NewUserConnected(user)
local msg = welcome[user.sName]
if msg then SendToAll(botname, msg) end
end
OpConnected = NewUserConnected
I'm probably the n00b here, but I cant make it work..
If I wanna make the bot say "He's back and he's evil"! when the OP [DK]Bobo_2k logs on... then what ??
And what to do if I want one for each OP ? Make 1 script per user or can I combine it all ?
//Shadow
Change the "nick" to the name you want
and the "message" to whatever you want the bot to say.
botname = "WelcomeBot"
welcome = {
-- ["[DK]Bobo_2k"] = "He's back and he's evil",
["DoD_Owner"] = "wheee!",
}
function NewUserConnected(user)
local msg = welcome[user.sName]
if msg then SendToAll(botname, msg) end
end
OpConnected = NewUserConnected
you can also search in the finished scripts section.
SaintSinner and Tezlo
dont get me wrong please
but i think he wants a bot where he can specify user and message for a lot of users.
And this bot is just for 1 user or...
welcome = {
-- ["[DK]Bobo_2k"] = "He's back and he's evil",
--"user" = "message"
--"user" = "message"
--"?ser" = "message"
["DoD_Owner"] = "wheee!",
}
wil this work for him??
so can he add as many users as he prefers this way ?
just trying to learn .
botname = "DaBotname"
welcome = {
["NTF"] = "Hub Owner NTF has entered.",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
[""] = "",
["FakeFinder"] = "FakeFinder has entered the Hub, he will find you all!",
}
function NewUserConnected(user)
local msg = welcome[user.sName]
if msg then SendToAll(botname, msg) end
end
OpConnected = NewUserConnected
And here is the script with userspecific Welcome and Goodbye message
botname = "DaBotname"
welcome = {
["NTF"] = "One of the Hub Owners, NTF, has entered the Hub. Damn! He's a hunk of a man!",
[""] = "",
[""] = "",
["FakeFinder"] = "FakeFinder has entered the Hub, he will find you all!",
}
goodbye = {
["NTF"] = "One of the Hub Owners, NTF, has left the Hub. He was handsome!",
[""] = "",
[""] = "",
["FakeFinder"] = "FakeFinder has left the Hub, he will come back",
}
function NewUserConnected(user)
local msg = welcome[user.sName]
if msg then SendToAll(botname, msg) end
end
function UserDisconnected(user)
local msg = goodbye[user.sName]
if msg then SendToAll(botname, msg) end
end
OpConnected = NewUserConnected
OpDisconnected = UserDisconnected
yep trucker, you can add as many as you want.
plop
Thx for the help all... now it works... great... I owe ya guys ;-)
//Shadow
Question guys, how do make the bot, like in the script that Cid did not show in the users list? I like the welcome and leaving message. or does it have to appear in order for the script to work correctly? Just try to keep the bot appearance down to a min when i can.
Thnx for everything u guys do. I know a simple thank u isn't much sometimes, but its all we got. One day maybe i can learn enough to help the way you all do. Till then, i guess i will watch and learn....
If you have a bot (you probably do).. let's say it's called "Cool-Bot", then simply in all the scripts you add, call the bot the same name... then it all will appear as the same bot...
I hope it was the answer you needed...
//Shadow
Couldn't get any of those welcome scripts to work..at all.
I run Robocop 4 and it seems to not like it at all. I went into the interface of Robocop and unchecked the welcome and goodbye for all the different profiles,restarted the hub and still didn't work. I am a beta tester of the 330 version, maybe it is that, was really looking forward to trying these out though. When i disabled the profiles in Robocop and restarted the hub. No welcome mess was displayed at all. Even though I had the script running. Anybody no how to fix this problem. Pretty sure its Robocop stopping it, just don't know how to get around it....
thnx cid
this bot works fine :-))
Xpman
i have a bot called [guard] this is in fact my main-script
and all external bots i have named [guard]
and they work like a charm :-)
and i work with 0.3.30 build 15.18 and i have no probs at all with this bot.
QuoteOriginally posted by XPMAN
Couldn't get any of those welcome scripts to work..at all.
I run Robocop 4 and it seems to not like it at all. I went into the interface of Robocop and unchecked the welcome and goodbye for all the different profiles,restarted the hub and still didn't work. I am a beta tester of the 330 version, maybe it is that, was really looking forward to trying these out though. When i disabled the profiles in Robocop and restarted the hub. No welcome mess was displayed at all. Even though I had the script running. Anybody no how to fix this problem. Pretty sure its Robocop stopping it, just don't know how to get around it....
have you tryed just running this welcome bot and nothing more.??
plop
I dont run alot of bots, just a few. A couple security bots..including Robocop, and your texterbot. I will try trial and error by disabling the bots one at a time and try to narrow down which one might be causing the problem.
Thanks for the idea though.