Custom UI for Shops.

Discussion in 'Plugin Development' started by mossyblog, Jan 16, 2012.

?

Stupid idea?

  1. I could get behind something like this?

    100.0%
  2. It breaks the spirit of the game, you have failed me for the last time

    0 vote(s)
    0.0%
  3. I'm indifferent and could care less either way.

    0 vote(s)
    0.0%
Thread Status:
Not open for further replies.
  1. Offline

    mossyblog

    I've been tinkering around with the modding lately both server and client. I wanted to come up with a UI Mod that takes on more of a passive approach in that it simply gets installed on end-users clients but doesn't active itself until the server sends a message to the "client" "Please get MossyShopUI!".

    Its human readable but that string then activates a sequence of events which then makes the clientMod "self-aware" (heh Skynet is now online). If the users client doesn't respond to that message within 10sec(s) - (Variable timeout) then that user is declared Invalid for the server to send specific msgs to the client.

    What I mean to say is that if the user chooses to opt out of the Shop UI mod they are free to do so but the server won't punish them for this choice, instead they'll have to rely on /commands to handle their day to day business (poor-mans experience).

    If the user does opt in for the client mod, then they will in turn have a better experience as if they click on shop signs they will see this UI.

    [​IMG]

    What happens here is the server will then send a private message (which gets supressed by the client)

    <ShopAgent>Sandstone:1:0:1
    <ShopAgent>Sandstone:32:16:0
    <ShopAgent>Sandstone:64:32:-1

    These messages are then transposed into the variables above <Block>, <Qty>, <BuyPrice>,<SellPrice>,<StockHealth>

    Now for users who dont have the client mod, they would instead get this:

    <ShopAgent> Sandstone for sale. Prices are as follows...
    <ShopAgent> 32x Sandstone (Limeted Stock) = $64.00. You can sell me 32x Sandstone @ $16.00.
    etc..

    Keeping in mind the plugin is tracking who has client UI and who doesnt.

    For the user, who has UI mod, they can in turn drag qtys of the items into their Buy slots. At the same tiem they can also drag items into the sell slots (why you would do that i have no idea, but should you want to do one or both, its possible).

    Whats folks thoughts on this? I have this almost done and I'm making this for a custom server I own, so its possible to hook this into iConomy/Vault but in truth i'm keen to write a super mod for both client and server thats optimised for my vision of how the game should be played...

    I also am working on a better toolbar which shows money and other things as you play so removes /balance etc whilst at the same time setting up private chat windows as well.

    Mods are using developed using MCP (Decompile source code), Bukkit (Server), ModLoader. I am thinking more about how additional blocks can work
     
  2. Offline

    Acrobot

    I can add that feature to the ChestShop :)
    (Of course if the client UI will be made)

    This will probably use the new 250 packet introduced to newest Bukkit builds.
     
    nunber1_Master and dwi like this.
Thread Status:
Not open for further replies.

Share This Page