Merge scripts, witk too timers...
 

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

Merge scripts, witk too timers...

Started by servaks, 27 October, 2003, 15:54:28

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

servaks

Im too lame to do this, som plz help me...

BotName = "InfoBot"
TimeSpanInMinutes = 60
function Main()
SetTimer(TimeSpanInMinutes*60000)
StartTimer()
end

function OnTimer()
SendToAll(BotName, "============="..frmHub:GetHubName().."============|      ::Huba maajaslapa:    www.hub.lv/|      ::Huba Forums:          http://forum.hub.lv/|      ::Huba Rules:              http://www.hub.lv/info.php|      ::Huba Galerija:           http://gallery.hub.lv/|      ::Huba F.A.Q:              http://www.hub.lv/faq.php|      ::Huba Chats:              irc.delfi.lv #lv.hub|      ::Huba sloti:                 min.slotu skaits 3 uz katru hubu, maks. 10 hubi = 30 sloti|      ::Huba Addrese:          alfa.hub.lv:3412 vai 62.85.47.106:3412 un omega.hub.lv:5412")
SendToAll(BotName, "============"..frmHub:GetUsersCount().." of "..frmHub:GetMaxUsers().." Users Connected=============")
end

AND

sRecordFile = "hubstats//records.txt"

iShareAllTime = ""
iUserAllTime  = ""


function Main()
  SetTimer(2731)
  StartTimer()
end

function OnTimer()

  local hFile
  local uptms
  local sec = clock()
  local days = floor(sec/86400)
  local hrs = floor((sec-(days*86400))/3600)
  local min = floor((sec-(days*86400)-(hrs*3600))/60)
  local uptms

  uptms = days.." days, "..hrs.." hours, "..min.." minutes."

  ReadRecords()

  hFile = openfile("..\\html\\webstats\\uptimeplus", "w")
  if (hFile) then
    write(hFile, uptms..iShareAllTime..iUserAllTime)
    closefile(hFile)
  end

end

function ReadRecords()
  local flRecordFile = openfile(sRecordFile, "r")

  if (flRecordFile) then
    _, _, iShareAllTime = strfind(read(flRecordFile), "^share=(%d+)$")
    _, _, iUserAllTime = strfind(read(flRecordFile), "^users=(%d+)$")
    closefile(flRecordFile)
    iShareAllTime="\n"..iShareAllTime
    iUserAllTime="\n"..iUserAllTime
  end
end

PLZ PLZ PLZ, merge theese scripts...  :rolleyes:

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


OpiumVolage

Look here and use RegTimer more than one time :)

servaks

Maby you can fiz it please..
Im too LAME  ?(
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

Why? have you even tried?
Resistance is futile!

servaks

Nop...
I can't understand the HOW-TO..

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


SMF spam blocked by CleanTalk