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)
for radom intro/outs for diffetn profiles try:-
Random Welcome for Ops/Vips (http://board.univ-angers.fr/thread.php?threadid=1912&boardid=11&sid=cb1815be9291593405dffb0ce1b187c3)
and here:-
Random intro/outro by chaggydawg (http://217.120.180.188/Forum4/redirect.php?dlid=86&PHPSESSID=fb846b41b434e8747b6ee54b456ca402)
or give vips/op there own welcomes
:-
Intro/Outro for Specific Users (http://board.univ-angers.fr/thread.php?threadid=1602&boardid=6&sid=cb1815be9291593405dffb0ce1b187c3)
hope thses help
yours
shad
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 :)
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
LO Plop see u beat me to it again PMFSL
yours shad
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
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
Hi m8,
thanx for that script, not tested it yet but looks like what i am looking for :)
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
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 . .
[/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
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
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