Thread: [PI] Adding a npc Killcount! [PI]

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1 [PI] Adding a npc Killcount! [PI] 
    Registered Member rs r's Avatar
    Join Date
    Oct 2009
    Age
    27
    Posts
    268
    Thanks given
    31
    Thanks received
    6
    Rep Power
    6
    Okay first of i made this because i had nothing to doxD
    i know its very basic, But i post it here for people Who want.

    Lets start with Saving your npc kills.

    Open Playersave.Java

    Search for:

    p.pcPoints = Integer.parseInt(token2);
    Right under it add:
    } else if (token.equals("npc-kills")) {
    p.npcKills = Integer.parseInt(token2);
    Now search for:

    characterfile.write("pc-points = ", 0, 12);
    characterfile.write(Integer.toString(p.pcPoints), 0, Integer.toString(p.pcPoints).length());
    characterfile.newLine();
    Under it add:

    characterfile.write("npc-kills = ", 0, 12);
    characterfile.write(Integer.toString(p.npcKills), 0, Integer.toString(p.npcKills).length());
    characterfile.newLine();
    Save & close Playersave.Java


    Open Player.java & search for

    pcPoints,
    Under it add:

    npcKills,
    Save & close Player.Java


    Making That if you kill an npc you get + 1 kill

    Open Npchandler.Java

    Search for:

    void dropItems
    under "if(c != null) {" Add:

    c.npcKills += 1;
    Done!!



    EXTRA:
    Adding a command that says: you killed ### Npcs!.

    Open Commands.Java

    Above
    playerCommand.equalsIgnoreCase("players")
    Add
    if (playerCommand.startsWith("npckills")) {
    c.sendMessage("You killed " + c.npcKills + " Npcs");
    }
    Or just add it anywhere else in commands.java


    Picture:

    Reply With Quote  
     

  2. #2  
    Registered Member
    Lennard's Avatar
    Join Date
    Mar 2010
    Posts
    924
    Thanks given
    0
    Thanks received
    234
    Rep Power
    274
    Nice, could be handy for a npc kill shop or something.
    Reply With Quote  
     

  3. #3  
    Registered Member rs r's Avatar
    Join Date
    Oct 2009
    Age
    27
    Posts
    268
    Thanks given
    31
    Thanks received
    6
    Rep Power
    6
    Thanks should i post a tutorial of making a npc kill shop?
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    why are you making it give points when it drops items?...
    Reply With Quote  
     

  5. #5  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,853
    Thanks given
    1,213
    Thanks received
    1,622
    Rep Power
    5000
    common sense but gj
    [Today 01:29 AM] RSTrials: Nice 0.97 Win/Loss Ratio luke. That's pretty bad.
    [Today 01:30 AM] Luke132: Ok u fucking moron i forgot i could influence misc.random
    Reply With Quote  
     

  6. #6  
    Registered Member rs r's Avatar
    Join Date
    Oct 2009
    Age
    27
    Posts
    268
    Thanks given
    31
    Thanks received
    6
    Rep Power
    6
    Quote Originally Posted by relex lawl View Post
    why are you making it give points when it drops items?...
    Because i couldn't find the npc dead Void rofl so i did it in there

    Rofl,
    Reply With Quote  
     

  7. #7  
    Registered Member rs r's Avatar
    Join Date
    Oct 2009
    Age
    27
    Posts
    268
    Thanks given
    31
    Thanks received
    6
    Rep Power
    6
    Quote Originally Posted by GabbeIsABaws View Post
    common sense but gj
    Thanks!
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    edit
    Reply With Quote  
     

  9. #9  
    Registered Member rs r's Avatar
    Join Date
    Oct 2009
    Age
    27
    Posts
    268
    Thanks given
    31
    Thanks received
    6
    Rep Power
    6
    kk Thx,
    Reply With Quote  
     

  10. #10  
    Donator DanielEkins's Avatar
    Join Date
    Aug 2009
    Posts
    173
    Thanks given
    3
    Thanks received
    5
    Rep Power
    1
    I like that, does it save, and continue the counter when you relog?
    Reply With Quote  
     

Page 1 of 4 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. GWD KillCount
    By Defiled-X in forum Help
    Replies: 2
    Last Post: 03-04-2011, 02:09 PM
  2. [Godwars] Killcount
    By Nighel in forum Help
    Replies: 1
    Last Post: 07-05-2010, 06:23 AM
  3. Help... killcount
    By H3llk03r in forum Help
    Replies: 2
    Last Post: 05-01-2010, 11:08 PM
  4. killcount ....
    By devildreams54 in forum Requests
    Replies: 6
    Last Post: 06-18-2009, 12:56 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •