Freshstuff 3.0 (rewritten by plop)
 

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

Freshstuff 3.0 (rewritten by plop)

Started by GaMeFaNaTiC, 01 January, 2004, 20:06:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GaMeFaNaTiC

-- FreshStuff v.3.0 
-- original idea/script by chilla
-- completely rewriten by plop


-- Name the commands to what U like 
-- This command adds stuff, syntax : +addalbum THESTUFF2ADD 
cmd1 = "+addalbum" 

-- This command shows the stuff, syntax : +albums
cmd2 = "+albums" 

-- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE 
cmd3 = "+delalbum" 

-- This command shows the latest stuff, syntax : +newalbums
cmd4 = "+newalbums"

-- This command reloads the txt file. syntax : +reloadalbums 
-- (this command is needed if you manualy edit the text file)
cmd5 = "+reloadalbums"

-- Show latest stuff on entry 1=yes, 0=no
ShowOnEntry = 1

-- Max stuff shown on newalbums/entry
MaxNew = 20

-- The file storing the stuff
file = "txt/AlbumsAll.txt"

-- Name of the bot
Bot = "post-it_memo"

--------------------- don't change anything below here
AllStuff = {}
NewestStuff = {}

function Main() 
   frmHub:RegBot(Bot)
   Reload()
end

function NewUserConnected(user) 
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end 

function OpConnected(user) 
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end 

function DataArrival(user,data) 
   if (strsub(data, 1, 1) == "<") then 
      data = strsub(data,1,strlen(data)-1) 
      s,e,cmd,tune = strfind(data, "%b<>%s+(%S+)%s*(.*)")
      if cmd == cmd2 then
         user:SendPM(Bot, MsgAll.."|")
         return 1
      elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
         if cmd == cmd3 then
            if tune ~= "" then
               DelStuff(user, tune)
            else
               user:SendData(Bot, "yea right, like i know what i got 2 delete when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd1 then
            if tune ~= "" then
               AddStuff(user, tune)
            else
               user:SendData(Bot, "yea right, like i know what you got 2 add when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd5 then
            Reload()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end
      end
   end
end

function OpenStuff()
   AllStuff = nil
   NewestStuff = nil
   AllStuff = {}
   NewestStuff = {}
   Count = 0
   Count2 = 0
   readfrom(file)
   while 1 do
      local line = read() 
      if ( line == nil ) then 
         break 
      else 
         Count = Count +1
         AllStuff[Count]=line
      end
   end
   readfrom()
   if Count > MaxNew then
      local temp = Count - MaxNew + 1
      for i=temp, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff[i]
      end
   else
      for i=1, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff[i]
      end
   end
end

function SaveStuff()
   writeto(file)
   for i=1,Count do
      if AllStuff[i] then
         write(AllStuff[i].."\n")
      end
   end
   writeto()
end

function ShowAlbums(table)
   Msg = "\r\n"
   if table == NewestStuff then
      if Count2 == 0 then 
         MsgNew = "\r\n\r\n".." --------- The Latest Albums -------- \r\nNo albums on the list yet\r\n --------- The Latest Albums -------- \r\n\r\n"
      else
         for i=1, Count2 do
            Msg = Msg..NewestStuff[i].."\r\n"
         end
         MsgNew = "\r\n\r\n".." --------- The Latest Albums -------- \r\n"..Msg.."\r\n --------- The Latest Albums -------- \r\n\r\n"
      end
   else
      if Count == 0 then
         MsgAll = "\r\n\r\r\n".." --------- All The Albums -------- \r\nNo albums on the list yet\r\n --------- All The Albums -------- \r\n\r\n"
      else
         for i=1, Count do
            Msg = Msg..AllStuff[i].."\r\n"
         end
         MsgAll = "\r\n\r\r\n".." --------- All The Albums -------- \r\n"..Msg.."\r\n --------- All The Albums -------- \r\n\r\n"
      end
   end
end

function AddStuff(user, what)
   Count = Count + 1
   AllStuff[Count]=what
   user:SendData(Bot, what.." is added to the albums|")
   SaveStuff()
   Reload()
end

function DelStuff(user, what)
   Okie = nil
   for a,b in AllStuff do
      if b == what then
         AllStuff[a]=nil
         user:SendData(Bot, what.." is removed from the albums|")
         Okie = 1
         break
      end
   end
   if Okie then
      SaveStuff()
      Reload()
   else
      user:SendData(Bot, what.." wasn't found in the albums|")
   end
end

function Reload()
   OpenStuff()
   ShowAlbums(NewestStuff)
   ShowAlbums(AllStuff)
end


+albums -- shows the full list
+newalbums -- shows the latest xx
+reloadalbums -- reloads the txt file (incase you manualy edit the file)
it uses only 1 file (AlbumsAll.txt)

An improved version of freshstuff.. rewriten by plop. i think this is an awsme script to use and mde a new post about it. enjoy !

[[SU]]Special-Ops

nice script, i converted it so i can use for movies in my hub. good work

HAPPY 2004    ;)

plop

i'm modding this script some more, but gotta do some other stuff 1st.
expect a update in the near future.
tiny preview.
 


 --------- All The Releases -------- 

  12/26/03 -- [TGA-OP]plop -- movie -- zusenzo
  12/26/03 -- [TGA-OP]plop -- music -- snap - cult of snap
  12/26/03 -- [TGA-OP]plop -- music -- herrie
  12/29/03 -- [TGA-OP]plopop -- warez -- tvtool v9.5.5.2 + v9.5.5.3
  12/29/03 -- [TGA-OP]plopop -- warez -- pixopedia 24 v1.0.4
  12/29/03 -- [TGA-OP]plopop -- warez -- SFV checker v1.10
  12/29/03 -- [TGA-OP]plopop -- warez -- trail doctor tdv131.zip 

 --------- All The Releases -------- 
  use +albums  to see only the selected types
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

[SWE]henrik

thanks ill use this;) the realy great thing is that i not only made it work, i also understand it all:)
Acoustic & World Music
jokiboxII.no-ip.info

