Release 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

Release Bot

Started by witch, 10 August, 2004, 00:51:26

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

witch

Hi guys!
I was looking thru the board for release bot and couldn't find what i need! All release Bots what i find showing whole release list. But i need:

+rls                         -to show last 30 releases
+allrls                      -to show all releases
+search (release)    -to search for releases
+addrls                    -to add new release (is only availible to [VIP] and above!)
+delrel (release)      -to delete release

all releases have to displayd in PM.

Thanx in advince  :))




witch

Thanx dude i will try that! ..don't understend why u didn't give me that before  :D



D-J Valhala

loooooooooool
all my Bot's are private and my release bot is not the same  :D
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

witch

Thank you very much Mr. Valhala for your time, now even if u offer me your "PRIVAT" bot i will NOT use it.

Keep it Psychedelic  ;)



D-J Valhala

My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

witch

I did tryed script what Valhala was offering......hmm dosn't work so good.

To Mr. Optimus!!! I using your on board Robocop release bot, very simple but works GREAT!!! Here it is:

__________________________________________________________________________________________

-- Verry simple release script nothing fancy
-- Make a file called releases.txt in \Scripts Folder
-- Made By Optimus

sBot = "...::ReleaseBot::..."

timedate = date()
file = "releases.txt"

display1 = "Item"
display2 = "Description"
display3 = "Releases"

function Main()
   frmHub:RegBot(sBot)
end

function DataArrival(user, data)
   if (strsub(data, 1, 1) == "<" ) then
      data=strsub(data,1,strlen(data)-1)
         _,_,cmd=strfind(data, "%b<>%s+(%S+)")

      if (cmd=="+rls") then
         ReadRelease(user, data, cmd)
         return 1

      elseif (cmd=="+addrls") then
         if user.bOperator or user.iProfile == 2 then
            s,e,cmd,release,desc = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )

            if desc == nil then
               description = "No "..display2.." specified!"
               s,e,cmd,release = strfind( data, "%b<>%s+(%S+)%s+(%S+)" )
            else
               description = desc
            end
            if release == nil then
               user:SendData(sBot, "*** No "..display1.." specified!")
               return 1
            end

            News("By: "..user.sName.."\t Date: "..timedate.."\r\n"..display1..": "..release.."\r\n"..display2..": "..description.."\r\n")
            SendToAll(sBot, "New "..display3.." Added....By <"..user.sName.."> Type +rls in Main-Chat to show "..display1..".")
            return 1
         else
            user:SendData(sBot, "*** +addrls is only availible to [VIP] and above!")
            return 1
         end
      end
   end
end

function ReadRelease(user, data, cmd)
   local release = ""
   readfrom(file)
   while 1 do
   local line = read()
   if (line == nil) then
   break
   else
   release = release.."   "..line.."\r\n"
   end
   end
   user:SendPM(sBot, "\r\n\r\n".."       "..display3.."s posted by users: ".."\r\n\r\n"..release)
   readfrom()
end

function News(what)
   appendto(file)
      write(what.."\n")
   writeto()
end

__________________________________________________________________________________________

So i will be very gratefull if you would change it for me a bit! I need add function to show last 30 releases + function delete release + function find release.

Thanx a lot in advince!!!



Madman

Mr. Optimus is on vacation... hmm hope i spelled that right ;p
So you have to hope some one else of the many good scripters here to help you =) But i am sure they will =)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Millsy

#8
Have a look @ freshstuff by plop you can find it here

Later,
Millsy
MoviePirates.no-ip.com    -   Part Of The BBI Network

witch

Thanx Millsy i have a look Plop's scripts.....yeah madman u r right Optimus is not in his hubs, looks like his gone.....hope some GRATE scripters will help me with that anyway!  

-- another thing! i would like to see releases displayd on one line, like that:

By: ...::DJ::Witch::...    Date: 08/06/04 10:25:28Item: DJ_Witch_-_Psycraft-live@04.2004-djset Description: Psychedelic

..now it's shows like that:


   By: ...::DJ::Witch::...    Date: 08/05/01 21:32:11
   Item: DJ_Witch_-_Psycraft-live@04.2004-djset
   Description: Psychedelic

also if it's posseble will be cool if u can add this line at the begining and end of the list:


>-=========================================================<...::Psy zOne::...>==========================================================-<

Thanx a lot  :))



Millsy

Quote-- another thing! i would like to see releases displayd on one line, like that:

By: ...::DJ::Witch::... Date: 08/06/04 10:25:28Item: DJ_Witch_-_Psycraft-live@04.2004-djset Description: Psychedelic

..now it's shows like that:


By: ...::DJ::Witch::... Date: 08/05/01 21:32:11
Item: DJ_Witch_-_Psycraft-live@04.2004-djset
Description: Psychedelic

News("By: "..user.sName.."\t Date: "..timedate.."\r\n"..display1..": "..release.."\r\n"..display2..": "..description.."


remove the /r/n
MoviePirates.no-ip.com    -   Part Of The BBI Network

witch

Thanx Millsy! I did correct it...now it's shows in one line, cool! But how i can make gap between release it self and word "Description"?

za lad  :))



