Special Welcome msg when login
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Special Welcome msg when login

Started by DoD_Owner, 07 January, 2004, 02:24:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DoD_Owner

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....
Owner of [??] Dimension of Deamons Private.

A nice private hub ... 100 GB min. share... wanna get regged, pm me.. ;)  (200+ users, 60TB+ share)

tezlo

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

DoD_Owner

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
Owner of [??] Dimension of Deamons Private.

A nice private hub ... 100 GB min. share... wanna get regged, pm me.. ;)  (200+ users, 60TB+ share)

SaintSinner

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.
   


[NL]trucker

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 .
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


Cid

#5
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

Cid

#6
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

plop

yep trucker,  you can add as many as you want.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

DoD_Owner

Thx for the help all... now it works... great... I owe ya guys ;-)

//Shadow
Owner of [??] Dimension of Deamons Private.

A nice private hub ... 100 GB min. share... wanna get regged, pm me.. ;)  (200+ users, 60TB+ share)

XPMAN

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....

DoD_Owner

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
Owner of [??] Dimension of Deamons Private.

A nice private hub ... 100 GB min. share... wanna get regged, pm me.. ;)  (200+ users, 60TB+ share)

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....

[NL]trucker

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.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

XPMAN

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.

SMF spam blocked by CleanTalk