plop

here it is, freshstuff 3.2.
if you have been running 3.0 then i got the sad news that you have 2 delete the old file.
this 1 is using a diferent way of saving, but it sure looks a lot better.
-- FreshStuff v.3.2 
-- original idea/script by chilla
-- completely rewriten by plop
-- if you were running 3.0 then you gotta delete the old file
-- it's incompatible with this version

-- Name the commands to what U like 
-- This command adds stuff, syntax : +addalbum TYPE/CATAGORY THESTUFF2ADD 
cmd1 = "+addalbum" 

-- This command shows the stuff, syntax : +albums with options new/game/warez/music/movie
cmd2 = "+albums" 

-- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE 
cmd3 = "+delalbum" 

-- This command shows the latest stuff, syntax : +newalbums
cmd4 = "+newalbums"

-- This command reloads the txt file. syntax : +reloadalbums 
-- (this command is needed if you manualy edit the text file)
cmd5 = "+reloadalbums"

-- Show latest stuff on entry 1=yes, 0=no
ShowOnEntry = 0

-- Max stuff shown on newalbums/entry
MaxNew = 20

-- The file storing the stuff
file = "txt/AlbumsAll.txt"

-- Name of the bot
Bot = "post-it_memo"

-- you can add catagory's yourself ["trigger_name"]="catagory_name"
Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}

--------------------- don't change anything below here
AllStuff = {}
NewestStuff = {}

function Main() 
   frmHub:RegBot(Bot)
   ReloadRel()
end

function NewUserConnected(user) 
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end 

function OpConnected(user) 
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end 

