[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

    deltahat

    I know what's going on...without the slash, bukkit doesn't think this is a command. Instead it interprets the input as a chat event. I'm not currently charging for matching chats.
     
  3. Offline

    Senzuri

    No worries. There was an option on Factions to disable it :p

    Was wondering if you could add extra info when you don't have enough to use the command. e.g. "Insufficient Funds, you need $x to use /x"

    Thanks for the awesome work, this is one of my fav plugins :)
     
  4. Offline

    Janb

    Awesome! Thank you!!
     
  5. Offline

    Senzuri

    Also another request if it's not asking too much. When you get the 'Insufficient Funds' or 'Charged x' command could this be logged to console? Something like 'Name was charged x for using /x'. Would be epic!
     
  6. Offline

    Spazmic

    Could you make it possible that if the players make a typo fail they are not charged... Cause players only do ''/tp'' and they are charged, when they didnt teleport at all (no player specified)
     
  7. Offline

    deltahat

    Change your match condition from
    Code:
    ^/tp
    to
    Code:
    ^/tp \S+
    This matches "/tp", a space, and one or more non-numeric characters.
     
  8. Offline

    Janb

    Is there any way to get this to work with Wand? Or I guess, rather, any plans to allow charging for using items? Or permission nodes? The latter would be super sweet.
     
  9. Offline

    nymm

    Hi!
    great plugin. and fonctionnal!

    I don't know if it's on your todo list but it would be awesome if we could setup different prices for different groups!
    thanks!
     
  10. Offline

    Infernus

    Simple plugin, masterful idea.
     
  11. Offline

    Revenge

    How can I use this with MyHome?

    In MyHome there are commands like:
    /home
    /home set
    /home delete
    /home <player>
    /home list

    Now I would like to add costs to those commands:
    /home
    /home set
    /home <player>

    But /home delete and /home list should be free to use anyway.
    Nonexisting commands, starting with /home should be free aswell (eg /homebla & /hometest) (<. Those commands don't exist!)

    My config looks like this now:
    Code:
    ^/home: 50
    ^/home set: 200
    ^/home delete: 0
    ^/home list: 0
    Only /home, /home <player> and /home set work.
    When using /home delete, /home list, or nonexisting commands (eg /homebla & /hometest) I have to pay 50 aswell...
     
  12. Offline

    Heinz Harald

    The plugin use the first founded match. Use this config and it will work:

    Code:
    ^/home set: 200
    ^/home \S+: 0
    ^/home: 50
    
    Now you pay for "/home set: 200", "/home: 50" and for anything else with "/home space and one or more non-numeric characters: 0"

    @deltahat:

    Is it possible to send the money to an iConomy-Account. I`d like to organise taxes on my server with your plugin.
     
  13. Offline

    deltahat

    @Revenge - change the match expression for /home to be ^/home$. That will prevent /homefries from matching (the $ means end-of-string).

    @Heinz - Interesting idea. I'll consider it. I'm not sure I understand the point of taxes on an MC server. The government (ops) can make any amount of money out of the sky an bypass any monetary restrictions. How would taxes help, let alone work?
     
  14. Offline

    Heinz Harald

    I'll give you a little insight into our server-economic. Players can trade gold with the bank. The price is dynamic thanks rshop. With this money they can buy some commands, like /home /spawn ect. This are the taxes.

    The taxes come to the elected Government of players. With the taxes, the Government paid for the construction of public buildings. This closes the circle and no money is lost.
     
  15. Offline

    deltahat

    Do you have one bank account for the "government"?
     
  16. Offline

    Heinz Harald

    I have one hidden account for the goverment.
     
  17. Offline

    Spazmic

    How can I set it that ppl can't tp to admin at all?
     
  18. Offline

    Heinz Harald

    Give them /tpa. With this command ppl have to accept the teleportrequest with /tpaccept.
     
  19. Offline

    Spazmic

    I know about the tpa command, but I don't want to use it.
     
  20. Offline

    Senzuri

    Hey, will you be updating this plugin for #602?
     
  21. Offline

    Valkyr

    Does this work for the latest version of iConomy? It doesn't appear to for me.
     
  22. Offline

    juchiu

    Is it possible to do back-referencing with the regex? For example: ^/spawnmob chicken (\d+): $1
    Possibly even do some math $1*2 or even Math.pow(2, $1)
     
  23. Offline

    deltahat

    Updates coming tonight.

    Sorry. Just run vanilla RE matching.

    Command iConomy 3.1 Released

    Recompiled for bukkit 602. Will not work for pre-600 series servers. Stick with 3.0 for older servers.

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

    Slayer9x9

    I'm using Craftbukkit 556 and iConomy 4.6 and my commands are never getting charged.
    The only command I have listed is:

    ^/jump: 100

    Is this a known bug with iConomy 4.6? Am I doing something wrong?
     
  25. Offline

    deltahat

    Are you getting any errors on the console?
     
  26. Offline

    Slayer9x9

    nope.
    -_-
     
  27. Offline

    Wolfy9247

    Is this currently working with CB 602?
     
  28. Offline

    deltahat

    Yes
     
  29. Offline

    Senzuri

    I get this when starting up: (612)

    Using 4.63 of iConomy, when I disable CommandiConomy this error doesn't come up on start up. (Also getting an error everytime I use a slash command).
     
  30. Offline

    Slayer9x9

    Yeah I'm having the same issue...
     
  31. Offline

    deltahat

    I'll look into getting things working with CB612
     
Thread Status:
Not open for further replies.

Share This Page