PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: jiten on 03 May, 2005, 20:45:25

Title: Rotating Message
Post by: jiten on 03 May, 2005, 20:45:25
-- Rotating Message 1.1 by jiten for PtokaX 0.3.3.0 build 17.02 or Higher
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval
--
--User Settings---------------------------------------------------------------------
mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 1, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
-- Don't change this
iCnt = 1,
tPrefixes = {},
--------------------
}

sFile = { -- put here the files you want to send
"txt/file1.txt",
"txt/file2.txt",
"txt/file3.txt",
"txt/file4.txt",
}
--End User Settings-----------------------------------------------------------------

Main = function()
for a,b in pairs(frmHub:GetPrefixes()) do mSet.tPrefixes[b] = 1 end
SetTimer(mSet.iDelay*60*1000)
StartTimer()
end

ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,sPrefix,cmd = string.find(sData, "%b<>%s*(%S)(%S+)")
if sPrefix and mSet.tPrefixes[sPrefix] then
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
OnTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
end
end
end
end

OnTimer = function()
if mSet.RunStatus == 1 then
for i = 1, table.getn(sFile) do
if i == mSet.iCnt then
local f,tmp = io.open(sFile[i],"r"),""
if f then
tmp = f:read("*a")--
tmp = string.gsub(tmp,"|",string.char(166))
tmp = string.gsub(tmp,"\n","\r\n")
f:close()
SendToAll(mSet.sBot,"\r\n"..tmp)
end
if table.getn(sFile) == i then
mSet.iCnt = 1
else
mSet.iCnt = i + 1
end
break
end
end
end
end
Title:
Post by: Dessamator on 03 May, 2005, 20:48:41
hmmm, well done, very compact, ;)
Title:
Post by: dkt on 04 May, 2005, 13:21:16
mSet = {
   sBot = frmHub:GetHubBotName(),   -- Bot Name
   RunStatus = 1,         -- Auto Start -> 1=ON 0=OFF
   iDelay = 30,         -- Delay between each text file in minutes
   -- Don't change this
   iCnt = 1,
   tPrefixes = {},
   --------------------
}

sFile = { -- put here the files you want to send
   "txt/file1.txt",
   "txt/file2.txt",
   "txt/file3.txt",
   "txt/file4.txt",
}
--End User Settings-----------------------------------------------------------------

Main = function()
   for a,b in pairs(frmHub:GetPrefixes()) do mSet.tPrefixes = 1 end
   SetTimer(mSet.iDelay*60*1000)
   StartTimer()
end

ChatArrival = function(sUser, sData)
   sData=string.sub(sData,1,-2)
   local s,e,sPrefix,cmd = string.find(sData, "%b<>%s*(%S)(%S+)")
   if sPrefix and mSet.tPrefixes[sPrefix] then
      if sUser.bOperator then
         local tCmds = {
         ["adon"] =   function(user,data)
                  mSet.RunStatus = 1
                  user:SendData(mSet.sBot,"Messages started...")
                  OnTimer()
               end,
         ["adoff"] =   function(user,data)
                  mSet.RunStatus = 0
                  user:SendData(mSet.sBot,"Messages stopped...")
               end,
         }
         if tCmds[cmd] then
            return tCmds[cmd](sUser,sData),1
         end
      end
   end
end

OnTimer = function()
   if mSet.RunStatus == 1 then
      for i = 1, table.getn(sFile) do
         if i == mSet.iCnt then
            local f,tmp = io.open(sFile,"r"),""
            if f then
               tmp = f:read("*a")--
               tmp = string.gsub(tmp,"|",string.char(166))
               tmp = string.gsub(tmp,"\n","\r\n")
               f:close()
               SendToAll(mSet.sBot,"\r\n"..tmp)
            end
            if table.getn(sFile) == i then
               mSet.iCnt = 1
            else
               mSet.iCnt = i + 1
            end
            break
         end
      end
   end
end

---------------
i get this error
---------------

