if its possible.......
im an operator in a hub from a friend of mine..
i build the hub for him..
but when i see a error syntax or something like that, is it possible to create a LUA script that i can input
"a script"
to the bot and restart scripts??
that after restart the script is in it?
regards jaydee
if you have the possibility to add the script into his folder, then yes.
PtokaX has inbuild commands for starting/stopping/restarting scripts
i mean, example...
he doesnt have D2AF.LUA and hes running the hub, but hes on vacation...
i load D2AF.LUA into the script save it and restart the scripts...
now D2AF.LUA is in the script list, is that possible to create such a script, to ---->input extern from the ptokax??
regards jaydee
It can be done, though (as CrazyGuy wrote) you would have to have access to the 'scripts' folder on the computer running the hub.
Ex. by script or FTP.
-Snooze (http://www.dixbot.com)
or you can use a texter ..
a script to read/write texts from
client to files in script folder ..
there is a few not sure what lua versions
but have look for "texter" and you will find it it will do without ftp ..
not really uploading files .. but actually paste copy .. (works for smaller scripts )
:D nice script mutor! thnx! ;D
maybe im a noob ???
how do i paste a script and save it???
theres only 1 box to save the filename????
help command needs a .txt file???
or im really blind???
regards jaydee
copy/paste it to notepad and save it as a .lua file ( set file type to All Files )
or, copy/paste it into PtokaX's Script editor and click save there
Quote from: Mutor on 05 January, 2007, 00:03:25
This perhaps is not the wisest method, nor is it recommended
for large scripts or files originally formatted as binary.
But here you are , a little rough perhaps but a good start.
As always, comments welcome
--[[
Script Bot 1.0 LUA 5.0/5.1
By Mutor 01/03/06
........ the hard work .............
thanks Mutor i was afraid he would ask me where to find it .. this looks better then the older version that was
so nice one, once again :))
" As always, comments welcome "
" a little rough perhaps but a good start. "
so what about..
a command to change script order ?
that would be a nice next thing i guess ..
Quote from: Mutor on 05 January, 2007, 22:34:40
Regarding scripot order:
I have been wanting a API call for the scripts for sometime.
Without this we cannot effect a change in the order properly.
Currently we may only fetch the list of scripts by direct command.
The same goes for the other default script commands.
If we could pull a table from the hub it would open up other options.
i have put a request in feature requests a long time ago ...
but .. no reply/response on that one :/
so i was thinking more like .. parsing/overwiting the Scripts.xml ...
just, i am not so sure what happens when we reboot all scripts or even reboot hub..
will PX overwite/read the xml so we loose the changes or could that work ?
Quote from: CrazyGuy on 05 January, 2007, 16:36:53
copy/paste it to notepad and save it as a .lua file ( set file type to All Files )
or, copy/paste it into PtokaX's Script editor and click save there
hmm wrong question of me, or understood quite different........
how do i paste a script to the bot, of my friends hub???
return "Save Script"," %[line:Filename (ie. filename.lua]"," %[line:Filename (ie. filename.lua]"
Wher do i paste the script??? its only .LUA saving.......... ????
Quote from: Mutor on 06 January, 2007, 15:59:49
Well we could always attempt to overwrite the xml, but
this should be an API call which would avoid any problems
altogether.
well, let's all hope PPK reads this and reconsiders the request(s).. ;)
it would be very convenient if we could have that one ...
;D the input on pm(bot) works !!! it loads with no error the script...
i have this script loaded:
-- rightclicker
rMenu = "~~~~?ShareHider?"
qMenu = "~~~~?Records?"
Prof = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[-1] = 1, -- Users
}
--------------------------------------------------------------------------------------------------------------------
NewUserConnected = function(user)
if Prof[user.iProfile] == 1 then
user:SendData("$UserCommand 0 3")
if user.iProfile == 0 or user.iProfile == 1 then
user:SendData("$UserCommand 1 3 "..rMenu.."\\hideshare $<%[mynick]> !hideshare |")
user:SendData("$UserCommand 1 3 "..rMenu.."\\unhideshare $<%[mynick]> !unhideshare|")
end
if user.iProfile == 0 or user.iProfile == 2 then
user:SendData("$UserCommand 1 3 "..qMenu.."\\help $<%[mynick]> !rb.help |")
user:SendData("$UserCommand 1 3 "..qMenu.."\\show records $<%[mynick]> !rb.show|")
user:SendData("$UserCommand 1 3 "..qMenu.."\\reset records $<%[mynick]> !rb.reset|")
end
end
end
OpConnected = NewUserConnected
but when i reconnect to the hub this comes in main:
[15:54:19] $UserCommand 0 3
[15:54:19] $UserCommand 1 3 ~~~~?ShareHider?\hideshare $<%[mynick]> !hideshare |
[15:54:19] $UserCommand 1 3 ~~~~?ShareHider?\unhideshare $<%[mynick]> !unhideshare|
[15:54:19] $UserCommand 1 3 ~~~~?Records?\help $<%[mynick]> !rb.help |
[15:54:19] $UserCommand 1 3 ~~~~?Records?\show records $<%[mynick]> !rb.show|
[15:54:19] $UserCommand 1 3 ~~~~?Records?\reset records $<%[mynick]> !rb.reset|
how is this possible ???
???
hmm the script is for operator....
can you change it please to operator and above??
running leviathan, and moderator functions is better then operator so if possible please op and above ??
thnx
Change
Prof = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[-1] = 1, -- Users
}
to
Prof = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 0, -- Vips
[3] = 0, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[6] = 1, -- Owner profile in Leviathan
[-1] = 0, -- Users
}
noticed a problem whit the script bot :(
after 6 days my hub refused to send messages from operators in pm and main whit the comment:
you dont have permission to use this command.
seems to disturb the other hubscripts/settings
i stopped scriptbot and problem was gone
advise to start the script only when needed
Quote from: jay-dee on 07 January, 2007, 16:01:34
;D the input on pm(bot) works !!! it loads with no error the script...
i have this script loaded:
-- rightclicker
rMenu = "~~~~?ShareHider?"
qMenu = "~~~~?Records?"
Prof = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 1, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[-1] = 1, -- Users
}
--------------------------------------------------------------------------------------------------------------------
NewUserConnected = function(user)
if Prof[user.iProfile] == 1 then
user:SendData("$UserCommand 0 3")
if user.iProfile == 0 or user.iProfile == 1 then
user:SendData("$UserCommand 1 3 "..rMenu.."\\hideshare $<%[mynick]> !hideshare |")
user:SendData("$UserCommand 1 3 "..rMenu.."\\unhideshare $<%[mynick]> !unhideshare|")
end
if user.iProfile == 0 or user.iProfile == 2 then
user:SendData("$UserCommand 1 3 "..qMenu.."\\help $<%[mynick]> !rb.help |")
user:SendData("$UserCommand 1 3 "..qMenu.."\\show records $<%[mynick]> !rb.show|")
user:SendData("$UserCommand 1 3 "..qMenu.."\\reset records $<%[mynick]> !rb.reset|")
end
end
end
OpConnected = NewUserConnected
but when i reconnect to the hub this comes in main:
[15:54:19] $UserCommand 0 3
[15:54:19] $UserCommand 1 3 ~~~~?ShareHider?\hideshare $<%[mynick]> !hideshare |
[15:54:19] $UserCommand 1 3 ~~~~?ShareHider?\unhideshare $<%[mynick]> !unhideshare|
[15:54:19] $UserCommand 1 3 ~~~~?Records?\help $<%[mynick]> !rb.help |
[15:54:19] $UserCommand 1 3 ~~~~?Records?\show records $<%[mynick]> !rb.show|
[15:54:19] $UserCommand 1 3 ~~~~?Records?\reset records $<%[mynick]> !rb.reset|
how is this possible ???
my guess would be that your not using the standard dc++ client but some mod or totaly different client.
some of those format the text, which can cause the hub to recieve the script in a screwed up way (for example magic chars get escaped).
plop
looks like a client not having supporting UserCommand
user.bUserCommand might help in this case.