Onjoin message for different profiles
 

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

Onjoin message for different profiles

Started by (????H??v?????v?L????), 07 July, 2004, 16:15:13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

(????H??v?????v?L????)

Hi,

i would like a script that can send different message's to different user profiles wen a user logs in.

thanx Heavens Devil :)

(soz if there is a script that all ready does this but i could not find it in a search)

((UKSN))shad_dow

for radom intro/outs for diffetn profiles try:-

Random Welcome for Ops/Vips


and here:-

Random intro/outro by chaggydawg

or give vips/op there own welcomes
:-

Intro/Outro for Specific Users

hope thses help

yours
shad
creator of Therapy-X? bot

(????H??v?????v?L????)

Hi,

soz i did not explain wot i wanted the bot to do.

i would like the bot to send a pm to different profiles wen they log in,

example,

op logs in = the bot would send a message from a textfile to the op

vip logs in = the bot would send a different text file to the vip

and so on...

hope that helps  :)

thanx Heavens Devil :)

plop

QuoteOriginally posted by (????H??v?????v?L????)
Hi,

soz i did not explain wot i wanted the bot to do.

i would like the bot to send a pm to different profiles wen they log in,

example,

op logs in = the bot would send a message from a textfile to the op

vip logs in = the bot would send a different text file to the vip

and so on...

hope that helps  :)

thanx Heavens Devil :)

check out my texter 4.x.

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

((UKSN))shad_dow

LO Plop see u beat me to it again PMFSL

yours shad
creator of Therapy-X? bot

(????H??v?????v?L????)

Hi again,

Thanx Shad and Plop for the fast answers and help :)

I have 1 prob with the script, Every time i type +help in pm to the bot it disconnect's me

Herodes

here u go man I think this is quite working for u ...

--- Profile Txt Intro  ?   requested by (????H??v?????v?L????)
--- by Herodes 

--- --- ^^ Notes ^^ ---
--- --- U will need a folder named TxtIntros in the  ' scripts ' folder and the corresponding files ... ( just create some new txts and rename them )
--- --- of your PtokaX folder ( is in the same place where  PtokaX.exe is found  )
--- --- Pls keep in mind that the profiles used are for the default ( 0 - 4 )
--- --- Remedy for any profile configuration besides the default is possible, but I don't have time for that .. :P ( look in scripting.txt and use imagination ... Hint : PtokaX's Profile Functions )


botsName = "NewsForYou"				--- this is the variable we will be using for the Name of the bot ...  ( it needs to be registered because it needs to appear online to send PM ... )
						--- --- This can be changed to whatever u want ...  :D

tProfiles = { 
	["Master"] = "TxtIntros/Master.txt", 		--- Master Profile Number is :	0		--- You can add more profiles here ...
	["Operator"] = "TxtIntros/Operators.txt",		--- Op Profile Number is :	1		--- or modify these to match your own profile names ... 	
	["Vip"] = "TxtIntros/VIP.txt",			--- Vip Profile Number is : 	2		--- just remember to keep the  ["ProfileName"] = "path/path.txt" format 
	["Reg"] = "TxtIntros/Reg.txt",			--- Reg Profile Number is :	3		
};

function Main()
frmHub:UnregBot(botsName)				--- Unreg the Bot from the NickList, ( using the string defined by the ' botsName ' value )
frmHub:RegBot(botsName)				--- and Register it again ... ( using the string defined by the ' botsName ' value, again )
end

function OpConnected(user) 
NewUserConnected(user)
end 

function NewUserConnected(user)
for prName, txtfile in tProfiles do			--- for every index ( represented by variable "prName", in this case) and its responding value in the Table ( tprofiles, in this case )
	if ( GetProfileName(user.iProfile) == prName ) then  		--- --- if the profile Name returned by PtokaX's GetProfileName(profile_idx) function** matches the prName variable string in the table then
							--- --- ** ( get's profile name by profile index=[number])
		user:SendPM(botsName, ReadTextFile(txtfile))	--- --- send a PM to the user from "botsName" with the data returned by the action in the "action" ( stated as responding value above ) 
	end						--- --- end of the ' if ' statement
end						--- end of the ' for ' statement
end						--- end of the function

function ReadTextFile(file)
local message = "\r\n"			--- a local variable* will hold the message that will be formed 
readfrom(file, "r")				--- input defined from variable " file " and on read mode (the "r" part)
while 1 do				--- if there is data in a line 
local 	line = read()			--- then get this data ( locally, since it is for using it in this loop only ) 
	if ( line == nil ) then break			--- --- note that if data from a line does not exist then break our loop
	else	message = message..line.."\r\n"	--- --- in any other case, add it up to our msgdata* ( also using "\r\n" that is in essense a new line ) 
	end					--- --- end of the if statement
end					--- end of the ' while ' loop statment
readfrom()					--- return the input to the default ( stdin )
return message				--- give us the msgdata*
end					--- end the function

(????H??v?????v?L????)

Hi m8,

thanx for that script, not tested it yet but looks like what i am looking for :)

plop

QuoteOriginally posted by ((UKSN))shad_dow
LO Plop see u beat me to it again PMFSL

yours shad
i can edit my post if you want. lol

@ (????H??v?????v?L????): weird never heard any1 having this problem.
would you have some more info like the client you use??

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

Herodes

QuoteOriginally posted by (????H??v?????v?L????)
Hi m8,

thanx for that script, not tested it yet but looks like what i am looking for :)
I tested , it works .. :D
Just be sure you create the folder and the files the script is going for ..

I thought it would be easy to go to sleep ... but i couldn't resist to an easy post .. Lol

going offline  . .

(????H??v?????v?L????)

[/QUOTE]

@ (????H??v?????v?L????): weird never heard any1 having this problem.
would you have some more info like the client you use??

plop
[/QUOTE]

Hi m8 i just changed over to StrongDC

plop

#11
QuoteOriginally posted by (????H??v?????v?L????)
Hi m8 i just changed over to StrongDC
mutor just tested it for me and it worked fine.

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

(????H??v?????v?L????)

QuoteOriginally posted by (????H??v?????v?L????)
Hi again,

Thanx Shad and Plop for the fast answers and help :)

I have 1 prob with the script, Every time i type +help in pm to the bot it disconnect's me


sorry it was a client prob lol

SMF spam blocked by CleanTalk