Author Topic: right click  (Read 15194 times)

0 Members and 1 Guest are viewing this topic.

Offline ((KMN))Gazza-95

  • Junior Member
  • **
  • Posts: 24
  • Karma: +3/-1
right click
« on: 25 July, 2006, 21:39:00 »
how do u add a right click function i lua 5.1

plz help

PtokaX forum

right click
« on: 25 July, 2006, 21:39:00 »

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: right click
« Reply #1 on: 25 July, 2006, 21:52:37 »
http://www.dcpp.net/wiki/index.php/%24UserCommand

Sending raw data to users is the PX-specific part :)
Everything could have been anything else and it would have just as much meaning.

Offline ((KMN))Gazza-95

  • Junior Member
  • **
  • Posts: 24
  • Karma: +3/-1
Re: right click
« Reply #2 on: 25 July, 2006, 21:58:25 »
thx m8

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: right click
« Reply #3 on: 25 July, 2006, 21:59:31 »
If you search the forum, you will find a discussion on this here (IIRC).
Everything could have been anything else and it would have just as much meaning.

Offline ((KMN))Gazza-95

  • Junior Member
  • **
  • Posts: 24
  • Karma: +3/-1
Re: right click
« Reply #4 on: 25 July, 2006, 22:01:10 »
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

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: right click
« Reply #5 on: 25 July, 2006, 22:04:49 »
Code: [Select]
user:SendData("$UserCommand 1 3 Help$!help|")
Everything could have been anything else and it would have just as much meaning.

Offline ((KMN))Gazza-95

  • Junior Member
  • **
  • Posts: 24
  • Karma: +3/-1
Re: right click
« Reply #6 on: 30 July, 2006, 21:26:58 »
thx m8 i will try it
Posted on: 2006-07-25, 23:16:38
i cant ger it to work

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: right click
« Reply #7 on: 30 July, 2006, 21:28:02 »
i cant ger it to work


Post what you are having.
Everything could have been anything else and it would have just as much meaning.

Offline Psycho_Chihuahua

  • Systemspecialist IT
  • Emperor
  • **
  • Posts: 1 054
  • Karma: +112/-1
  • I am wherever i want to be
    • PtokaX Luaboard
Re: right click
« Reply #8 on: 31 July, 2006, 15:17:18 »
well try something more like this
Code: [Select]
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Help$!help|")
end

OpConnected = NewUserConnected
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: right click
« Reply #9 on: 07 August, 2006, 19:59:34 »
Cannot help write-only users, sorry. :-P
Everything could have been anything else and it would have just as much meaning.

Offline ((KMN))Gazza-95

  • Junior Member
  • **
  • Posts: 24
  • Karma: +3/-1
Re: right click
« Reply #10 on: 07 August, 2006, 22:57:02 »
thx all i eventually got it working

thx again

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: right click
« Reply #11 on: 08 August, 2006, 15:05:26 »
thx all i eventually got it working

thx again

Care to share your work with us?
Everything could have been anything else and it would have just as much meaning.

Offline ((KMN))Gazza-95

  • Junior Member
  • **
  • Posts: 24
  • Karma: +3/-1
Re: right click
« Reply #12 on: 08 August, 2006, 22:04:18 »
not finished yet m8 lol soz but will wen finished kk

Offline The_ArchitecT

  • Newbie
  • *
  • Posts: 1
  • Karma: +3/-0
Re: right click
« Reply #13 on: 21 September, 2006, 18:34:18 »
Code: [Select]
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Help$<[%mynick]>!help&#124;")
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...

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: right click
« Reply #14 on: 05 October, 2006, 23:14:22 »
Code: [Select]
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??
« Last Edit: 06 October, 2006, 00:37:27 by bastya_elvtars »
Thanking You,

speedX

Offline Thor

  • Scripter
  • Lord
  • ******
  • Posts: 290
  • Karma: +45/-5
    • Hungarian Direct Connect Site
