Conversion request
 

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

Conversion request

Started by gOOfus, 04 July, 2005, 08:30:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gOOfus

I've looked all over for an LUA5 update for this script with no luck. I know it must be an easy one but I haven't a clue how to do it. I use it for a "This Day in Music History" announcer.    TIA

code:-----------------------------------------------------------------------------------
enemas vaarda dienu bots
--- Requested by mazmaajinsh
--- Date - 21.12.2004, fixed time bug and few spelling bugs in 22.12.2004
--- time format - ["c:x:y:z"] c = month, x = days, y = hours, z = minutes
--------------------------------------------------------

iMin = 1000*60

tTime = { --["timestring"] = "show this string"
   ["12:01:00:01"] = "Shodien vaarda dienas svin Arnolds un Emanuels!!!",
   ["12:02:00:01"] = "Shodien vaarda dienas svin Meta un Sniedze!!!",
   ["12:03:00:01"] = "Shodien vaarda dienas svin Evija, Raita un Jogita!!!",
   ["12:04:00:01"] = "Shodien vaarda dienas svin Baiba, Barbara un Barba!!!",
   ["12:05:00:01"] = "Shodien vaarda dienas svin Sabiine, Sarma un Klaudijs!!!",
   ["12:06:00:01"] = "Shodien vaarda dienas svin Nikolajs, Niklaavs un Niks!!!",
   ["12:07:00:01"] = "Shodien vaarda dienas svin Antonija, Anta un Dzirkstiite!!!",
   ["12:08:00:01"] = "Shodien vaarda dienas svin Gunaars, Vladimirs un Gunis!!!",
   ["12:09:00:01"] = "Shodien vaarda dienas svin Sarmiite un Tabita!!!",
   ["12:10:00:01"] = "Shodien vaarda dienas svin Guna un Judiite!!!",
   ["12:11:00:01"] = "Shodien vaarda dienas svin Voldemaars, Valdemaars un Valdis!!!",
   ["12:12:00:01"] = "Shodien vaarda dienas svin Otiilija un Iveta!!!",
   ["12:13:00:01"] = "Shodien vaarda dienas svin Luucija un Veldze!!!",
   ["12:14:00:01"] = "Shodien vaarda dienas svin Auseklis un Gaisma!!!",
   ["12:15:00:01"] = "Shodien vaarda dienas svin Johanna, Hanna un Jana!!!",
   ["12:16:00:01"] = "Shodien vaarda dienu svin Alviine!!!",
   ["12:17:00:01"] = "Shodien vaarda dienas svin Hilda un Teiksma!!!",
   ["12:18:00:01"] = "Shodien vaarda dienas svin Kristaps, Krists, Klinta, Kristofers un Kristers!!!",
   ["12:19:00:01"] = "Shodien vaarda dienas svin Lelde un Sarmis!!!",
   ["12:20:00:01"] = "Shodien vaarda dienas svin Arta un Minjona!!!",
   ["12:21:00:01"] = "Shodien vaarda dienas svin Toms, Tomass un Saulceriite!!!",
   ["12:22:00:01"] = "Shodien vaarda dienu svin Saulvedis!!!",
   ["12:23:00:01"] = "Shodien vaarda dienas svin Viktorija un Balva!!!",
   ["12:24:00:01"] = "Shodien vaarda dienas svin Aadams un Ieva!!!",
   ["12:25:00:01"] = "Shodien vaarda dienas svin Stella un Larisa!!!",
   ["12:26:00:01"] = "Shodien vaarda dienas svin Dainuviite, Gija un Megija!!!",
   ["12:27:00:01"] = "Shodien vaarda dienas svin Elmaars, Helmaars un Inita!!!",
   ["12:28:00:01"] = "Shodien vaarda dienas svin Inga, Ivita, Irvita un Ingeborga!!!",
   ["12:29:00:01"] = "Shodien vaarda dienas svin Solveiga un Ilgona!!!",
   ["12:30:00:01"] = "Shodien vaarda dienas svin Daavids, Daavis, Daaniels un Daniela!!!",
   ["12:31:00:01"] = "Shodien vaarda dienas svin Silvestrs, Silvis un Kalvis!!!" }
--------------------------------------------------------
bot = "Vaarda_dienu_bots"

function Main()
   current = date("%m:%d:%H:%M")
   SetTimer(iMin)
   StartTimer()
end
--------------------------------------------------------
function OnTimer()
   current = date("%m:%d:%H:%M")
   if tTime[current] then
      SendToAll(bot, tTime[current] )
      SendToAll("$HubName "..frmHub:GetHubName().." - "..tTime[current])
   end