Syntax E:\0.3.3.0.B16.09.9X.RLS\scripts\rm.lua:20: attempt to call method `GetPrefixes' (a nil value)
Title:
Post by: Dessamator on 04 May, 2005, 14:13:47
that script only works with the newest ptokax, upgrade and try again !!
Title:
Post by: jiten on 04 May, 2005, 17:15:10
QuoteOriginally posted by dkt
---------------
i get this error
---------------

Syntax E:\0.3.3.0.B16.09.9X.RLS\scripts\rm.lua:20: attempt to call method `GetPrefixes' (a nil value)
As Dessamator said, u should get at least PtokaX 0.3.3.0 build 17.02 for this script.

Cheers
Title:
Post by: jiten on 04 May, 2005, 17:23:37
Well, made a working one for ur PtokaX version:
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval
--
--User Settings---------------------------------------------------------------------
mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 1, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
-- Don't change this
iCnt = 1,
--------------------
}

sFile = { -- put here the files you want to send
"txt/file1.txt",
"txt/file2.txt",
"txt/file3.txt",
"txt/file4.txt",
}
--End User Settings-----------------------------------------------------------------

Main = function()
SetTimer(mSet.iDelay*60*1000)
StartTimer()
end

ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
OnTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
end
end
end

OnTimer = function()
if mSet.RunStatus == 1 then
for i = 1, table.getn(sFile) do
if i == mSet.iCnt then
local f,tmp = io.open(sFile[i],"r"),""
if f then
tmp = f:read("*a")--
tmp = string.gsub(tmp,"|",string.char(166))
tmp = string.gsub(tmp,"\n","\r\n")
f:close()
SendToAll(mSet.sBot,"\r\n"..tmp)
end
if table.getn(sFile) == i then
mSet.iCnt = 1
else
mSet.iCnt = i + 1
end
break
end
end
end
end
Cheers
Title:
Post by: kepp on 04 May, 2005, 21:56:35
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval

mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 1, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
-- Don't change this
iCnt = 1,
}

sFile = {}

Main = function()
ReloadText()
SetTimer(mSet.iDelay*60*1000)
if (mSet.RunStatus == 1) then
StartTimer()
end
end

ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
StartTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
StopTimer()
end,
["reload"] = function(user,data)
ReloadText()
user:SendData(mSet.sBot,"Textfiles loaded...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
end
end
end

OnTimer = function()
local TableSize = table.getn(sFile)
for i=1,TableSize do
if (i == mSet.iCnt) then
local sContent = FileExist(sFile[i])
if (sContent) then
SendToAll(mSet.sBot,"\r\n"..sContent)
end
if (TableSize == i) then mSet.iCnt = 1 else mSet.iCnt = mSet.iCnt + 1 end
break
end
end
end

function FileExists(sFile)
local oFile,sMsg,line = io.open(sFile,"r"),"","";
if (oFile) then
line = oFile:read()
while line do
sMsg = sMsg..line
end
oFile:close();
return sMsg;
else
return nil;
end
end

function ReloadText()
sFile = nil;
sFile = {};
collectgarbage();

--// Load up files to table from folder \\--
os.execute("dir /b txt\\*.txt > files.txt");
local hFile = io.open("files.txt","r");
local line = hFile:read();
while line do
table.insert(sFile,1,line)
line = hFile:read();
end
hFile:close();
os.remove("files.txt");
end
Modified a little, untested, place all text files in folder called 'txt'
Title:
Post by: jiten on 04 May, 2005, 22:21:21
Haven't tested it, but, looks good ;)

Best regards.
Title:
Post by: BeeR on 04 May, 2005, 23:27:40
Hi folks

Is it possible to modify this bot to grab the textfiles randomly
in a folder insted of calling it for file1.txt?? (not rename all my textfiles)
it would be nice if i can add a direction to that folder so i can manage all my files where i want to store them

Best Regards :]
Title:
Post by: kepp on 04 May, 2005, 23:34:59
It's exactly what the above should do, not random, much better, it goes throught them all..

