=ReleaseBot= request - 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

=ReleaseBot= request

Started by LILLITH, 08 March, 2005, 18:28:01

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shalla-Bal

Madman,

You were correct, it was another script conflict.....
All is running smoothly now, Thanks for the great script,
and all your help :)



Thanks Again,

Shalla

(-=TrIp-iN-SuN=-)

any one know how changed this script to lua5?




--## Release Bot Re-Written

--## Removed some functions to xxx

--## Made by xxx

--## Commands:

--##+add - Will add a Release to the list

--##+del - Will deleted a Relese from the list

--##+rlsall- Will Show all the Releases

--##+rls- Will Show the Lastest Releases

--##+rlsfind - Will make a search for a Release



sBot = "-NemO-"



arrRelease = {}

fDataRelease = "release.dat"

fRelease = "release.work"



--## Configuration ##--



iLastRelease = 30 -- Choose how many new release you want to show in +rls

uLaterPtokax = 0-- Choose 0 if you are using Ptokax version 0.3.3.0 or higher

-- Choose 1 if you are using Ptokax version lower then 0.3.3.0



--## END ##--



function Main()

frmHub:RegBot(sBot)

LoadFromFile(fDataRelease)

end



function OnExit()

SaveToFile(fDataRelease , arrRelease , "arrRelease")

end



function DataArrival(user, data)

if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: Psychedelic~Dreams2"..sBot) then

data = strsub(data,1,strlen(data)-1)

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

if (cmd == "+add" and user.bOperator) then

LoadFromFile(fDataRelease)

AddRelease(user, data)

if (uLaterPtokax == 0) then

OnExit()

end

arrRelease = {}

return 1

elseif (cmd == "+rlsall") then

ShowAllRelease(user)

return 1

elseif (cmd == "+rls") then

ShowLastestReleases(user)

return 1

elseif (cmd == "+del" and user.bOperator) then

LoadFromFile(fDataRelease)

DeleteRelease(user, data)

if (uLaterPtokax == 0) then

OnExit()

end

arrRelease = {}

return 1

elseif (cmd == "+rlsfind") then

FindRelease(user, data)

return 1

end

end

end



function AddRelease(user, data)

local s,e,rel,style = strfind(data, "%b<>%s+%S+%s+(%S+)%s+(%S+)")

if (rel == nil or style == nil) then

user:SendData(sBot, "Syntax Error, +addrls