PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Madman on 13 May, 2005, 05:03:26

Title: Show scripts
Post by: Madman on 13 May, 2005, 05:03:26
-- Show scripts
-- Made by Madman
-- A simple script to show what scripts are in the Scripts folder

Bot = frmHub:GetHubBotName()

function ChatArrival(curUser, data)
local data = string.sub(data, 1, -2)
local s,e,cmd = string.find(data, "%b<>%s+[%!%+%?%#](%S+)")
if cmd then
local tCmds = {
["listscripts"] = function (curUser, data)
if curUser.bOperator then
os.execute("dir *.lua /b > Scripts.ini")
local list = io.open("Scripts.ini")
if list then
curUser:SendData(Bot, "The hub currently has these scripts in the scripts folder")
for Scripts in io.lines("Scripts.ini") do
curUser:SendData(Scripts)
end
list:close()
os.remove("Scripts.ini")
end
return 1
end
curUser:SendData(Bot, "Hmmm.. nope.. You ain't allowed to list the scripts") return 1
end,
}
if tCmds[cmd] then
return tCmds[cmd](curUser, data)
end
end
end

A simple script to show what scripts are in the Scripts folder... =)
Title: Shoe Scripts
Post by: MDFP on 22 July, 2005, 03:11:44
Perfect!

Nice Script.

Useful.

Thks
Title:
Post by: Northwind on 23 July, 2005, 13:43:20
hi, can u make versio where only master profile can see the script what are running.
Title:
Post by: Madman on 23 July, 2005, 14:27:55
QuoteOriginally posted by Mutor
change the line

if cmd then

to

if cmd and user.iProfile == 0 then
Understand this script, doesnt reflect what scripts are running, just what scripts are in the scripts folder.

wrong line m8 ;) no need to change that one...
Change this instead
if curUser.bOperator thento
if curUser.iProfile == 1 then
Title:
Post by: kash? on 01 August, 2005, 17:28:48
gr8 script but Is it possible to enable and disable scripts
 when I am not hosting hub of course but I am master...

Regards,
Title:
Post by: Dessamator on 01 August, 2005, 18:11:33
yep
Title:
Post by: kash? on 03 August, 2005, 18:36:00
How can I enable and disable scripts ?
Can u plz make necessary changes in the script...
Title:
Post by: Madman on 03 August, 2005, 18:39:36
You dont need a script for that.... check PtokaX help.. the is start and stop script commands...
Title:
Post by: kash? on 03 August, 2005, 18:47:43
How can I enable and disable scripts ?
Can u plz make necessary changes in the script...
***when I am not hosting hub but I am master***
Title:
Post by: Madman on 03 August, 2005, 18:59:41
QuoteOriginally posted by kash?
How can I enable and disable scripts ?
Can u plz make necessary changes in the script...
***when I am not hosting hub but I am master***

QuoteOriginally posted by madman
You dont need a script for that.... check PtokaX help.. the is start and stop script commands...

in fact... u dont need this script at all... with new PtokaX u can use the commands
!getscripts
!startscript filename.lua
!stopscript filename.lua

and YES masters is allowd to use thoose commands...
Title:
Post by: kash? on 04 August, 2005, 10:57:22
those commans by madman are not working in my hub
I have PtokaX 0.3.3.1