Client cmd rc
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Client cmd rc

Started by yoonohoo, 27 June, 2005, 12:32:04

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yoonohoo

I want to make a rightclick for the cmd /imdb.
I used this syntax (I can hear some of you laughing):
curUser:SendData("$UserCommand 1 3 IMDB$<%[mynick]>  /imdb %[line:Filme a pesquisar]|")
Where did I go wrong?...Probably the whole lot!

Also which are the profiles covered by the function NewUserConnected(curUser) and function OpConnected(curUser). My profiles are unreg, reg, vip, op, master and netfounder.

Thanks

It might be simple for you but rocket science for me...

ConejoDelMal

well...you just forgot the "|" in the end...

curUser:SendData("$UserCommand 1 3 IMDB$<%[mynick]> /imdb %[line:Filme a pesquisar]||")

NewUserConnected covers all non key users, OpConnected, all the key users. If you want this command for a specific profile --> If user.iProfile == x or user.iProfile == x2 then

being x and x2 the profile numbers you wish
Rede-DC Comunidade Portuguesa de DC

yoonohoo

Didn't work! I think you have to use client command instead user command...Does it make sense?

It might be simple for you but rocket science for me...

ConejoDelMal

Not really... the structure is always the same, it doesnt depends on what kind of command it is.. i think the problem might be in the rest of the script... if you post it it will be easier to help you
Rede-DC Comunidade Portuguesa de DC

yoonohoo

Here it is...

-- PtokaX Lua 5 version by PPK
             
-- UserCommand extension script for PtokaX by Gadget


function NewUserConnected(curUser)

       if curUser.bUserCommand then 

               curUser:SendData("$UserCommand 255 7")

               curUser:SendData("$UserCommand 0 3")

               curUser:SendData("$UserCommand 1 3 Ajuda\\Comandos$<%[mynick]> !help|")

               curUser:SendData("$UserCommand 1 3 Ajuda\\Regras$<%[mynick]> +regras|")

              curUser:SendData("$UserCommand 1 3 Ajuda\\Info$<%[mynick]> +info|")

               curUser:SendData("$UserCommand 1 3 Ajuda\\Rede$<%[mynick]> +rede|")

               curUser:SendData("$UserCommand 1 3 IMDB$<%[mynick]>  /imdb %[line:Filme a pesquisar]||")
       
       end

end




function OpConnected(curUser)

       if curUser.bUserCommand then

               curUser:SendData("$UserCommand 255 7")

               curUser:SendData("$UserCommand 0 3")

               curUser:SendData("$UserCommand 1 3 IMDB$<%[mynick]>  /imdb %[line:Filme a pesquisar]||")

               curUser:SendData("$UserCommand 1 3 Regras$<%[mynick]> +regras|")

               curUser:SendData("$UserCommand 1 3 Ajuda$<%[mynick]> !help|")

               curUser:SendData("$UserCommand 1 3 Mass Message$<%[mynick]> !massmsg %[line:message to all users]|")

               curUser:SendData("$UserCommand 1 2 Inbuild\\ Show user info$<%[mynick]> !getinfo %[nick]|")

               curUser:SendData("$UserCommand 1 2 Inbuild\\ Drop user$<%[mynick]> !drop %[nick]|")

               curUser:SendData("$UserCommand 1 2 Inbuild\\ Gag Menu\\Gag user$<%[mynick]> !gag %[line:nick]|")

               curUser:SendData("$UserCommand 1 2 Inbuild\\ Gag Menu\\Ungag user$<%[mynick]> !ungag %[line:nick]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Ban and kick user$<%[mynick]> !ban %[line:nick] %[line:Enter a reason]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Ban user$<%[mynick]> !nickban %[line:nick]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Ban IP...$<%[mynick]> !banip %[line:Enter an IP to ban]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Unban user or ip...$<%[mynick]> !unban %[line:Enter an IP or name to unban]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Temp Ban and kick user$<%[mynick]> !tempban %[line:nick] %[line:Enter a time] %[line:Enter a reason]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Temp Unban ip...$<%[mynick]> !tempunban %[line:Enter an IP to unban]|")

               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Clear all temp bans$<%[mynick]> !clrtempban|")

               curUser:SendData("$UserCommand 1 1 Inbuild\\ Ban Menu\\Show ban list$<%[mynick]> !getbanlist|")

               	
       end

