Solved aliases of a plugin with 2 args

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

varboosted

Active Member
Apr 20, 2020
50
3
8
24
It is a .jar file and this is the command someone have an example on how to do an aliases with Skript: /bounty {player1} {500}
unknown.png
 
Code:
command /bounty <player> <integer>:
  trigger:
    make player execute command "/kitbattle bounty %arg-1% %arg-2%"
is this what you want?
 
Code:
command /bounty <player> <integer>:
  trigger:
    make player execute command "/kitbattle bounty %arg-1% %arg-2%"
is this what you want?
Yes but how can I make it with correct usage?

Code:
command /bounty <player> <integer>:
  trigger:
        if arg-1 is not set:
    make player execute command "/kitbattle bounty %arg-1% %arg-2%"
        else:
        send "&6&lKitPvP &8» &7Usage: /bounty <Player> <Amount>"
        send "&7&oNote: the minimum bounty amount is 150."
Like this?
 
Yes but how can I make it with correct usage?

Code:
command /bounty <player> <integer>:
  trigger:
        if arg-1 is not set:
    make player execute command "/kitbattle bounty %arg-1% %arg-2%"
        else:
        send "&6&lKitPvP &8» &7Usage: /bounty <Player> <Amount>"
        send "&7&oNote: the minimum bounty amount is 150."
Like this?

Code:
command /bounty <player> <integer>:
  usage: wrong usage message here
  trigger:
    make player execute command "/kitbattle bounty %arg-1% %arg-2%"

Just put a usage: and then the message that will display if the player enters a wrong usage
 
Code:
command /bounty <player> <integer>:
  usage: wrong usage message here
  trigger:
    make player execute command "/kitbattle bounty %arg-1% %arg-2%"

Just put a usage: and then the message that will display if the player enters a wrong usage
upload_2021-5-2_22-3-22.png

but then it like that and i want 2 lines
[doublepost=1621075397,1619982210][/doublepost]
upload_2021-5-2_22-3-22.png

but then it like that and i want 2 lines
bump
 
Code:
command /bounty [<offline player>] [<text>]:
  trigger:
    if arg-1 is online:
      set {_bounty} to arg-2 parsed as a integer
      if {_bounty} is more than or equal to 150:
        make player execute command "/kitbattle bounty %arg-1% %{_bounty}%"
      else:
        send "Invalid amount."
        send "Note: The minimum amount of bounty is 150."
    else:
      send "This player isn't online."
 
Code:
command /bounty [<offline player>] [<text>]:
  trigger:
    if arg-1 is online:
      set {_bounty} to arg-2 parsed as a integer
      if {_bounty} is more than or equal to 150:
        make player execute command "/kitbattle bounty %arg-1% %{_bounty}%"
      else:
        send "Invalid amount."
        send "Note: The minimum amount of bounty is 150."
    else:
      send "This player isn't online."
Code:
# here you can use <player> which is just online players and <integer>
command /bounty <player> <integer>:
    # here usage means that if for example the second argument is a text, this message will display
    usage: Correct usage:&6 KitPvP&8 > &7Usage: /bounty <Player> <Amount>
    trigger:
        # and here he executes the command
        make player execute command "/kitbattle bounty %arg-1% %arg-2%"
This should work, I also put in the comments what that is for, so maybe you can also learn something
 
  • Like
Reactions: varboosted
Code:
# here you can use <player> which is just online players and <integer>
command /bounty <player> <integer>:
    # here usage means that if for example the second argument is a text, this message will display
    usage: Correct usage:&6 KitPvP&8 > &7Usage: /bounty <Player> <Amount>
    trigger:
        # and here he executes the command
        make player execute command "/kitbattle bounty %arg-1% %arg-2%"
This should work, I also put in the comments what that is for, so maybe you can also learn something
Works, thanks!
 
Status
Not open for further replies.