Hi,
Today I'll release the first operational version of my Arcturus plugin, MyCommands. The plugin allows you to make your own commands without any knowledge of code.
How does it work?
Put the MyCommands.jar plugin in your \plugins\ folder, run the server and a table `mycommands` will be automatically made.
Every row in this table is a different command, customize them however you like.
How to make a command
To make a command is incredibly easy. Insert a row, described as follows:
`aliases` - Set your command keys seperated by ';'.
Example: welcome;welc;w
`actions` - Actions seperated by ';'.
Example: shout Welcome to Habbo, $1! !;wave;wait 0.5;say Have a great time;thumbsup
Lets understand what's going on here. Every action is run after the other one's finished.
In this example the user using the command will..
- shout "Welcome to Habbo, XXX", where XXX is the first param
- wave
- the command waits 0.5 seconds before proceeding
- say Have a great time
- the user will put their thumbs up
`minrank` - Minimum rank to run the command
Example: 1
`enabled` - Is the command enabled?
Example: 1
This command results into
https://i.gyazo.com/d80f68342edb715c00a66ba25374c424.gif
How do I use params?
Params are the given parameters by the user. If a user says ":credits Keiz 1", parameter 1 is Keiz, parameter 2 is "1"
Your commands made with MyCommands can use those parameters however you like!
In an action, use the dollar-sign followed by the requested parameter count.
To use parameter one you use "$1", to use parameter two you use "$2".
To use the user's username use "$player".
If you require a certain parameter, (so it can't be empty), add a exclamation mark (!) after the parameter. For instance, this action: "say The word $1! was my first parameter" will check if a parameter is given. If not, the action will not execute.
There's an option to use all the given parameters too, use "$all".
In short:
- $X = parameter X
- $X! = parameter X, and is required to execute the action ( if you want just to say parameter 1, and have an exclamation mark afterwards, use $X\! )
- $all = All parameters
- $player = The player's username
Different actiontypes
Your commands can have as many actions as you like, but what actions can I use? We've seen some above, like "say", "wait", "shout".. Here's a complete list for version 1.0.0.
All types are followed with a description and an example usage.
- ":" Make the user run a command. :stalk $1
- "message" Send the user an alert. message What's up, $player?
- "whisper" Send the user a whisper. whisper Psst..
- "handitem" Give the user a handitem. handitem 1
- "dance" Dance (1-5) dance 3
- "enable" Enable an effect enable 13
- "wait" Wait X secs before continuing wait 2.5
- "hotelalert" Send a hotel alert hotelalert Make sure to check out the news daily!
- "say" Make the user say something say My parameters were: $all
- "shout" Make the user shout something shout Hey, $1!
- "giveitem" Give the user items by name giveitem throne 3 (give the user 3 thrones)
- "wave" Wave wave
- "kiss" Blow kiss kiss
- "laugh" Laugh laugh
- "thumbsup" Thumbs up thumbsup
New actiontypes can be requested in the comments, for now this must be enough to play with.
Do share your creations with us in the comments, I'll make sure to add them to the thread.
Reloading commands
Reloading your custom commands can be done with the :mycommands, or :myc for short, command.
The permission necessary for this command is cmd_update_config.
Download
v1.1.1
http://forum.ragezone.com/f353/arct...own-commands-1140372-post8833782/#post8833782
Loves,
Keiz
Today I'll release the first operational version of my Arcturus plugin, MyCommands. The plugin allows you to make your own commands without any knowledge of code.
How does it work?
Put the MyCommands.jar plugin in your \plugins\ folder, run the server and a table `mycommands` will be automatically made.
Every row in this table is a different command, customize them however you like.
How to make a command
To make a command is incredibly easy. Insert a row, described as follows:
`aliases` - Set your command keys seperated by ';'.
Example: welcome;welc;w
`actions` - Actions seperated by ';'.
Example: shout Welcome to Habbo, $1! !;wave;wait 0.5;say Have a great time;thumbsup
Lets understand what's going on here. Every action is run after the other one's finished.
In this example the user using the command will..
- shout "Welcome to Habbo, XXX", where XXX is the first param
- wave
- the command waits 0.5 seconds before proceeding
- say Have a great time
- the user will put their thumbs up
`minrank` - Minimum rank to run the command
Example: 1
`enabled` - Is the command enabled?
Example: 1
This command results into
https://i.gyazo.com/d80f68342edb715c00a66ba25374c424.gif
How do I use params?
Params are the given parameters by the user. If a user says ":credits Keiz 1", parameter 1 is Keiz, parameter 2 is "1"
Your commands made with MyCommands can use those parameters however you like!
In an action, use the dollar-sign followed by the requested parameter count.
To use parameter one you use "$1", to use parameter two you use "$2".
To use the user's username use "$player".
If you require a certain parameter, (so it can't be empty), add a exclamation mark (!) after the parameter. For instance, this action: "say The word $1! was my first parameter" will check if a parameter is given. If not, the action will not execute.
There's an option to use all the given parameters too, use "$all".
In short:
- $X = parameter X
- $X! = parameter X, and is required to execute the action ( if you want just to say parameter 1, and have an exclamation mark afterwards, use $X\! )
- $all = All parameters
- $player = The player's username
Different actiontypes
Your commands can have as many actions as you like, but what actions can I use? We've seen some above, like "say", "wait", "shout".. Here's a complete list for version 1.0.0.
All types are followed with a description and an example usage.
- ":" Make the user run a command. :stalk $1
- "message" Send the user an alert. message What's up, $player?
- "whisper" Send the user a whisper. whisper Psst..
- "handitem" Give the user a handitem. handitem 1
- "dance" Dance (1-5) dance 3
- "enable" Enable an effect enable 13
- "wait" Wait X secs before continuing wait 2.5
- "hotelalert" Send a hotel alert hotelalert Make sure to check out the news daily!
- "say" Make the user say something say My parameters were: $all
- "shout" Make the user shout something shout Hey, $1!
- "giveitem" Give the user items by name giveitem throne 3 (give the user 3 thrones)
- "wave" Wave wave
- "kiss" Blow kiss kiss
- "laugh" Laugh laugh
- "thumbsup" Thumbs up thumbsup
New actiontypes can be requested in the comments, for now this must be enough to play with.
Do share your creations with us in the comments, I'll make sure to add them to the thread.
Reloading commands
Reloading your custom commands can be done with the :mycommands, or :myc for short, command.
The permission necessary for this command is cmd_update_config.
Download
v1.1.1
http://forum.ragezone.com/f353/arct...own-commands-1140372-post8833782/#post8833782
Loves,
Keiz
Last edited: