[ECON/RPG] MultiCurrency v0.11 - the only Multiple Currency Plugin [1240]

Discussion in 'Inactive/Unsupported Plugins' started by ashtheking, Jul 15, 2011.

  1. Offline


    by Ashtheking
    What is MultiCurrency? A lightweight yet powerful plugin providing multiple currencies. Perfect for that RP server with different nations! Or perhaps usable for that Stock Market server? Whatever you are looking for, this plugin is for you. Created for the private server TJRP (tjrp.proboards.com), I decided to release this for the world.

    Source included in jar.

    Command List:
    Alias are the same, with "mc" infront, aka "/mcpay" instead of "/pay."

    Uses these nodes if Permissions is installed, else it uses the above settings.
    Show Spoiler

    ashtheking.multicurrency.info: (/money command)
    ashtheking.multicurrency.pay (/pay command)
    ashtheking.multicurrency.create (/create command)
    ashtheking.multicurrency.convert (/convert command)
    ashtheking.multicurrency.exchange (/exchange command)
    ashtheking.multicurrency.remove (/remove command)
    (If the config is set up for this)
    ashtheking.multicurrency.obtain.<currency> (receiving from /pay command)

    None so far, :D
    Please email [email protected] OR post here with any bugs.

    For Plugin Developers (How to hook into MultiCurrency):
    Uneeded now, it's part of Register!
    Show Spoiler

    Hooking into MultiCurrency is about the easiest thing to do. Here's how.
    1. Start by importing the following.
      1. Code:
        import me.ashtheking.currency.CurrencyList;
    2. Then, when you wish to modify the currency (add / subtract / multiply/ divide), use this. If you do not specify, currency, uses whatever currency the player has the most of.
      1. Code:
        CurrencyList.<function>(String playerName, double amount, [optional] String currency)
    3. You can check things about the currency, such as isNegative, hasOver, hasUnder, hasEnough, all of which have arguments: (String playerName, double amount, (optional) String currency). If you don't specify currency, does the same as the functions.
    4. If you wish to add your own currency, simply use this code, where "m" is a Material:
      1. Code:
        CurrencyList.addCurrency(currency, m.name());
    5. If you ever need help, just check the source code included in the jar, or email me at [email protected]

    Config File Explanation:
    Show Spoiler

    • usePermissions=true
      • If set to true, means that it will look for, and if found, will use, Permissions 3.x
    • noPermsMessage=You don't have permissions to do this.
      • Message sent if someone tries to use a command, does not mean you need the usePermissions, as it will do this for the (Op) commands.
    • requirePermsForEachCurrency=false
      • If changed to true, will require the player a person is trying to send <currency> to using /pay to have "ashtheking.multicurrency.obtain.<currency>", otherwise will tell both players the below message
    • unableToGetCurrencyMessage=not having permissions for this currency.
      • Reason Message for being unable to obtain <currency>.

    --Integrate with Permissions DONE!
    --Have better plugin dev support. Part of Register! Thanks @Acrobot
    --Suggest if you have an idea.


    That's all, folks! Enjoy!
    kahlilnc and StormyDayz like this.
  2. Offline


    The thing I wanted to do with with the plugin was edit what happened when you entered a command. Is that even possible?
  3. Offline


  4. Offline


    Nice mod. Easy to use and pretty handy. I do have one suggestion, though. I don't know if this is an optional setting already in the mod or not, but when converting money, the player should receive a message letting them know how much currency they received, and perhaps their new balance.
  5. Offline


    A conversion between differnet types of currency would be nice. example if 100 silver = 1 gold than you could use
    /change silver 100 gold to get 1 gold . Or /change gold 1 silver = 100 silver
  6. Offline


    I was just thinking, Maybe a nice little "/consolidate %currencyA% %currenyB%" to atomatically convert 100 cp (copper peice) into 1 (sp) silver peice and subsequently 100 sp into 1 gp.
    On secound thought, this would require the curreny to be converted to its lowest form at every perchase, and then reconsolidated.
    Maybe allow for something (somewhat) complex like:
    "/currencyBase 100 copper|silver|gold|dimond" or even
    "/currencySpan 'cp'100:1|'sp'100:1|'gp'100:1|'diamond'1000:1"
    such that currency values would be displayed as "You have 1gp, 50sp, 87cp.
    Just my thoughts, although such a system seems like no fun to develop.
    Also, i don't know if this is possible (probably not since i haven't seen it anywhere), but if you could add a hud element of the currency you had (of a single array of currency from your "/currencyFavorite 'cp','sp','bomerbmantokens'") that would also be supah awesome!.
    Dude, this is an awesome RP pluggin, and I want.
  7. Offline


    Cool, i'll work on that too. Also, Works with the latest recommended build.
  8. Offline


    I'm wondering if this would be a better concept, and it could work nicely with Register supported plugins.

    The plugin searches the amount of a type of currency in the server and does this for all of the currency. Then, compare how much does the currency worth. (The more of a type of currency, the less it is worth)

    For example: 3 currencies, Gold, Cake, and Fish are set up on a server.

    100 Gold, 5000 Cake, and 20 Fish exists on the server. The server automatically does conversion rates of the 3 currencies. 5:250:1. (1 Fish gives you 5 Gold, 1 Gold gives you 50 Cake, 250 Cake gives you 1 Fish)

    In Register transactions, the server admin could choose the default currency other currencies have to convert to in order to pay, or have the server always choose the currency that worth the most (in this case, the Fish currency). If a person is doing a Register transaction, but doesn't have the default currency, the plugin takes the other currency they have, and gives the change in the default currency.

    This gives more of a realistic multicurrency to servers, and it would be awesome if you could implement it.
  9. Offline


    how to use this plugin?
    how to define that creating a town using towny costs 10000Coins or 100GoldCoins?
  10. Offline


    It's been a while since I looked at this, wow. @Pim1234, that's on Towny's end. If they decide to support Register or just this plugin, then you can. If you need help, ask on their thread.
  11. Offline


    ok :s

    i asked it on their thread, but they told me you already support Register :(
  12. Offline


    Yes, I support Register. But it's an API, like the bukkit API. I'm part of Register, so if anyone else wants to support my plugin, then they can manually do it with the hooks I have in my plugin, or they can support Register, which allows a lot of different currency plugins to be used without multiple plugin code for each plugin. It's like supporting PEX, NikkoPerms, SuperPerms, and all the others by using one API, except that this is for Currencies.

    I just realized that i've promised to do things since September, but haven't yet. >.<
    Being in the best school in the USA has some disadvantages, :(

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


    The basic idea behind this plugin is very good, but in order to be useful in my RPG context, it would need support for virtual currency/treasure. Modifications might be as follows:
    1. Admin can create a virtual currency not tied to a specific material. For example, the command would be:
    /create gp virtual - creates virtual gold piece treasure item.
    2. Admin can pay players in the virtual currency. For example:
    /pay someguy 100 gp - gives that player 100gp in their account.
    3. Players can pay in any currency they have. For example:
    /pay someotherguy 100 gp
    Are you sure you want to pay 100gp? (type y or n and hit return)
    y <cr>
    4. the /money command still works the same way, with the possible addition of currency type at the end:
    /money gp
    **someguy has 100gp

    Now that I've written that, I suppose what I'm really looking for is a virtual treasure sheet. I don't want it tied to real items (much too restrictive), and when I award RPG treasure, I want to be able to give players any virtual thing I name in the moment and have it kept in list which is based on player name rather than currency type. For example, a virtual treasure plugin would have multiple fields and work something like this:

    i = item, q = quantity, l = location found, n = notes, a = action

    /vtgive thief i:small_rubies q:3 l:giant's chest n:approximately 100gp value each
    /vtgive thief i:gp q:100 l:gnoll's bed n:
    /vtgive thief i:short_sword_+1 q:1 l:goblin chieftain's weapon n:engraved with strange runes
    /vtgive thief i:strength_potion_+4 q:1 l:bob the wizard n:boosts strength for 2 turns a: You feel stronger!

    (these get stored in thief.yml as a list of delimited items - or in a mysql db)
    small_rubies q:3 l:giant's chest n:approximately 100gp value each
    i:gp q:100 l:gnoll's bed n:
    i:short_sword_+1 q:1 l:goblin chieftain's weapon n:engraved with strange runes
    i:strength_potion_+4 q:1 l:bob the wizard n:boosts strength for 2 turns a: You feel stronger!

    to remove/use:
    /vtuse <item> <qty - optional if only 1>
    /vtuse thief small_rubies 1
    ** You used 1 small_rubies

    /vtuse strength_potion_+4
    ** You used the strength_potion_+4
    You feel stronger!

    to see treasure:
    /vtlist thief <page>
    <prints list>

    other possible commands:
    /vtloc thief small_rubies
    **small_rubies found in: giant's chest

    /vtnote thief short_sword_+1
    **short_sword_+1 info: engraved with strange runes

    /vtinfo thief short_sword_+1
    qty: 1
    found in: giant's chest
    note: engraved with strange runes

    ...and of course server admins can always edit the playername.yml files or db to directly add/remove treasure as they see fit.

    Anyway - maybe multi-currency isn't the right plugin for me...or maybe in a stripped down form, it would do what I want. Or, maybe it's an altogether new plugin. If there's something like this out there that anybody knows about, let me know. The key here is to completely forget about trying to track minecraft materials - it's a complete waste of time and has needless complication. The plugin only needs to add/remove whatever it is passed, parse based on the field identifies, track quantity, display the file contents in pages, display an action (optional, if present) when used, and respond to other simple commands.

    Anyway - just a suggestion.

    ...and btw - After successfully setting up the "gp" currency, when I, as an admin, attempt to issue the command /pay myself 100 gp in the current plugin, it doesn't work and says: /pay [player] [amount] [currency] - seems like a bug. I assigned "gp" to gold_ingot, gave myself 100 gold ingots, and it still behaved the same way.

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


    Possible support for Vault since it is far better than Register? Its better, more flexible and more stuff you can do :D and actually under development more than Register is. Ask @Sleaker for more infomation
  15. Offline


    Nice mod.

    1 Suggestion:
    Could you add a function that you can also set a Default currency if you use the commands?

    (Didn't installed yet but:)
    Is it also possible to dis-enable normal users selling items in one of the currency's?

    My plans are like there is just normal money, and VIP points. If you donate, you'll get VIP points.
    In 1 special shop you can buy some special items (like sponge etc.) with VIP points,
    but in maintime, it would be more user-friendly if user's don't need to type:
    /money <currency> All the time.
    /money VIP
    For VIP points.

    Maybe this is allready added to the mod, I'm just a noob, remember that! ;-)
  16. Offline


    Okay, so I need some help (Again). How do I use this with Iconomy Chest Shop?
  17. Offline


    This still working?
    Also would like Vault support as most plugins have switched to it.
  18. Offline


    Hi there,

    I am currently running iConomy 5 using MySQL - is there a simple way to migrate all my old iConomy data to MultiCurrency as this definitely seems the way to go
  19. Offline


    wow so say im using essentials eco if i install this i could create another currency that would be say $1000 essentials eco = 1 coin or something like that? if so then I'll be a regular user X-D

Share This Page