Vouchers Help

  • 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 community!

    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.

Chubbyduck1

Member
Feb 23, 2018
1
0
0
Skript Version: Skript 2.2
Skript Author: Chubbyduck1
Minecraft Version: 1.8.8
---
I need help, I want to add 2 Vouchers to it, but I don't know how.
Full Code:

code_language.skript:
command /pouch <type> <player>:
    usage: &b/pouch <type> <player>
    permission: skyblock.pouch
    permission message: &7(&e&lSkyblockPouch&7) &cYou have no permission!
    trigger:
        if arg 1 is "crate":
            give argument 1 tripwire hook named "&6&lCrate Key Pouch&7 (Right Click)" with lore "&7Right-click in hand to receive||&7a random amount of Keys! ||&b||&6&l* &e1-5 Vote Keys"
        if arg 1 is "token":
            give argument 1 tripwire hook named "&6&lToken Pouch&7 (Right Click)" with lore "&7Right-click in hand to receive||&7a random amount of Keys! ||&b||&6&l* &e1-5 Vote Keys"
      
      
      
on right click:
    set {_random} to a random integer between 1 and 5
    if player is holding tripwire hook named "&6&lCrate Key Pouch&7 (Right Click)" with lore "&7Right-click in hand to receive||&7a random amount of Keys! ||&b||&6&l* &e1-5 Vote Keys":
    remove 1 of tool from tool
    execute player command "/cratekey give %player% Vote %{_random}%"
    broadcast "&b&l(!) &b%player% has just opened there Crate Key Pouch and received &n%{_random}%&b Vote Keys"

on right click:
    set {_random} to a random integer between 25 and 300
    if player is holding tripwire hook named "&6&lToken Pouch&7 (Right Click)" with lore "&7Right-click in hand to receive||&7a random amount of Tokens! ||&b||&6&l* &e25-300 Tokens":
    remove 1 of tool from tool
    execute player command "/tokens give %player% %{_random}%"
    broadcast "&b&l(!) &b%player% has just opened there Token Pouch and received &n%{_random}%&b Tokens"
 
Status
Not open for further replies.