PtokaX forum

Archive => Archived 5.1 boards => Help with scripts => Topic started by: virusel2013 on 14 August, 2007, 21:13:59

Title: PM on connect
Post by: virusel2013 on 14 August, 2007, 21:13:59
hi.
help me please with script
--[[ PM to user on connection by Mozzilla™
Requested by ScAnDaL

Will send a PM to users when they connect to the hub
]]

Cfg = {
-- Mesage to send ["" = none/use extenal file]
Message = "",
-- Path/filename of login message file ["" = none/use scripted Message]
File = "Login.txt",
}
message=[[

What you write appears for the \o/ user, with "quotes" and \\back/forward slashes//.
]]

who = frmHub:GetHubBotName()
what = frmHub:GetHubName()

function NewUserConnected(user)
user:SendPM(who, "")
end

OpConnected=NewUserConnected


the script is working great but when i want to put a message from a file is not working. please what i must to change to this script to work.

the path where ptokax folder is look like that
F:\kituri\kituri\ptokas
Title: Re: PM on connect
Post by: virusel2013 on 15 August, 2007, 11:01:59
Thx Mutor the script is working great
Title: Re: PM on connect
Post by: Giorgos on 17 February, 2008, 23:00:47
Could someone please update this script so it works on the new API and maybe add a profile table and a timer for how often it will be sent? Or maybe point me in the right direction towards a script that will do this. I am trying to get the unregistered users in one of my hubs to register and see some info on the hub/network when they connect and every third hour or so... Thanks in advance  :D
Title: Re: PM on connect
Post by: Giorgos on 19 February, 2008, 23:55:45
That seems like a very nice script but I don't think I will be able to modify it to fit my needs... See I only want a scheduled message for unregged users. The message I use has some info on the network and encourages users to register themselves to enjoy some of the perks of being a registered user and to check out the other hubs in the network. I tried editing the lua to show my scheduled message but every time I try to modify it, something goes wrong =p


How should I modify:

local Msg = user.sNick.. " you are required to register "..
"in this hub. PM an operator for registration. "


to be able to use my own message?
Title: Re: PM on connect
Post by: Giorgos on 20 February, 2008, 01:08:15
Wohoo! Seems to be working great. Thanks a lot Mutor  :D