end

It might be simple for you but rocket science for me...

Dessamator

cant be done, thats a raw command, only dc developers can add that
Ignorance is Bliss.

ConejoDelMal

#6
I guess it can be done.... but just people who have a client that supports it like Bcdc will benefit from it, the rest will just send a message to main :P

*edited*
and i thought he is aware of this
Rede-DC Comunidade Portuguesa de DC

ConejoDelMal

-- PtokaX Lua 5 version by PPK
-- UserCommand extension script for PtokaX by Gadget

function NewUserConnected(curUser)

    if curUser.bUserCommand then 
               curUser:SendData("$UserCommand 255 7")
               curUser:SendData("$UserCommand 0 3")
               curUser:SendData("$UserCommand 1 3 Ajuda\\Comandos$<%[mynick]> !help|")
               curUser:SendData("$UserCommand 1 3 Ajuda\\Regras$<%[mynick]> +regras|")
              curUser:SendData("$UserCommand 1 3 Ajuda\\Info$<%[mynick]> +info|")
               curUser:SendData("$UserCommand 1 3 Ajuda\\Rede$<%[mynick]> +rede|")
               curUser:SendData("$UserCommand 1 3 IMDB$<%[mynick]> /imdb %[line:Filme a pesquisar]||")
       end
end


function OpConnected(curUser)

       if curUser.bUserCommand then
               curUser:SendData("$UserCommand 255 7")
               curUser:SendData("$UserCommand 0 3")
               curUser:SendData("$UserCommand 1 3 IMDB$<%[mynick]> /imdb %[line:Filme a pesquisar]||")
               curUser:SendData("$UserCommand 1 3 Regras$<%[mynick]> +regras|")
               curUser:SendData("$UserCommand 1 3 Ajuda$<%[mynick]> !help|")
               curUser:SendData("$UserCommand 1 3 Mass Message$<%[mynick]> !massmsg %[line:message to all users]|")
               curUser:SendData("$UserCommand 1 2 Inbuild\\ Show user info$<%[mynick]> !getinfo %[nick]|")
               curUser:SendData("$UserCommand 1 2 Inbuild\\ Drop user$<%[mynick]> !drop %[nick]|")
               curUser:SendData("$UserCommand 1 2 Inbuild\\ Gag Menu\\Gag user$<%[mynick]> !gag %[line:nick]|")
               curUser:SendData("$UserCommand 1 2 Inbuild\\ Gag Menu\\Ungag user$<%[mynick]> !ungag %[line:nick]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Ban and kick user$<%[mynick]> !ban %[line:nick] %[line:Enter a reason]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Ban user$<%[mynick]> !nickban %[line:nick]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Ban IP...$<%[mynick]> !banip %[line:Enter an IP to ban]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Unban user or ip...$<%[mynick]> !unban %[line:Enter an IP or name to unban]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Temp Ban and kick user$<%[mynick]> !tempban %[line:nick] %[line:Enter a time] %[line:Enter a reason]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Temp Unban ip...$<%[mynick]> !tempunban %[line:Enter an IP to unban]|")
               curUser:SendData("$UserCommand 1 3 Inbuild\\ Ban Menu\\Clear all temp bans$<%[mynick]> !clrtempban|")
               curUser:SendData("$UserCommand 1 1 Inbuild\\ Ban Menu\\Show ban list$<%[mynick]> !getbanlist|")
       end
end

you just had a space too much between <%[mynick]> and the command  ;)
Rede-DC Comunidade Portuguesa de DC

PPK

QuoteOriginally posted by yoonohoo
I want to make a rightclick for the cmd /imdb.
If you want it as usercommand then you need script on hub supporting this /imdb command. If you want to use internal client /imdb command then is not posible with usercommand :(
QuoteOriginally posted by [AT]conejodelmal
well...you just forgot the "|" in the end...
And you need to read scripting interface docs :P
QuoteSendData(Data)            - Data without ending | !
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

ConejoDelMal

:blushes:

upsss, sorry about all the sh** i said then... lol

my intentions were good..
Rede-DC Comunidade Portuguesa de DC

yoonohoo

Thanks anyway to all

It might be simple for you but rocket science for me...

SMF spam blocked by CleanTalk