Author Topic: Freshstuff 3.0 (rewritten by plop)  (Read 17847 times)

0 Members and 1 Guest are viewing this topic.

Offline GaMeFaNaTiC

  • Fulll Member
  • ****
  • Posts: 52
  • Karma: +0/-0
Freshstuff 3.0 (rewritten by plop)
« on: 01 January, 2004, 20:06:34 »
Code: [Select]
-- 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 !

PtokaX forum

Freshstuff 3.0 (rewritten by plop)
« on: 01 January, 2004, 20:06:34 »

Offline [[SU]]Special-Ops

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Freshstuff
« Reply #1 on: 01 January, 2004, 21:03:07 »
nice script, i converted it so i can use for movies in my hub. good work

HAPPY 2004    ;)

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #2 on: 02 January, 2004, 03:14:00 »
i'm modding this script some more, but gotta do some other stuff 1st.
expect a update in the near future.
tiny preview.
Code: [Select]



 --------- 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 <----<<

Offline [SWE]henrik

  • Member
  • ***
  • Posts: 34
  • Karma: +0/-0
(No subject)
« Reply #3 on: 02 January, 2004, 10:21:08 »
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

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #4 on: 05 January, 2004, 00:33:08 »
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.
Code: [Select]
-- 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.."          for a,b in Types do
            MsgHelp = MsgHelp.."/"..a
         end
         MsgHelp = MsgHelp.."> 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 <----<<

Offline BlazeXxX

  • Lord
  • ***
  • Posts: 375
  • Karma: +3/-0
(No subject)
« Reply #5 on: 05 January, 2004, 02:43:20 »
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?

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #6 on: 05 January, 2004, 03:11:25 »
Quote
Originally 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 <----<<

Offline DEEP-GOA

  • Double Ace
  • *
  • Posts: 122
  • Karma: +5/-0
    • DEEP-GOA
(No subject)
« Reply #7 on: 07 January, 2004, 11:18:51 »
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.

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #8 on: 19 January, 2004, 19:58:35 »
version 3.3.
change the way of deleting things.
+albums now shows an id number per entry, that number is used 2 delete things.
Code: [Select]
-- 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.."          for a,b in Types do
            MsgHelp = MsgHelp.."/"..a
         end
         MsgHelp = MsgHelp.."> 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
« Last Edit: 30 January, 2004, 15:38:11 by 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 <----<<

Offline GaMeFaNaTiC

  • Fulll Member
  • ****
  • Posts: 52
  • Karma: +0/-0
(No subject)
« Reply #9 on: 20 January, 2004, 19:42:21 »
kool plop  :D

Offline Trust_in_Trance

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Mistake
« Reply #10 on: 30 January, 2004, 10:04:36 »
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.

Offline Me?alCas?le?

  • Member
  • ***
  • Posts: 31
  • Karma: +0/-0
(No subject)
« Reply #11 on: 30 January, 2004, 10:43:39 »
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    

Offline Trust_in_Trance

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
(No subject)
« Reply #12 on: 30 January, 2004, 13:00:13 »
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?

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #13 on: 30 January, 2004, 15:39:52 »
Quote
Originally 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
« Last Edit: 30 January, 2004, 15:40:05 by 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 <----<<

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #14 on: 30 January, 2004, 15:45:15 »
Quote
Originally 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.
Code: [Select]
     elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
for this.
Code: [Select]
     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 <----<<

Offline DoN

  • Member
  • ***
  • Posts: 28
  • Karma: +0/-0
A lil bit of help
« Reply #15 on: 04 March, 2004, 09:40:05 »
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

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #16 on: 07 March, 2004, 19:38:52 »
Quote
Originally 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 <----<<

Offline DoN

  • Member
  • ***
  • Posts: 28
  • Karma: +0/-0
(No subject)
« Reply #17 on: 07 March, 2004, 19:54:10 »
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 "
Code: [Select]
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

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #18 on: 07 March, 2004, 20:31:36 »
Quote
Originally 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 "
Code: [Select]
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.
Code: [Select]
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 <----<<

Offline DoN

  • Member
  • ***
  • Posts: 28
  • Karma: +0/-0
(No subject)
« Reply #19 on: 07 March, 2004, 21:16:54 »
Quote
Originally 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.
Code: [Select]
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

Offline [DK]DjBent

  • Junior Member
  • **
  • Posts: 11
  • Karma: +0/-0
(No subject)
« Reply #20 on: 20 April, 2004, 15:22:26 »
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

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #21 on: 20 April, 2004, 17:26:28 »
Quote
Originally 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.
Code: [Select]
---------------------------------------
  @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 <----<<

Offline [DK]DjBent

  • Junior Member
  • **
  • Posts: 11
  • Karma: +0/-0
(No subject)
« Reply #22 on: 20 April, 2004, 17:31:28 »
Looks Great... can't wait to get my hands on that script

Offline Habalua

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
(No subject)
« Reply #23 on: 13 August, 2004, 01:58:33 »
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
« Last Edit: 13 August, 2004, 01:59:21 by Habalua »

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #24 on: 13 August, 2004, 06:47:24 »
Quote
Originally 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 <----<<

PtokaX forum

(No subject)
« Reply #24 on: 13 August, 2004, 06:47:24 »