hmm, didn't i add this to guarding? :P
Title:
Post by: BeeR on 04 May, 2005, 23:37:47
QuoteOriginally posted by kepp
It's exactly what the above should do, not random, much better, it goes throught them all..

hmm, didn't i add this to guarding? :P

yes u did :>
but i want 1 bot to all my jokes and 1 to all my infofiles

BTW

gonna take a look now at your new Guarding !!
Title:
Post by: kepp on 04 May, 2005, 23:42:43
QuoteOriginally posted by BeeR
QuoteOriginally posted by kepp
It's exactly what the above should do, not random, much better, it goes throught them all..

hmm, didn't i add this to guarding? :P

yes u did :>
but i want 1 bot to all my jokes and 1 to all my infofiles

BTW

gonna take a look now at your new Guarding !!

The above should work, i just stripped out things
you can have as many textfiles as wanted in a folder called txt and script reads them up automatically
and iterates over them one by one
Title:
Post by: kepp on 05 May, 2005, 11:51:06
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval

mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 1, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
-- Don't change this
iCnt = 1,
}

sFile = {}

Main = function()
ReloadText()
SetTimer(mSet.iDelay*60*1000)
if (mSet.RunStatus == 1) then
StartTimer()
end
end


ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
StartTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
StopTimer()
end,
["reload"] = function(user,data)
ReloadText()
user:SendData(mSet.sBot,"Textfiles loaded...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
end
end
end

OnTimer = function()
local TableSize = table.getn(sFile)
for i=1,TableSize do
if (i == mSet.iCnt) then
local sContent = FileExists(sFile[i])
if (sContent) then
SendToAll(mSet.sBot,"\r\n"..sContent)
end
if (TableSize == i) then mSet.iCnt = 1 else mSet.iCnt = mSet.iCnt + 1 end
break
end
end
end

function FileExists(sFile)
local oFile,sMsg,line = io.open(sFile,"r"),"","";
if (oFile) then
line = oFile:read()
while line do
sMsg = sMsg..line
end
oFile:close();
return sMsg;
else
return nil;
end
end



function ReloadText()
sFile = nil;
sFile = {};
collectgarbage();

--// Load up files to table from folder \\--
os.execute("dir /b txt\\*.txt > files.txt");
local hFile = io.open("files.txt","r");
local line = hFile:read();
while line do
table.insert(sFile,1,line)
line = hFile:read();
end
hFile:close();
os.remove("files.txt");
end

Just an error fix reported in wrong thread
Title:
Post by: jiten on 05 May, 2005, 14:32:23
Fixed the FileExist part and added some stuff:
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09 or Higher
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval
-- Added: Rotates every .txt file stored in sFolder (by kepp)

mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 1, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
sFolder = "txt", -- Folder where all the .txt files are stored
-- Don't change this
iCnt = 1,
}

sFile = {}

Main = function()
ReloadText()
SetTimer(mSet.iDelay*60*1000)
if (mSet.RunStatus == 1) then
StartTimer()
end
end


ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
StartTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
StopTimer()
end,
["reload"] = function(user,data)
ReloadText()
user:SendData(mSet.sBot,"Textfiles loaded...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
end
end
end

OnTimer = function()
local TableSize = table.getn(sFile)
for i=1,TableSize do
if (i == mSet.iCnt) then
local sContent = FileExists(mSet.sFolder.."/"..sFile[i])
if (sContent) then
SendToAll(mSet.sBot,"\r\n"..sContent)
end
if (TableSize == i) then mSet.iCnt = 1 else mSet.iCnt = mSet.iCnt + 1 end
break
end
end
end

function FileExists(sFile)
local oFile = io.open(sFile,"r");
if (oFile) then
local line = oFile:read("*all");
oFile:close();
return string.gsub(line,"\r","\r\n");
else
return nil;
end
end

function ReloadText()
sFile = nil;
sFile = {};
collectgarbage();

--// Load up files to table from folder \\--
os.execute("dir /b "..mSet.sFolder.."\\*.txt > files.txt");
local hFile = io.open("files.txt","r");
local line = hFile:read();
while line do
table.insert(sFile,1,line)
line = hFile:read();
end
hFile:close();
os.remove("files.txt");
end
Cheers
Title:
Post by: kepp on 05 May, 2005, 14:50:09
Ah, read it all at once :)
Nice Jiten :D
Title:
Post by: Syphrone-NL on 05 May, 2005, 15:31:30
One question

