PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: damo on 22 June, 2005, 21:43:31

Title: Right click
Post by: damo on 22 June, 2005, 21:43:31
wen adding a right click how can you make it so it only shows on the hub tab and not in the users list as well cos i no that 2 is user list and 3 is user list and hub tab
any help please if its posible


lol i worked it out but for those that have the same question the answer is 1
Title:
Post by: jiten on 22 June, 2005, 21:55:30
Nice to know that you sorted it out.
Anyway, here it goes:
Context**
1=Hub Menu 2=User Menu 3=Hub/User Menu 4 = File[Search] 5 = Hub/File 6 = User/File 7 = Hub/User/File
Best regards,

jiten
Title:
Post by: damo on 22 June, 2005, 22:14:58
glad i could fix it meself but what exactly are the others for, ive never used em or seen em used? ive only used upto 3
Title:
Post by: Dessamator on 22 June, 2005, 22:42:43
its simple really, those number indicate where u want the right click to appear !
Title:
Post by: damo on 22 June, 2005, 22:52:54
thx for the info might come in handly now
Title:
Post by: Dessamator on 22 June, 2005, 23:27:50
ur welcome !
Title:
Post by: DJ Bert on 23 June, 2005, 22:53:24
Oke, i have a question too.
This what i got now. It shows the rules and network only to the unregged users. I know how to set for master,ops etc. But how to change it  for all profiles?

function NewUserConnected(user)
user:SendData(" Enhanced Right Click Support For Your Own Good Is Available!")
--//Users
if (user.iProfile == -1) then
UserCustomCMDs(user)
end
end

function UserCustomCMDs(user)
user:SendData("$UserCommand 1 3 Users\\Rules$<%[mynick]> !rules||")
user:SendData("$UserCommand 1 3 Users\\Network$<%[mynick]> !network||")
end


Grtzzz
DJ Bert
Title:
Post by: damo on 23 June, 2005, 23:37:59
would sugest it was a profile problem but not to sure
Title:
Post by: DJ Bert on 24 June, 2005, 01:05:51
I tryed some, but it don't work.
menu = frmHub:GetHubName()

function NewUserConnected(user)
-- user:SendData(" Enhanced Right Click Support For Your Own Good Is Available!")
--//Users
if user.iProfile == -1 or user.iProfile == 0 or user.iProfile == 1 or user.iProfile == 2 or user.iProfile == 3 or user.iProfile == 4 or user.iProfile == 5 then
UserCustomCMDs(user)
end
end


function UserCustomCMDs(user)
user:SendData("$UserCommand 1 3 "..menu.."\\General\\Rules$<%[mynick]> !rules||")
user:SendData("$UserCommand 1 3 "..menu.."\\General\\Network$<%[mynick]> !network||")
user:SendData("$UserCommand 1 3 "..menu.."\\General\\Register me in this hub$<%[mynick]> !regme %[line:Password]||")
user:SendData("$UserCommand 1 3 "..menu.."\\Chatstats\\Toponliners$<%[mynick]> !toponliner||")
user:SendData("$UserCommand 1 3 "..menu.."\\Chatstats\\Topchatters$<%[mynick]> !topchatter||")
user:SendData("$UserCommand 1 3 "..menu.."\\Chatstats\\Topkickers$<%[mynick]> !topkicker||")
user:SendData("$UserCommand 1 3 "..menu.."\\Chatstats\\Topbanners$<%[mynick]> !topbanner||")
user:SendData("$UserCommand 1 3 "..menu.."\\Chatstats\\Topreggers$<%[mynick]> !topregger||")
user:SendData("$UserCommand 1 3 "..menu.."\\Chatstats\\My Time$<%[mynick]> !mytime||")
end


But only the unregged user can see the rightclick.

Somebody have an idea?
Title:
Post by: ??????Hawk?????? on 24 June, 2005, 01:11:39
hi m8  


Op's enter through the  

function OpConnected(curUser)
Title:
Post by: DJ Bert on 24 June, 2005, 01:17:28
You mean this????

OpConnected = NewUserConnected
Title:
Post by: GrinSlaW on 24 June, 2005, 01:43:37
QuoteOriginally posted by DJ Bert
You mean this????

