PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: witch on 11 July, 2004, 12:49:02

Title: Need script
Post by: witch on 11 July, 2004, 12:49:02
Need script that PM's welcome.txt message on connect to unreg users only.

Thanx  :)
Title:
Post by: plop on 11 July, 2004, 13:39:19
QuoteOriginally posted by witch
Need script that PM's welcome.txt message on connect to unreg users only.

Thanx  :)
check out my texter 3 or 4 serie's.

plop
Title:
Post by: witch on 11 July, 2004, 15:43:46
ok....i get texter v3.0 but still can't sorted out how to set it up for on conncet automatic welcome.txt message on PM to unreg users only.  ?(
Title:
Post by: witch on 11 July, 2004, 17:04:53
anyone  ?(
Title:
Post by: NightLitch on 11 July, 2004, 20:14:04
Have you bother checking this one out ??

LINK (http://board.univ-angers.fr/thread.php?threadid=2293&boardid=12&styleid=1&sid=044a6e8071971bf8d7c0501669535bf4)

This is an advanced welcome message but you can just skip the [USER] etc. triggers and do a simple welcome text.

/NL
Title:
Post by: witch on 11 July, 2004, 23:06:37
..it's great scripts all, but all i looking for is a simple one with only one function.  :rolleyes:
Title:
Post by: Herodes on 11 July, 2004, 23:50:19
I think this should be working ...
I haven't tested it ...
[*edit*] U will need a file named Unregs.txt in the scripts folder ....
--- Unreg Txt Intro  ?   requested by witch --- by Herodes
botsName = "HeyUnreg"
unergs = "Unregs.txt"

function Main()
frmHub:UnregBot(botsName)
frmHub:RegBot(botsName)
end

function NewUserConnected(user)
if ( user.iProfile == -1 ) then
local msg = "\r\n"
readfrom(file, "r")
while 1 do
local line = read()
if ( line == nil ) then break
else msg = msg..line.."\r\n"
end
end
readfrom()
user:SendPM(ReadTextFile(msg)
end
end
Title:
Post by: plop on 12 July, 2004, 10:05:05
QuoteOriginally posted by witch
ok....i get texter v3.0 but still can't sorted out how to set it up for on conncet automatic welcome.txt message on PM to unreg users only.  ?(
sorry my mistake, you need the 4.x serie.

plop
Title:
Post by: witch on 12 July, 2004, 11:21:05
Thanx Herodes for the script! Functionary it's exactly what i need :) but...

Syntax Error: `end' expected (to close `if' at line 34);
  last token read: `elsemsg' at line 36 in file `D:\PtokaX\0.326new\scripts\Unreg.lua'

can u fix it please.

Plop dude thanx for corrections! I will give a try to it too.
Title:
Post by: NightLitch on 12 July, 2004, 12:10:19
here is my simplest Load Text File on Login:

-----------------------------
-- Simple Welcome / By: NightLitch
-----------------------------
BotName = "yourbotnamehere"

File = "YourFileNameHere"

function NewUserConnected(User)
SendPmToNick(sUser.sName,BotName,TextFile(File))
end

function TextFile(file)
readfrom(file, "r")
local message = ""
while 1 do
local line = read()
if line == nil then break
else
message = message..line.."\r\n"
end
end
readfrom()
return message
end

*updated 2 send PM instead *
/NL
Title:
Post by: witch on 12 July, 2004, 12:34:36
Simple the best NightLitch!!! Works fine. But i need send it to PM! Can u change it? Please  :)
Title:
Post by: NightLitch on 12 July, 2004, 12:37:38
fixed.
Title:
Post by: witch on 12 July, 2004, 13:22:46
..still shows on the main, dude!  ?(
Title:
Post by: Herodes on 12 July, 2004, 14:25:36
QuoteOriginally posted by witch
Thanx Herodes for the script! Functionary it's exactly what i need :) but...

Syntax Error: `end' expected (to close `if' at line 34);
  last token read: `elsemsg' at line 36 in file `D:\PtokaX\0.326new\scripts\Unreg.lua'

can u fix it please.

Plop dude thanx for corrections! I will give a try to it too.
I fixed that :D ready to use ..
Title:
Post by: witch on 12 July, 2004, 15:32:12
..would u posted fixed version in here please?  :))
Title:
Post by: Snooze on 12 July, 2004, 15:41:55
I belive he already did :)

--- Unreg Txt Intro  ?   requested by witch --- by Herodes
botsName = "HeyUnreg"
unergs = "Unregs.txt"

function Main()
frmHub:UnregBot(botsName)
frmHub:RegBot(botsName)
end

function NewUserConnected(user)
if ( user.iProfile == -1 ) then
local msg = "\r\n"
readfrom(file, "r")
while 1 do
local line = read()
if ( line == nil ) then break
else msg = msg..line.."\r\n"
end
end
readfrom()
user:SendPM(ReadTextFile(msg)
end
end

QuotePost last edited by Herodes on 12.07.2004, 14:24.
Title:
Post by: witch on 12 July, 2004, 16:09:12
Syntax Error: `)' expected (to close `(' at line 41);
  last token read: `end' at line 43 in file `D:\PtokaX\0.326new\scripts\unregs.lua'
Title:
Post by: Snooze on 12 July, 2004, 16:12:55
Oops - my mistake...

botsName = "HeyUnreg"
unergs = "Unregs.txt"

function Main()
frmHub:UnregBot(botsName)
frmHub:RegBot(botsName)
end

function NewUserConnected(user)
if ( user.iProfile == -1 ) then
local msg = "\r\n"
readfrom(file, "r")
while 1 do
local line = read()
if ( line == nil ) then break
else msg = msg..line.."\r\n"
end
end
readfrom()
user:SendPM(ReadTextFile(msg))
end
end

Sorry about that ;)

Snooze
Title:
Post by: witch on 12 July, 2004, 16:32:52
NON of all this scripts is working!!!  :rolleyes:
Title:
Post by: Snooze on 12 July, 2004, 16:43:58
Hmm.. Looks like this was made in a hurry ..


botsName = "HeyUnreg"
unregs = "Unregs.txt"

function Main()
frmHub:UnregBot(botsName)
frmHub:RegBot(botsName)
end

function NewUserConnected(user)
if ( user.iProfile == -1 ) then
local msg = "\r\n"
readfrom(unregs, "r")
while 1 do
local line = read()
if ( line == nil ) then break
else msg = msg..line.."\r\n"
end
end
readfrom()
user:SendPM(botsName, msg)
end
end

Tested and working ..
Title:
Post by: witch on 12 July, 2004, 17:10:33
Last script is working perfect! My apologies!!!

Thanx to all!  :P
Title:
Post by: Snooze on 12 July, 2004, 17:29:21
Your most welcome :)
Title:
Post by: Herodes on 12 July, 2004, 20:30:09
QuoteOriginally posted by Snooze
Hmm.. Looks like this was made in a hurry ..
[...]
Tested and working ..

Ok thanks for making it work .. .

The reality is that time runs fast when u are expecting a
System shutdown popup lol

NT AUTHORITY/SYSTEM sucks a lot ... ( accessing the net through my family pc ... )

I wonder whos's to blame ... MS?, My father?, my young bro?
probly me ... lol
Title:
Post by: Snooze on 12 July, 2004, 20:38:15
hehe - whats really funny is the amount of time we spend on getting a working script together LOL

oh well.. its there and its working :D

Snooze