[INACTIVE][ECON] Command iConomy v6 - Make any plugin an iConomy plugin [766]

Discussion in 'Inactive/Unsupported Plugins' started by deltahat, Mar 20, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    deltahat



    Command iConomy - Charge for each command
    Version v7

    Overview
    Command iConomy is a plugin that allows a server admin to assign a cost to server commands that is deducted from a player's iConomy account whenever a player uses that command. Commands are matched using java regular expressions. If text entered by a player matches a configured rule, Command iConomy will attempt to bill the player. Command iConomy requires iConomy 4.5+ to be installed.

    Examples include charging for each summoned magic carpet, or adding a fee for different kits.

    Configuration
    To set the price of a command, add a line to prices.yml. Command iConomy matches regular expressions against user input. Regular expressions allow you to charge separately for individual sub-commands or even specific command arguments.

    A typical configuration line looks like this: ^/tp: 10
    A configuration line matching sub-commands might look like this: ^/time (day|night): 20

    Command expressions are matched in order from top to bottom. If a match is found, Command iConomy stops looking for a match and charges the player the configured amount. If the command is configured with a cost of zero, processing will stop but the player will not be charged. Together these features allow open ended commands to be individually charged. Ex:

    ^/warp help$: 0
    ^/warp \S+$: 10

    Really Quick Regular Expression Info
    ^ = Start of command
    $ = End of command
    \S+ = One or more non-whitespace characters

    For best results, please study and learn regular expressions!

    For more info on regular expressions, see: http://www.regular-expressions.info/reference.html

    Command Cooldowns
    You can now configure a number of seconds before charging a player again for a command. To do so, add a space and then the number of seconds to wait after the command's cost. Ex:

    ^/warp \S+$: 10 30

    Permissions
    • CommandIConomy.Free - Grants free access to all commands.
    Internationalization
    Three additional settings can be made in the config.yml file to localize Command iConomy's text. You will have to create config.yml. They are:
    • NoAccountMessage
    • InsuficientFundsMessage
    • AccountDeductedMessage
      • Substitute {cost} for cost
    Download
    Direct - https://github.com/rmichela/Command-iConomy/downloads
    Source - https://github.com/rmichela/Command-iConomy


    Release Notes (open)

    Version 1
    • Initial Release
    Version 2
    • Added free permission
    • Only match first expression
    • Match but don't display zero cost commands
    Version 3
    • Increased priority of CommandPreProcess hook to improve compatibility
    Version 3.1
    • Bukkit 602 compatibility
    Version 5
    • iConomy 4.6.5 suport
    • Added optional logging to the console
    • Added optional matching of chat events
    • Added command cost to insufficient funds message
    • Verified CB612 and MC1.4 support
    Version 6
    • Added command cooldowns
    • Added fee collection account
    Version 7
    • iConomy 5 support
     
    Linki, Senzuri and itsatacoshop247 like this.
  2. Offline

    Coelho

    I see it to be worthless seeing as the command might not have gone through as expected, but I suppose its nice to have.
     
  3. Offline

    deltahat

    Consider this another tool in the server admin's toolbox. Using Command iConomy, any other plugin can be iConomy enabled.
     
  4. Offline

    wildshoetwt

    cool, thanks for this!
     
  5. Offline

    Kainzo

    Definitely something thats interesting to use. I may look into adding this.
     
  6. Offline

    nukeade

    This is great! I've been absolutely dying for a plugin like this--one request, though: can you add a permission node so that ops may use the commands as much as they like, for free?
     
  7. Offline

    rasse

    Awesome plugin.. just what I have waited for.

    ^Everybody in my server pays, ops or not, including me. Just you keep this setting too :)
     
  8. Offline

    deltahat

    Adding an optional CommandIConomy.Free permissions node is on the roadmap. Next release in a day or two.
     
  9. Offline

    nukeade

    I've been using this plugin for only a day, and it's really gone a long way to discourage abuse of /home, /warp, /lwc, and /dynmap show player. One more request that would make it infinitely more useful: can you make it so that it will only charge for the first matching RegEx on the list?

    For Example:

    Code:
    ^/warp help: 0
    ^/warp \S+: 10
    Currently charges 0+10 for "/warp help", but, I want to make "/warp help" free and "/warp destination" cost money.

    Thanks so much for developing this great plugin!
     
  10. Offline

    deltahat

    I've added your request to the roadmap for V2

    Command iConomy v2 Released

    Bugs Fixed:
    • Now matches only the first matching expression
    Features Added:
    • Zero cost commands are matched but no message is displayed for their use
    • Added support for the CommandIConomy.Free permissions node

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  11. Offline

    Daveyo

    I think the real question on everyones mind is, what are regular expressions and is there a way to not have to learn what they are?
     
  12. Offline

    Senzuri

    This isn't working with factions installed. The factions command (/f create) will work regardless if you have enough money or not.
     
  13. Offline

    deltahat

    Regular expressions are character sequences that are used to determine if a string (like player input) matches a given pattern. They are extremely powerful but require a little learning.

    What match expression are you using in your .yml file?

    ^/f create: 10 will charge 10 currency for the /f create command.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  14. Offline

    wolves

    Thanks for this mate.
     
  15. Offline

    Euron

    Forgive me if this is already a feature, but is it possible to charge for plugin features which aren't strictly text commands? For example,

    'tombstone.use'
    where the plugin would automatically use a tombstone, but charge the player.

    Or to an entire plugin? For example, creating a Chronotrigger in Eekrunes which charges players for its use.
     
  16. Offline

    deltahat

    I'm not sure I understand your request. Could you elaborate?
     
  17. Offline

    Senzuri

    Ya I've got it setup as "^/f create: 100" however this happens:

    (If I have enough money):
    [​IMG]

    (If I dont have enough money):
    [​IMG]

    Command still goes through even though I don't have the required money
     
  18. Offline

    deltahat

    What plugin are you trying to interface with? I've got an idea of how to fix this, but it depends on how other plugin authors write their plugins.
     
  19. Offline

    Senzuri

  20. Offline

    deltahat

    Command iConomy v3 Released

    Bug Fix
    • Increased priority of CommandPreProcess hook to improve compatibility with other plugins.
     
  21. Offline

    Senzuri

    Appreciate the fast fix, however I still have the same problem with the updated version :(
     
  22. Offline

    deltahat

    Ok....I looked at the Faction code and it doesn't respect the cancelled flag on the CommandPreProcess event. This means that when Command iConomy attempts to cancel the /f create command due to insufficient funds, Faction goes ahead and processes it anyway. I'll log a bug with the author of Faction.
     
  23. Offline

    Euron

    Charging for the use of an entire plugin, or for features which are not specifically text commands. For example:

    Say you're using any of the Nether-enabling or altering plugins. Now, when the player passes through the gate, they are automatically teleported to the Nether. I realize it would be very awkward to charge per feature of any plugin, so alternatively, charging for the plugin itself. So, instead of specific commands being listed, you list an entire plugin; whenever player X wants to use (any) feature from plugin Y, it charges them amount Z. In this case? A player is charged whenever they use a portal from the regular world to the Nether, and back again.

    Obviously this would have applications to many other plugins, whose features are rarely used as purely text-based commands.

    Not sure how to describe it more explicitly.
     
  24. Offline

    Senzuri

    Thanks for the effort, nice job on the plugin! :cool:
     
  25. Offline

    deltahat

    Euron, I'm afraid there is now way to tap into the inner workings of other plugins to monetize their internal activation. The best you can do is write to different plugin authors and ask them to add optional iConomy support to their plugins.
     
  26. Offline

    deltahat

    Factions 1.1 should fix the problem you were seeing.
     
  27. Offline

    Zaros

    Could you add a time limit for the commands. So a player can use a command for only a set period of time before having to pay again. Could you also make it possible to limit the use of command buying for certain commands to a certain amount of times a day?
     
  28. Offline

    Senzuri

    Hurray! But there's a new problem :(

    The Factions plugin uses alias's for commands, and functionality to configure this has been removed from his plugin.

    For example:
    /f create - works and will charge
    f create - does not work

    I tried adding the nonslash command to prices.yml but it didn't like that. Would it be too much to ask if you could make your plugin work with commands that don't require slashes?
     
  29. Offline

    deltahat

    I'll consider it for the roadmap.

    You should be able to use
    Code:
    ^f create
    There is nothing special about the slash. Do you get a specific error?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  30. Offline

    Senzuri

    Yep I'm using "^f create: 100" as a test, however it doesn't work. It phases /f create fine, but not f create. (also makes no errors on server).
     
Thread Status:
Not open for further replies.

Share This Page