WARNING: Silkymenus 2 is old and doesn't work that well, I recommend you get SilkyMenus 3 Instead!
Heres the download:
https://www.spigotmc.org/resources/silkymenus.83068/download?version=352623
You can get a basic understanding of Silkymenus by using /silkymenus generate which will give you a chest that should point you into the right direction,
Other info can be found right here if you scroll down a bit!
Documentation below
How to setup and open a menu
Menus work by basically scanning a chest, and then storing whatever is in the chest into some variables. To set it up you put whatever you want into a chest and run
/silkymenus set myMenu
Real fancy stuff right?
Opening a menu can be done with
/openmenu Steve myMenu
You can run that command in skript to open a menu to someone by doing
command "openmenu %player% myMenu"
Commands in your menus:
Well, you need to set the commands for each icon in the menu. This can be done in a bunch of ways.
The easiest is by baking a command into the lore of the item (You can use /relore that comes with the script)
Everything after a / becomes part of the command!
[player] gets changed to the player that clicked it. Which can be used like in the image (@p doesnt work)
You can even add a command for both left and rightclick events by adding 2 commands in the lore
Click to get a sword or axe /give [player] iron_axe /give [player] iron_sword
You can do a lot of things with this, But if you want more control you can use Custom Cases
Custom Cases:
Custom cases basically are snippets of skript-code that can be run when your menu icon gets updated (when the menu opens or animates)
You can use this to do all kinds of checks you want.
Custom cases have a couple of REALLY important variables:
{~return} The item that ends up being placed in the menu
{~returnCmd} The main command that gets executed when clicked
{~returnCmd2} The rightclick command that gets executed when clicked
Other than that there are a couple of useful variables:
{_player} The player opening the menu
{_case} The case string
You can call a custom case by using a \ like \caseString in the lore of the item, The item in question will not be used when it has a custom case in it's lore.
Keep in mind that the custom case function gets ran only when the menu is opened and not when something is clicked (if you need that you make the command that it runs a custom skripted command!)
You can write your custom cases in the function custom_case part of the .sk file!
If you have any questions feel free to DM me (Flowwave#9999)