How can i change bot name??

sBot = frmHub:GetHubBotName(), -- Bot Name

I want to change that to Disneys_Diner
Title:
Post by: Dessamator on 05 May, 2005, 15:41:20
QuoteOriginally posted by Syphrone-NL
One question

How can i change bot name??


put it like this ::

sBot = "Disneys_diner", -- Bots Name
Title:
Post by: jiten on 05 May, 2005, 16:35:57
Kepp, it was missing a "break" :D
That was the reason why it didn't work.
function FileExists(sFile)
local oFile,sMsg,line = io.open(sFile,"r"),"","";
if (oFile) then
line = oFile:read()
while line do
sMsg = sMsg..line
[COLOR=red]break[/COLOR]
end
oFile:close();
return sMsg;
else
return nil;
end
end
Cheers
Title:
Post by: kepp on 05 May, 2005, 17:34:40
it should have had the same in the loop too
line = oFile:read()

because when line turns nil loop breaks if im not too wrong here
Title:
Post by: kepp on 05 May, 2005, 17:51:00
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09 or Higher
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval
-- Added: Rotates every .txt file stored in sFolder (by kepp)

mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 1, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
sFolder = "Text", -- Folder where all the .txt files are stored
-- Don't change this
iCnt = 1,
}

sFile = {}

Main = function()
ReloadText()
SetTimer(mSet.iDelay*60*1000)
if (mSet.RunStatus == 1) then
StartTimer()
end
end

ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
StartTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
StopTimer()
end,
["reload"] = function(user,data)
ReloadText()
user:SendData(mSet.sBot,"Textfiles loaded...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
end
end
end

OnTimer = function()
local TableSize = table.getn(sFile)
for i=1,TableSize do
if (i == mSet.iCnt) then
local sContent = FileExists(mSet.sFolder.."/"..sFile[i])
if (sContent) then
SendToAll(mSet.sBot,"\r\n"..sContent)
end
if (TableSize == i) then mSet.iCnt = 1 else mSet.iCnt = mSet.iCnt + 1 end
break
end
end
end

function FileExists(sFile)
local oFile = io.open(sFile,"r");
if (oFile) then
local line = oFile:read("*all");
oFile:close();
return string.gsub(line,"\r","\r\n");
else
return nil;
end
end

function ReloadText()
sFile = nil;
sFile = {};
collectgarbage();

--// Load up files to table from folder \\--
os.execute("dir /b "..mSet.sFolder.."\\*.txt > files.txt");
local hFile = io.open("files.txt","r");
local line = hFile:read();
while line do
table.insert(sFile,1,line)
line = hFile:read();
end
hFile:close();
table.sort(sFile);
os.remove("files.txt");
end

It sorts it :)
Title:
Post by: BeeR on 05 May, 2005, 19:12:11
hehe
a weird thing did happend when i test your bot above kepp

i made a folder named humor and put some jokes init,
after bot was finnished - it reads my txt files from ptokax texts folder

is that correct ??
i though the bot only should reading files from the folder i named humor

