[REQ] NewPlayerGift

Discussion in 'Archived: Plugin Requests' started by Shad, May 12, 2011.

  1. Offline

    Shad

    I need a plugin that will gift or give new players items on their first login only.

    If there already is one, I couldn't find it and would love a link to one.

    Thanks :)
     
  2. Offline

    kmccmk9

    I like this idea, shouldn't be too hard either. Just a simple hashmap check upon logon. I will start working on this!
     
  3. Offline

    DreadKyller

    @kmccmk9 : on player join you can just check the levelname/players folder to see if the player has ever been in the game.
     
  4. Offline

    Juze

    Achievements plugin can do this! :)
     
  5. Offline

    DreadKyller

    yes, that it could, and it would actualy be easyer, join a server and on open inventory achievement give them an item.
     
  6. Offline

    kmccmk9

    Ok so should I keep going with development or not?
     
  7. Offline

    DreadKyller

    go ahead I guess, just probably using one of the listed methods above could check to see if a player has been in the world before without making a saving script. you mine if I attempt it too?
     
  8. Offline

    kmccmk9

    Sure. Ya I will implement a saving feature
     
  9. Offline

    DreadKyller

    Oo, what i'm saying is there is no need for a saving feature, as the world/players folder holds all players that have been in the game, you can just use that to see if they've ever been it.

    I'm actually almost done with mine, just got to test it, mine also will come with a file where you can define the items they get and the amount, and in-game you can remove and add items with:

    /loginrewards add|remove MaterialName Amount{Max=64}
     
  10. Offline

    kmccmk9

    Alright then, I will not develop mine. Good luck!
     
  11. Offline

    DreadKyller

    um, I said go right ahead, in fact my method of finding out if a player has joined before failed, I thought maybe the player file didn't appear in the folder until a little after, but the file saves there instantly, therefore it think the player has been in before. Also the Configuration class will not seem to read the file even though it exists, so I made my own file reader and writer, and I think that's working better.
     
  12. Offline

    kmccmk9

    Oh ok well maybe I will give it a shot anyway...
     
  13. Offline

    DreadKyller

    yah, like I said go right ahead. I'm still trying but most likely you'll do better anyways, I'm fairly new.
     
  14. Offline

    Shad

    I forgot I made this, happy people replied to it haha :)

    whoever makes it, I will test it :p
     
  15. Offline

    kmccmk9

    I'm a slight noob myself so maybe combined it would work lol
     
  16. Offline

    DreadKyller

    lol, sure. I'll pm you my code so far if you would like to check it out.
     
  17. Offline

    kmccmk9

    Ya that sounds good. Two brains are better than one!
     
  18. Offline

    DreadKyller

    yeah, hope you have better luck with the loading, the saving is working actually very well and my own system of keeping track of the players I think is unique, only other thing that does it that I've found is bukkit itself. In the plugins/LoginRewards/DO_NOT_DELETE/worldname there will be a blank .sty file for every player that has joined.

    unfortunately I have been cursed with not ever having luck with loading... I have a config file like this:
    PHP:
    Rewards:
        
    Stone:'10'
        
    Dirt:'10'
        
    Wood_Spade:'1'
        
    Wood_Pickaxe:'1'
        
    Wood_Axe:'1'
    yet getting the config I can't get them, I used getKeys("Rewards") and it returned null...
     
  19. Offline

    kmccmk9

    Isn't getting things from the config file, in this case String.parseInt("Stone")?

    I'm not sure I'm doing another plugin that uses a similar feature so I'm just as bad if not worse than you lol. I'm watching my support thread about it religiously though.
     
  20. Offline

    DreadKyller

    not really, getting the property should return a string with the number in it, then I use Integer.valueOf(string), but string ends up being null and therefore error...
     
  21. Offline

    kmccmk9

    Has anyone made any progress on this?
     
  22. Offline

    DreadKyller

    I actually have made considerable progress, only the config file is left and that's giving me a problem and errors, so hopefully soon.
     
  23. Offline

    kmccmk9

    Awesome, let me know if I can help in any way.
     
  24. Offline

    Nazerb

  25. Offline

    DreadKyller

    that's a bit too different, you have to add people to the started kits, you have to import a directory, ect... plus I looked at the source and it gives it the first time period the person logs in, however, when you swich worlds you start with new inv, so I the one I'm making gives it based on worlds as well, if you are first joining a certain world it'll give you items. So it's a little different
     
  26. Offline

    kmccmk9

    Can't wait, will you be providing source code?
     
  27. Offline

    DreadKyller

    I always provide source code when I release anything, even the games I make I release a source for.
     
  28. Offline

    kmccmk9

    Great, because I would love to see how it is done.
     

Share This Page