Thread: Simple,Stupid [PI 317 HELP]

Results 1 to 3 of 3
  1. #1 Simple,Stupid [PI 317 HELP] 
    Registered Member
    Join Date
    Nov 2011
    Posts
    104
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    lol , was wondering if someone could give me a small tut on adding something that would count how many times a player killed Jad and it saved to the character file? a simple and clean way
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2011
    Age
    28
    Posts
    1,880
    Thanks given
    311
    Thanks received
    557
    Rep Power
    703
    This method already should exist in your NPCHandler.java:

    Code:
    	public void handleJadDeath(int i) {
    		Client c = (Client)PlayerHandler.players[npcs[i].spawnedBy];
    		c.getItems().addItem(6570,1);
    		c.sendMessage("Congratulations on completing the fight caves minigame!");
    		c.getPA().resetTzhaar();
    		c.waveId = 300;
    	}
    From there you could add and save an integer called something like... jadsKilled and have it increase by one each time Jad is killed so...

    In Player.java add
    Code:
    public int jadsKilled;
    In the handleJadDeath void in NPCHandler.java change it to this:

    Code:
    	public void handleJadDeath(int i) {
    		Client c = (Client)PlayerHandler.players[npcs[i].spawnedBy];
    		c.getItems().addItem(6570,1);
    		c.sendMessage("Congratulations on completing the fight caves minigame!");
    		c.getPA().resetTzhaar();
    		c.waveId = 300;
                    c.jadsKilled++;
    	}
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Nov 2011
    Posts
    104
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    nvm added thanks you forgot playersave part but its fine
    Reply With Quote  
     

  5. Thankful user:



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. [317] Few Simple Questions
    By Bagnio in forum Help
    Replies: 8
    Last Post: 11-13-2010, 02:33 AM
  2. [317] A probably simple error
    By ownernickzarosscape in forum Help
    Replies: 6
    Last Post: 07-20-2010, 09:19 AM
  3. help with a simple command (im stupid)
    By patrick0294 in forum Help
    Replies: 3
    Last Post: 06-14-2010, 11:59 PM
  4. I feel stupid.. Simple command..
    By Joker in forum Help
    Replies: 5
    Last Post: 03-04-2010, 02:26 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
  •