[[:

sorry ,, i found that a i did copy another textfile in humorfolder

it works correct now :>
Title:
Post by: ~~~~?Master?~~~~ on 07 May, 2005, 21:11:12
i'm keep getting this msg function arguments expected near `=' in line 8


can you help me??



thnx greetzz
Title:
Post by: jiten on 07 May, 2005, 21:24:47
QuoteOriginally posted by ~~~~?Master?~~~~
i'm keep getting this msg function arguments expected near `=' in line 8


can you help me??



thnx greetzz
What PtokaX version are you using?
Btw, the code to copy is the one between the
Best regards,

jiten
Title:
Post by: ~~~~?Master?~~~~ on 08 May, 2005, 09:50:48
ptokax 16.09......
 and i know..... i always copy that....


 i think i found the problem... maybe its jumble that keeps interfering with other scripts???
Title:
Post by: jiten on 08 May, 2005, 10:45:01
QuoteOriginally posted by ~~~~?Master?~~~~
ptokax 16.09......
 and i know..... i always copy that....


 i think i found the problem... maybe its jumble that keeps interfering with other scripts???
Nope, that's not the reason.
Just copy the from and including
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09 or Higherto:
end
Cheers
PS: Do not copy the horizontal lines and the "code:"
Title:
Post by: jiten on 13 May, 2005, 17:14:42
-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09 or Higher
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval
-- Added: Rotates every .txt file stored in sFolder (by kepp)
-- Added: Text file sending by own trigger (Prefix - Filename)

mSet = {
sBot = frmHub:GetHubBotName(), -- Bot Name
RunStatus = 0, -- Auto Start -> 1=ON 0=OFF
iDelay = 30, -- Delay between each text file in minutes
sFolder = "txt", -- Folder where all the .txt files are stored
-- Don't change this
iCnt = 1,
}

sFile = {}

Main = function()
ReloadText()
SetTimer(mSet.iDelay*60*1000)
if (mSet.RunStatus == 1) then
StartTimer()
end
end


ChatArrival = function(sUser, sData)
sData=string.sub(sData,1,-2)
local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
if sUser.bOperator then
local tCmds = {
["adon"] = function(user,data)
mSet.RunStatus = 1
user:SendData(mSet.sBot,"Messages started...")
StartTimer()
end,
["adoff"] = function(user,data)
mSet.RunStatus = 0
user:SendData(mSet.sBot,"Messages stopped...")
StopTimer()
end,
["reload"] = function(user,data)
ReloadText()
user:SendData(mSet.sBot,"Textfiles loaded...")
end,
}
if tCmds[cmd] then
return tCmds[cmd](sUser,sData),1
else
local sContent = FileExists(mSet.sFolder.."/"..cmd..".txt")
if (sContent) then
return sUser:SendData(mSet.sBot,"\r\n"..sContent),1
end
end
end
end

OnTimer = function()
local TableSize = table.getn(sFile)
for i=1,TableSize do
if (i == mSet.iCnt) then
local sContent = FileExists(mSet.sFolder.."/"..sFile[i])
if (sContent) then
SendToAll(mSet.sBot,"\r\n"..sContent)
end
if (TableSize == i) then mSet.iCnt = 1 else mSet.iCnt = mSet.iCnt + 1 end
break
end
end
end

function FileExists(sFile)
local oFile = io.open(sFile,"r");
if (oFile) then
local line = oFile:read("*all");
oFile:close();
return string.gsub(line,"\r","\r\n");
else
return nil;
end
end

function ReloadText()
sFile = nil;
sFile = {};
collectgarbage();

--// Load up files to table from folder \\--
os.execute("dir /b "..mSet.sFolder.."\\*.txt > files.txt");
local hFile = io.open("files.txt","r");
local line = hFile:read();
while line do
table.insert(sFile,1,line)
line = hFile:read();
end
hFile:close();
os.remove("files.txt");
end
Cheers
Title:
Post by: BeeR on 14 May, 2005, 14:59:58
after 2-3 days of rotating it stops sending mess to main,,
must restartscripts to start rotating again
Title:
Post by: Dessamator on 14 May, 2005, 15:17:27
QuoteOriginally posted by BeeR
after 2-3 days of rotating it stops sending mess to main,,
must restartscripts to start rotating again

lol, it runs out of fuel?, make sure some other script doesnt interfere with that, in theory it should run indefinitely, :)
Title:
Post by: BeeR on 14 May, 2005, 15:32:40
QuoteOriginally posted by Dessamator
QuoteOriginally posted by BeeR
after 2-3 days of rotating it stops sending mess to main,,
must restartscripts to start rotating again

lol, it runs out of fuel?, make sure some other script doesnt interfere with that, in theory it should run indefinitely, :)
Theory and reality can be 2 differnt thing :]
Title:
Post by: Dessamator on 14 May, 2005, 15:54:05
indeed, but give us more info, did u change anything in the script,like  the timer interval, and doesnt it show any syntax error in ptokax ???, because if there are bugs with it, it should stop sooner than that !

