hello, i want to know if its possible to have a Lua script that activate from X at X minutes activate the Ptokax inbuilt command !restartscripts.
best regards
BruNeo
yess it should be possible but why do you need this?
if you just press the restartscripts in pkotax it works also
and look in the mainscripts like robo or channelbot they have a command !restartscripts inbuild.
Request that BruNeo wants has come up many a times before. Dont know why he may want the script but I think it would be a good applacation for myself and maybe others.
Running a hub 24/7 (as I and others do) and not being there all the time to restart them, well speaks for itself.
So such a script with a timer is a Good idea.
Hi ppl:
About restarting the scripts (all of them) , i usually make a remote desktop connection for that. ;(
Can you imagine , when the hub is full and the line have few bandwidth left ? 8o
It's impossible...and sometimes i have to wait until the hub have less users to do that. :(
This kind of script is very welcome and it would be AWESOME to have a timer. :D
Hope someone "grabs the ideia" ;)
Sounds like a great idea to me... but how would u send the restartscripts to the hub?
i imagine u would use something like user:SendData(user.sName, "!restartscripts|"
:rolleyes:
ello all .....
try this , sorry untested due to busy times @ home
---- ScriptRestart timer by ((UKSN))shad_dow
Min = 3 -- in minutes (can change the numer from 3 to any number )
Time = Min*60000 --(don't touch)
sBotName = "ScriptRestart" --- ( rename with your hub bots name)
function Main()
SetTimer(Time)
StartTimer()
ReStart()
end
function OnTimer()
ReStart()
end
function ReStart()
SendToAll(sBotName,"Is being restarted On: "..date("%A").." the "..date("%d").."th of "..date("%B").." Time: "..date("%T"))
end
plz leave a messgae if it works or if theres a prob .. thx
((UKSN))shad_dow this aint restarting the scripts! it just sends a message sayin it has :S
in the function ReStart() if u call OnExit() and then Main() this will actually do allmost the exact same as restarting them from the button or typeing !restartscripts but...
this doesnt reset the system settings and only works per script.
so you would have to add this to each script you would like to restart on x time
;)
sBot = "-Restart-Scripts-"
dSecond = 1000
dMinute = 60 * dSecond
dHour = 60 * dMinute
dDay = 24 * dHour
dInterval = 1 * dHour
function Main()
frmHub:RegBot(sBot)
SetTimer(dInterval)
StartTimer()
end
function OnTimer()
restartScripts
end
function restartScripts()
OnExit()
Main()
SendToAll(sBot, "*** Hub Script Restarted!"
end
function OnExit()
end
thankx for the info Corayzon and the help ..
since im only using 1 bot (my own LOL ) this will do nicely .... shame we dont acutuly know the !restartscripts fuction other than its hub scripted , MR Ptokax can u help us here Plz ... (*on knees , grovling to the hubsoft master*) .... ;)
hopefully in the 0330 release there will be something like frmHub:RestartScripts ?(
Hello all,
i get this syntax error:
Syntax error: `=' expected;
last token read: `function' at line 19 in file `...en\Rui Ferreira\Eigene Dateien\LusoArenA\scripts\RestartScripts.lua'
Could someone fix it for me please!?
Thx a lot.
Hi,
Corrected...
sBot = "-Restart-Scripts-"
dSecond = 1000
dMinute = 60 * dSecond
dHour = 60 * dMinute
dDay = 24 * dHour
dInterval = 1 * dHour
function Main()
frmHub:RegBot(sBot)
SetTimer(dInterval)
StartTimer()
end
function OnTimer()
restartScripts()
end
function restartScripts()
OnExit()
Main()
SendToAll(sBot, "*** Hub Script Restarted!")
end
function OnExit()
end
Best regards, nErBoS
Thx a lot my m8. :))