how do u add a right click function i lua 5.1
plz help
http://www.dcpp.net/wiki/index.php/%24UserCommand
Sending raw data to users is the PX-specific part :)
thx m8
If you search the forum, you will find a discussion on this here (IIRC).
soory m8 i dint make it clear enough my mestak i men what is the function to add a right click command into a script
sorry m8 my bad
user:SendData("$UserCommand 1 3 Help$!help|")
thx m8 i will try it
Posted on: 2006-07-25, 23:16:38
i cant ger it to work
well try something more like this
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Help$!help|")
end
OpConnected = NewUserConnected
Cannot help write-only users, sorry. :-P
thx all i eventually got it working
thx again
Quote from: ((KMN))Gazza-95 on 07 August, 2006, 22:57:02
thx all i eventually got it working
thx again
Care to share your work with us?
not finished yet m8 lol soz but will wen finished kk
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Help$<[%mynick]>!help|")
end
OpConnected = NewUserConnected
<[%mynick]> indicates that the command is coming from you
i.e. if my nick is Billy, then the result, when I type !help would normally be shown as <Billy> !help in the hub...
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart#124;|")
end
i made this right click for my trivia script.....ut works fine but after clicking on it....i have type some thing in main chat....thn only it shows trivia started by speedX......adn the game starts....wat error is there??
Use this format:
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
So not two endpipe, first will be |
Btw: http://dcpp.net/wiki/index.php/%24UserCommand
thank u guys...1 last request...
Quote
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
OpConnected = NewUserConnected
i want to add one right click only for ops and masters.... i.e
Quote
user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser %[line:Nick] %[line:Pass] Reg|")
Where and how to put this command???
Quote from: speedX on 06 October, 2006, 10:42:17
thank u guys...1 last request...
i want to add one right click only for ops and masters.... i.e
Where and how to put this command???
Change:
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
OpConnected = NewUserConnected
with:
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
function OpConnected(user)
if user.bOperator and (user.iProfile == 0 or user.iProfile == 1) then
user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser %[line:Nick] %[line:Pass] Reg|")
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
end
C ya
Quote from: 6Marilyn6Manson6 on 06 October, 2006, 11:50:19
Change:
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
OpConnected = NewUserConnected
with:
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
function OpConnected(user)
if user.bOperator and (user.iProfile == 0 or user.iProfile == 1) then
user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser %[line:Nick] %[line:Pass] Reg|")
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
end
end
C ya
Much better to do
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
if user.bOperator then
user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser
end
end
OpConnected = NewUserConnected
Quote from: Rincewind on 06 October, 2006, 18:26:06
Much better to dofunction NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart||")
if user.bOperator then
user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser
end
end
OpConnected = NewUserConnected
Mmm I agree ;D
Hi guys...
Quote
user:SendData("$UserCommand 1 3 HOPS\\IP Help\\Nick From IP$<%[mynick]> +ip %[line:IP]||")
user:SendData("$UserCommand 0 3 ")
user:SendData("$UserCommand 1 3 HOPS\\Alerts\\Add Alert$<%[mynick]> +addalert %[line:nick]||")
I would like a separator between IP help and Alerts......but the codes wich i have entered makes a separator after Nick frm IP.....wat is the error ?? i tried to go through the link above.......but didn get it.....plzzz help...
I believe the separator would be curUser:SendData("$UserCommand 0 3 |")
Give that a try and let me know how you get on
nope not workin......it is showing me the following error....
Syntax ...PtokaX & Scripts\test 0.3.5.1\scripts\rightclick.lua:12: attempt to index global 'curUser' (a nil value)
Quote from: speedX on 07 October, 2006, 18:08:12
nope not workin......it is showing me the following error....
Syntax ...PtokaX & Scripts\test 0.3.5.1\scripts\rightclick.lua:12: attempt to index global 'curUser' (a nil value)
what is the script you are running,..?
Because as I searched the thread I didn't find 'curUser' anywhere,
I assume that you copy-pasted some code.
Post up the script that you are trying to code in the developing problems forums (look at the board index.)
no....it is not a script or thread......i am just making my own right.....first i disable teh right click of all my scripts and thn cuztomizing my own right click.......in making my own right click i faced a porb while making a separator.......read my above post.....
Quote from: speedX on 07 October, 2006, 19:26:17
no....it is not a script or thread......i am just making my own right.....first i disable teh right click of all my scripts and thn cuztomizing my own right click.......in making my own right click i faced a porb while making a separator.......read my above post.....
yeap I noticed ;) nice to see you doing some stuff on your own :P
I just now saw the post from Rincewind
try changing the curUser to user ;o
Sorry that was me not paying attenton to the variable names
hm.....so i guess tht my request is not possible to fulfill :(
as Herodes said change the curUser in the line I supplied to user and the separator should then work
The separator is working....but it is shoing the separator after Nick of IP.....I would like a separator between IP help and Alerts.........is it possible?? and i tried both curuser and user but still the separator comes after Nick from IP.....
Is the code you have this;user:SendData("$UserCommand 1 3 HOPS\\IP Help\\Nick From IP$<%[mynick]> +ip %[line:IP]|")
user:SendData("$UserCommand 0 3 |")
user:SendData("$UserCommand 1 3 HOPS\\Alerts\\Add Alert$<%[mynick]> +addalert %[line:nick]|")
nope I m using this code...
user:SendData("$UserCommand 1 3 HOPS\\IP Help\\Nick From IP$<%[mynick]> +ip %[line:IP]||")
user:SendData("$UserCommand 0 3 ")
user:SendData("$UserCommand 1 3 HOPS\\Alerts\\Add Alert$<%[mynick]> +addalert %[line:nick]||")
But i tried ur code also....not workin as per my request... :( the separator is still coming after Nick from IP
it is impossible.. resistance is futile.
try making it without the sub-menus.. it'll work ;)
user:SendData("$UserCommand 1 3 HOPS\\IP Help - Nick From IP$<%[mynick]> +ip %[line:IP]||")
user:SendData("$UserCommand 0 3 ")
user:SendData("$UserCommand 1 3 HOPS\\Alerts - Add Alert$<%[mynick]> +addalert %[line:nick]||")
Probably the separator can be added only for just until one sub menu. no more. ( I don't know if its meant to work this way in the client, if not then its a bug that will not be fixed since the DC++ creators are going to remove all NMDC Protocol from the DC++ sooner than we can all imagine... )
ya even i knew it tht it would be impossible......but thought i shud once ask u all...... np
well i've been playing around a bit and this bit works for me
user:SendData("$UserCommand 1 3 HOPS\\IP Help - Nick From IP$<%[mynick]> +ip %[line:IP]|");
user:SendData("$UserCommand 0 3 ");
user:SendData("$UserCommand 1 3 HOPS\\Alerts - Add Alert$<%[mynick]> +addalert %[line:nick]|");
either that way or this way
user:SendData("$UserCommand 1 3 HOPS\\IP Help\\Nick From IP$<%[mynick]> +ip %[line:IP]|");
user:SendData("$UserCommand 0 3 ");
user:SendData("$UserCommand 1 3 HOPS\\Alerts\\Add Alert$<%[mynick]> +addalert %[line:nick]|");
Yeah sorry I was forgetting about rhe submenus :P
The separator will appear at the bottom of the previous submneu rather than ijn the top level. As far as I know there is no way round that
hm......unfortunately the 2nd one is not working for me......would not like if it is displayed like the first one.......
what client are you using?
like i said they both work for me and i'm using CZDC 0.666[P2]
i m using Strong DC 1 rc10