btw, i just tested the script  for 10 mins with a 1 sec interval to send each txt, if it was a script problem it would have stopped in less than 5 mins, so theres obviously something wrong there in ur hub, :)
Title:
Post by: jiten on 14 May, 2005, 16:44:11
QuoteOriginally posted by BeeR
after 2-3 days of rotating it stops sending mess to main,,
must restartscripts to start rotating again
Can you run it for more 2/3 days and see if that error happens again and check if AutoStart is on by default?

As Dessamator said, it should be running fine...

Cheers
Title:
Post by: BeeR on 14 May, 2005, 23:37:15
QuoteOriginally posted by jiten
QuoteOriginally posted by BeeR
after 2-3 days of rotating it stops sending mess to main,,
must restartscripts to start rotating again
Can you run it for more 2/3 days and see if that error happens again and check if AutoStart is on by default?

As Dessamator said, it should be running fine...

Cheers

yes autostart is on and i dont get a syntax error on it - it just stops ,,
maybe it interfere with clever janina or my jokebot ,,

i do some more tests
Title:
Post by: xvk on 14 June, 2005, 00:03:57
hi
i already have a folder in my script folder called txt changed this sFolder = "Messages",      -- Folder where all the .txt files are stored
and made a folder called Messages but getting error texter.lua:99: attempt to concatenate local `cmd' (a nil value)

any ideas please
Title:
Post by: jiten on 14 June, 2005, 10:26:59
QuoteOriginally posted by xvk
hi
i already have a folder in my script folder called txt changed this sFolder = "Messages",      -- Folder where all the .txt files are stored
and made a folder called Messages but getting error texter.lua:99: attempt to concatenate local `cmd' (a nil value)

any ideas please
Hi xvk.
That's strange. I did the same you wrote and didn't get any error. Working fine here.
Did you change anything else in the script?
Maybe if you change the script loading error in PtokaX...

Best regards
Title:
Post by: Honey on 16 July, 2005, 23:10:30
Hi folks,

I have two things.

1) Thank you very much to all for this great script.

2. And thats my problem:
I write into ABC.txt this: Hello all users on my hub!

But script write into mainchat this:

Hello all users on my hub!

It is possible to do that the script write the message on the first line, like this: Hello all users on my hub!

I think, that script write message into main chat exactly how I write this message into .txt file: eg.
Into .txt file:
(1st line)
(2nd line)
(3rd line) Hello all users on my hub!

and into chat script write:
(1st line)
(2nd line)
3rd line)Hello all users on my hub!

It is this possbile to do, please?

Thank you in advance for help!

 Honey
Title:
Post by: java on 19 August, 2005, 01:32:01
Is it possible modify the rotating message (for build 17.02 or higher) so that it start automatically by default, and cant be stopped any other way then by stopping the script in hubsoft?
Title:
Post by: Dessamator on 19 August, 2005, 09:26:36
QuoteOriginally posted by java
Is it possible modify the rotating message (for build 17.02 or higher) so that it start automatically by default, and cant be stopped any other way then by stopping the script in hubsoft?

Yes
Title:
Post by: java on 19 August, 2005, 20:44:04
What a helpfull reply. :P

Is there anybody who can tell me how to modify it to work like that  then?
Title:
Post by: java on 20 August, 2005, 02:29:02
tywm :)