Need script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Need script

Started by witch, 11 July, 2004, 12:49:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

witch

Need script that PM's welcome.txt message on connect to unreg users only.

Thanx  :)



plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

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.  ?(



witch




NightLitch

Have you bother checking this one out ??

LINK

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

/NL
//NL

witch

..it's great scripts all, but all i looking for is a simple one with only one function.  :rolleyes:



Herodes

#6
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

plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

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.



NightLitch

#9
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
//NL

witch

Simple the best NightLitch!!! Works fine. But i need send it to PM! Can u change it? Please  :)



NightLitch

//NL

witch

..still shows on the main, dude!  ?(



Herodes

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 ..

witch

..would u posted fixed version in here please?  :))



Snooze

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.

witch

Syntax Error: `)' expected (to close `(' at line 41);
  last token read: `end' at line 43 in file `D:\PtokaX\0.326new\scripts\unregs.lua'



Snooze

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

witch

NON of all this scripts is working!!!  :rolleyes:



Snooze

#19
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 ..

witch

Last script is working perfect! My apologies!!!

Thanx to all!  :P




Herodes

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

Snooze

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

SMF spam blocked by CleanTalk