[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


    Command iConomy - Charge for each command
    Version v7

    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.

    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

    • CommandIConomy.Free - Grants free access to all commands.
    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
    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


    Wors really great! thank you a lot. :)
  3. Offline


    Just to be clear. When i use the permission and a Command isnt showing up in the List. The Player wont have access to it at all right?
  4. Offline


    I don't understand your question.
  5. Offline


    Ok time to fire off a few questions... rdy? :p
    If I wanted to charge a player 500coin to use " /command cmd <variable>
    I would set up the price.yml file to look like:
    ^/command cmd \S+$: 500
    Also, sorry if this has been posted elsewhere, but in my defense I did check all pages as well as the OP and saw nothing about it:
    If a user does not have permission to a command that has a cost attaatched, and attempts to use it, or for some other reason he cannot use the command (ie: the plugin doesnt allow? ) will he be charged for attempting to execute the command?
    Also just out of curiosity, could I do something like this:
    ^/command \S+ part2$: onebillioncoin:p
    to have it it charge for issuing command:
    /command <variable> part2
    Thanks in advance!

    Just tested it out, if lacking permissions, it seems to charge the player anyways :(

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


    There is no way to for me to integrate with permissions. Command iConomy intercepts the commands while they are still chat events and are nothing more than strings of text. There is no way to know if the plugin the player is invoking will deny the request on its own, or if the command is even legitimate.

    Your interpretation of Regular Expressions seems sound. It's worth testing to be sure. There are some great Java Regular Expression testers on the Internet that will tell you if the expression you are writing matches the strings you expect.
  7. Offline


    Aww man... :( well I understand that there is nothing you can do about it. Is there anything I could heckle bukkit, or permissions authors about to get them to make it function this way?
  8. Offline


    Nope. There is no way to predict if a command will succeed or fail before the command text is sent to a plugin. A plugin could fail without ever touching permissions.

    To make things more fair, you can add a cooldown to commands so if they are typed wrong, there is a short window to retype before being charged again - see the readme for details.
  9. Offline


    I did see the cooldowns, but I do think it would be helpful in my situation:
    hrmmm, I think i just came up with a workaround...
    And I completely understand that theres now way for the plugin to "predict" commands, I was thinking that there may be some priority, like the block breaking process
  10. Offline

    tha d0ctor

    any way to have different groups charged different ammounts, so regulars and guest have their own price lists and VIPs get their own prices with discounts?
  11. Offline


    Can't seem to get it to charge
    using latest version with 617

    Verbose: false
    ChargeForChat: false
    PayTo: theobservant1
    NoAccountMessage: No bank account.
    InsuficientFundsMessage: Insuficent funds. {cost} needed.
    AccountDeductedMessage: Charged {cost}
    # To charge for a command, list a matching regular expression below on its own
    # line with the price, separated by a colon. For more info on regular expressions
    # see http://www.regular-expressions.info/reference.html
     ^/tp: 10
     ^/gk: 10
     ^/home set: 200
     ^/home \S+: 0
     ^/home: 50
  12. Offline


    quick feature request:
    Price check
    /pricecheck /mc
    This costs <X> (if it has a price)
    This has no charge (if no price)
  13. Offline


    Can you elaborate?

    I'll add it to the list.

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


    Great! Thanks a bunch :D
  15. Offline


    I would love to get this working on my server it sound fantastic.
    What other info would help.
    I installed the plugin, those are my settings, it doesn't work.
    It fails to take money from players.
  16. Offline


    Do you get an error on the console?
  17. Offline


    It's absolutely great job ! Many thanks deltahat :cool:
  18. Offline


    no console errors
  19. Offline


    it is possible to add more features? like number of times that u can buy a command?
  20. Offline


    not charging a nickel for anything this is what I got

    ^/tp: 10
    ^/f claim: 10
    ^/time: 1

    no errors or responses
  21. Offline


    At startup is there any problem connecting to iConomy?
  22. Offline


  23. Offline


    Can you reload the server and post the output? Are you using the latest version of iConomy?
  24. Offline


    A request;
    Can you implement a function where someone, for example, i type /time day the plugin broadcasts a customized message like "qrux payed and brought light!"? It would be awesome!
  25. Offline


    ok so my problem is /kit command works grets players were charged for kit that they selected, but when i add this line:

    ^/f create$: 100
    ^/f claim$: 500

    plugin faction allow players to create clan and clan's region that command work but player dindt get charged for the amount.

    ex: /f create myclan
    plugin create myclan but command iConomy dont claim the money from the player i missed somethin?
  26. Offline


    $ means end of string. Remove it.
  27. Offline


    I don't know if this is outside of the scope of what this plugin provides, but is there any way to add a way to add a / command to commandiconomy that assigns Permissions Nodes to a player temporarily/permanently?

    Example would be, someone types "/command" and the Permission.Node is written into Permissions' .yml file.

    Not sure if this is a request appropriate for this plugin, or if this is something that should be addressed with the writer of Permissions.
  28. Offline


    Sounds like something that needs to be addressed in Permissions. If it ever is, Command iConomy can charge for it.
  29. Offline


    Any chance you can add a functionality where the money that is charged is deposited into some sort of bank account rather then removed from the system entirely?

    Like, I configured the prices like this, for usage with nSpleef:

    While that does work, I'd rather see it configurable to be able to direct any payments of that sort to a "Bank".

    Would be much appreciated if you could add such a thing :)
  30. Offline


    Readmes are your friend.
  31. Offline


    I just now read that, sorry
Thread Status:
Not open for further replies.

Share This Page