Author Topic: simple welcome script  (Read 574 times)

0 Members and 1 Guest are viewing this topic.

Offline hawaj

  • Junior Member
  • **
  • Posts: 11
  • Karma: +0/-0
simple welcome script
« on: 07 July, 2021, 12:24:12 »
hi iam looking fore simple welcome msg on log in script for all users (reg , unreg , etc)
with couple welcome msgs
can any1 help me with that script ????

best regards

PtokaX forum

simple welcome script
« on: 07 July, 2021, 12:24:12 »

Offline ATAG

  • Scripter
  • Double Ace
  • ******
  • Posts: 114
  • Karma: +14/-0
  • secret things
    • Metin2 Hungarian Forum
Re: simple welcome script
« Reply #1 on: 09 September, 2021, 15:01:12 »
Like this?
Code: [Select]
-- px_simple-welcome.lua /ATAG
-- Send welcome messages randomly

tMessages = {
"This is the first welcome message for you, have a nice day.",
[[a multiline
message looks
like this
if you want :)]],
"this is an other one...",
"you can use only static text this way.",
"Don't forget the comma at the end of line",
"And don't use quotation mark in the message :)",
}

function UserConnected(tUser)
--math.randomseed(os.time())
local i = math.random(1,table.getn(tMessages))
Core.SendToUser(tUser, "<"..SetMan.GetString(21).."> "..tMessages[i])
end
-- comment it to disable for reg users
Regconnected = UserConnected
-- comment it to disable for operators
OpConnected = UserConnected
« Last Edit: 09 September, 2021, 15:20:51 by ATAG »

PtokaX forum

Re: simple welcome script
« Reply #1 on: 09 September, 2021, 15:01:12 »