Re: right click
« Reply #15 on: 05 October, 2006, 23:55:14 »
Use this format:
Code: [Select]
function NewUserConnected(user)
   user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
end
So not two endpipe, first will be &#124;
Btw: http://dcpp.net/wiki/index.php/%24UserCommand

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: right click
« Reply #16 on: 06 October, 2006, 10:42:17 »
thank u guys...1 last request...
Quote
function NewUserConnected(user)
   user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
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&#124;")

Where and how to put this command???


« Last Edit: 06 October, 2006, 10:58:00 by speedX »
Thanking You,

speedX

Offline 6Marilyn6Manson6

  • Scripter
  • King
  • ******
  • Posts: 869
  • Karma: +47/-35
    • http://www.marilynmanson986.altervista.org
Re: right click
« Reply #17 on: 06 October, 2006, 11:50:19 »
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:

Code: [Select]
function NewUserConnected(user)
   user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
end

OpConnected = NewUserConnected

with:

Code: [Select]
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
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&#124;")
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
end
end

C ya
« Last Edit: 06 October, 2006, 11:54:26 by 6Marilyn6Manson6 »

Offline Rincewind

  • Scripter
  • Lord
  • ******
  • Posts: 403
  • Karma: +60/-7
    • Rincewind's Scripts
Re: right click
« Reply #18 on: 06 October, 2006, 18:26:06 »
Change:

Code: [Select]
function NewUserConnected(user)
   user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
end

OpConnected = NewUserConnected

with:

Code: [Select]
function NewUserConnected(user)
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
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&#124;")
user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
end
end

C ya
Much better to do
Code: [Select]
function NewUserConnected(user)
   user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
   if user.bOperator then
      user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser
   end
end

OpConnected = NewUserConnected

Offline 6Marilyn6Manson6

  • Scripter
  • King
  • ******
  • Posts: 869
  • Karma: +47/-35
    • http://www.marilynmanson986.altervista.org
Re: right click
« Reply #19 on: 07 October, 2006, 09:01:26 »
Much better to do
Code: [Select]
function NewUserConnected(user)
   user:SendData("$UserCommand 1 3 Triva\\Start Trivia$<%[mynick]> !trivstart&#124;|")
   if user.bOperator then
      user:SendData("$UserCommand 1 3 Registration\\Add User$<%[mynick]> !addreguser
   end
end

OpConnected = NewUserConnected


Mmm I agree  ;D

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: right click
« Reply #20 on: 07 October, 2006, 16:44:14 »
Hi guys...
Quote
   user:SendData("$UserCommand 1 3 HOPS\\IP Help\\Nick From IP$<%[mynick]> +ip %[line:IP]&#124;|")
   user:SendData("$UserCommand 0 3 ")
   user:SendData("$UserCommand 1 3 HOPS\\Alerts\\Add Alert$<%[mynick]> +addalert %[line:nick]&#124;|")

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...
« Last Edit: 07 October, 2006, 21:09:02 by speedX »
Thanking You,

speedX

Offline Rincewind

  • Scripter
  • Lord
  • ******
  • Posts: 403
  • Karma: +60/-7
    • Rincewind's Scripts
Re: right click
« Reply #21 on: 07 October, 2006, 17:28:08 »
I believe the separator would be
Code: [Select]
curUser:SendData("$UserCommand 0 3 |")Give that a try and let me know how you get on

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: right click
« Reply #22 on: 07 October, 2006, 18:08:12 »
nope not workin......it is showing me the following error....
Code: [Select]
Syntax ...PtokaX & Scripts\test 0.3.5.1\scripts\rightclick.lua:12: attempt to index global 'curUser' (a nil value)
Thanking You,

speedX

Herodes

  • Guest
Re: right click
« Reply #23 on: 07 October, 2006, 18:15:54 »
nope not workin......it is showing me the following error....
Code: [Select]
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.)

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: right click
« Reply #24 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.....
Thanking You,

speedX

PtokaX forum

Re: right click
« Reply #24 on: 07 October, 2006, 19:26:17 »