PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: D-J Valhala on 24 May, 2004, 10:44:46

Title: Very Lil Stand Alone Scrip
Post by: D-J Valhala on 24 May, 2004, 10:44:46
if someone can do it?...
+SFV will show txt/sfv.txt
+renm will show txt/Renaming.txt
10x :D
Title:
Post by: plop on 24 May, 2004, 11:19:14
QuoteOriginally posted by D-J Valhala
if someone can do it?...
+SFV will show txt/sfv.txt
+renm will show txt/Renaming.txt
10x :D
check my texter series, 1 of those earlyer versions can do what you want.

plop
Title:
Post by: D-J Valhala on 24 May, 2004, 11:50:47
there is alot of scripts...
can you post it here maybe? :)
Title:
Post by: plop on 24 May, 2004, 12:13:20
QuoteOriginally posted by D-J Valhala
there is alot of scripts...
can you post it here maybe? :)
check the 1st url in my signature, they are all on my website.

plop
Title:
Post by: D-J Valhala on 24 May, 2004, 12:17:35
yea i know but in the website there is alot of scripts
please post it here :)
Title:
Post by: pHaTTy on 24 May, 2004, 12:27:30
QuoteOriginally posted by D-J Valhala
yea i know but in the website there is alot of scripts
please post it here :)
just because he helping dont mean hes ya personal slave, if ya cant be bothered todo something yaself, i dont think we shud bother to help....its simple, webite->nameofscript verrry simple

click link for plops scripts then download the texter bot
Title:
Post by: D-J Valhala on 24 May, 2004, 13:47:24
ok ok in the site there is to meny bot's man... how can i know wich one to take?
no harm only asking for help... :\
Title:
Post by: plop on 24 May, 2004, 17:40:15
QuoteOriginally posted by D-J Valhala
ok ok in the site there is to meny bot's man... how can i know wich one to take?
no harm only asking for help... :\
the script is for ptokax so click ptokaxbots.
next script is made by me (plop), click on my name in the list.
whoooooowieeeee there are all the texter versions.
you prob have enough on version 1.

plop
Title:
Post by: D-J Valhala on 25 May, 2004, 11:07:50
ok i fopund it thanks alot :)
but the script dont work
-- texter bot by plop
-- modified 2 show only 6 files,
-- thx 2 chilla for the faster routine for opening the files
-- shows text files from a folder named text.


Bot = "-=<[LsD_-_BoT]>=-"

FDFolder = "txt"

cmd1 = "+sfv"
file1 = "sfv.txt"

cmd2 = "+renm"
file2 = "Renaming.txt"

cmd3 = "+news"
file3 = "news.txt"


function Main()
   frmHub:RegBot(Bot)
end

function DataArrival(user, data)
   data=strsub(data,1,strlen(data)-1)
   if( strsub(data, 1, 1) == "<" ) then
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if (cmd == cmd2) then
         showtext(user, file2)
         return 1
      elseif cmd == cmd1  then
         showtext(user, file1)
         return 1
      elseif cmd == cmd3 then
         showtext(user, file3)
         return 1
      end
   elseif(strsub(data, 1, 4) == "$To:") then
      s,e,cmd = strfind(data,"$To:%s+%S+%s+From:%s+%S+%s+$%b<>%s+(%S+)")
      if cmd == cmd2 then
         showtext(user, file2)
         return 1
      elseif cmd == cmd1 then
         showtext(user, file1)
         return 1
      elseif cmd == cmd3 then
         showtext(user, file3)
         return 1
      end
   end
end

function showtext(user, file)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local contents = gsub(read(handle, "*a"),strchar(10), "\r\n")
closefile (handle)
user:SendPM(Bot, "\r\n"..contents.."\r\n|")
end

function showtextmain(user, file)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local contents = gsub(read(handle, "*a"),strchar(10), "\r\n")
closefile (handle)
SendToAll(Bot, "\r\n"..contents.."\r\n|")
end

this is what i get...

Syntax Error: bad argument #1 to `read' (string expected, got nil)
Syntax Error: bad argument #1 to `read' (string expected, got nil)
Syntax Error: bad argument #1 to `read' (string expected, got nil)
Syntax Error: bad argument #1 to `read' (string expected, got nil)
Syntax Error: bad argument #1 to `read' (string expected, got nil)
Title:
Post by: plop on 25 May, 2004, 14:53:58
did you make a folder called "txt" and placed the files in there???
and offcourse change the script so it matches your filenames.
i'm 200% sure that this script works.

plop
Title:
Post by: bastya_elvtars on 25 May, 2004, 15:13:40
texter bot works amazing, add my 200 per cent as well... :)
Title:
Post by: D-J Valhala on 25 May, 2004, 15:55:58
yes i did...
and it's not working...
Title:
Post by: plop on 26 May, 2004, 00:55:27
QuoteOriginally posted by D-J Valhala
yes i did...
and it's not working...
just notiched that the script you posted is a modded version.
try texter version 2 from my site.

plop