FreshStuff 3.5 - Page 2
 

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

Started by bastya_elvtars, 11 March, 2005, 02:34:03

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bastya_elvtars

All the functions you mentioned were planned (pruning, mainchat, etc.)

About clonebot: need to find a good method.
Everything could have been anything else and it would have just as much meaning.

LiqUiD~TrolL

hello again , well i have the same problem too , when the hub is restarting the categories don t saved so i when it the old releases of the script

why is this happpeneing ??

bastya_elvtars r you gonna fix a new release unbaged ??   can t wait _!!

hop the script gonna end some day =)
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

ConejoDelMal

can somebody give me a working link for this script? thx
Rede-DC Comunidade Portuguesa de DC

bastya_elvtars

OK, the fixed version is online, this link should work.
Everything could have been anything else and it would have just as much meaning.

jiten

Tried the new version and the problem with the categories still remains.
After restarting the scripts,  now the contents of "categories.dat" aren't lost but, it doesn't seem to load it. So, when trying to add something, he says that the category doesn't exist.

Here:

[18:46:27]  The category cinemas has successfully been added. 
[18:46:38]  Test is added to the releases as cinemas 
[18:46:38]  jiten added to the cinemas releases: Test 
[18:46:41] *** Parts: ?bot? 
[18:46:45]  Unknown category: cinemas

LiqUiD~TrolL

well i decided to use the older version it works great exept this function with the +rlsfind


and something more VIPs can t add releases  =/ this is not good

can anyone fix this?

