[Req] XP Bank

Discussion in 'Archived: Plugin Requests' started by hhaammzzaa2, Dec 11, 2011.

  1. Offline

    hhaammzzaa2

    Hello,
    I am in need of a simple plugin which gives users the ability to store xp in a physical bank or virtual bank through commands. I thought of this when I realised members on my server will keep losing xp on my server. (Its PvP)

    - The Basic Idea -
    A user would like to store his exp.
    He types /xpbank deposit 10
    This deducts 10 exp from him and stores it. MySQL would be cool.
    The user wants his exp back.
    He types /xpbank withdraw 10
    This gives him his 10 xp points back.

    - Commands -
    /xpbank deposit <number>
    /xpbank withdraw <number>

    Sorry but I can't offer anything. :(

    Thanks
     
  2. Offline

    KingWar92

    Easy except MySQL, we should use config to store players/amounts...
     
  3. Offline

    retsrif

    I might be up for this, would you like a physical bank, one through commands, or both and you choose?
     
  4. Offline

    KingWar92

    I think he want a command one.
     
  5. Offline

    hhaammzzaa2

    I'm sorry I thought MySQL is better. Your more experienced than me!
    Thanks thats great!
    I'm not sure, which would be better?
    How about a Physical Bank. When you walk in, you're able to use the commands OR you right-click some kind of block or sign then use the commands OR the commands and I use a command-on-sign plugin to use inside of the bank?
    Your view?
    Also, I don't want this as a private plugin, merely an plugin I could use but can be useful to the public as I have seen because there are loads of requests for something like this.

    P.S - Same avatar = Awesomeness
     
  6. Offline

    KingWar92

    MySQL need a server (and only under windows) to run, if the server is the same of minecraft server, all bytes will pass to the MySQL service to finally be write on the disk as a file and that will simply slow down minecraft... If that not the same, you can add the network's ping delay…
    Even if you need a database more evoluated, MySQL can get the task easier...
     
  7. Offline

    Quintin

    Has anyone taken this yet?
     
  8. Offline

    Sputnik_15

    I don't know but everyone on my server is asking if they could store exp somehow and i said i would look into ti.. I was wondering if there's anyone working on this or maybe progress? It would be pretty awesome
     
  9. Offline

    retsrif

    Ok guys ill look into this, I'll make it so you can choose between physical, command, or both.
     
  10. Offline

    ledhead900

    What a load of crap :eek:

    1. MySql is available on Unix/Linux OS's INC MAC http://www.mysql.com/downloads/mysql/5.5.htmleven the workbench tool to manage the server cane be run on almost all OS's http://www.mysql.com/downloads/workbench/5.2.html
    2. MySQL does not constantly write to disk it loads requests into ram for a short while, Even the parts that do require disk access are easy to avoid mixing up with Minecraft as anyone who installs Minecraft Servers on the same drive as their operating system is a fool, unless the worlds are running on ram disk http://stackoverflow.com/questions/1000595/is-it-possible-to-load-a-database-in-the-ram
    3. MySQL actually uses less HDD activity than Flat file in the long run as flat files become large esp when dealing with many users they quickly become bulky slow loading files SQLite or even full blown MySQL fixes that issue
    Moving everything of any plugin that is designed to hold large amounts of player information be it chat,command use,block logs,Currency anything at all that will be written to a lot and read lots that will become large should ALWAYS be stored in SQLite or MySQL as at this point flat file becomes the slowest storage method.

    For this plugin your three options should be SQLite or MySQL or Both, SQlite does not require any setup or any server to actually use its less complicated to setup but has draw backs such as its not as efficient as Mysql can be or as useful in terms of ability to grab the data for display on websites/stat pages.

    There are many free SQLite database managing tools I have one on my server its a simple tool to open the database like into a readable file much like excel then I make my edits save/close.

    MySQL is the better if you already have many plugins (3+) that all use an SQL database and if they all support MySQL then your far better of creating the server and learning how to manage that and let all plugins + future ones take advantage of it. Like I said above the more things you run that require reading and writing a lot to flat file will in the long run become worse for you server than actually taking the plunge into SQL.

    Granted SQL is not all that better for a lot of flatfile use like config files or anything that is not read and written to often. But the general rule of thumb is if your going to be storing over 1000+ users all with data attached SQL is the way to go as at this point Flatfile becomes bulky and slower read/lookup times.

    Of course a lot of what I said REALLY depends on the environment it is used on and how it gets used many factors will play a role in if SQL will end up better for you or not but that is what competency comes in handy for.
     
  11. Offline

    retsrif

    Ok I'm working on it, I'll see if I can make some progress today.

    There doesn't seem to be a method I can use to get a player's experience, only percentage toward next level up.. I've still got the project set up and I'll work on this when the method is available.

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

    BlackHawkLex

    getTotalExperience() in Player should fulfill your needs mate, there is also getExperience(). That should kinda do it ;).
     
  13. Offline

    MDCreator

    I was toying with this, and both of the ways suggested (getTotalExperience() and getExperience()) are obsolete in more recent 1.0.0 builds. The giving of XP doesn't work either though, it won't update.

    I would wait for craftbukkit for 1.0.0 to be perfected before working with XP.
     
  14. Offline

    KingWar92

    Ok, sorry for my errors.

    Did you try with the last build ? Here !

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

    retsrif

    Ah I seem to have missed those two.. I just looked at the E's... :p I'll try doing this again
     
  16. Offline

    zzzspawn

    oh! :D
    this is exactly what I'm looking for! :)

    hope you get it working! =3
     
  17. Offline

    Daniel Heppner

    MySQL support should not be implemented for something like this.
     
  18. I have a working plugin for this. Contacting retsrif if he still wants to take up the challenge.
     
  19. Offline

    retsrif

    I never planned to have MySQL support. Personally, I'm a database hater... Would prefer coding with flatfiles any day over a database :p
     
    Daniel Heppner likes this.
  20. Offline

    KingWar92

    If you don't have more than 1000 players in the same time, it's really stupid to force user to create a database...
     
  21. Offline

    retsrif

    Exactly... I still remember the fuss over iConomy dropping flatfile support...
     
  22. Offline

    JoneKone

    This would be a nice plugin... Taxing XP for the "server" for this would be nice as well..
     
  23. Request Fulfilled. Can be found HERE.
    Happy banking!
     
  24. Offline

    zzzspawn

    awesome! :D you are the man ^^
     
  25. Offline

    KingWar92

    @Shuski you made a plugin, finally ;)
     
  26. Hahah! Hi there!
    Yup. After making my inventory saver request. I wanted to start learning, because if something comes into my head...I want to just, make it myself. ^^
     
  27. Offline

    hhaammzzaa2

    @Shuski
    Thanks man! This is really helpful!
    One tip, you should add Permission support and another command to credit someone with xp

    @Everyone talking about MySQL
    I thought that if a server gets loads of people and they store their exp, it makes some kind of file so I pretty much thought of iConomy, it stores xp data instead of money data
    Sorry if this is wrong!

    Thanks anyway and to shuski
     
  28. Offline

    KingWar92

    Database ? Ok. MySQL ? Why, SQLite isn't perfect ?
     
  29. Offline

    hhaammzzaa2

    As I said, sorry if im wrong.
     
  30. It has permissions support. (Perms 3 probably wont work...update from it!).
    As for SQL. The file literally holds. Player: #. That's it. It shouldn't put strain on it.
     

Share This Page