PtokaX forum

Development Section => LUA & PtokaX-Scripting-Interface => Topic started by: Snooze on 22 March, 2004, 10:34:04

Title: [Question] UserCommands/subCommands
Post by: Snooze on 22 March, 2004, 10:34:04
Hey guys,

I've been playing with the usercommands and were trying to make a subcommand. Is it me going about it wrong or does the hub software not support it ?

Ex:

curUser:SendData("$UserCommand 1 3 Help\Show Help menu$<%[mynick]> +help|")
curUser:SendData("$UserCommand 1 3 Help\Show Help menu2$<%[mynick]> +help2|")
curUser:SendData("$UserCommand 1 3 Help\Show Help menu3$<%[mynick]> +help&3#124;")

**Snooze
Title:
Post by: Snooze on 22 March, 2004, 11:11:42
Hmm... Solved..

Im not sure why but it has to be done like this:


 user:SendData("$UserCommand 1 2  ? Help\\Hub Help$<%[mynick]> !help|")
  user:SendData("$UserCommand 1 2  ? Help\\Log Help$<%[mynick]> !loghelp2|")
Title:
Post by: [=robbase=] on 22 March, 2004, 11:41:46
Here's 1 I use for robocop

-- UserCommand extension script for PtokaX by Gadget
function NewUserConnected(curUser)
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 3 *** HOUSE NATION ***$<%[mynick]> !rules|")
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")  
curUser:SendData("$UserCommand 1 3 Hub Rules$<%[mynick]> !rules|")
curUser:SendData("$UserCommand 1 3 Show Help Menu$<%[mynick]> !userhelp|")
curUser:SendData("$UserCommand 1 3 House Charts$<%[mynick]> !faq|")
curUser:SendData("$UserCommand 1 3 Show New Releases$<%[mynick]> !shows|")
curUser:SendData("$UserCommand 1 3 Away From Keyboard$<%[mynick]> !away %[line:Enter a reason]|")
curUser:SendData("$UserCommand 1 3 Returned$<%[mynick]> !back %[line:Enter a reason]|")
curUser:SendData("$UserCommand 1 3 Register To Hub$<%[mynick]> !regme %[line:password]|")
curUser:SendData("$UserCommand 1 3 Report Fakers$<%[mynick]> !report %[line:nickname]|")
curUser:SendData("$UserCommand 1 3 Whats my IP$<%[mynick]> !myip|")
curUser:SendData("$UserCommand 1 3 Make Donation$<%[mynick]> !network|")
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 3 *** REG ONLY ***$<%[mynick]> !rules|")
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 3 Show Users With Free Slots$<%[mynick]> !slots|")
curUser:SendData("$UserCommand 1 3 Show Reg Users$<%[mynick]> !showreg|")
curUser:SendData("$UserCommand 1 3 Show Most Online Users$<%[mynick]> !tophubbers|")
curUser:SendData("$UserCommand 1 3 Show Your Online Time$<%[mynick]> !myhubtime|")
curUser:SendData("$UserCommand 1 3 Last Seen User$<%[mynick]> !seen %[nick]|")
curUser:SendData("$UserCommand 1 3 Change Password$<%[mynick]> !repass %[line:new password]|")


 
end
Title:
Post by: Skrollster on 22 March, 2004, 18:49:36
i was thinking of making a how to add usercommands..

but i didn't get specially far...

References: Wiki @ DC++ @ Sourceforge (http://dcplusplus.sourceforge.net/wiki/index.php/UserCommand%20command)

Examples:

Put a horizontal separator bar in the menu for Hub commands
$UserCommand 0 1 |

Put a horizontal separator bar in the menu for User commands
$UserCommand 0 2 |

Put a horizontal separator bar in the menu for Hub commands and User commands
$UserCommand 0 3 |

Put a horizontal separator bar in the menu for User file commands
$UserCommand 0 4 |

Put a horizontal separator bar in the menu for Hub commands and User file commands
$UserCommand 0 5 |

Put a horizontal separator bar in the menu for User commands and User file commands
$UserCommand 0 6 |

Put a horizontal separator bar in the menu for Hub commands and User commands and User file commands
$UserCommand 0 7 |
Title:
Post by: Corayzon on 24 March, 2004, 08:04:42
a while ago when i was tring to figure this one out...i found a really nice site that explained really well...and had all the settings and how to's for $usercommand syntax...

Ill have a look now to see if i can find the site...