[FUN/MECH] PickACard v2.2 - World Evolution Plugin [1060]

Discussion in 'Inactive/Unsupported Plugins' started by dkramer, Aug 27, 2011.

  1. Offline

    dkramer

    PickACard, a World-Changing Plugin
    Version: 2.2

    (Please donate here if you like what I do. This is my only job.)
    Description:
    At the draw of a card, a message is displayed to all online players that guides them on how to build the world OR if the card has "custom <customcardname>" in the .yml, it runs the custom code. It is inspired by this reddit post/video here.

    Download:
    Source: https://github.com/JerrysMod/PickACard
    2.2 http://dl.dropbox.com/u/36326695/PAC/PickACardV2.2.zip
    2.1 http://dl.dropbox.com/u/36326695/PickACardV2.1.zip
    2.0 http://dl.dropbox.com/u/36326695/PickACardV2.0.zip
    1.5 http://dl.dropbox.com/u/36326695/PickACardv1.5.zip
    1.4 http://dl.dropbox.com/u/36326695/PickACardv1.4.zip
    1.3 http://dl.dropbox.com/u/36326695/PickACardv1.3.zip
    v1.2 http://dl.dropbox.com/u/36326695/PickACardv1.2.zip
    v1.1 http://dl.dropbox.com/u/36326695/PickACard1.1.zip
    v1.o http://dl.dropbox.com/u/36326695/PickACardv1.0.zip

    Installation:
    Extract PickACard.zip. Insert PickACard.jar into your plugins folder.

    Commands:
    /pac
    This tells you every other command and what they do.

    Permissions:
    • - pickacard.draw
    • - pickacard.shuffle
    This allows the person/people to draw a card/shuffle the deck. If you do not have a permissions system that superperms supports, it will default to your OPs having the powa.

    My Custom Cards:
    To use these, change a card's text (the text after its colon) to "custom <customcardname>", so if I wanted Ace of Hearts to be the custom card alwaysDay, I would change it to "Ace of Hearts: custom alwaysDay".

    Name: alwaysDay
    Description: Makes it and keeps it day for the length of a day, then automatically draws a new card.

    Name: cantPlaceBlocks
    Description: Players cannot place blocks for a quarter of a day. Draws a new card afterwards.

    Name: noMobs
    Description: Mobs do not spawn for a day, then a card is drawn.

    Name: buildUnderwater
    Description: You can breathe underwater until a new card is drawn.

    Custom Card Tutorial:
    In the source, there is a folder called customCards. In this, you will make a folder with the name of your custom card, so let's say I want one called "turnIntoSheep", I will make a folder named "turnIntoSheep". Inside this folder will be your main class file that the plugin will call (named the same as the folder, so for me, "turnIntoSheep"), so in my case whenever the card with the text "custom turnIntoSheep" is drawn, it will load the class. For a very good example of a main class file, look at alwaysDay from the alwaysDay folder. It explains how you should set up the class file. It also has examples for setting up listeners.

    Customizing:
    In your PickACard folder will be a folder named "Decks". In this, you can have any number of .ymls to represent any number of decks. If you started up your server once, open up the default.yml. You should see two major sections: "deck" and "cards". You will never need to change anything in "deck". "Cards" is where you can add or delete cards between server resets. The space after the colon for each card is the message that that card sends. If you want to have the card be a "customCard", you will need to set this to "custom <customCardName>.

    Changelog:
    2.2:
    • added buildUnderwater custom card
    • added a reload command
    • changed text around: more compact
    • added the drawlast command
    • fixed null pointer for customCards, which solves a couple issues
    2.1:
    • when drawing a customCard, it doesn't show the class's name anymore
    • added the command /pac default <deckname> that sets what default deck you mess with (draw from, shuffle, etc)
    2.0:
    • completely re-wrote the code for more options and better performance
    • decks can now be of any size and you can have any number of decks
    • you can change any card value (ex: instead of "Ace of Hearts", you can have "Card of Awesome" or "Beaver" or "Yo Momma", if you wish)
    • better text colors and formatting!
    • new .yml format
    1.5:

    • Added in jokers!
    • added the command /pac lastshuffle
    1.4:


    • Really fixed permissions issues, but only superperms permission systems are supported now.
    • Added more color to text
    • added the custom card, noMobs
    1.3: Fixed permissions errors and added the custom card cantPlaceBlocks


    1.2: I think I fixed permissions issues.
    1.1: Support for custom code (not just reading off messages)
    1.0: Release
     
  2. Offline

    iPhysX

    A cool way to mix things up on servers :)
    nice!
     
  3. Offline

    Timberjaw

    I've been following this on Reddit; I'm excited to see where it goes. :)

    Are you planning on adding this to DevBukkit? That would give you some built-in Wiki/filehosting/issue-tracker functionality for the project.
     
  4. Offline

    dkramer

    Yessir. I am not sure if I filled out the "application" correctly though :D
    I have the custom card API-ish code complete, but I don't have time to release it and give a tutorial right now, so I plan on doing it later today. It should add an easy way for people to make cards that perform java code (if they know java, of course).
     
  5. Offline

    Timberjaw

    @dkramer Very cool. DevBukkit also supports permissions for multiple authors/contributors on projects, so I believe you can allow others access to do things like add/edit wiki articles.

    Will this be on GitHub when it's a little further along?
     
  6. Offline

    marshall007

    This sounds like it would just be a prototyped Card object, so couldn't you make this possible by just exposing your Card constructor to other plugins? You could also make one of the parameters an anonymous function and callback on it when the card is drawn.

    I would also like to see this put on GitHub.
     
  7. Offline

    dkramer

    Sorry chaps, the release is coming a bit later. I couldn't figure out how to get forName() working for the longest time, but I'm good now.
     
  8. Offline

    Snaipe

    You, sir, are a genius.

    I can see that you are implementing the Void. Great news :D

    Shall I suggest that Voids should be started in admin-defined Areas ? I don't want it to start in the middle of a town.

    Plus, don't forget about void-stopping blocks :) It would be a pain to handle otherwise.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
    dkramer likes this.
  9. Offline

    dkramer

    @Snaipe
    Sadly, I've been working on a project for the evocraft server that takes away time from this, but I plan to go back and add the Void (I already have how it spreads coded).
     

Share This Page