UwV

try   \t   for a tab  ...
like this
.. News("By: "..user.sName.." \t Date: "..timedate.." "..display1..": "..release.." "..display2..": \t  "..description.."

and try reading one simple C++ reference guide ;0)
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

witch

Yes thanx UwV now better!
Well to learn C++ it's my plan for near future.....and btw \t shold be added before "..display2.."

za lad  :))



UwV

just giving an example ..
Quoteand btw \t shold be added before "..display2.."
ust a  

"..timedate.." "..display1..": "..release.." "..display2..":

has a space in between the   "..release.."  and the "..display2..":  that already made the space you asked for ..  ;)
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

witch

Yoo UwV thanx dude!
Whith release line we sorted out ....some how  hehe...lol....but script no one can fix....hmmmm

Hello scripters. help please !!!  :P



BottledHate

QuoteOriginally posted by UwV
try   \t   for a tab  ...
like this
.. News("By: "..user.sName.." \t Date: "..timedate.." "..display1..": "..release.." "..display2..": \t  "..description.."

and try reading one simple C++ reference guide ;0)

"\t" only goes to the next tab index on the line... so if the next tab index is only 1 space away... \t will only go out 1 space.... might want to just add a few spaces...

-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

imby

#17
how does one edit this script so:

-all users can !write

-when someone does !read or !write it sends both to main chat. something like SendToAll !read

-remove the description part altogether.

i know it seems like i'm being lazy, but i spent an hr editing but it didn't work out. i know what bit needs to be changed, like (elseif (cmd=="!write") then
         if user.bOperator or user.iProfile == 2 then) to all allow all users to !write, i just don't know what to put in place.

and where can i find a simple lua guide? :D the one on the lua site is definitely written for programmers.

nErBoS

Hi,

Just remove the condition "if user.bOperator or user.iProfile == 2 then" and his "end" and will be avaible to all users.

Best regards, nErBoS
--## nErBoS Spot ##--

imby

ok brain, what about the other two things? a bit beyond me, infact i'm not even sure if i understood the first thing. but i'll try and see if i can work it out later.

Herodes

for the second thing u asked for ....

expiriment with the "return 1" part at the bottom of most of the "if/else/elseif" in this scriptby Optimus ;)

return 1 --- like this is processed
-- return 1 --- like this it is not processed (it is a comment in the script now ;)

imby

#21
ok, nerbo's thing worked, so problem 1 solved. i deleted that part initially, but didn't know to delete 'end'.

i tried commenting those parts out Herodes, didn't work. i must of done something wrong.

to try and solve problem two. i rewrote it, to

      if (cmd=="!read") then
         SendToAll("<"..user.sName.."> !read")
         ReadRelease(user, data, cmd)
         return 1

so now that works. i'm sure it's a messy way of doing it, but oh well. now people see !read written when users type it. how do i do it so it shows !write in main chat?

imby

and problem 3 looks impossible to me. because i gather it's inherently something to do with "%b<>%s+(%S+)%s+(%S+)%s+(.+)" , which i have no chance in deciphering, never mind editing.

Herodes

#23
QuoteOriginally posted by imby
if (cmd=="!read") then
			SendToAll("<"..user.sName.."> !read")
			ReadRelease(user, data, cmd)
			return 1

you understood a great deal keep it up.. ;)

but try putting this instead ... I am confident it will work if u are using TD4
if (cmd=="!read") then
	-- SendToAll("<"..user.sName.."> !read")
	ReadRelease(user, data, cmd)
	-- return 1
end


About the pattern matching (the weird %S+%s+ stuff ...)
pay attention to the number of parenthesis, (brackets) pairs  and the number of variables in the first part of the strifnd. .. ;)
s,e,cmd,release,desc = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
now if you change this to
s,e,cmd,release = strfind( data, "%b<>%s+(%S+)%s+(%S+)" )
It should be fine ...
remember %s is for saying "a space character" and
%S is for saying "a non space character"
for undesratnding the first part of the line (before the "=" ) I will give another two tips ...
This following line
aval, bval,cval,none = 1,2,"string",nil
is the same as saying
aval = 1
bval = 2
cval = "string"
none = nil
Thats one ... the other is the "s,e," part ,...
This refers to some values that the strfind is returning ... so in most cases this would stay the same (basically ppl use these letters because they stand for "start","end" but you can pick any other combination of letters )...
If you want to learn more about this (or not .. ;) I strongly
reccomend u read through plop's tutorial on pattern matching ...

good luck :D

imby

s,e,cmd,release = strfind( data, "%b<>%s+(%S+)%s+(%S+)" )

removes the description, but just catches the first word a user writes. so if they wrote: !write artist - album - year [genre] it would only show the album. need it to catch the entire thing they write, and have it as the release (or item).

SMF spam blocked by CleanTalk