[INACTIVE][ECON] BetterShop 1.6.5- iConomy Global Command-based Shop [602 & 677]

Discussion in 'Inactive/Unsupported Plugins' started by jjfs85, Feb 4, 2011.

  1. Offline

    jjfs85

    BetterShop - The "better" global command-based shop that ties into iConomy:
    Version: v1.6.5 (1.6.5.3)
    Download: (static jar) BetterShop.jar
    (older, 602 compatible) BetterShop_1.6.2.8.jar
    (older, 556 compatible) BetterShop_1.6.2.5.jar
    (older versions are not supported, sorry)
    Authors: jascotty2, and jjfs85, with a little help from lologarithm.

    Webpage coming soon.

    Want the most up-to-date info on usage, features, the changelog, and more?
    Read the README!

    Plugin Information (as of v1.6.5.3 - 4/11/11)

    Commands (open)

    • /shop
      • for those used to a plugin having one command, this is another way to get to the following commands
    • /shophelp (shelp) [command]
      • shows you all the commands you can use
      • can show specific help for a command
    • /shoplist (sl,slist) [pagenum]
      • shows a listing of items for sale
      • (if -1, all, or full given, will show full list. (mainly for console use))
    • /shopitems (sitems)
      • show full listing of items in shop, without prices
    • /shopcheck (sc,scheck) <item>
      • lookup a specific item so you don't have to read through pages of prices
    • /shopbuy (buy,sbuy) <item> [amount]
      • buy an item for the price in the shopshop ("all" is accepted as an amount)
    • /shopbuyall (buyall,sbuyall) <item>
      • buy all of an item that you can hold
    • /shopsell (sell,ssell) <item> [amount]
      • sell an item for the price in the shop
    • /shopadd (sadd): <item> <buy> [sell]
      • add an item to or update an item in the price list
    • /shopremove (sremove): <item>
      • remove an item from the price list
    • /shopload (sload):
      • reload prices from pricelist database
    • /shopsellall (sellall): [inv] [item [...]]
      • Sell all of item from your inventory (alias to command /shop sell all)
      • (inv will not search lower 9 slots)
    • /shopbuystack (buystack): <item> [item | amount]
      • buy a stack of an item (usually 64)
    • /shopsellstack (sellstack) <item> [amount]
      • sell a stack of an item (usually 64)
    • /shopbuyagain (buyagain,sba):
      • repeat last buy action
    • /shopsellagain (sellagain,ssa):
      • repeat last sell action
    • /shopkits (skits):
      • show a listing of avalliable kits (will be elaborated later)


    Dependencies (open)

    BetterShop's dependencies:

    Economy plugins supported:


    iConomy
    - or
    BOSeconomy

    Supported Plugins:

    • Permissions v2.5.0+ by people - permissions and groups plugin
    or​
    • GroupManager by not Zenexer after all- a replacement for Permissions that is fully compatible with plugins that require it (using FakePermissions)
    • Help 0.2+
    • MinecraftIM


    Features (open)

    Features:
    configurable
    • Fully configurable colors and message text in config.yml file
    • shoplist can have text alignment (read config for more info): <item> <l(eft-aligned)> <buy and sell info>
      • - uses minecraft font character spacing, so is very close to perfectly aligned in chat
    • shoplist can optionally not show listing tail (or head, but recommended to leave <page> of <pages>)
    • Items can be colored in the new itemsdb.yml file
    • also in itemsdb.yml: kits!
      • - define your own kits that the shop can sell
      • - three examples provided, edit and add to your liking
    • Configurable Options:
      • -max pagesize when printing shoplist
      • -whether to broadcast all transactions publicly
      • -name of the pricelist file/table
      • -customsort: a custom sorting order, so you can have items at the top of the shop list
      • -allowbuyillegal: if someone without BetterShop.admin.illegal can buy illegal items
      • -whether maxstack should be honored
      • -if used tools can be bought back
      • -default color for items
    shop flexibility
    • shopcheck will run a name comparison check, and return all matching items
    • Item sub-type support for dye colors, cloth colors, etc: magentacloth = 35:2 = cloth:magenta
    • "all" is a valid amount when buying or selling: "/sell cobblestone all" or "/sell all cobblestone"
    • damaged tools can be resold for an adjusted value of sellprice*(1-(damage/maxdamage))
    • buystack can be given multiple items, or number of stacks: "/buystack wool 5" or "/buystack wool blackdye reddye"
    • shopsellall can be given multiple items (/sell all cobble gravel flint dirt)
    • plural-insensitive items: if not found, will check if plural & remove "s"
    • not just items can be bought anymore: can now buy LivingEntities, like dogs (wolf)
    • signs can be used for buying & selling
      • Code:
         [*][BetterShop]
         [*]buy [amt], buyall, buystack, sell [amt], sellall, sellstack
         [*]item name (recommended) or id:data, or for sellall: onhand, inv
         [*](unused line)
         [*]
      • to activate, someone with BetterShop.admin.makesign must left-click the sign.. the first line will change color when active
      • left-click for price check (or activate), right-click to buy/sell
      • if a unauthorized player destroys a block a sign is on, is canceled
      • can scan for uxexpected sign destruction (tnt) & replace it
    administration
    • Every item and subtype can be priced differently
    • Disable buying or selling of an item by giving it a price of -1 (0 makes it free)
    • command aliases to stop carpal tunnel
    • many commands have sub-aliases.. eg. shoplist kits will run shoplistkits
    • MySQL pricelist support
    • MySQL pricelist can be cached for a given timespan (decreases table selects)
      • (flatfile is cached until manually updated)
    • Transaction records (MySQL or flatfile as .csv)
    • Downloads mysql-bin.jar dependency automatically
    • buy/sell cap in program set to 999,999,999 (not that you'd be using that much, but the cap is to prevent other errors)
    • if encounters errors while editing a player's account, will attempt to reload iConomy (i've had issuses with it before)
    • can backup the current pricelist: /shop backup
    • on start, can check the download page to see if there is an update available
    • /shop ver[sion] shows version # and if is up-to-date
    • shop can be given a finite stock from which to buy & sell
    • /shop ver[sion] to check the current version & see if there's an update
    • MinecraftIM support: forward errors or all messages
    • checks for missing & unused configuration nodes
    • strings have default values if missing
    • auto error reporting added (can be disabled)
    • help main page integration can be disabled
    • global shop can be disabled & only allow signs to be used


    Installing (open)

    Installation instructions:

    New Installation?
    Upgrading?

    • lots more added to config.yml all the time..
    • to 1.6.3+ ? Itemsdb.yml has been expanded to include entities
    • from before v1.6.1.3 ? Itemsdb.yml has been expanded:
      • not required to update, but recommended
      • if you've already edited yours, you can look here and see what i've added
        • mainly: leaves, charcoal, tools & armor damage, some more aliases
    • from version 1.5.9b - 1.6.1.0 and use MySQL transaction logging?
      • ALTER TABLE BetterShopMarketActivity ADD COLUMN PRICE DECIMAL(11,2);
      • ALTER TABLE BetterShopMarketActivity CHANGE COLUMN SOLD SOLD TINYINT;
        • optional, but useful for php
    • from version between 1.5.5 - 1.5.9 and use MySQL pricelist?
      • ALTER TABLE minecraft.BetterShop CHANGE COLUMN BUY BUY DECIMAL(11,2);
      • ALTER TABLE minecraft.BetterShop CHANGE COLUMN SELL SELL DECIMAL(11,2);
    • from an earlier version?
      • Will import your old pricelist.yml into the db you have setup in the config :)
      • Items.db is no longer used - delete it :)
    Permissions:

    Just add the following nodes to Permissions' world.yml file (or data.yml file for GroupManager):


    - 'BetterShop.user.*'
    ^ Allows the user to use the list, sell, buy, and help commands
    - 'BetterShop.admin.*'
    ^ Allows the user to use the add, remove, and load commands

    Alright, so you have the plugins in place and set up, and permissions nodes added to the Permissions' config.yml. Now just place the BetterShop.jar file in the server's plugins directory. Then just start the server and add things to the shop. That's all!

    Adding Items:
    There are two ways to add things to the shop:
    1. Recommended, but slow: use /shopadd [item] [buy-price] [sell-price]
    2. Faster: use a text editor or spreadsheet program to edit the pricelist.csv


    TODO (open)

    features listed here may already be in the works, or may be on the back burner
    if you want a new feature, or want something sooner, ask :)

    • calculated/derived item prices
    • /shopvalue item[@amount] item to show the current trade value for two items
    • discount system: users or groups can be charged less/more for an item or all items (sell prices also affected)
    • dynamic market pricing, based off of logged market activity
    • region shops (items added while in a region defined as a shop are only added to that shop)
    • add option for amount in stock for surplus decreases how much item is worth to the shop
    • /shop alias <item> - show the itemname, with a list of aliases
    • add pages for /shopitems
    • more descriptive kit listing, similar to shoplist:
      • - pages
      • - show what makes up a kit
      • - enable admin.add to see avaliable kits
    • SQLite support?
    • tie item prices to stock quotes?
    • craftables' stock is tied to source material stock (if using sell craftables)
    • make LivingEntities follow the owner around?
    • change buystock if itemStock is enabled so that if trying to buy multiple stacks (buystack item 20) and stock runs out to stop buying (stop showing "out of stock")
    • individually-customizable restock stock values per-item
    • chest shop interface ?
    • automatically add missing config nodes (preserving comments)
    • add a simple builtin economy system, if none found?
    • add categories to items
      • - can search, buy, & sell with category
    • user-owned shops (signs, linked to chests)
    • 4th line for configurable prices or shop profit owner


    Changelog (open)

    Changelog:
    (the (?) means plugin didn't report that as the version.. sorry :))

    Version 1.6.5.3 - 4/11/11 - jascotty2
    • added option to disable sign protection
    • added sign action wait, to prevent sign click spamming
    • fixed a nullpointer error when selling
    Version 1.6.5.2 - 4/11/11 - jascotty2
    • removed spawnwolf debugging line
    • wolves bought have correct health
    Version 1.6.5.1 - 4/10/11 - jascotty2
    • removed a debugging line
    • wolfs bought have their owner already set (need to increase health)
    Version 1.6.5.0 - 4/10/11 - jascotty2
    • corrected new settings (missed some previously)
    • fixed default sign pricecheck showing wrong one
    • fixed messenger formatting error
    • misc. null fixes
    • BOSEconomy support added
    • changed block protection from scan to save (should improve performance)
    • added tnt protection, in the form of a scanner that routinely checks that all shop signs & their anchors still exist
    • added syntax check for /buy & /sell # [item] (like the sign syntax)
    • allowbuyillegal now defaults to true
    • fixed color set (hidden logic error)
    • signs can have the item name colored according to the defined item color
    Version 1.6.4.2 - 4/9/11 - jascotty2
    • fixed sign destroy permission check to only check bettershop signs
    Version 1.6.4.1 - 4/8/11 - jascotty2
    • "inhand" and "inv" added as valid sellall/buyall items (signs only)
      • - "in hand" buys/sells all of the type of item in the player's hand
    • sign destroy protection algorithm improved (still can't check for explosions :( )
    Version 1.6.4.0 (?) - 4/8/11 - jascotty2
    • stock message error fixed when selling too much
    • fixed <curr> causing a server freeze
    • added amount to pricecheck, so can check the result buy/sell price
    • fixed a buying error when already has some of the item
    • added a sign interface
      • - first line: [BetterShop] (not case-sensitive)
      • - second line: action: buy [amt], buyall, buystack, sell [amt], sellall, sellstack
      • - third line: item (name, id, etc)
      • - fourth line: unused (was going to make price, but decided on pricecheck instead)
      • - to activate, someone with BetterShop.admin.makesign must left-click the sign.. the first line will change color when active
      • - left-click to pricecheck
      • - right-click to run action
    • if a unauthorized player destroys a block a sign is on, is canceled
    • fixed column check for table updating
    • updated for 670
    • configuration nodes are moved to more organised parent nodes (easier to edit if using an intelligent text editor)
      • - older nodes are still supported (for now)
    Version 1.6.3.6 - 4/6/11 - jascotty2
    • again, previously forgot to update the date in last version
    • - added additional checks to prevent future false-positives
    • -- (also checks if comment on download matches plugin, not if plugin >= comment version)
    • figured out the integrity check errors :)
    • now runs checks on changed tables to check if needs updating (and adds columns as necessary)
    • - just transaction log table for now (only table with added columns)
    • another option added: AutoUpdate
      • - if a new update is found, will download & install
      • - can also run manually with /shop updade (OP-only, since forces update & restarts server plugins)
    Version 1.6.3.5 - 4/4/11 - jascotty2
    • fixed a rare null exception in integretycheck?
    • fixed saving errors when transaction logging disabled
    • implemented infinite stock (setting stock to -1 makes infinite)
    • # 1,000+ downloads in one day!
    Version 1.6.3.4 - 4/3/11 - jascotty2
    • fixed a rare invalid function signature error
    • fixed if a player tries to buy/sell air
    • OPs now completely bypass security checks
    • more changes to error reporting format: added a custom message
    • # 10,000+ lines of code :)
    Version 1.6.3.3 - 4/2/11 - jascotty2
    • renamed monstertamer package, to avoid conflicts if you're using the monstertamer plugin
    • should have a reported bug in integrety check taken care of.. not sure of the cause, though
    Version 1.6.3.2 - 4/2/11 - jascotty2
    • fixed more error reporting bugs (still can't find one stupid stock flatfile bug)
    • added stock messages to config
    Version 1.6.3.1 - 4/1/11 - jascotty2
    • fixed chickens & buying more than one animal
    • updated error reporting(again)
    • rand libary update for my (jascotty2's) version of CookieMonster
    Version 1.6.3 - 4/1/11 - jascotty2
    • fixed buy/sell == 0 ? no (in shoplist, 0 incorrectly showed as no)
    • updated for 612 (and 600+ .. had accidently been using the wrong libary)
    • LivingEntities can now be purchased! :D
      • special thanks to fullwall for the MonsterTamer plugin, from which this ability comes from (1.3)
      • if capable, will attack the anything attacking the purchaser (if nearby)
    Version 1.6.2.8 - 3/31/11 - jascotty2

    • nullpointer fixed if running 602 with old groupmanager
    • other misc. null fixes
    • removed redundant reload points for iConomy
    • repaired a mysql totalTransactionLog format error
    • error reporting now begins with a portion of the date, so i can see them listed in order
    • more info added to error reports.. still can't figure out the stock flatfile save bug
    Version 1.6.2.7 - 3/30/11 - jascotty2

    • improved error reporting format & removed a few unnecessary send triggers
    Version 1.6.2.6 - 3/30/11 - jascotty2

    • now checks for missing & unused configuration nodes
    • strings have default values if missing
    • auto error reporting added (can be disabled)
    • now compatible with bukkit 602
    • help main page integration can be disabled
    • hidden changes to get one step closer to dynamic pricing
    Version 1.6.2.5 - 3/28/11 - jascotty2

    • forgot to update the date in the last release, so a false 'newer release' was showing up
    • fixed help support when help loaded before bettershop
    Version 1.6.2.4 - 3/25/11 - jascotty2

    • Added support for my new plugin: MinecraftIM :)
    • removed a stock debugging line i forgot to remove
    • manually set locale for updating date format.. should fix non-us countries?
    Version 1.6.2.3 - 3/23/11 - jascotty2

    • added stock db to reload
    • fixed a stock update on sell
    • updated plugin commands to include sellstack (oops :oops:)
    Version 1.6.2.2 - 3/23/11 - jascotty2

    • more commands added to register with help
    • fixed a MySQL update syntax error for stock
    Version 1.6.2.1 - 3/23/11 - jascotty2

    • fixed a plural search bug
    • added /sellstack (much like buystack)
    • fixed a buyagain logic error
    • /shop import <file> - insert values from file in plugin folder
    • /shop restore <file> - clear shop & load from saved backup file
    • flatfile itemstock repaired
    Version 1.6.2 - 3/23/11 - jascotty2

    • stock option - items can have a finite amount
      • selling to the shop increases the stock, buying decreases
      • can have a minimum update interval: time before will reset stock to initial amounts
      • maximum stock: most will hold
      • noOverStock: will not allow selling if item stock is full
    • note on stock: does not track each item's damage values (if tools)
      • (selling a damaged good allows 1 intact to be bought)
    • /shop restock (permission BetterShop.admin.restock) to update how much stock the shop has
    • permission node BetterShop.admin.backup added for backing up the pricelist
    • added Help plugin integration: will automatically register commands with help
    • added some more MySQL db connection reconnect points (autoReconnect=true not working is becomming irritating)
    • more checking for iConomy account editing failures (i've had more problems with it)
    • fixed a format error if using a replacement char in listing (like <l.>)
    • retructured sellall inventory editing
    • # passed 7500 lines of code! (430KB)
    Version 1.6.1.4 - 3/21/11 - jascotty2

    • (hopefully) fixed MySQL region formatting errors (such as europe where the decimal is a comma)
    • addto/updated help menu
    • added [command] to help: lookup a specific command (also accepts aliases)
    • fixed flatfile total transactions log
    • shop ver[sion] also shows if the plugin is up-to-date
    Version 1.6.1.3 - 3/20/11 - jascotty2

    • default color for items
    • plural-insensitive items: if not found, will check if plural & remove "s"
    • fixed transaction log insert missing the price
    • was having problems reading bit from php, so shanged SOLD column from bit to tinyint
      • alter table BetterShopMarketActivity change column SOLD SOLD TINYINT;
    • finished flatfile support for transaction logging
    Version 1.6.1.2 - 3/20/11 - jascotty2

    • runs MySQL connection check before executing database queries, and manually attempts reload if not connected
      • (still trying to iron out MySQL connection bugs, but this should end those errors)
    • removed list debugging lines i forgot to remove earlier
    Version 1.6.1.1 - 3/19/11 - jascotty2

    • removed double negative add check.. can add an item for -1, -1
    • fixed some Item errors: color and .equals(ItemStack).. fixes itemdb colors and sellall
    • fixed page numbering for when there are hidden items
    • fixed sell for 0: a <= instead of < .. thought i'd fixed that, but apparently not all of those.
    Version 1.6.1 - 3/19/11 - jascotty2

    • update check is optional (in config)
    • /shop backup to save pricelist to a backup csv file
    • updates itemsdb on shopload, in case the admin wanted to update colors/kits and such
    • added price column in marketHistory table
      • upgrading from older version?
      • ALTER TABLE BetterShopMarketActivity ADD COLUMN PRICE DECIMAL(11,2);
    • added flatfile support for transaction logging (uses csv)
    • removed pricelist save file on close (is already saved on edit)
    • if an item is marked as no buy, no sell, don't show on shoplist
    • itemsdb names can be saved (and outputted) with title formatting (eg RedstoneTorch)
    • - included itemsdb also expanded & names formatted
    • case-insensitive item matching
    Version 1.6.1 alpha - 3/18/11 - jascotty2

    • Checks git to see if there is a newer version avaliable
    • fixed price = 0 to be free
    • fixed null in sellall if selling all sellable
    Version 1.6.0f - 3/18/11 - jascotty2

    • better error check for config & importing old yml pricelist
    • MySQL pricelist can be cached for a given timespan (decreases table selects)
    • fixed sell bug (selling one would credit for amount in the first stack)
    Version 1.6.0e - 3/17/11 - jascotty2

    • fixed a removal error - there was a typecast exception previously
    Version 1.6.0d - 3/17/11 - jascotty2

    • if the old PriceList.yml file exists, will import into whatever db is enabled, then rename the file
    • fixed public message bug - would send broadcast (num_players-1) times
    Version 1.6.0c (?) - 3/17/11 - jascotty2

    • added more options: allowbuyillegal, usemaxstack, buybacktools
    • fixed buystack history
    • major buystack logic error repaired - previously didn't work correctly
    • buystack can now be given multiple items, or number of stacks: "/buystack wool 5" or "/buystack wool blackdye reddye"
    • damaged tools can now be resold for an adjusted value of sellprice*(1-(damage/maxdamage))
    Version 1.6.0b (?) - 3/16/11 - jascotty2

    • fixed a minor buy error if tried to buy more than they can hold, and could hold 0 more
    • major MySQL problem fixed - pricelist table wasn't being created
    Version 1.6.0 - 3/16/11 - jascotty2

    • major code restructure & reorganization
    • changed item db to a more descriptive yml file
      • can define what items make an item (for calculated/dynamic costs)
      • can change what color it will be outputted as in the listing
      • define kits (sold.. store won't buy them)
    • MySQL buy & sell fields increased to decimal(11,2), and cap in program set to 999,999,999
    • shoplist can now optionally not show listing tail (or head, but recommended to leave <page> of <pages>)
    • removed value check - can now "sell" items that sell for 0
    • added /shop command alias - for if a user is more used to "/shop help" than "/shophelp"
    • many commands have sub-aliases.. eg. shoplist kits will run shoplistkits
    • now does pre-check for if user can hold as much as they're trying to buy
      • and "all" to try to buy as many as they can hold
    • items can be marked as illegal, and can only be purchased by a select few (using permissions)
      • also not shown to users who cannot buy them, except with pricecheck
    • option in config to make transactions publicly broadcasted
    • option in config to have a custom sort order
    • shopsellall can be given multiple items (/sell all cobble gravel flint dirt)
    • now shows what items were sold when using shopsellall
    • fixed bug where single sell parameter would == sell [item] all
    • all, full, -1 added as a pricelist pagenumber: will print the full list (intended for console use)
    • marketactivity table truncate logic repaired..
    • marketactivity MySQL table changed with primary key(DATE, USER, ID) (instead of DATE, USER) to resolve conflicts with sellall
    • items can be marked as 'legal: false', and only those with permissions can buy them (can still sell)
    • if encounters errors while editing a player's account, will attempt to reload iConomy
    • sellall can be given "inv" as first parameter to only sell from inventory (not in quick access slots)
    • shopcheck given partial name matching: "/shopcheck wool" (not "shopcheck 35") will show all colored wool prices :)
    • fixed sellall bug when an item not for sale
    • /shopbuystack (buystack): buy a stack of an item (usually 64)
    • /shopbuyagain (buyagain,sba): repeat last buy action
    • /shopsellagain (sellagain,ssa): repeat last sell action
    • /shopkits (skits): show a listing of avalliable kits (will be elaborated later)
    • can now buy kits :)
    • /add now has sell as an optional parameter.. will set to -1 if not given (or if is a kit)
    Version 1.5.9b - 3/11/11 - jascotty2

    • width outputting in minecraft chat (for /shoplist): now can have item (or listing) right-align, left-align, or centered
    • implemented transaction log and total transactions record
    • no longer dependent on permissions: if missing, ops have .admin.* & everyone has .user.*
    • bugs: MySQL buy & sell is decimal(6,2), limiting price to 9,999 (plus a nondescriptive error)
      • to fix (db minecraft, table BetterShop):
      • alter table minecraft.BetterShop change column buy buy decimal(11,2);
      • alter table minecraft.BetterShop change column sell sell decimal(11,2);
    • unknown error: MySQL connection seems to get dropped & won't connect until restart plugin
      • seems to stem from iConomy (v4.4 (Arcadia)) or v0.2 [Coelho].. i only have 4.4, but .2 is being logged
      • shopload should fix this, but iconomy will still be down.. if you have a plugin like hotswap, reload iConomy
    • not a bug, but forgot to remove: debug output of select statements being executed
    Version 1.5.8(?) - 3/10/11 - jascotty2

    • fixed a sell error for one parameter
    • major-ish code restructure - removed data redundancy
    • / shopsell all [item] (alias to /shopsell [item] all)
    Version 1.5.7(?) - 3/10/11 - jascotty2

    • / shopsell [item] all added: sell all of an item that you have
    • fixed total sell value min to .01 instead of 1 (if your server uses low prices)
      • before this fix, one could get around this check by trying to sell alot of an item
    • now automatically downloads mysql dependency (zip from mysql mirror & unzip or from iConomy mirror)
    Version 1.5.5(?) - 3/9/11 - jascotty2

    • Pricelist can now be in a MySQL database
    Version 1.5.4 - 3/2/11

    Fixed some lingering bugs with lologarithm's help.


    Version 1.5.3
    Fixed sell 0 < sellprice < 1 bug.


    Version 1.5.2
    Now it'll convert your old pricelist.yml to the new 1.5.x format automagically!


    Version 1.5.1
    Fixed the bug where setting a price to -1 didn't disable it
    Fixed the "LOLWTFDOESN'TWORK" bug.
    Made price-list listing configurable in config.yml. The way it was 'sposta be.

    (older versions not shown..)

     
  2. Offline

    jascotty2

    i have my sub-version working, if you'd like to try it: https://github.com/downloads/jascotty2/BetterShop/BetterShop.jar
    let me know if you find anything i missed. :)
    (didn't make a script to transfer your current pricelist, though, sorry)
    also: this uses, but does not automatically download, the mysql-connector-java-bin.jar, in the same folder that iConomy puts it
    [MERGETIME="1299745307"][/MERGETIME]
    my "unofficial" changelog..
    -- Bugfixes/additions from 1.5.4:
    - option in config.yml to use a MySQL database instead of a yml flatfile (no caching option yet)
    - another for items to show per shoplist page
    - tries to space out names of items in shoplist (best viewed in the console, since minecraft chat font is not fixed-width)
    - another string added in config.yml: chgmsg for when shopadd item already exists
    - fixed wool color/dye buying/selling. 1.5.4 will allow buying any color for price of white, and sell back any color it finds
    - added "all" to sell: "/sell [item] all" or "/sell all" (to sell everything you have that the shop will buy)
    + other, less visible changes to (hopefully) improve performance & code readability
     
  3. Offline

    jjfs85

    AWESOME! That's all I have to say about that. AWESOME! I will take a look at your code tonight or tomorrow night. Work's been ramping up and I've not had as much time to work on this as I would have liked. Sorry, guys! But the benefits of open source shine through. :D

    BTW, thanks for any optimizations you've made (sight unseen). I'm not a Java programmer by trade or training and I'm sure I've made some poor choices here and there (and everywhere?). Based on the changelog alone, it looks like you've done a whole lot here. I'll merge your changes to the master branch, increment the version to 1.6.0 because that's a huge feature addition, and add you as a co-author. Thanks for your work, and any future improvements you want to make are more than welcome.
     
  4. Offline

    jascotty2

    not really a java programmer by trade, either.. i started learning java last month :)
    honestly, i started programming in general pretty recent.. i just have a mind that easily links into it.

    i started developing my own plugin based off of concepts from this one, but a stock market setting:
    market values could be linked to real-world stocks, or even buy & sell (virtual) stocks
    was also going to move away from the permissions & iConomy dependency & include own if not installed

    if you'd like, i could instead co-develop this one & add some features like that :)
    at the moment, i'm adding a transaction log to the bettershop i have, which could be used to dynamically fluctuate the market buy/sell prices (i think would entail further data on items, such as the items used to make crafted

    -- Added:
    / shopsell all [item] (alias to /shopsell [item] all)
    fixed a sell error for one parameter
    now automatically downloads mysql dependency (zip from mysql mirror & unzip or from iConomy mirror)
    major code restructure - removed data redundancy
    -- Future (todo, planned):
    fix width outputting in minecraft chat (for /shoplist)
    implement transaction log (and total records)
    replace current itemdb with enhanced (yml) records (can use for calculated costs & sub-aliases, like wool:green)
    optional stock market integration? :)
    [MERGETIME="1299880711"][/MERGETIME]
    -- Added:
    width outputting in minecraft chat (for /shoplist): now can have item (or listing) right-align, left-align, or centered
    implemented transaction log and total transactions record
    no longer dependent on permissions: if missing, ops have .admin.* & everyone has .user.*
    [MERGETIME="1299884195"][/MERGETIME]
    not sure what that file is, but if it was related to permissions, my version won't give that error
    if it is permissions and you need it, double-check that it isn't throwing errors at startup.. if it is, you may have a yml syntax error
     
  5. Offline

    GameFAQsRolo

    Are there any flagged items that cannot be added?

    1.5.9b (jascotty2)
    MySQL

    I'm trying to add stationary lava to the shop using:
    /shopadd 11 -1 10000

    I am getting this error in the console:
    [BetterShop] Error executing INSERT on BetterShop

    In the game, the chat output is:
    SHOP:[stationarylava] added to the shop. Buy: -1.00 Sell: -1.00

    I'd like to add it to the shop in case lava blocks ever make it into a player's inventory, they can sell it to the shop for an insane amount of money (relative to our economy). I just started using this plugin so I don't know if it this is intentional for some items or a problem with the new version. I haven't tested all items, but I want to add all our server's "illegal" items in this fashion since no matter how much you trust a mod/admin, these items always seem to fall out of their inventories and into the hands of normal players :rolleyes:
    [MERGETIME="1299891884"][/MERGETIME]
    OK, nvm. I found that 10000 is out of range. I just changed the price to 9999 and it worked fine. Is 9999.99 the limit for prices on the plugin?
     
  6. Offline

    jascotty2

    sorry, yes.. i used decimal for the table, with max precision of 6,2 , meaning 4 digits & 2 decimals..
    i could increase that & add a more descriptive error message
    i'll have to look into that :)
     
  7. Offline

    ehushagen

    Please do - I'd love to upgrade to your version, but I'd definitely need the ability to price some items above 10,000!
     
  8. Offline

    jascotty2

    until i release the next version with this increase (or if you upgrade later & don't want to drop the table), you'll need to run this in MySQL:

    alter table BetterShop change column buy buy decimal(11,2) ;
    alter table BetterShop change column sell sell decimal(11,2);

    (BetterShop being the tablename.. or can use "minecraft.BetterShop" (db being minecraft) if you want to skip the "use")
    you can, of course, change the max to above 999,999,999.99, but i think i'll set this as a cap within the plugin as well
    (not uploading with the fix right now, since i'm also working on another feature, which is still buggy)
     
  9. Offline

    ehushagen

    Awesome! Wasn't sure if a table alteration was all it would take, or if the limit was hard-coded in the plugin.
     
  10. Offline

    GhostToast

    found a minor bug. if you have exactly the number of items needed so that they don't fit on one page, it won't create a page 2. the item won't be listed but will still be for sale, but page 2 won't be generated. if you add 1 more item, it will fix the bug. this stumped me for a long time. otherwise, great plugin.
     
  11. Offline

    Blank1268

    I was wondering if anyone knew if you could set a price for a stack of 64 items and not just one so they would buy a stacks of smooth stone for 5 instaed of 1 for 5
     
  12. Offline

    jascotty2

    taking a momentary break & thought i'd share what my next release will entail:
    increase max buy/sell amount in MySQL, plus a monetary cap with a more descriptive error (from previous post)
    much more detailed item definitions, allowing bluewool, wool:blue, 35:blue, wool:11 to all be equivalent
    kits avaliable for selling, defined in item definition file (don't think i'll have ingame adding..)
    possible calculated costs for craftable items (each item would have a recipe definition to calculate prices with)
    -- which then leads way to more possibilities for a dynamic market

    this is a bug i found earlier in the first edition. my version should have that fixed

    that's something i'm adding: kits. you could have a stack of 64 stone for sale (but the shop won't buy kits.. only sell)
     
  13. Offline

    Sparx

    May I suggest adding an option to give discounts to user groups? I would like to give half price to my VIPs and mods :)
     
  14. Offline

    jascotty2

    that is certainly a possibility.. using permissions would be easy, but i'm guessing you may want different levels of discounts... i think a separate listing for discounts would need added, and maybe groupmanager support..
    consider it on my todo list [​IMG]
     
  15. Offline

    GhostToast

    i have two suggestions as well, not sure how difficult this would be to add. the shop items seem to order themselves not by how i add them, but perhaps by data value number. is there a way to ovverride this behavior? also it would be great if we could color-code each item. for example my shop is mostly for buying/selling iron/gold/diamond and some other rares, but i also buy/sell some mundane crafting type materials, and food. it would be great to have these items stand out with a simple color difference in the name. sort of like "here's the food color" so it's easier to read the list.

    also is there a way to make an initial "open an account" fee? i just recently added cobble for sale because my more advanced players were demanding it. but then i realized a newbie griefer could buy nearly 2 stacks with the starting iconomy funds he joins with.
     
  16. Offline

    Marduk1608

    i got a minor problem with this plugin.
    if i want the players to be able to sell items but not to buy them, what do i have to do?
    in the pricelist.yml i set the price to 0.0 but then players can get the items for free.
    how do i fix this?
     
  17. Offline

    jascotty2

    they do sort themselves by data value right now.. i could add custom ordering in the config file & colors to my new items db file pretty easy.. thanks for the suggestion [​IMG]
    as for the second part: when i finish discounts, you could set the default group to have a negative discount on those items (or all items) or set all prices high & give normal players a discount

    set the price to -1 to disable buy/sell.
    read the plugin description before asking an faq [​IMG]
     
  18. Offline

    Snipezzxreapa

    I get an error when i try and do anything to do with the shop plugin:
    SHOP: BetterShop is missing a dependency. Check the console
    It doesn't say anything on console? i have the config and the other things...what do i need
     
  19. Offline

    jascotty2

    next version coming soon, i promise :)
    this next will almost be a version 2... i might even make that the version number..
    - MAJOR restructure & reorganization (most of the code was re-written). should (hopefully) make it easier to build on top of or use parts in other plugins, as well as use less resources
    - over 20 new features/bugfixes, and 3 new commands (2 more planned)
    haven't yet completed discounts or kits.. i hope to have one or both done by the time i release it
    any suggestions (especially for discounts) are welcome :)
    right now i'm thinking a csv file for discounts, and the admin adds them manually..
    if i add commands, they could be like in groupmanager: shopdiscountadd [name]
    then to edit: shopdaddu shopdaddg shopdremd shopdaddi (adding individual items, instead of globally in shop)

    any thoughts?

    depends on the version. if you have the latest, you should only need iConomy, and optionally permissions or groupmanager
     
  20. Offline

    GhostToast

    so excited to see this plugin's development continue. my only other suggestion, which borders on breaking the scope of the plugin, is to have some kind of option for making it local or region defined? I know localshops kind of does that, but my interest is not in letting players setup their own shops, but simply having a few stores located in the world, so players can't just "buy stuff online" so to speak (as in, instant transactions from everywhere).

    that said, localshops seems like a fairly good choice but is a bit farther behind in its other ambitions, compared to where betterShop is heading. (read localShops t0-do list).

    And NPC trader projects seem to have all faded away.
     
  21. Offline

    jjfs85

    I'll look into region-defined shops. This would probably require WorldEdit and WorldGuard, but what self-respecting server doesn't already have those?
    This would probably be as simple as parsing the WorldGuard region file for a region with a certain name and checking player position, but we may be able to hook into WorldGuard so that it handles reading the file and making sure up-to-date regions are always in memory.
     
  22. Offline

    lenocinor

    I have a few. :)

    1. Partial name support. Does this shop list all redstone items if you type in "/shopcheck redstone"? It doesn't seem like it does currently. (If this does get implemented, I think it should only be for listing, and not buying/selling, to keep things simple.)

    2. /buyagain to buy the last thing you bought again. I would get a lot of use out of this while building big structures.

    3. List of items to exempt from /sellall. Generally I'd want to keep my tools, torches, and compass when selling everything, and not have to throw them down first.

    4. /buystack to buy a 64 stack of something. Many things I want to buy in single stacks of 64, and it'd be nice not to have to reach for the number row each time.

    I'll probably be switching to this from DynamicMarket when you release your next version, so I'm really looking forward to your release. :) These extra features would just be icing on the cake.
     
  23. Offline

    jjfs85

    Partial name support is a great idea. With transaction logging, /buyagain is feasible. Exempt /sellall items... I'll have to think more about how this would work. Should it be player-customizable or set in the config.yml? And /buystack would be simple. Great ideas!
     
  24. Offline

    jascotty2

    i was considering partial naming.. since you suggested it i'll see about implementing it ..
    #3: i have a option right now (in the next release) to only sell items in inventory, not in the lower 9 slots.
    if you need more options (or still want sellall exempt items) let me know [​IMG]
    buystack and buyagain should be easy.. i'll get right on that
     
  25. Offline

    lenocinor

    That's actually a better implementation of my idea. Easier to understand and manipulate as a player. Sounds great!

    And thanks to both of you for your willingness to add features! It's awesome. Can't wait to try this...
     
  26. Offline

    jascotty2

    on tools: currently, damaged tools cannot be sold..
    should i change that to can be sold for price*(1-(damage/maxdamage)) ?
     
  27. Offline

    lenocinor

    That would be an elegant way to solve the problem if it's not a pain. Currently in my shop no tools can be sold, but I'd rather be able to sell tools back. Especially, this would help me with axes, which I need once in a while but would rather not carry around all the time.

    PS: If you implement this, don't forget flint and tinder. :)

    Thinking about new features, I realized there was one more that would make my life as economy manager a lot easier, but which you might view as too complex/clunky: derived pricing. That is, make prices for crafted goods based on recipes and the cost of the resources that make that item. This would remove most shop exploits entirely (especially for people like me that have most buy and sell prices set the same), and it would allow people to get their own price lists going more easily, by making it so you'd only have to specify prices for raw resources.

    Maybe also add an ability to override the price if it seems wrong, by specifying your own price. (This would unfortunately create multiple conflicting prices for some derived goods -- imagine a dispenser where the bow was made more expensive -- but then the algorithm should only consider the prices for the refined goods when calculating.)

    This unfortunately ignores time of crafting in the cost (like for glass). This could also be addressed by factoring in crafting time as a multiplier somehow. But this is getting even more complex. :)

    Feel free to ignore this idea if it seems bad to you. Just throwing it out there based on my experience; you don't know how often I've changed one item and forgotten to change it in all the derived items!

    EDIT: One more idea I just had: can you check non-stackable status and return the items non-stacked if so? This is important for stuff like water buckets, which, when you pour one from the stack, removes the water from all of them.
     
  28. Offline

    jascotty2

    i was slowly working towards derived pricing.. glad i'm not the only one who thinks it'd be good :)
    i have in my items db the list of materials to craft an item.. just haven't got around to getting calculated prices yet..
    (there would also be a percentage of price increase for people too lazy to make the items themselves)

    on stackables: i started using bukkit's max stack size, but it doesn't return 1 for nonstackables.. :( looks like another field i'm going to need to the items db
     
  29. Offline

    Drakeir

    I am getting an issue where wool and dyes don't buy properly. I have whitewool set at a cost of 5 and all the other wools are not buyable or sellable, but players can still buy them for 5 a piece. This works the exact same way with dyes.

    Scratch that, it turns out I didn't have the latest update.
     
  30. hm!

    /shopadd gravel -1 1 left me with the pricing -1 -1! using latest craftbukkit(b554 because i wanted worldedit) and latest bettershop as well as iConomy (4.4.7)

    edit: no matter what price i try it ends up as -1 -1 :(
     
  31. Offline

    GhostToast

    so wait are you able to do custom colors for each item now? how is that done?
     

Share This Page