function DataArrival(user,data) 
   if (strsub(data, 1, 1) == "<") then 
      data = strsub(data,1,strlen(data)-1) 
      s,e,cmd,type,tune = strfind(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
      if cmd == cmd2 then
         if type == "" then
            user:SendPM(Bot, MsgAll.."|")
         elseif type == "new" then
            user:SendPM(Bot, MsgNew.."|")
         elseif Types[type] then
            ShowRelType(type)
            user:SendPM(Bot, MsgType.."|")
         end
         return 1
      elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
         if cmd == cmd3 then
            if type ~= "" then
               DelRel(user, type)
            else
               user:SendData(Bot, "yea right, like i know what i got 2 delete when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd1 then
            if tune ~= "" and Types[type] then
               AddRel(user, tune, type)
            elseif Types[type] == nil then
               user:SendData(Bot, "I need to know the catagory to add it to!|")
            else
               user:SendData(Bot, "yea right, like i know what you got 2 add when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd5 then
            Reload()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end
      end
   end
end

function OpenRel()
   AllStuff = nil
   NewestStuff = nil
   AllStuff = {}
   NewestStuff = {}
   Count = 0
   Count2 = 0
   readfrom(file)
   while 1 do
      local line = read() 
      if ( line == nil ) then 
         break 
      else 
         Count = Count +1
         AllStuff[Count]=line
      end
   end
   readfrom()
   if Count > MaxNew then
      local temp = Count - MaxNew + 1
      for i=temp, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff[i]
      end
   else
      for i=1, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff[i]
      end
   end
end

function ShowRel(table)
   Msg = "\r\n"
   if table == NewestStuff then
      if Count2 == 0 then 
         MsgNew = "\r\n\r\n".." --------- The Latest Releases -------- \r\n\r\n  No releases on the list yet\r\n\r\n --------- The Latest Releases -------- \r\n\r\n"
      else
         for i=1, Count2 do
            s,e,type,who,when,title=strfind(NewestStuff[i], "(.+)$(.+)$(.+)$(.+)")
            if title then
               Msg = Msg.."  "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
            else
               Msg = Msg..NewestStuff[i].."\r\n"
            end
         end
         MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.."  Releases -------- \r\n\r\n"
      end
   else
      if Count == 0 then
         MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- \r\n\r\n  No releases on the list yet\r\n\r\n --------- All The Releases -------- \r\n\r\n"
      else
         MsgHelp = "  use "..cmd2.."  to see only the selected types"
         for i=1, Count do
            s,e,type,who,when,title=strfind(AllStuff[i], "(.+)$(.+)$(.+)$(.+)")
            if title then
               Msg = Msg.."  "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
            else
               Msg = Msg..AllStuff[i].."\r\n"
            end
         end
         MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n"
      end
   end
end

function ShowRelType(what)
   Msg = "\r\n"
   tmp = 0
   if Count == 0 then
      MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
   else
      for i=1, Count do
         s,e,type,who,when,title=strfind(AllStuff[i], "(.+)$(.+)$(.+)$(.+)")
         if type == what then
            tmp = tmp + 1
            Msg = Msg.."  "..when.." -- "..who.." -- "..title.."\r\n"
         end
      end
      if tmp == 0 then
         MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
      else
         MsgType= "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n"..Msg.."\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
      end
   end
end

function AddRel(user, what, type)
   Count = Count + 1
   AllStuff[Count]=(type.."$"..user.sName.."$"..date("%x").."$"..what)
   user:SendData(Bot, what.." is added to the releases as "..type.."|")
   SaveRel()
   ReloadRel()
end

function DelRel(user, what)
   Okie = nil
   for a,b in AllStuff do
      s,e,title=strfind(b, ".+$(.+)$")
      if title == what then
         AllStuff[a]=nil
         user:SendData(Bot, what.." is removed from the releases|")
         Okie = 1
         break
      end
   end
   if Okie then
      SaveRel()
      ReloadRel()
   else
      user:SendData(Bot, what.." wasn't found in the releases|")
   end
end

function SaveRel()
   writeto(file)
   for i=1,Count do
      if AllStuff[i] then
         write(AllStuff[i].."\n")
      end
   end
   writeto()
end

function ReloadRel()
   OpenRel()
   ShowRel(NewestStuff)
   ShowRel(AllStuff)
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

BlazeXxX

Good work plop ;) Will it have control of who is allowed to add etc..?

for e.g. Only ops and above can add new releases or some kind?

plop

QuoteOriginally posted by BlazeXxX
Good work plop ;) Will it have control of who is allowed to add etc..?

for e.g. Only ops and above can add new releases or some kind?
yep only op's can add and delete stuff.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

DEEP-GOA

yauuuuu works fine - thanks!

http://deep-goa.no-ip.org
Put any term or title on me you want. What I am is what I do. I make things.

plop

#8
version 3.3.
change the way of deleting things.
+albums now shows an id number per entry, that number is used 2 delete things.
-- FreshStuff v.3.3 
-- original idea/script by chilla
-- completely rewriten by plop
-- if you were running 3.0 then you gotta delete the old file
-- it's incompatible with this version
-- deleting now goes by id number

-- Name the commands to what U like 
-- This command adds stuff, syntax : +addalbum TYPE/CATAGORY THESTUFF2ADD 
cmd1 = "+addalbum" 

-- This command shows the stuff, syntax : +albums with options new/game/warez/music/movie
cmd2 = "+albums" 

-- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE 
cmd3 = "+delalbum" 

-- This command shows the latest stuff, syntax : +newalbums
cmd4 = "+newalbums"

-- This command reloads the txt file. syntax : +reloadalbums 
-- (this command is needed if you manualy edit the text file)
cmd5 = "+reloadalbums"

-- Show latest stuff on entry 1=yes, 0=no
ShowOnEntry = 0

-- Max stuff shown on newalbums/entry
MaxNew = 20

-- The file storing the stuff
file = "txt/AlbumsAll.txt"

-- Name of the bot
Bot = "post-it_memo"

-- you can add catagory's yourself ["trigger_name"]="catagory_name"
Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}

