ok i found the one i was after but it needs converting(if you can help
 

ok i found the one i was after but it needs converting(if you can help

Started by Tw?sT?d-d?v, 22 May, 2005, 23:02:27

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tw?sT?d-d?v

would it be at possible for some one to convert this script please .. and alter it a bit so it only sends a message to certain profiles  
-- timed mass message from text by ??????Hawk??????
-- create a massmessage.txt file in the scripts directory
-- containing your message


SendEvery = 1   ----  time in hrs
textfile = "massmessage.txt"
bot = "Mass_Message"
hrs = 1000 * 60 * 60 * SendEvery


function Main()
	SetTimer(hrs)
	StartTimer()
end



function OnTimer()
	massMessageToAll()
end




function massMessageToAll() 
local handle = io.open(textfile, "r") 
	if (handle ~= nil) then 
		local line = read(handle) 
                  Temptimerfile = "\r\n"
		while line do 
			Temptimerfile = Temptimerfile.."\r\n"..line
			line = read(handle) 
		end 
			SendPmToAll(bot, Temptimerfile) 
		closefile(handle) 
	end 
end

THX

Dessamator

#1
--Lua 5 By Dessamator(added message To Profile)
-- timed mass message from text by ?˜”??•Hawk•??”˜?
-- create a massmessage.txt file in the scripts directory
-- containing your message


SendEvery = 1   ----  time in hrs
textfile = "massmessage.txt"
bot = frmHub:GetHubBotName()--"Mass_Message"
hrs = 1000 * 60 * 60 * SendEvery
ProfileNumber= -1 -- type here the profile u wish to send to


function Main()
	SetTimer(hrs)
	StartTimer()
end


function OnTimer()
	local handle = io.open(textfile, "r") 
	if (handle ~= nil) then 
                  Temptimerfile = "\r\n"
		for line in io.lines(textfile) do 
			Temptimerfile = Temptimerfile.."\r\n"..line
			io.read() 
		end 
		for pos,user in frmHub:GetOnlineUsers(ProfileNumber) do		
			user:SendPM(bot, Temptimerfile) 
		end
		io.close() 
	end 
end
 
Done !
Ignorance is Bliss.

Tw?sT?d-d?v


Dessamator

Ignorance is Bliss.

SMF spam blocked by CleanTalk