end--------------------------------------------------------------------------------


blackwings

this should be enough, change =
current = date("%m:%d:%H:%M")
to this =
current = os.date("%m:%d:%H:%M")


Markitos

Otherwise is the script converted
-----------------------------------------------------------------------------------
--- enemas vaarda dienu bots
--- Requested by mazmaajinsh
--- Date - 21.12.2004, fixed time bug and few spelling bugs in 22.12.2004
--- time string.format - ["c:x:y:z"] c = month, x = days, y = hours, z = minutes
--- Lua 5 version
--------------------------------------------------------

iMin = 1000*60

tTime = { --["timestring"] = "show this string"
["12:01:00:01"] = "Shodien vaarda dienas svin Arnolds un Emanuels!!!",
["12:02:00:01"] = "Shodien vaarda dienas svin Meta un Sniedze!!!",
["12:03:00:01"] = "Shodien vaarda dienas svin Evija, Raita un Jogita!!!",
["12:04:00:01"] = "Shodien vaarda dienas svin Baiba, Barbara un Barba!!!",
["12:05:00:01"] = "Shodien vaarda dienas svin Sabiine, Sarma un Klaudijs!!!",
["12:06:00:01"] = "Shodien vaarda dienas svin Nikolajs, Niklaavs un Niks!!!",
["12:07:00:01"] = "Shodien vaarda dienas svin Antonija, Anta un Dzirkstiite!!!",
["12:08:00:01"] = "Shodien vaarda dienas svin Gunaars, Vladimirs un Gunis!!!",
["12:09:00:01"] = "Shodien vaarda dienas svin Sarmiite un Tabita!!!",
["12:10:00:01"] = "Shodien vaarda dienas svin Guna un Judiite!!!",
["12:11:00:01"] = "Shodien vaarda dienas svin Voldemaars, Valdemaars un Valdis!!!",
["12:12:00:01"] = "Shodien vaarda dienas svin Otiilija un Iveta!!!",
["12:13:00:01"] = "Shodien vaarda dienas svin Luucija un Veldze!!!",
["12:14:00:01"] = "Shodien vaarda dienas svin Auseklis un Gaisma!!!",
["12:15:00:01"] = "Shodien vaarda dienas svin Johanna, Hanna un Jana!!!",
["12:16:00:01"] = "Shodien vaarda dienu svin Alviine!!!",
["12:17:00:01"] = "Shodien vaarda dienas svin Hilda un Teiksma!!!",
["12:18:00:01"] = "Shodien vaarda dienas svin Kristaps, Krists, Klinta, Kristofers un Kristers!!!",
["12:19:00:01"] = "Shodien vaarda dienas svin Lelde un Sarmis!!!",
["12:20:00:01"] = "Shodien vaarda dienas svin Arta un Minjona!!!",
["12:21:00:01"] = "Shodien vaarda dienas svin Toms, Tomass un Saulceriite!!!",
["12:22:00:01"] = "Shodien vaarda dienu svin Saulvedis!!!",
["12:23:00:01"] = "Shodien vaarda dienas svin Viktorija un Balva!!!",
["12:24:00:01"] = "Shodien vaarda dienas svin Aadams un Ieva!!!",
["12:25:00:01"] = "Shodien vaarda dienas svin Stella un Larisa!!!",
["12:26:00:01"] = "Shodien vaarda dienas svin Dainuviite, Gija un Megija!!!",
["12:27:00:01"] = "Shodien vaarda dienas svin Elmaars, Helmaars un Inita!!!",
["12:28:00:01"] = "Shodien vaarda dienas svin Inga, Ivita, Irvita un Ingeborga!!!",
["12:29:00:01"] = "Shodien vaarda dienas svin Solveiga un Ilgona!!!",
["12:30:00:01"] = "Shodien vaarda dienas svin Daavids, Daavis, Daaniels un Daniela!!!",
["12:31:00:01"] = "Shodien vaarda dienas svin Silvestrs, Silvis un Kalvis!!!" }
--------------------------------------------------------
bot = "Vaarda_dienu_bots"

function Main()
current = os.date("%m:%d:%H:%M")
SetTimer(iMin)
StartTimer()
end
--------------------------------------------------------
function OnTimer()
current = os.date("%m:%d:%H:%M")
if tTime[current] then
SendToAll(bot, tTime[current] )
SendToAll("$HubName "..frmHub:GetHubName().." - "..tTime[current])
end

end
--------------------------------------------------------------------------------


Cheers...

gOOfus

Great,, thank you! I had a feeling it would be easy.. I'll try it out today.

SMF spam blocked by CleanTalk