-- FreshStuff 3 - 3.7beta  -----------------------------------------------------------------------------------------  -- original idea/script by chilla  -- completely rewriten by plop  -- taken over by bastya_elvtars (the rock n' roll doctor)  -- 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  -- anounces the new releas in mainchat  -----------------------------------------------------------------------------------------  --------------------------- 3.7 -----------------------------  -- converted to lua5 and added search function by bastya_elvtars  -- also taken over with permission by plop. :P  -- rewrote the metadata routine: pattern matching is applied upon opening, using nested arrays ---> faster.  -- added ability to delete multiple releases with a single line.  --------------------------- 3.7.5 -----------------------------  -- added choice between showing in main or PM on entry  -- new stuff is shown by real ID (idea by LiqUiD~TrolL)  -- security fixes have been made, corrupt entries are ignored  -----------------------------------------------------------------------------------------    senddebugto={"[TGA-OP]bastya_elvtars"}    -- Name the commands to what U like   -- This command adds stuff, syntax : +addalbum TYPE/CATAGORY THESTUFF2ADD   cmd1 = "+addrls"     -- This command shows the stuff, syntax : +albums with options new/game/warez/music/movie  cmd2 = "+rlsall"     -- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE   cmd3 = "+delrls"     -- This command shows the latest stuff, syntax : +newalbums  cmd4 = "+rls"    -- This command reloads the txt file. syntax : +reloadalbums   -- (this command is needed if you manualy edit the text file)  cmd5 = "+reloadalbums"      -- This is for searching inside releases.    cmd6="+rlsfind"    -- Show latest stuff on entry 1=PM, 2=mainchat, 0=no  ShowOnEntry = 0    -- Max stuff shown on newalbums/entry  MaxNew = 40    -- The file storing the stuff  file = "releases.dat"      -- Name of the bot  Bot = "•NemO•"    -- you can add catagory's yourself ["trigger_name"]="catagory_name"  Types = {["psychedelic"] = "Psychedelic", ["ambient"]="Ambient", ["electronic"]="Electronic", ["psytrance"]="Psytrance", ["goa"]="Goa", ["chill"]="Chill", ["psytrance"]="Psytrance", ["house"]="House", ["proggresive"]="Proggresive", ["trance"]="Trance", ["psymovie"]="Psymovie"}     --------------------- don't change anything below here  AllStuff = {}  NewestStuff = {}    function Main()   frmHub:RegBot(Bot)  ReloadRel()  end    function Show(user)  if ShowOnEntry ~=0 then  if ShowOnEntry==1 then  user:SendPM(Bot, MsgNew.."|")  end  end  end    function NewUserConnected(user)   Show(user)  end     function ChatArrival(user,data)  data = string.sub(data,1,string.len(data)-1)   local _,_,cmd,type,tune = string.find(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!|")  elseif cmd==cmd6 then   if type~="" and tune=="" then  SearchRel(user,type)  else  user:SendData(Bot, "yea right, like i know what you got 2 search when you don't tell me!|")  end    return 1  end  end  end      function OpenRel()  AllStuff = nil  NewestStuff = nil  AllStuff = {}  NewestStuff = {}  Count = 0  Count2 = 0  local f=io.open(file,"r")  if f then  for line in f:lines() do  Count = Count +1  local _,_,type,who,when,title=string.find(line, "(.+)$(.+)$(.+)$(.+)")  if type and who and when and title then  AllStuff[Count]={type,who,when,title}  else  SendToOps(Bot, "Releases file is corrupt, failed to load all items.")  end  end  f:close()  end  if Count > MaxNew then  local tmp = Count - MaxNew + 1  Count2=Count - MaxNew + 1  for i = tmp, Count do  Count2=Count2 + 1  if AllStuff[Count2] then  NewestStuff[Count2]=AllStuff[Count2]  end  end  else  for i=1, Count do  Count2 = Count2 + 1  if AllStuff[i] then  NewestStuff[Count2]=AllStuff[i]  end  end  end  end    function ShowRel(table)  Msg = "\r\n"  local type,who,when,title  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  if NewestStuff[i] then  type,who,when,title=NewestStuff[i][1],NewestStuff[i][2],NewestStuff[i][3],NewestStuff[i][4]  if title then  Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"  else  Msg = Msg..(table.concat(NewestStuff[i])).."\r\n"  end  end  end  end  MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.."  Releases -------- \r\n\r\n"  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  if AllStuff[i] then  type,who,when,title=AllStuff[i][1],AllStuff[i][2],AllStuff[i][3],AllStuff[i][4]  if title then  Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"  else  Msg = Msg..(table.concat(AllStuff[i])).."\r\n"  end  end  end  end  MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n"  end  end    function ShowRelType(what)  local type,who,when,title  Msg = "\r\n"  tmp = 0  if Count == 0 then  MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..string.lower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"  else  for i=1, Count do  type,who,when,title=AllStuff[i][1],AllStuff[i][2],AllStuff[i][3],AllStuff[i][4]  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 "..string.lower(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,os.date("%x"),what}  user:SendData(Bot, what.." is added to the releases as "..type.."|")  SendToAll(Bot, user.sName.." added to the "..type.." releases: "..what.."|")  SaveRel()  ReloadRel()  end    function DelRel(user, what)  string.gsub(what,"(%d+)",function(what)  what = tonumber(what)  if what then  if AllStuff[what] then  local which=(AllStuff[what][4])  user:SendData(Bot, which.." is deleted from the releases|")  AllStuff[what]=nil  else  user:SendData(Bot, "release numbered "..what.." wasn't found in the releases|")  end  else  user:SendData(parseenv(user,env,Bot).. "I need the ID number to delete an entry.|")  end  end)  SaveRel()  ReloadRel()  end    function SaveRel()  local f= io.open(file,"w+")  for i=1,Count do  if AllStuff[i] then  f:write(AllStuff[i][1].."$"..AllStuff[i][2].."$"..AllStuff[i][3].."$"..AllStuff[i][4].."\n")  end  end  f:flush()  f:close(f)  end    function ReloadRel()  OpenRel()  ShowRel(NewestStuff)  ShowRel(AllStuff)  end    function DelRelOld(user, what)  Okie = nil  local title  for a,b in AllStuff do  title=b[4]  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 SearchRel(user,what)  local res=0  local rest={}  local _,_,bdc=string.find(what,"([%%%[%]%(%)%*%+%-%?%^])")  local msg="\r\n---------- You searched for keyword \""..what.."\". The results: ----------\r\n"  if bdc then  user:SendData(Bot,"you cannot use the character "..bdc)  return  end  for a,b in AllStuff do  if string.find(b[4],what) then  table.insert(rest,{b[1],b[2],b[3],b[4]})  end  end  if table.getn(rest)~=0 then  for i=1,table.getn(rest) do  local type,who,when,title=rest[i][1],rest[i][2],rest[i][3],rest[i][4]  res= res + 1  msg = msg.."\r\n  "..when.." -- "..who.." -- "..title  end  msg=msg.."\r\n\r\n"..res.." results."  else  msg=msg.."\r\nSearch string "..what.." was not found in releases database."  end  user:SendPM(Bot,msg)  end    function OnError(ErrorMsg)  if enabledebug==1 then  for f=1,table.getn(senddebugto) do  SendPmToNick(senddebugto[f],Bot, ErrorMsg.."\r\n".."Stack traceback: "..debug.traceback())  end  end  end    OpConnected=NewUserConnected
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

ConejoDelMal

thx a lot, looks great, just really has the problem jiten  said... you restart the script, and you cant add anything to the cat's created...  hope to see it fixed  :P
Rede-DC Comunidade Portuguesa de DC

kuipie

Very nice job  :]
A rightclicker would be nice to  ;)

