PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: GaMeFaNaTiC on 27 October, 2003, 14:27:26

Title: can any1 make an addfunction to this...
Post by: GaMeFaNaTiC on 27 October, 2003, 14:27:26
the other thread may of been confusing so this is what i basically want. in skybot 0.2 ther is a function called !albums which shows you the albums in the hub. it reads the text from a txt file in this directory, TUNEZ/albums.txt. ok i found the read bit in the script which is...

function doalbums(user)
if (not user.bOperator) or (user.bOperator) then
local albums =""
readfrom("TUNEZ/albums.txt")
while 1 do
local line = read()
if (line == nil) then
break
else
albums = albums..line.."\r\n"
end
end
SendPmToNick(user.sName, Bot, albums)
readfrom()
end
end


This reads !albums if you are a op not not a op. now next to it or in it i want to add smething like a write function. like when you add vips, the names go in a file and all this is done in main. i wnt a function that can use !addalbum to add text into the .txt file. !addalbum can only also be done by ops only but !albums can be used be anyone. also if possible.. can there also be a delete feature such as !delalbum . i knw this is a lot of things but i am desperatly wanting it and i hope that somebody can make it . thnks for the help people!
Title:
Post by: TiMeTrAVelleR on 27 October, 2003, 16:03:33
Go Here (http://chiller3000.tripod.com/p-scripts/freshstuff-v.2.60.zip)   script made by chiller   i think it has all youre looking for  and more

TiM?
Title:
Post by: GaMeFaNaTiC on 27 October, 2003, 16:28:05
i knw about fresh stuff, but just wnted to add the addfunction to this bot to make it easier.  :))