OpConnected = NewUserConnected

OpConnected = NewUserConnected

or

function OpConnected(user)

if i dont mistaken me

cheers
Title:
Post by: Dessamator on 24 June, 2005, 10:26:23
QuoteOriginally posted by DJ Bert
You mean this????

OpConnected = NewUserConnected

Well indeed, he meant that, but theres another thing . You dont need to verify the profiles to send the commands, since you are sending to everyone, remove this line:
if user.iProfile == -1 or user.iProfile == 0 or user.iProfile == 1 or user.iProfile == 2 or user.iProfile == 3 or user.iProfile == 4 or user.iProfile == 5 then

and add this:
 OpConnected = NewUserConnected
Title:
Post by: DJ Bert on 24 June, 2005, 22:43:48
Thnx guys for the support :D

Grtzzz
DJ Bert
Title:
Post by: Dessamator on 24 June, 2005, 22:55:28
ur welcome !, check the lua5 howto section for more enquiries into user commands(right click)
Title:
Post by: DJ Bert on 25 June, 2005, 20:47:48
QuoteOriginally posted by Dessamator
ur welcome !, check the lua5 howto section for more enquiries into user commands(right click)
I will check it out, i'm still learning so many on lua 5

Thnx m8
Title:
Post by: Dessamator on 25 June, 2005, 21:19:20
goody :)
Title:
Post by: James on 26 June, 2005, 10:14:30
Hi
i have a little Prob. with RightClick @ PtokaX 0.3.3.1

this is my Rightclick @ this works all :
 
                user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? Kick 20 Min (Nick eintragen)$<%[mynick]> !drop %[line:nick]||")
                user:SendData("$UserCommand 0 3 |") -- separator
                user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? User-Kick mit Zeit (bitte (d) f?r Tagen ,(h) f?r Stunden oder (m) f?r Minuten eingeben)und Grundangabe$<%[mynick]> !tempban %[line:nick] %[line:time] %[line:reason]> !tempban||")
                user:SendData("$UserCommand 0 3 |") -- separator
                user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? User-Ban (gebant wird Nick und IP) mit Grundangabe$<%[mynick]> !ban %[line:nick] %[line:reason]> !ban||")
                user:SendData("$UserCommand 0 3 |") -- separator
                user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? Mute (MainChat Verbot)$<%[mynick]> !gag %[line:nick]||")
                user:SendData("$UserCommand 0 3 |") -- separator
                user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? UnMute (MainChat Verbot wieder aufheben)$<%[mynick]> !ungag %[line:nick]||")
                user:SendData("$UserCommand 0 3 |") -- separator
                user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? MassMessage an alle User$<%[mynick]> !massmsg %[line:message]||")
                user:SendData("$UserCommand 0 3 |") -- separator


but this Function works not :
user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? User-Registrieren$<%[mynick]> !addreguser %[line:nick] %[line:pass] %[line:profileName]> !addreguser||")

*** Error. No profile of given name doesn't exist

Thx in Advance
Title:
Post by: Dessamator on 26 June, 2005, 11:01:50
well, i see quite a lot of errors in ur script,
1. u need to remove the end pipe --> |
from all the commands .
2.in this line :
user:SendData("$UserCommand 1 3 ? OPERATOR ?\\ ? User-Kick mit Zeit (bitte (d) f?r Tagen ,(h) f?r Stunden oder (m) f?r Minuten eingeben)und Grundangabe$<%[mynick]> !tempban %[line:nick] %[line:time] %[line:reason]> !tempban||")

for example u have "tempban" twice remove the last "!tempban", that happens more than once in ur code !
Title:
Post by: James on 26 June, 2005, 11:20:18
Yes Dessamator...but...
This works all perfectly (kick ,ban ,massmessage ,mute..)

 ONLY the AddregUser Function works not .This error Message is only for AddRegUser.

James
Title:
Post by: James on 26 June, 2005, 18:04:24
Yes...
run perfectly -)))

Thanks  Dessamator  @  Mutor
Title:
Post by: Dessamator on 26 June, 2005, 18:15:42
ur welcome