bastya_elvtars

Well, ok, the customizability simply forces me to make this feature. :)
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

After a looooooooong silence, here is some update.


DOWNLOAD HERE


What's new:

---------------- --------------- 4.0 pre3
added showing and deleting of a category
fixed ugly bugs hopefully, please test

TODO:

1) add PM and env support
2) add some kind of !help

As usual, use at own risk, however it seems neat. :P Bug reports are more than welcome.
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

#35
Pre5.

Pre4 had a critical bug, please update!

Go to download site.
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

The long-awaited update is NOW.

Special thx to oldman for ideas/reports.

Read the notes please, there are too many new things to list here.

Download
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

4.3 is out.

Download

fixed category saving bug
added timed announces
added help
added PM command parsing
added some version info :-)

TODO: optimize a bit more
Everything could have been anything else and it would have just as much meaning.

?Tr??T_????

[19:15] Syntax ...ents\Azim (Business)\Ptokax\Ptokax\scripts\fresh.lua:243: attempt to compare number with nil

bastya_elvtars

QuoteOriginally posted by ?Tr??T_????
[19:15] Syntax ...ents\Azim (Business)\Ptokax\Ptokax\scripts\fresh.lua:243: attempt to compare number with nil

What profiles do you use?
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

A bug crawled into the file. :)

Replace the whole OnTimer() to:

function OnTimer()
  if FreshStuff.Timer < 60 then
    FreshStuff.Timer=FreshStuff.Timer+1
  else
    if FreshStuff.WhenAndWhatToShow[os.date("%H:%M")] then
      if FreshStuff.Types[FreshStuff.WhenAndWhatToShow[os.date("%H:%M")]] then
        SendToAll(Bot.name, FreshStuff.ShowRelType(FreshStuff.WhenAndWhatToShow[os.date("%H:%M")]))
      else
        if FreshStuff.WhenAndWhatToShow[os.date("%H:%M")]=="new" then
          SendToAll(Bot.name, FreshStuff.MsgNew)
        elseif FreshStuff.WhenAndWhatToShow[os.date("%H:%M")]=="all" then
          SendToAll(Bot.name, FreshStuff.MsgAll)
        else
          SendToOps(Bot.name,"Some fool added something to my timed ad list that I never heard of. :-)")
        end
      end
    end
    FreshStuff.Timer=0
  end
end
Everything could have been anything else and it would have just as much meaning.

?Tr??T_????

[20:07] Syntax ...ents\Azim (Business)\Ptokax\Ptokax\scripts\fresh.lua:243: attempt to compare number with nil

bastya_elvtars

QuoteOriginally posted by ?Tr??T_????
[20:07] Syntax ...ents\Azim (Business)\Ptokax\Ptokax\scripts\fresh.lua:243: attempt to compare number with nil

1) What brings this on?
2) I asked once: what profiles do you have?
Everything could have been anything else and it would have just as much meaning.

?Tr??T_????

profile?
my is netfounder ?(

Psycho_Chihuahua

QuoteOriginally posted by ?Tr??T_????
profile?


Look in cfg/Profiles.xml

ie



    
        Master
        1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
    
    
        Operator
        1001111111111111111101110011111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    
    
        VIP
        0000111000000111111000000000000111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    
    
        Reg
        0000101000000010000000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    

PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

?Tr??T_????


-
-
  Master
  1111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 

-
  Operator
  1001111110110011111001100010111101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 

-
  VIP
  0011110010100011000000000000010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 

-
  Reg
  0000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 

-
  Moderator
  1111111110110011111011100110111101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 

-
  NetFounder
  1111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 

 

bastya_elvtars

OK, the script uses the standard profiles. Wait and gonna do, I assume this is Robo or something...
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

Replace

userlevels={ [-1] = 1, [0] = 5, [1] = 4, [2] = 3, [3] = 2 }

to

userlevels={ [-1] = 1, [0] = 5, [1] = 4, [2] = 3, [3] = 2, [4]=4, [5]=5 }

(Goes for robocop users only!!!)
Everything could have been anything else and it would have just as much meaning.

?Tr??T_????

Syntax ...ministrator\My Documents\Azim (Business)\Ptokax\Ptokax\scripts\fresh.lua:86: `=' expected near `FreshStuff'

bastya_elvtars

QuoteOriginally posted by ?Tr??T_????
Syntax ...ministrator\My Documents\Azim (Business)\Ptokax\Ptokax\scripts\fresh.lua:86: `=' expected near `FreshStuff'

You have done something wrong. Should work.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk