timerannuncer?????
 

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

timerannuncer?????

Started by antonio, 16 October, 2005, 14:26:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

antonio

I wish one script type timeannouncer thanks

Dessamator

Ignorance is Bliss.

6Marilyn6Manson6

Mmmm I things this is ok:

--## Simple Time Bot
--## Requested by SteffJay 
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--##	!time - Gives the current time

sBot = "Time-Bot"

function ChatArrival(user, data)
	if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
		data = string.sub(data,1,string.len(data)-1)
		s,e,cmd = string.find(data,"%b<>%s+(%S+)")
		if (cmd == "!time") then
			user:SendData(sBot, GetTime())
		end
	end
end

function GetTime()
	s = os.date("%S")
	h = os.date("%H")
	m = os.date("%M")
	d = os.date("%d")
	mm = os.date("%m")
	y = os.date("%y")
	Date = "Date: "..d.."/"..mm.."/20"..y.." Hour "..h..":"..m..":"..s
	return Date
end

Try this. c ya

Herodes

havent tested due to inability to do so.
--## Simple Time Bot
--## Requested by SteffJay 
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--##	!time - Gives the current time
--- touched by Herodes ( rmvd GetTime() )

sBot = "Time-Bot"

function ChatArrival(user, data)
	if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
		data = string.sub(data,1,string.len(data)-1)
		s,e,cmd = string.find(data,"%b<>%s+(%S+)")
		if (cmd == "!time") then
			user:SendData(sBot, os.date( "Date: %d/%m"/%Y Hour %H:%M:%S" ) )
		end
	end
end

bastya_elvtars

#4
--## Simple Time Bot
--## Requested by SteffJay
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--## !time - Gives the current time
--- touched by Herodes ( rmvd GetTime() )

-- Now it really works in PM. -- // bastya_elvtars
-- Also hacked & optimized a bit.

sBot = "Time-Bot"

function ChatArrival(user, data, bool)
    data = string.sub(data,1,string.len(data)-1)
    local s,e,cmd = string.find(data,"%b<>%s+(%S+)")
    if (cmd == "!time") then
      send=user.SendData
      if bool then send=user.SendPM end
      send(user,sBot, os.date( "Date: %d/%m/%Y Hour %H:%M:%S" ) )
      return 1
    end
end

function ToArrival(user,data)
  if string.sub(data,1,5+string.len(sBot))=="$To: "..sBot then ChatArrival(user,data,true) return 1 end
end

BTW this is not what he wanted. He wanted a timed ad or so.
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

#5
bastya change in your script:

-- Now it really works in PM. -- // basyta_elvtars

with

-- Now it really works in PM. -- // bastya_elvtars

hihihi now tour nick in comment is correct :P c ya

bastya_elvtars

Done. Looks like I am unfamiliar with names. :D
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

Now script is correct :P

antonio

excused but and this that I meant the timerannucer I did not say that I had to write to the inside of the script a phrase that it would have sended in main every tot of time thanks

SMF spam blocked by CleanTalk