+hel and opmessages
 

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

+hel and opmessages

Started by gizmo, 06 February, 2004, 22:36:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gizmo

hi i want a script who shows the op a messages when they login is it possible

kepp

BOT = "Botname"

msg = [[ Add some nice text here, This will be sent
to OPS only ]]


function OpConnected(user)
   user:SendData(BOT, msg)
end
Guarding    

gizmo


gizmo

its been very messy in the message is it possible to call a txt file called oprules.txt in stead to ops ??

BlazeXxX

-- Requested by Gizmo
-- Written By BlazeXxX

Bot = "WelcomeBot"
function Main()
frmHub:RegBot(Bot)
end

function function OpConnected(curUser)
readfrom("Welcome.txt")
local message = ""
while 1 do
local line = read()
if (line == nil) then break else
message = message..line.."\r\n"
end
end
curUser:SendPM(Bot,message)
end

NightLitch

well I think there is one function to much there BlazeXxX :-)
//NL

kepp

-- Requested by Gizmo 
-- Written By BlazeXxX 

Bot = "WelcomeBot"

function Main() 
   frmHub:RegBot(Bot) 
end 

function OpConnected(curUser) 
readfrom("Welcome.txt") 
local message = "" 
   while 1 do 
   local line = read() 
      if (line == nil) then break else 
      message = message..line.."\r\n" 
      end 
   end 
   curUser:SendPM(Bot,message) 
end
Guarding    

NightLitch

Nice Kepp always there fixing the minimum error.   :-)

hunting post are ya!  :-p hehe (no harm in that) :-)

Cheers m8, Am drinking some vodka with ice here and bubble water. hahaha... if you know can understand what i mean
with that. (socker dricka in swedish) lol
//NL

gizmo

nice =)  damn your fast with replie script =)

kepp

he he, Getting "full"? lol

Yea, i like the samll errors, they're easy to fix, while the big ones are in other projects
Guarding    

gizmo

how do i make a script who calls help.txt or txt files

nErBoS

Hi,

Use this eg....

--- Requested by gizmo ---- 
--- Made by nErBoS ------ 

help = "help.txt"

function Readtextfile(user, file)
   	local filecontents = ""
	local handle = openfile(file, "r")
	if (handle ~= nil) then
		local line = read(handle)
		while line do
        	filecontents = filecontents..line.."\r\n"
		line = read(handle)
		end
		closefile(handle)
      	user:SendPM(Bot, filecontents)
	end
end

function CallText (user, data)
	Readtextfile(user, help)
end

Best regards, nErBoS
--## nErBoS Spot ##--

plop

there is a tiny error in all of these scripts.
doesn't cause any big error but it just isn't nice.
none of them send the end pipe.

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

kepp

Ok, a question, What's the end pipe good for if not needed? That's my questions... :S
and if it is needed, What problems may it cause,

-1 on the text it reads?
Guarding    

SMF spam blocked by CleanTalk