[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

    Fogbear

    Lwc and conflict
     
  3. Offline

    Lodran

    I'm seeing errors in the log when I click on a sign, if I'm not holding the required item:

    Feb 17, 2011 1:25:44 AM org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event BLOCK_RIGHTCLICKED to SignTrader
    java.lang.NullPointerException
    at com.polycrypt.darknesschaos.SignTrader.Signer.tradeItems(Signer.java:145)
    at com.polycrypt.darknesschaos.SignTrader.Signer.useSign(Signer.java:131)
    at com.polycrypt.darknesschaos.SignTrader.SignTraderBlockListener.onBlockRightClick(SignTraderBlockListener.java:21)
    at org.bukkit.plugin.java.JavaPluginLoader$20.execute(JavaPluginLoader.java:221)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:60)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:214)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:496)
    at net.minecraft.server.Packet15Place.a(SourceFile:57)
    at net.minecraft.server.NetworkManager.a(SourceFile:232)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:317)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:232)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)

    Second, I have a feature request - I'd like to be able to use SignTrader to create specific mob spawners, but this would require the item that is dropped to have its data value set.

    As an example, a sign reading:

    Global
    1:41
    1:52:3

    would trade 1 gold block for a type 3 mob spawner (Unfortunately, I can't find any documentation which tells what data value = what mob).
     
  4. Offline

    darknesschaos

    it doesnt set data. not yet anyway. and the next update will have no error with lwc. but im currently working out some bad bugs.
    --- merged: Feb 17, 2011 10:17 AM ---
    oooh sorry i misread, I will consider doing that later!
    --- merged: Feb 17, 2011 10:18 AM ---
    and the error, what sign type was it?
     
  5. Offline

    Lodran

    The sign that errors reads:

    Global
    1:3
    1:1

    There's no chest attached to it.

    I've run into another issue, which hopefully you already know about - If I stop the server, and restart it, none of the signs get reactivated. I'm also seeing some minor corruption of the GlobalSigns.txt file

    # Save Format(x:y:z:WorldName:playerThatActivatedTheSign)
    # --Global Signs--
    197:76:174:heretic world of fun:lodran
    197:76:172:Heretic World of Fun:Lodran
    197:76:174:Heretic World of Fun:Lodran
    197:76:172:heretic world of fun:lodran

    As you can see, signs have been recorded twice - once with caps, and once without.
     
  6. Offline

    Nakou

    LWC issues :
    17 févr. 2011 16:59:03 org.bukkit.craftbukkit.CraftServer loadPlugins
    GRAVE: com.griefcraft.lwc.LWCPlugin cannot be cast to com.griefcraft.lwc.LWC (Is it up to date?)
    java.lang.ClassCastException: com.griefcraft.lwc.LWCPlugin cannot be cast to com.griefcraft.lwc.LWC
    at com.polycrypt.darknesschaos.SignTrader.Tools.testLWC(Tools.java:58)
    at com.polycrypt.darknesschaos.SignTrader.SignTrader.onEnable(SignTrader.java:94)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:425)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:175)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:171)
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:158)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)

    (CBB: 323 i think. Release Download is down actualy).
     
  7. Offline

    darknesschaos

    this one has a bug with lwc, but that bug is fixed. @Lodran what is the error with that sign? and global signs dont use chests. And I never thought the world will have the names saved in upper and lower case XD gotta fix that one. (the issue may be with me loading the world names in lower case and the check happens in uppercase.)
     
  8. Offline

    n4Ghost

    it sells only 1 of my buyitem:

    10:266
    1:278

    i become 1 of 278 for 1 of 266

    i will by 10 of 266
     
  9. Offline

    darknesschaos

    @n4Ghost there is an issue with putting stock into chests and I am looking into it right now on how to fix it.
     
  10. Offline

    Nakou

    Last version, same bug again :

    17 févr. 2011 20:52:47 org.bukkit.craftbukkit.CraftServer loadPlugins
    GRAVE: com.griefcraft.lwc.LWCPlugin cannot be cast to com.griefcraft.lwc.LWC (Is it up to date?)
    java.lang.ClassCastException: com.griefcraft.lwc.LWCPlugin cannot be cast to com.griefcraft.lwc.LWC
    at com.polycrypt.darknesschaos.SignTrader.Tools.testLWC(Tools.java:58)
    at com.polycrypt.darknesschaos.SignTrader.SignTrader.onEnable(SignTrader.java:94)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:425)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:175)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:171)
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:158)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
     
  11. Offline

    Jear

    Great plugin! however, when running with either TradeChest or Stargate plugins whenever you right click a sign, two messages pop up saying "The sign is in the incorrect format" or something close. not a functional bug, but spammy
     
  12. Offline

    darknesschaos

    @Nakou that will be fixed in 0.6

    @Jear that warning will be removed.
    --- merged: Feb 17, 2011 10:11 PM ---
    update to 0.6
    --- merged: Feb 17, 2011 10:59 PM ---
    update to 0.7!
     
  13. Offline

    Lodran

    I'm unable to get version 0.7 to work at all.

    CraftBukkit version 328, SignTrader version 0.7 and Permissions version 2.0

    I'm listed in ops.txt, and have given myself - 'signtrader.*' in .../Permissions/config.yml

    For a sign reading:

    Global
    1:3
    1:1

    1) I /st set, left-click the sign, and get "You have added 202:75:176:heretic world of fun to the sign list." in response (as expected).
    2) I hold a block of dirt, right-click the sign, and get "This sign has not been activated." in response (not expected).
    3) I /st set, left-click the sign again, and get "That sign has already been activated." in response.

    For a sign reading

    personal
    1:3
    1:1

    with an adjacent chest containing stone:

    1) I right click the sign, and get "No chest found.", even though I have made no attempt to activate the sign yet.
    2) I /st set, left click the sign, and get no response in chat.
    3) I hold a block of dirt, right click the sign, and get "No chest found".
     
  14. Offline

    darknesschaos

    @Lodran I have no idea why you are having such trouble with global signs, but we shall get to the bottom of this. for the personal sign, do you have the chest under the sign?
    --- merged: Feb 18, 2011 4:56 PM ---
    update to 0.7.1 hpoefully this will solve @Lodran issue!
     
  15. Offline

    Nakou

    The plugin work fine now with LWC, (for the 0.7, I have dont test the 0.71).

    But if i can summit something, it can be perfect if when you buy stuff, you can see:
    "You buy #nbrofitem #nameofItem for #cost. Balance #youraccount."
    or for sell :
    "You sell #nbrofitem #nameofItem for #cost. Balance #youraccount."
    (for ItemName=>Item number, we can use the item.db of a lot of another plugin).

    I'm goin to see the sourcecode for that plugin and the sourcecode of iConomyChestShop for know how you can do that, and tell you if i find it ^^.


    PS : Sorry for my english, i'm french :).
     
  16. Offline

    Eniaco

    still having this issue:

    but now it wont even give me the soup. Clicking on the sign just takes my money. Running the latest version- 0.7.1
     
  17. Offline

    Nakou

    We publish a changed java file named signer.java ->
    We implement sell and buy messages on Global shop.
    Line 246 and 192.

    And we publish our version, you can take it, it's free :D.
    (V.42 was a joke ^^)
    Enjoy!

    (c) Code simply modified by Nakou and Barklight (Les Limbes de Gary server)
     

    Attached Files:

  18. Offline

    darknesschaos

    @Nakou that was going to go in eventually. thanks!

    @Eniaco I have no idea how that is happening. but the chest owner is used if you have lwc (meaning they are the one that protected the chest.) then it goes to the first line of the sign if you do not have lwc. I am currently trying to figure out a way to find out if there is an account in iConomy. Within the next few updates I plan on putting more protections to stop any issue with iConomy or people not getting their money.
    Also, did any kind of error message pop up when the sale failed?
     
  19. Offline

    Nakou

    We try to make another fuction. We trying to do not nescesseraly to have the item in the hand, but just in the inventary. We have a lot of bugs xD (infinite objects).

    If we stabilise this fuction, we publish it :D.
     
  20. Offline

    darknesschaos

    I wanted to do that function too, but there is an inventory update error that i am waiting to get fixed.
     
  21. Offline

    Nakou

    Yep that's right, we conclued on this way too.
    We have made modify somes fuction, objects stop to be sell at the last, but they're not update on the inventory.
    It's a Bukkit problem no?
     
  22. Offline

    darknesschaos

    yes, it is a bukkit issue, all you need to do is open a chest and your inventory updates.
     
  23. Offline

    Nakou

    Yeah, or move the stack, or move something on the stack.
     
  24. Offline

    Lodran

    Version 0.7.1 appears to have fixed the problems my world's silly long name caused.

    And, now that I know that the sign has to be placed exactly above the chest, personal signs are working as well.

    I do find the rules for activation a bit confusing - Personal signs work without being activated, and I've never been able to get the activator's name to appear on a personal sign.

    Typing /st set, and then clicking on a personal sign doesn't appear to do anything different from just clicking on the sign.
     
  25. Offline

    darknesschaos

    personal signs don't use activation or need it, I plan on fixing this soon. and the playername is used on the sign if lwc isn't available, if it is available, it uses the name of the person that protected the chest.
     
  26. Offline

    Lodran

    I've got a bug report, that's related to my earlier request for block data support.

    I made a personal sign for trading 1 gold for 64 red wool, and put 64 red wool in the chest.

    After a trade, I found myself with 63 white wool - so really, it's 2 bugs ;-)
     
  27. Offline

    darknesschaos

    ok, I want you to stop having problems :D k?
    --- merged: Feb 19, 2011 2:06 AM ---
    @Lodran how did the sign look? wool looks peachy to me (minus the color bit)
     
  28. Offline

    Lodran

    I retried it, and can't reproduce the item count problem anymore - it's possible that one dropped far enough away that I just didn't end up picking it up.

    I'm still hoping you can wedge block data in there sometime - it's the only thing that's keeping me from using this on our server.
     
  29. Offline

    darknesschaos

    haha, eventually. I need to fix everything first.
     
  30. Offline

    Lodran

    I cracked open your source code to see what it would take to add item data support - looks like I'd be all over the Signer class - particularly the parsing code - I'll see if I can at least get it to retain block data when moving from chest to player.

    Looking at it, it seems that adding full support for item data will be complicated, in that it's hard to say whether or not keeping the item data is important for a particular item. There will also be issues with stacking items in a player's inventory which would have to be resolved.

    It also occurs to me that SignTrader could be abused to reset the durability on a player's tools, so you might want to blacklist tools by default.
     
  31. Offline

    darknesschaos

    That occured to me too just a moment ago XD so, it may be of interest of server owners to do that.
     

Share This Page