Thread: [317] PI Cheap Efficient Achievement System With Rewards!

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11  
    Registered Member Sentimental's Avatar
    Join Date
    Apr 2011
    Posts
    308
    Thanks given
    120
    Thanks received
    35
    Rep Power
    3
    Quote Originally Posted by _Jet View Post
    What people mean by that it's done horribly is not only because of how you don't stick to conventions and because it's long, rather because of how hard it is to build on.

    The way you've made it, to add any more achievements someone would have to go through the whole process of adding text to the achievement tab, finding out the actionbutton, adding a new variable, adding when they'll get closer to getting their achievement.

    If you structured it properly, you could've made it so the only people people would have to do is add a few lines to create another achievement. Even adding a proxy on the packethandler to intercept packets and see if they'll contribute to an achievement.

    Whenever you create something (especially when you plan on releasing something), always make sure that you structure it so people and easily add/subtract from it; because sure this might work great for you, but not everyone wants your EXACT achievements.
    Thanks for the great feedback!
    Reply With Quote  
     

  2. #12  
    Donator

    Join Date
    Jan 2014
    Posts
    1,617
    Thanks given
    8
    Thanks received
    196
    Rep Power
    39
    Nice looks decent.
    Reply With Quote  
     

  3. #13  
    Registered Member Sentimental's Avatar
    Join Date
    Apr 2011
    Posts
    308
    Thanks given
    120
    Thanks received
    35
    Rep Power
    3
    Thanks.
    Reply With Quote  
     

  4. #14  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Should use abstraction for something like this. Goes along with what Jet was saying and ease-of-use for everyone.
    Reply With Quote  
     

  5. #15  
    Registered Member
    Stephen OG's Avatar
    Join Date
    Aug 2014
    Posts
    173
    Thanks given
    114
    Thanks received
    56
    Rep Power
    182
    Instead of making player's check if they have 3 free slots, why not just add a check and send a message to them if they don't and return?
    Reply With Quote  
     

  6. #16  
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Eww... Please make a class for something like this, it's content and should be kept separate from all your packet files, but good job on releasing something I guess
    Reply With Quote  
     

  7. #17  
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,490
    Thanks given
    184
    Thanks received
    653
    Rep Power
    1338
    Quote Originally Posted by Zivik View Post
    Should use abstraction for something like this. Goes along with what Jet was saying and ease-of-use for everyone.
    Wouldn't suggest using abstraction, I'd rather suggest doing something along these lines

    Code:
    /**
     * A class to hold all the constants
    */
    public final class Achievements {
    
    ...
    
    }
    Then have another class hold various 1 dimension arrays which you can easily extend

    Code:
    /**
     * holds all the 1 dimensional arrays
    */
    public class AchievementsController {
    
    private static final int[] AMOUNT_TO_DO = {1};
    
    public static void incrementAchievement() {
    
    .....
    
    }
    Then when a player does what you want him to do, in this case kill a rock crab or w.e
    just head to the dropitems method located in npchandler and do something like

    Code:
    AchievementsController.incrementAchievement(.....);
    Keep your head up.



    Reply With Quote  
     

  8. #18  
    Registered Member Sentimental's Avatar
    Join Date
    Apr 2011
    Posts
    308
    Thanks given
    120
    Thanks received
    35
    Rep Power
    3
    Thanks for the suggestions guys.
    Reply With Quote  
     

  9. #19  
    Banned
    Join Date
    Jul 2014
    Posts
    437
    Thanks given
    200
    Thanks received
    76
    Rep Power
    0
    lol you can't really copy and paste the code. The spoiler closes.
    Reply With Quote  
     

  10. #20  
    Member
    Join Date
    Aug 2014
    Posts
    38
    Thanks given
    131
    Thanks received
    2
    Rep Power
    0
    Thank you for sharing with us
    Reply With Quote  
     

Page 2 of 3 FirstFirst 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 11-26-2013, 03:54 PM
  2. PvP Artifact System WITH Cash Rewards! [PI]
    By Moronic in forum Tutorials
    Replies: 90
    Last Post: 03-26-2013, 11:53 PM
  3. [PI] Simple KillStreak System With Rewards
    By .Optimum in forum Snippets
    Replies: 20
    Last Post: 08-12-2012, 09:21 PM
  4. [PI] Vote for points system with shop etc.. $
    By Raw Envy in forum Buying
    Replies: 1
    Last Post: 09-02-2011, 08:26 PM
  5. [PI] Crystal Chest and Key with Rewards
    By Roboyto in forum Tutorials
    Replies: 19
    Last Post: 07-18-2011, 07:48 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •