Thread: Working On A Custom Achievements | Need help with something [PLEASE READ]

Results 1 to 7 of 7
  1. #1 Working On A Custom Achievements | Need help with something [PLEASE READ] 
    Registered Member
    Join Date
    Jun 2014
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    If working on an achievement System where Once you hit 50 NPC Kills, You are awarded 1m!
    What I need help with is making it so it like

    if (npcKills == 50)
    I want it to be like from 50 NPC Kills to 99 NPC Kills

    If you are capable of helping me, Id be glad to explain it even further


    This is a 317 loading 614+ [PI]

    Or |||||

    Once the Player gets 50 NPC Kills, It automatically adds 1M Into his BANK

    My skype: tonebawsjinx
    Message me if you can help me
    Reply With Quote  
     

  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Assuming you haven't even started;

    Create a new variable in player called "npcKills" or whatever you want to call it. In the "dropItems" method or anywhere else npc death is handled add "c.npcKills++;".

    Then also in that same class, add the code you provided yourself above;

    Code:
    if (npcKills == 50) {
         //add bank method stuff
    }
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2014
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    I have started it, Ive got everything in place. I just need either method for Rewards!

    Is it possible you could tell me the Add to bank method (ADDING 1M COINS TO BANK ONCE YOU REACH 50 NPC KILLS)
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2014
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Bump!
    Reply With Quote  
     

  5. #5 Delete this 
    Registered Member
    Join Date
    Jun 2014
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Delete
    Reply With Quote  
     

  6. #6  
    Server developer


    Join Date
    Jul 2010
    Posts
    881
    Thanks given
    265
    Thanks received
    55
    Rep Power
    94
    Hey! I remember you from my server, even though you got the answer, maybe I can tell you something more or stuff to add.

    So yeah, in the method dropItems you can make something like c.npcKills++, so it counts the npc counter, if you want it for a specific npc, you could do something like;

    Code:
    npcs[i].npcType == npcIdHere;
    And you could handle the rewards in a few ways, I'll give you an example

    Code:
    private void giveAchievementReward(String level) {
         switch (level) {
             case "normal":
                 c.getItems.addItemToBank(995, 1000000);
             break:
            
            case "hard":
                 c.getItems.addItemToBank(995, 5000000);
            break;  
         }
    
    }
    And you can call it like this in initialize or somehting
    Code:
    if (c.npcKills >= 50 && !c.completedFishingAchievement) {
       Achievments.giveFishingAchievementReward();
    }
    And then in the achievement class

    Code:
    public void giveFishingAchievementReward() {
        giveAchievementReward("normal");
        c.completedFishingAchievement = true;
    }
    This will make it so it gives a normal achievement reward, just giving an example, if you have more questions, you can always pm me.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jun 2014
    Posts
    14
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    I already finished the achievement system for NPC's, But thanks anyways!
    I'm working on one wiith Woodcutting now
    Reply With Quote  
     


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. need help with something please
    By zodiac in forum Help
    Replies: 2
    Last Post: 12-27-2009, 08:04 AM
  2. Need help with something... PLEASE!
    By Untameable22 in forum Help
    Replies: 0
    Last Post: 12-26-2009, 07:45 AM
  3. Replies: 4
    Last Post: 04-09-2009, 12:19 AM
  4. [508] i need help with something
    By Gluon in forum Configuration
    Replies: 7
    Last Post: 01-04-2009, 08:32 PM
  5. i need help with something...
    By Dragonking in forum Website Development
    Replies: 0
    Last Post: 12-06-2008, 09:28 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
  •