Gems 1.0

[Skript] Economy plugin

  1. FJouk
    Tested Minecraft Versions:
    • 1.8
    Contributors:
    FJouk
    GEMY.png


    This is like every economy plugin. You can view you account, send gems, and more...


    GEMY.png


    /gems help - Commands
    /gems me - View you account
    /gems peek - Look to other player's account
    /gems pay - Give your gems to player
    /gems admin - Admin commands

    /gems give - Give gems to player
    /gems take - Take gems from player
    /gems set - Set player's account
    /gems reset - Reset player's account


    GEMY.png


    gems.me - /gems me
    gems.peek - /gems peek
    gems.pay - /gems pay
    gems.admin - /gems admin and admin commands (give, take, set, reset)


    GEMY.png


    Code (Text):
    #---------------------------------------
    #               GEMS
    #           Created by FJouk
    #---------------------------------------
    #DO NOT EDIT THIS CODE (ONLY MESSAGES AND CONFIG)!
    #-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
    options:
    #------------
    #    CONFIG     |
    #------------

        #Plugin prefix (Default: &9[&6Gems&9]&r)
        prefix: &9[&6Gems&9]&r

        #Defines the balance with which new players begin (Default: 0)
        starting.balance: 10

        #Main command for plugin (Default: gems)
        cmd.main: gems

    #-----------
    #  MESSAGES    |
    #-----------

        player.nopermissions: &cYou don't have permissions
        player.notmoney: &cYou don't have enaught money
        player.doesnotexist: &cPlayer does not exist
        player.amount: &9Gems: &f%{gems::%player%}%
        player.amount.other: &9%arg 2%'s gems: &f%{gems::%arg 2%}%
        player.pay: &9You paid &e%arg 3% &9gems to player &e%arg 2%
        player.get: &9You got &e%arg 3% &9gems from player &e%player%

        admin.give: &9You gave &e%arg 3% &9gems to player &e%player-argument%         #This is message for admin
        player.give: &9Admin &e%player% &9gave you &e%arg 3% &9gems                    #This is message for player

        admin.take: &9You took &e%arg 3% &9gems from player &e%player-argument%
        player.take: &9Admin &e%player% &9took you &e%arg 3% &9gems.

        admin.set: &9You set &e%player-argument%'s &eaccount to &e%arg 3% &9gems
        player.set: &9Admin &e%player% &9set your gems to &e%arg 3% &9gems.

        admin.reset: &9You reset &e%player-argument%'s &eaccount
        player.reset: &9Admin &e%player% &9reset you account.

    #--------------
    #  PERMISSIONS |
    #--------------

        perm.me: gems.me
        perm.peek: gems.peek
        perm.pay: gems.pay
        perm.admin: gems.admin
    #-----------
    #    CODE   |
    #-----------

    on join:
        if player has permission "gems.start":
            stop
        else:
            set {gems::%player%} to {@starting.balance}
            wait 1 tick
            execute console command "pex user %player% add gems.start"
       
    command /{@cmd.main} <text> [<player>] [<number>]:
        usage: &c/{@cmd.main} help
        trigger:
            if arg 1 is "help":
                message "&e&m-----------------------------------------------------"
                message "&e&l                                           &nGEMS"
                message ""
                message "&a/{@cmd.main} help &f- &6Commands"
                message "&a/{@cmd.main} me &f- &6You account"
                message "&a/{@cmd.main} peek <player> &f- &6Look to player's account"
                message "&a/{@cmd.main} pay <player> <amount> &f- &6Give your gems to player"
                message "&c/{@cmd.main} admin &f- &6admin commands"
                message "&e&m-----------------------------------------------------"
            if arg 1 is "me":
                if player has permission "{@perm.me}":
                    message "{@prefix} {@player.amount}"
                else:
                    message "{@prefix} {@player.nopermissions}"
            if arg 1 is "peek":
                if player has permission "{@perm.peek}":
                    if {gems::%player-argument%} is not set:
                        message "{@prefix} {@player.doesnotexist}"
                    else:
                        message "{@prefix} {@player.amount.other}"
                else:
                    message "{@prefix} {@player.nopermissions}"
            if arg 1 is "pay":
                if player has permission "{@perm.pay}":
                    if {gems::%player%} > arg 3 or if {gems::%player%} = arg 3:
                        add arg 3 to {gems::%player%}
                        wait 1 tick
                        subtract arg 3 from {gems::%player%}
                        message "{@prefix} {@player.pay}"
                        message "{@prefix} {@player.get}" to player-argument
                    else:
                        message "{@prefix} {@player.notmoney}"
                else:
                    message "{@prefix} {@player.nopermissions}"
    #
    #        ADMIN SECTION      
    #              
            if arg 1 is "admin":  
                if player has permission "{@perm.admin}":
                    message "&e&m-----------------------------------------------------"
                    message "&e&l                                           GEMS "
                    message "&4&l                                          &nADMIN"
                    message ""
                    message "&a/{@cmd.main} give <player> <amount> &f- &6Give gems to player"
                    message "&a/{@cmd.main} take <player> <amount> &f- &6Take gems from player"
                    message "&a/{@cmd.main} set <player> <amount> &f- &6Set player's gems"
                    message "&a/{@cmd.main} reset <player> &f- &6Reset player's account"
                    message "&e&m-----------------------------------------------------"
                else:
                    message "{@prefix} {@player.nopermissions}"
            if arg 1 is "give":
                if player has permission "{@perm.admin}":
                    add arg 3 to {gems::%player-argument%}
                    wait 1 tick
                    message "{@prefix} {@admin.give}"
                    message "{@prefix} {@player.give}" to player-argument
                else:
                    message "{@prefix} {@player.nopermissions}"
            if arg 1 is "take":
                if player has permission "{@perm.admin}":
                    subtract arg 3 from {gems::%player-argument%}
                    wait 1 tick
                    message "{@prefix} {@admin.take}"
                    message "{@prefix} {@player.take}" to player-argument
                else:
                    message "{@prefix} {@player.nopermissions}"          
            if arg 1 is "set":
                if player has permission "{@perm.admin}":
                    set {gems::%player-argument%} to arg 3
                    wait 1 tick
                    message "{@prefix} {@admin.set}"
                    message "{@prefix} {@player.set}" to player-argument
                else:
                    message "{@prefix} {@player.nopermissions}"          
            if arg 1 is "reset":
                if player has permission "{@perm.admin}":
                    set {gems::%player-argument%} to {@starting.balance}
                    wait 1 tick
                    message "{@prefix} {@admin.reset}"
                    message "{@prefix} {@player.reset}" to player-argument
                else:
                    message "{@prefix} {@player.nopermissions}"          
                   


    GEMY.png


    Skript - http://dev.bukkit.org/bukkit-plugins/skript/
    PermissionsEx - http://dev.bukkit.org/bukkit-plugins/permissionsex/


    GEMY.png


    The skript file named "Gems" is full property of "FJouk" and protected under Czech Republic copyright laws. The author doesn't allow the total or partial redistribution of this plugin. Also the author doesn't allow any decompilation (or reverse-engineering) and modification of the code. The final user cannot resell or make money of any form with total or partial code or resources from this plugin. The final user is allowed to install this plugin in more than one server.


    GEMY.png


    [​IMG] [​IMG]
    Dj_Nahue likes this.

Recent Reviews

  1. Aaron12345gr
    Aaron12345gr
    4/5,
    Version: 1.0
    Well set up plugin or a economy, more original than just plain money. Like the idea. It sounds more like a Prison economy though. Nice work keep it up.
    1. FJouk
      Author's Response
      Thank you :)