[URGENT] Twelve Days of X-Mas [FORMATTED]

Discussion in 'Archived: Plugin Requests' started by Sayshal, Dec 12, 2011.

  1. Offline

    Sayshal

    Plugin category: Fun

    Suggested name: ChristmasCalender

    A bit about me: I run a small server who wants a small plugin to make people go 'YAY!'

    What I want:
    • Player logs in to server, they get a message 'Its the {DAY} of Christmas!' Tomorrow, {DAY} would be First.
    • If they stay logged in for a combined time of 1 hour, they get a daily prize. Prize set in config, should be random per player, so every day they get something else.
    • No permissions, no iConomy, just give item set in a config, if not I can give you a list of items I want included. (Including colored sheep!)

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: No permissions needed for this plugin.

    Willing to pay up to: $0 - It's Christmas! Do it for the YAY's to be had!

    When I'd like it by: December 13th 2011

    Similar plugin requests: None.

    Devs who might be interested in this:
    My friend, @turt2live, already started this! The github for it is here.
    Finish it for him? He's sick!

    Example of when logging in:
    Today is the first day of Christmas!
    One hour later...
    On the first day of Christmas, you got a Green Sheep!
    On the second day of Chrismas, you got two iron ingot!

    Etc etc etc!

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

    ThatBox

    +1 love the idea.
     
    Sayshal likes this.
  3. Offline

    Sayshal

    Try make it ? :D
     
    ThatBox likes this.
  4. Offline

    ThatBox

    I want too. I really do, it just this plugin is really complicated to make for a small time developer like me:/ Sorry.
     
  5. Offline

    Sayshal

    What part? It's simple math, if I knew java I could do it D:
     
  6. Offline

    ThatBox

    The calendar part. :p I haven't worked on them. But maybe i can work on it tomorow with the help of a friend. ( @tips48 ) :p
     
  7. Offline

    Sayshal

    you can hardcode the dates. tomorrow is the 1st, count up to the twelve.
     
  8. If you knew java you wouldn't say that.
     
  9. Offline

    ThatBox

    Hmm. Ok, but i can't get to work on this right now.. sorry. You will have to wait until tomorow.
     
  10. Offline

    Sayshal

    The thing is, I need it for tomorrow since starting tomorrow, its 12 days until christmas.. :/ Kinda defeats purpose and I just thought this idea today D: Damnit.. -.-
     
  11. Offline

    ThatBox

    Well if its done by tomorow then there won't be any problem ? :p
     
  12. Offline

    nickrak

    I've got free time, I'll start on it right now.
     
    ThatBox likes this.
  13. Offline

    Sayshal

    Let me know!
    Thank you so much. If you get it done by tomorrow I'll give you a cookie! :D And if you want a couple free months of builder (donator rank) on my serveR? :D
     
  14. Offline

    ThatBox

    Well if you need any help let me know! :D
     
  15. Offline

    nickrak

    Zwander likes this.
  16. Offline

    Zwander

    Dude... you are a boss.
     
  17. Offline

    turt2live Retired Staff

    If you wouldn't mind, am I able to get full/partial source code on that?
     
  18. Offline

    Netto Hikari

    Aww, I wanted to do that plugin. ^^
     
  19. If ya need any help, I'll do it :p
     
  20. Offline

    nickrak

    You are welcome to decompile, I'll post an updated jar with code inside when I get home.

    Until I settle on a software license, assume Creative Commons 3.0 Attribution Non-Commercial Non-Derivative Unported.

    If anyone finds any bugs, please send me a PM or post here. I'll get a GitHub set up soon.
     
  21. Offline

    Technius

    Dates aren't too hard to do... Christmas is always on 25th of December, right?

    Date date = new Date();
    int day = 25 - date.getDay();

    That "formula" can, of course, be more well polished.
     
  22. Offline

    nickrak

    Code:java
    1.  
    2. Calendar.getInstance().get(Calendar.MONTH) + 1 == 12 // check if december
    3. Calendar.getInstance().get(Calendar.DAY_OF_MONTH) - 13 == 1 through 12 // the days of christmas
    4.  


    Date's useful functions have been deprecated *sadface*

    https://github.com/nickrak/DaysOfChristmas
    https://github.com/nickrak/DaysOfChristmas/raw/master/downloads/DaysOfChristmas-2011.jar

    Updated version now keeps track of time spent each day. Users can now be logged in for a half-hour in the morning and a half-hour in the evening and still get the gift. If anyone has issues, please post help tickets on github if possible.

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

    Sayshal

  24. Offline

    turt2live Retired Staff

    Hello, I'm an admin on Sayshal's server and this error popped up today http://pastebin.com/MdLEzUBd

    Timestamps are included in the pastebin.
     
  25. Offline

    nickrak

  26. Offline

    Sayshal

  27. Offline

    nickrak

    Yeah, the config file is very... haphazardly made. But it works.
     
    Sayshal likes this.
  28. Offline

    HockeyMike24

  29. Offline

    nickrak

    Where x is the day of christmas, the 12th day being december 25th;
    Where y is a gift of some sort that this player has not gotten from the plugin this year, from a list of possible gifts containing [IronIngot, GoldIngot, Coal, Diamond, Snow Block, Cake, Cookie, Cooked Chicken, Sapling, Egg, Green Sheep, Red Sheep] these items.

    After one hour of cumulative gameplay each day, that player will receive x items of type y.
     
    HockeyMike24 likes this.
  30. Offline

    Sayshal

    They get a gift everyday (it started two days ago) they get a gift if they sty logged in for 1 hour on the server it is random what they get from a list of 12 items. Install it and start server no config. :p I'm not saying what they get but it's nothing dangerous.
     
    HockeyMike24 likes this.

Share This Page