Picture-Bot
 

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

Picture-Bot

Started by B@B?, 13 May, 2005, 11:17:44

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

B@B?

Maybe someone can make an Lua 5-Script for me
from this one wich worked fine with Lua4.

-- Pic/Text-Bot
-- shows TEXT-files from a folder named TEXT.
-- doesn't mather what prefix it used (+test.txt or #test.txt, etc.).

Bot = "NAME"

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+)")
      cmd = strsub(cmd, 2,strlen(cmd))
      if readfrom("text/"..cmd..".txt") then
         showtext(user, cmd)
         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+)")
      cmd = strsub(cmd, 2,strlen(cmd))
      if readfrom("text/"..cmd..".txt") then
         showtext(user, cmd)
         return 1
      end
   end
end

function showtext(user, cmd)
   lines = "\r\n\r\n"
   readfrom("text/"..cmd..".txt")
   while 1 do
      local line = read()
      if line == nil then
         readfrom()
         break
      end
      lines = lines..line.."\r\n"
   end
   --user:SendPM(Bot, lines.." |")
   SendToAll(Bot, lines.." |")
end

Thank YOU!

Btw:
It will be very nice if the bot has an function to allow me
to set an timer on or off wich shows the pictures randomly all XX min.

But that should not be the Main-Funktion!

The Main-Function should be to call an Pictures by the given command...like above.
THE DAY AFTER...  

...is >>>>>>>> NOW!




Btw:
Plz excuse my english...
It?s not the best, i?m sure...but it?s funny...isn?t it?

Dessamator

Ignorance is Bliss.

B@B?

#2
Nice. Very nice!  :rolleyes:

But:

1. The script i requested is not in the database
>>> (I allways search before)

2. My request should be in the right form

What?s wrong?  ?(

The shortest way to help isn?t discuss...

The shortest way to help, i  think, is copy!  ;)

btw: An link to the script, wich- YOU think that it is the requested, makes more sense...

QuoteIn this Topic you are allowed to ask for new scripts - or even to ask if some still exists
...
THE DAY AFTER...  

...is >>>>>>>> NOW!




Btw:
Plz excuse my english...
It?s not the best, i?m sure...but it?s funny...isn?t it?

jiten

Give this a try.

Best regards

Dessamator

#4
QuoteOriginally posted by B@B€
Nice. Very nice!  :rolleyes:

But:

1. The script i requested is not in the database
>>> (I allways search before)

2. My request should be in the right form

What?s wrong?  ?(

The shortest way to help isn?t discuss...

The shortest way to help, i  think, is copy!  ;)

btw: An link to the script, wich- YOU think that it is the requested, makes more sense...

QuoteIn this Topic you are allowed to ask for new scripts - or even to ask if some still exists
...

hmm indeed, i just put that to show u the link already exists, if u searched and didnt find, well, maybe i was incorrect, but an ascii bot exists for a veeeery long time,
and heres the proof :
QuoteOriginally posted by jiten
Give this a try.

Best regards

 maybe the script should be renamed to allow acomodate some ppl, :)
Ignorance is Bliss.

B@B?

THANK YOU VERY! MUCH @ "jiten"

The second time YOU SAVED MY LIFE...  ;)

btw;

I have this script from you, but as i putted an Pic.txt-file with an ASCII inside in the folder i had only Hyroglyphs on my screen inside of my client...so i thought, it?s not perfect...for normaly Text-files like Hub-Info-Text it worked great! That?s the reason i setted this question.

Now i copied the script again and it works GREAT!  :]

@ Dessamator: np...  :D
THE DAY AFTER...  

...is >>>>>>>> NOW!




Btw:
Plz excuse my english...
It?s not the best, i?m sure...but it?s funny...isn?t it?

Dessamator

Ignorance is Bliss.

jiten

You're welcome, B@B?

Quotemaybe the script should be renamed to allow acomodate some ppl, :)
Next time I make some changes in Rotating Message, I'll add more info to its description :D

Best regards,

jiten

Dessamator

indeed, great idea, add the words "picture bot, ascii bot with timer, text viewer " hmm and whatever comes to ur mind, ;)
Ignorance is Bliss.

SMF spam blocked by CleanTalk