--------------------- don't change anything below here
AllStuff = {}
NewestStuff = {}

function Main() 
   frmHub:RegBot(Bot)
   ReloadRel()
end

function NewUserConnected(user) 
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end 

function OpConnected(user) 
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end 

function DataArrival(user,data) 
   if (strsub(data, 1, 1) == "<") then 
      data = strsub(data,1,strlen(data)-1) 
      s,e,cmd,type,tune = strfind(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
      if cmd == cmd2 then
         if type == "" then
            user:SendPM(Bot, MsgAll.."|")
         elseif type == "new" then
            user:SendPM(Bot, MsgNew.."|")
         elseif Types[type] then
            ShowRelType(type)
            user:SendPM(Bot, MsgType.."|")
         end
         return 1
      elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
         if cmd == cmd3 then
            if type ~= "" then
               DelRel(user, type)
            else
               user:SendData(Bot, "yea right, like i know what i got 2 delete when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd1 then
            if tune ~= "" and Types[type] then
               AddRel(user, tune, type)
            elseif Types[type] == nil then
               user:SendData(Bot, "I need to know the catagory to add it to!|")
            else
               user:SendData(Bot, "yea right, like i know what you got 2 add when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd5 then
            ReloadRel()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end
      end
   end
end

function OpenRel()
   AllStuff = nil
   NewestStuff = nil
   AllStuff = {}
   NewestStuff = {}
   Count = 0
   Count2 = 0
   readfrom(file)
   while 1 do
      local line = read() 
      if ( line == nil ) then 
         break 
      else 
         Count = Count +1
         AllStuff[Count]=line
      end
   end
   readfrom()
   if Count > MaxNew then
      local temp = Count - MaxNew + 1
      for i=temp, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff[i]
      end
   else
      for i=1, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff[i]
      end
   end
end

function ShowRel(table)
   Msg = "\r\n"
   if table == NewestStuff then
      if Count2 == 0 then 
         MsgNew = "\r\n\r\n".." --------- The Latest Releases -------- \r\n\r\n  No releases on the list yet\r\n\r\n --------- The Latest Releases -------- \r\n\r\n"
      else
         for i=1, Count2 do
            s,e,type,who,when,title=strfind(NewestStuff[i], "(.+)$(.+)$(.+)$(.+)")
            if title then
               Msg = Msg.."  "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
            else
               Msg = Msg..NewestStuff[i].."\r\n"
            end
         end
         MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.."  Releases -------- \r\n\r\n"
      end
   else
      if Count == 0 then
         MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- \r\n\r\n  No releases on the list yet\r\n\r\n --------- All The Releases -------- \r\n\r\n"
      else
         MsgHelp = "  use "..cmd2.."  to see only the selected types"
         for i=1, Count do
            s,e,type,who,when,title=strfind(AllStuff[i], "(.+)$(.+)$(.+)$(.+)")
            if title then
               Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
            else
               Msg = Msg..AllStuff[i].."\r\n"
            end
         end
         MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n"
      end
   end
end

function ShowRelType(what)
   Msg = "\r\n"
   tmp = 0
   if Count == 0 then
      MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
   else
      for i=1, Count do
         s,e,type,who,when,title=strfind(AllStuff[i], "(.+)$(.+)$(.+)$(.+)")
         if type == what then
            tmp = tmp + 1
            Msg = Msg.."  "..when.." -- "..who.." -- "..title.."\r\n"
         end
      end
      if tmp == 0 then
         MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
      else
         MsgType= "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n"..Msg.."\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
      end
   end
end

function AddRel(user, what, type)
   Count = Count + 1
   AllStuff[Count]=(type.."$"..user.sName.."$"..date("%x").."$"..what)
   user:SendData(Bot, what.." is added to the releases as "..type.."|")
   SaveRel()
   ReloadRel()
end

function DelRel(user, what)
   if tonumber(what) then 
      what = tonumber(what)
      if AllStuff[what] then
         local s,e,which=strfind(AllStuff[what], "([^%$]+)$")
         user:SendData(Bot, which.." is deleted from the releases|")
         AllStuff[what]=nil
         SaveRel()
         ReloadRel()
      else
         user:SendData(Bot, what.." wasn't found in the releases|")
      end
   else
      user:SendData(Bot, "I need the ID number to delete a releas|")
   end
end

function SaveRel()
   writeto(file)
   for i=1,Count do
      if AllStuff[i] then
         write(AllStuff[i].."\n")
      end
   end
   writeto()
end

function ReloadRel()
   OpenRel()
   ShowRel(NewestStuff)
   ShowRel(AllStuff)
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

GaMeFaNaTiC


Trust_in_Trance

Hi i found a small mistake in the last script you post
plob.

The manually reload of the list brings you an error.

Correct this
         elseif cmd == cmd5 then
            Reload()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end

to:
         elseif cmd == cmd5 then
            ReloadRel()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end


and there won`t be a problem any more.

Me?alCas?le?

Nice work Plop this is what we did talk about before cristmas if you remember !tday

Dam GOOD work Plop  8)
NetworkFounder Of
?-^-=PureMe?al-Net=-^-?
http://puremetal.sytes.net    

Trust_in_Trance

One question!
How i have to modify the bot that when a user tipes +allhubtime  that this is shown to all users in the main chat not only to the one who wrote it?

plop

#13
QuoteOriginally posted by Trust_in_Trance
Hi i found a small mistake in the last script you post
plob.

The manually reload of the list brings you an error.

Correct this
         elseif cmd == cmd5 then
            Reload()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end

to:
         elseif cmd == cmd5 then
            ReloadRel()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end


and there won`t be a problem any more.
thx, that error must have slipped in when i converted this 2 work inside a.i.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

plop

QuoteOriginally posted by Trust_in_Trance
One question!
How i have to modify the bot that when a user tipes +allhubtime  that this is shown to all users in the main chat not only to the one who wrote it?
if i get your idea you want 2 replace this part.
     elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
for this.
     elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif cmd == cmd6 then
         SendToAll(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
cmd6 becomes your +allhubtime, don't forget 2 add that 2 the config part of the script.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

DoN

Wonder if someone could offer some help..

At the mo FreshshStuff has Categories such as..

Quote-- you can add catagory's yourself ["trigger_name"]="catagory_name"
Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}

I was just wondering if there will be a way to implement Sub Categories like for example for
Quote["music"]="Music",
you could have like POP, ROCK, JAZZ. As sub cats.


PLOP or any 1 willing to help?


Brgs

plop

QuoteOriginally posted by DoN
Wonder if someone could offer some help..

At the mo FreshshStuff has Categories such as..

Quote-- you can add catagory's yourself ["trigger_name"]="catagory_name"
Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}

I was just wondering if there will be a way to implement Sub Categories like for example for
Quote["music"]="Music",
you could have like POP, ROCK, JAZZ. As sub cats.


PLOP or any 1 willing to help?


Brgs
posible but how do you want it ??

+albums rock --- shows all rock albums

or

+albums music rock -- shows all rock albums from the catagory music
so +albums music -- would show all music catagory's.

gues the last as the 1st can be done by yourself.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

DoN

Well I wouldn't mind neither. As for the 1st idea as you said I could do that myself. I've already tried by just having loads of categories. So if I was to do +albums pop then in my categories I had already setted a "
Types = {["pop"] = "Pop",
But if I had the 2nd if you could make it better or the 2nd option of having +albums music pop is not 2 much to ask then I would appreciate whatever I end up with. :)

Is it possible so you could also have the content added formatted as...

Item ID - [DD/MM/YY] Category added by [Nick]        ::  Added Content

Brgs

plop

QuoteOriginally posted by DoN
Well I wouldn't mind neither. As for the 1st idea as you said I could do that myself. I've already tried by just having loads of categories. So if I was to do +albums pop then in my categories I had already setted a "
Types = {["pop"] = "Pop",
But if I had the 2nd if you could make it better or the 2nd option of having +albums music pop is not 2 much to ask then I would appreciate whatever I end up with. :)

Is it possible so you could also have the content added formatted as...

Item ID - [DD/MM/YY] Category added by [Nick]        ::  Added Content

Brgs
the id's are added the moment the script is running, you'll see that the number change the moment you add/delete something.
this makes it a bit useless 2 save them also.
the order it shows things like catagory/time/thingy can be changed by yourself.
just modify lines like this.
Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
i'll try 2 add the sub catagory's later, it's a nifty idea.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

DoN

QuoteOriginally posted by plop
the id's are added the moment the script is running, you'll see that the number change the moment you add/delete something.
this makes it a bit useless 2 save them also.
the order it shows things like catagory/time/thingy can be changed by yourself.
just modify lines like this.
Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
i'll try 2 add the sub catagory's later, it's a nifty idea.

plop

Thanx I didnt mean to have them saved in that format. Just meant to have it displayed like that but you have pasted the bit of code I can play about with to get looking like the way I may want it. Looking forward to the implement of sub cats. Thanx in advance :)

Brgs

[DK]DjBent

is there any way to change the prefix from + to !..as the other scripts i use are using ! in prefix.. and the sub catogoryes will be great...

Looking forward to your next update Plop

plop

QuoteOriginally posted by [DK]DjBent
is there any way to change the prefix from + to !..as the other scripts i use are using ! in prefix.. and the sub catogoryes will be great...

Looking forward to your next update Plop
you can change them in the top of the script.

version 4.2 is currently tested by some ppl.
but i got some questions for all of you.
---------------------------------------
  @show [option]			- option can be (sub)catagory name or ID number.
  @add  		- add's a entry's to the given catagory name.
  @del 			- deletes the given id.
  @comment  		- adds your comment to the given id number.
  @decomment  	- deletes the given comment on the given ID.
  @addartist  		- adds the given artist name to the ID.
  @delartist 			- deletes the artist from the given ID.
  @addfilename  		- adds the given filename to the ID.
  @delfilename 		- deletes the filename from the given ID.
  @addurl  		- adds the given url to the ID.
  @delurl 			- deletes the url from the given ID.
  @addcat  [subcat]		- adds a (sub)catagory.
  @delcat 			- deletes a (sub)catagory.
  @search 			- searches the database for the given string.
  @config [ ]	- shows the current config, more info is shown when no options are given!
---------------------------------------
not the most handy commands as you can see, my question is there for simple.
any1 got a better idea for them ?
i ask because it's really hard 2 change them yourself.

all left 2 do for the rest is something i kept forgetting, the showing of the latest x things 2 the users who enter the hub.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

[DK]DjBent

Looks Great... can't wait to get my hands on that script

Habalua

#23
Can't you add so that it writes in mainchat that a new release is added not just to the bot. And can you update it for bcdc++ to?

Maybe a switch on/off on this funktion

plop

QuoteOriginally posted by [DK]DjBent
Looks Great... can't wait to get my hands on that script
there are some beta's avail on my site, aslong as you don't delete things the latest versions are pretty stable.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk