PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: anubis_say on 09 January, 2004, 21:35:46

Title: Welcome Message PM
Post by: anubis_say on 09 January, 2004, 21:35:46
Hi again!

I need script :]

A welcome message with private message!
When i enter the hub, ive got a PM with some information!

Thx :)
Title:
Post by: plop on 09 January, 2004, 21:44:00
QuoteOriginally posted by anubis_say
Hi again!

I need script :]

A welcome message with private message!
When i enter the hub, ive got a PM with some information!

Thx :)
sorry for the short answer but i lost count on the amount of scripts like that witch are posted here on the forum.
a simple search with the string "welcome" should @ least return 10 scripts.
if you don't find the script witch matches your wishes, then post the 1 witch comes closest here and state your requests on what you want 2 have changed.

plop
Title:
Post by: kepp on 09 January, 2004, 21:47:36
function NewUserConnected(user)
readfrom("pmmsg.txt")
   while 1 do
    local line = read()
        if line == nil then break end
        user:SendPM(Bot,line)
        end
        readfrom()
end

pmmsg.txt in the script folder
Title:
Post by: anubis_say on 09 January, 2004, 21:49:35
QuoteOriginally posted by kepp
function NewUserConnected(user)
readfrom("pmmsg.txt")
   while 1 do
    local line = read()
        if line == nil then break end
        user:SendPM(Bot,line)
        end
        readfrom()
end

pmmsg.txt in the script folder

Thx for the fast reply
Title:
Post by: anubis_say on 09 January, 2004, 21:58:57
Not working  :(
Title:
Post by: kepp on 09 January, 2004, 22:05:30
Sorry, Forgot something
Bot = "Your Bot Name"

function NewUserConnected(user)

readfrom("pmmsg.txt")

   while 1 do

    local line = read()

        if line == nil then break end

        user:SendPM(Bot,line)

        end

        readfrom()

end
Title:
Post by: anubis_say on 09 January, 2004, 22:08:15
hmmm

USer ok...

Maybe when op entering the hub?...

i dont get the massage, but users get!

pls, i want --> not only users, ops and vips as well!

sry for bad english!

thx
Title:
Post by: anubis_say on 09 January, 2004, 22:48:00
Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `OpConnected' at line 34 [file `C:\SaveZ\ptokax\scripts\pmop.lua']

?
Title:
Post by: anubis_say on 09 January, 2004, 23:00:42
Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `OpConnected' at line 34 [file `C:\SaveZ\ptokax\scripts\pmop.lua']

:((
Title:
Post by: anubis_say on 09 January, 2004, 23:02:49
User ok, but op dont get this message!

and Syntax error: attempt to perform arithmetic on a nil value
stack traceback:
   1:  function `OpConnected' at line 34 [file `C:\SaveZ\ptokax\scripts\pmop.lua']
Title:
Post by: kepp on 09 January, 2004, 23:02:58
Bot = "Test"

function NewUserConnected(user)
readfrom("pmmsg.txt")
while 1 do
local line = read()
if line == nil then break end
user:SendPM(Bot,line)
end
readfrom()
end

function OpConnected(user)
NewUserConnected(user)
end

if you want PM in a window the bot has to be regged

then this is what you want
Bot = "Test"

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user)
readfrom("pmmsg.txt")
while 1 do
local line = read()
if line == nil then break end
user:SendPM(Bot,line)
end
readfrom()
end

function OpConnected(user)
NewUserConnected(user)
end
Title:
Post by: anubis_say on 09 January, 2004, 23:09:53
Not good!

But
Bot = "Test"

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user)
readfrom("pmmsg.txt")
      while 1 do
      local line = read()
      if line == nil then break end
      user:SendPM(Bot,line)
   end
   readfrom()
end

function OpConnected(user)
NewUserConnected(user)
end


THX :)