[INACTIVE][ECON]SignTrader 1.0.7 - Trading with signs! (617)

Discussion in 'Inactive/Unsupported Plugins' started by darknesschaos, Feb 3, 2011.

  1. Offline

    darknesschaos

    SignTrader - Trade with Signs!
    Version: v1.0.7 - CB (617) tested
    [wheatsprout]Description[wheatsprout]
    This Bukkit plugin allows servers to use signs as a functioning shop tool. Simply set the sign in the appropriate format, optionally link it to a chest and you can have a sign that either vends from a chest you own or you can set the sign to sell to users items they normally couldn't get as something like a modified /give with a set location. Simply punch the sign to get a little more information to understand what it does and how to use it.

    [wheatsprout]Commands[wheatsprout]
    /signtrader -s p - set the sign that you punch, the 'p' is optional and makes it persist.
    /signtrader -sc p - link signs and chests to each other, must be within 40 blocks and on the same world and the 'p' is optional
    /getdata - returns the data of the item in hand (name, amount, and durability.)

    [wheatsprout]Other Plugin Support[wheatsprout]
    You don't need any of these for this plugin to work.​
    Supports protection from LWC, (2.0 only) with lwc installed SignTrader forces players to sell from chests that they own.​
    Supports Permissions from TheYeti (2.5.4 tested) with the following nodes This defaults to op.txt if not present:​
    • signtrader.MakeGlobalSign - so the player can activate "Global" signs defa
    • signtrader.MakePersonalSign - so the player can activate "Personal" signs
    • signtrader.admin.BreakAnySign - so the player can break any sign (duh)
    • signtrader.Use - so the player can use any player sign or activated Global sign
    • signtrader.admin.SetOwner - so the player can set the owner of signs.
    Supports iConomy (4.0 +) for usage with the local money system.


    [wheatsprout]Sign Format[wheatsprout]
    The sign format is as follows:​
    Line one - Global or Personal - denotes sign type, personal pulls from chests, Global doesn't use chests.​
    Line two - amount:ItemType:durability or amount:$ - this is the payment line (what the chest will get from the player) amount is how much the player wants to recieve, ItemType is the item number of the item they want to recieve from player if the other is chosen it will be the amount of money the sign owner wants to get from the player.​
    Line three - amount:ItemType:durability or amount:$ - Similarly to line two, this is what is removed from the sign owner and given to the player.​
    Line four - leave this one alone, [Activated] is put in the line to show it is an active sign.​
    Example 1) - trade sign​
    Line # - text​
    1 - Global​
    2 - 1:3​
    3 - 1:35:1​
    This sign trades for dirt and gives the user orange wool.​
    Example 2) - Sale sign​
    1 - Personal​
    2 - 1:$​
    3 - 64:3​
    This sign takes 1 of iconomy money from the sign user and gives it to the owner, and gives the user 64 dirt.​
    Example 3) - Freebie sign​
    1 - Personal​
    2 - Free​
    3 - 1:3​
    This sign gives 1 dirt for free to the user​
    Example 4) - Purchase Sign​
    1 - Personal​
    2 - 1:3​
    3 - 1:$​
    This sign takes money from the owner and gives to the user and takes 1 dirt from the user and puts it into the chest.​
    [fire]Trouble?[fire]
    When posting issues here please write the following:​
    * What the sign has written on it.​
    * What output you got from the console. (If any)​
    * What you expected to happen.​
    * What actually happened.​
    * What plugins (and their versions) you are using with this (including version number.)​
    * What version of this plugin you are using.​
    Failure to do these will result in you being called an idiot.​
    Show Spoiler


    CHANGELOG:​
    Version 1.0.7​
    *Bugfixing​
    Version 1.0.6​
    * removed the sign breaking prevention function...​
    Version 1.0.5​
    * Fixed an abuse problem​
    * Now protects signs and blocks from destruction of non-op(or permissioned) and non owners of signs (owners of global signs are the ones who placed them.)​
    Version 1.0.3​
    * Updated to be compatable with 600+​
    Version 1.0.2​
    * Fixed link with newest version of lwc.​
    * Null pointer bugfix​
    * Rewired the sign recognition code.​
    Version 1.0.1​
    * Trading sign bugfix​
    * re-added the /signtrader -s command​
    * fixed up command interface a bit​
    * added /getdata so players can find the durability of the item in hand.​
    * added /signtrader -so (OwnerName) needs "signtrader.admin.SetOwner" node or player being op.​
    * now prevents people from linking signs and chests that aren't their own.​
    Version 1.0.0​
    * Monsterous update​
    * Too many to list...​
    Version 0.9.3​
    * Fixed bug where appropriate files were not created.​
    * Cleaned up item.txt creation code.​
    * update to iConomy 3.0 support?​
    Version 0.9.2​
    * Fixed bug where chests weren't detected, possibly other fixes.​
    * still not sure on iConomy, please, someone, let me know.​
    Version 0.9.1​
    * Fixed a bug where signs were not deleted from the sign list when they were destroyed.​
    Version 0.9​
    * Added Sign protecting features​
    * hopefully a fix to iConomy support​
    * now players need to set personal signs.​
    Version 0.8​
    * Added a feature that displays sign information in a more detailed form when the sign is punched.​
    Version 0.7.1​
    * hopefully a bugfix that solves a problem with named worlds​
    * getting chest owner works nicely with LWC​
    Version 0.7​
    * Fixed purchasing and selling to chests (Needs testing.)​
    Version 0.6​
    * Removed incorrect format error.​
    * Chests can now: trade, get donations, give stuff out.​
    * Chests still can't "sell via iConomy"​
    * probably a few other fixes​
    Version 0.5​
    * Release of locking protection for global signs (so not anyone can make them)​
    * signs "should" work fine with chests, however I am afraid they ignore protections.​
    * item blacklisting possible.​
    * permissions support.​
    * iConomy support.​
    * ect.​
    Version 0.1​
    * Initial release of the plugin.​
     

    Attached Files:

    rasse, shadrxninga and NEO like this.
  2. Offline

    bdot

    This is exactly the plugin I've been waiting for and give kudos to darknesschoas for putting the time in to develop it.

    I've been anxiously waiting for any kind of permissions system more than anything else on this.

    I even tried using my own poor coding skills to implement a very simple name check for it, and failed miserably.

    Can't wait for the next update!
     
  3. Offline

    Scaarj

    Yeah this plugin will be very beneficial! :) Just need Iconomy support + Signs that drain chests, already have LWC so don't need any chest protection.

    However if anyone wants a quick fix, the way I've been running it on my server is to install LWC, create a forum for people to trade and advertise shops, then have the player selling, receive the money and make a chest with the stuff for their client, they can password the chest and everything can be done while one is offline
     
  4. Offline

    darknesschaos

    Im working on a major revisioning, there will be no need for chests.
     
  5. Offline

    WMisiedjan

    Waiting for a nice update :D
     
  6. Offline

    darknesschaos

    me too ;)
    --- merged: Feb 7, 2011 5:28 PM ---
    but seriously, there is a lot of changes I'm doing.
     
  7. Offline

    roatigern

    when i place a sign with an item to trade for like cobblestone i dont get any thing back:/
     
  8. Offline

    darknesschaos

    the order is
    1x(itemid) - this is the item they have to pay.
    xxxxx
    1x(itemid) - this is the item they get.

    but seriously, no-one should use this seriously yet... it allows anyone to /give essentially... bedrock is bad
     
  9. Offline

    LucidLethargy

    Once iConomy is supported, you will have saved me a lot of trouble! The fact the trade module hasn't been ported for iConomy yet is really harming my economy, so this will be an amazing solution!
     
  10. Offline

    NobodyOfNaught

    When you say there will be no need for chests, I'm guess that means the plugin will keep track of how much inventory has been loaded into the sign?

    While having the plugin track the signs inventory makes the plugin useful for player trading. I would prefer the inventory be kept in a chest so that it's still using in game storage, not some mystery magic storage place.

    I'm not sure I'm making myself clear here, but basically I like my world to be as realistic to the unmodified minecraft as possible.

    As an example I could plunk down a chest fill it with stuff and post the prices on a sign above it, and if people where honest they could take why that want and leave the payment in the chest. Unfortunately people are not honest so we need a plugin to enforce that honesty, however I would like the mechanics of the trading system operate the same way as though there was no plugin.

    Another way to look at it is, storing stuff in a chest means that the plugin can be removed without inventory being lost, because the inventory is saved as part of the map not in the plugin database.

    Sorry about the rambling hopefully some of what I'm trying to say makes sense :)
     
  11. Offline

    darknesschaos

    it does, but then I need to make a bunch of code to check for chests and their contents. that is a lot of work seeing I have no idea how to work with chests yet.
     
  12. looks awesome! i will start using when it gets permissions:D
     
  13. Offline

    darknesschaos

    I will put a code update later just so people can see what changes I have done, sadly, it is untested atm.
     
  14. Offline

    LucidLethargy

    Until this plugin has it's own permissions, or works with the permissions plugin, it's almost entirely useless...

    People on my server can make diamonds and gold from dirt right now... and that kind of ruins the server.

    Either way, fantastic work so far! It functions perfectly apart from the above problem. It just needs a bit more love to be used on any serious server (or, rather, any server that doesn't have or want unlimited free resources.)
     
  15. Offline

    darknesschaos

    erm, if they wanted, it would be free and they could make BEDROCK. but if you trust everyone.... go ahead. But the one Ill be releasing soon will be sooooo robust.
    --- merged: Feb 8, 2011 1:25 AM ---
    oh, and thanks for the kudos! I love kudos!
     
  16. Offline

    NobodyOfNaught

    You might check out sk89q's Craftbook plugin for insight into manipulating chests
     
  17. Offline

    darknesschaos

    ill look into that one when i finish this iteration.
     
  18. Offline

    bdot

    More kudos will be given upon successful implementation of permissions :D

    All my players are very excited for this! I'd even be happy to help test if needed.
     
  19. Offline

    darknesschaos

    testing 'shouldnt' be the issue, its that the scope of the project increased 100fold
     
  20. Offline

    bdot

    If I knew more than just a crash-course in java I might be able to contribute, but I'm afraid I'm still too much of a noob.

    Looking through your code I see some groundwork there for using ops.txt. Was this abandoned in favor using the Permissions plugin? My idea for a quick holdover was something like

    Code:
    public static void createSign(Block b, Player p)
        {
            if((b.getType() != Material.SIGN_POST) ||
                (b.getType() != Material.WALL_SIGN) ||
                (p.isOp() == false))
                    return;
    
    
     
  21. Offline

    darknesschaos

    I have it default back to ops.txt if permissions happens to be available. Thanks for the effort, but the code is rediculous right now and I'm probably the only one with a clue(barely) as to what will happen next with that. However, thanks much for your support and I hope I can get a decently working copy out in the next few days.

    Major code updates have been happening in the git hub for the curious.
    --- merged: Feb 8, 2011 8:16 AM ---
    oh, and one thing I'm trying to do with this project is have many little functions instead of having one or two large ones, I want to see what kind of difference this makes.
     
  22. Offline

    bdot

    Wow, latest commit is looking really good.

    I like the little functions concept, makes things a bit more organized. I have yet to find a change I don't like! Will be testing this in the morning to give you some feedback, for now i must sleep.
     
  23. Offline

    darknesschaos

    i can promise it wont do anything but go hurrrr duurrrr. but hopefully this will be nice in the end. Also, using lots of //TODO in eclipse is amazing. works for good notekeeping.
     
  24. Offline

    Yogoda

    I have made trading chests for my server, using iConomy and ChestProtect (old chest protection plugin).

    Players have been using it for a week now, we have shops everywhere and it really boosted the economy, that's awesome :)

    http://greencity.4rumer.com/t644-trade-chests

    I don't think I want to release this plugin public, that's too much work for me, but if you want I can give you the source code, that might help you a lot in implementing trade chests. It also support double chest with one selling side and one buying side. What is cool is there is no need of any data storage, everything is on the sign. Also it won't let you place a sign on top of a protected chest if you are not the owner, that prevents stealing items.

    Don't work for colored wool or special logs now, but I'm working on an update. It will also tell you how much items are remaing in the chest or if the chest is empty/full
     
  25. Offline

    NobodyOfNaught

    @Yogoda your plug-in is exactly what I was looking for :)

    I feel like an sk89q fanboy pointing him out again but I noticed that World Edit recently added support for wool colours, that might help you get it working in your chests.
     
  26. Offline

    darknesschaos

    @Yogoda that would be awesome! Thanks!
     
  27. Offline

    bdot

    @Yagoda I'd love to see the source for that as well.

    Kudos to anyone who develops non-global command buying/selling/trading plugins!

    @darknesschoas: I found your code a lot easier to navigate now.
     
  28. Offline

    Yogoda

    Ok, here it is, it is a build in development so I'm not sure it is bug free, but is should work.

    CraftBukkit version is 135, so you will probably need to update the code.

    http://dl.dropbox.com/u/4422249/Minecraft/Plugins/TradeChests/TradeChests.zip

    Also it is using ChestProtect, here it is :

    http://dl.dropbox.com/u/4422249/Minecraft/Plugins/TradeChests/ChestProtect.zip

    Anyone is free to reuse the code (TradeChests, not ChestProtect, as it is not mine).

    If someone is interested to make a public release of the plugin, tell me.

    To make it work with LWC, just update the ChestProtection.java.

    If you wonder where the comments did go, it is because I did put none ^^, also I had to deal with very buggy Bukkit API, so if the code looks strange sometimes it is because it was the only way I found that worked :p
     
  29. Offline

    darknesschaos

    haha, no problem. and thanks so much yogoda, I will check it out later!
     
  30. Offline

    Yogoda

    Be careful, I found a bug that makes the server crash when setting a sign line to null. It is better to wait my new version, that will have support for colored wool and special logs.
     
  31. Offline

    darknesschaos

    lol this became a thread for two similar projects XD
     

Share This Page