Thread: [PI] Pk Point System [PI]

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 [PI] Pk Point System [PI] 
    Banned
    Join Date
    Aug 2009
    Posts
    490
    Thanks given
    22
    Thanks received
    3
    Rep Power
    0
    Does anyone have a working tutorial on how to add a Pk Point System ?

    For Project Insanity
    Reply With Quote  
     

  2. #2  
    Let the good times roll
    Eazy's Avatar
    Join Date
    Jun 2012
    Age
    27
    Posts
    1,234
    Thanks given
    90
    Thanks received
    223
    Rep Power
    70
    Lol?
    Just search on google, there must be tons of tutorials released.




    Reply With Quote  
     

  3. #3  
    Ignorance is always an excuse

    Mikee's Avatar
    Join Date
    Nov 2009
    Posts
    2,370
    Thanks given
    732
    Thanks received
    490
    Rep Power
    656
    Couldn't be simpler. Just add an integer variable. Everytime you kill someone: pkpoints++



    The day Aj repped me, my life changed forever
    Quote Originally Posted by Aj View Post
    Rep++ for you
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by Mikee View Post
    Couldn't be simpler. Just add an integer variable. Everytime you kill someone: pkpoints++
    This^ best answer of this topic ++
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Banned
    Join Date
    Aug 2009
    Posts
    490
    Thanks given
    22
    Thanks received
    3
    Rep Power
    0
    Quote Originally Posted by Eazy E View Post
    Lol?
    Just search on google, there must be tons of tutorials released.
    I've tried 3, got errors.
    Reply With Quote  
     

  7. #6  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by i Leo i View Post
    I've tried 3, got errors.
    Post them after all this is an helping community
    Reply With Quote  
     

  8. #7  
    Registered Member Eberwolf's Avatar
    Join Date
    Nov 2008
    Age
    30
    Posts
    210
    Thanks given
    10
    Thanks received
    17
    Rep Power
    34
    Spoonfeed for you ;P

    In Player.java add:
    Code:
    public int pkp = 0;
    Then in PlayerSave.java find:
    Code:
    } else if (token.equals("character-rights")) {
    	p.playerRights = Integer.parseInt(token2);
    Anywhere you'd like in this area add:
    Code:
    } else if (token.equals("pkp")) {
    	p.pkp = Integer.parseInt(token2);
    Then search for:
    Code:
    characterfile.write("character-rights = ", 0, 19);
    Anywhere in this area add:
    Code:
    characterfile.write("pkp = ", 0, 6);
    characterfile.write(Integer.toString(p.pkp), 0, Integer.toString(p.pkp).length());
    characterfile.newLine();
    ^ Make sure you add it after another "characterfile.newLine();"


    Now go into PlayerAssistant.java go to:
    Code:
    public void applyDead() {
    And finally add:
    Code:
    if(c.duelStatus != 6) {
    			c.killerId = findKiller();
    			Client o = (Client) Server.playerHandler.players[c.killerId];
    			if(o != null) {
    				if (c.killerId != c.playerId)
    					if(c.inWild() && heightLevel == 0){
    						c.DC++;
    						o.KC++;
    						o.pkp += 1;
    						o.sendMessage("You have received @red@1 @bla@Pk Points after defeating @red@"+Misc.optimizeText(c.playerName)+"!");
    					}	
    				c.playerKilled = c.playerId;
    				if(o.duelStatus == 5) {
    					o.duelStatus++;
    				}
    			}
    		}


    Reply With Quote  
     

  9. #8  
    Banned
    Join Date
    Aug 2009
    Posts
    490
    Thanks given
    22
    Thanks received
    3
    Rep Power
    0
    Quote Originally Posted by Eberwolf View Post
    Spoonfeed for you ;P

    In Player.java add:
    Code:
    public int pkp = 0;
    Then in PlayerSave.java find:
    Code:
    } else if (token.equals("character-rights")) {
    	p.playerRights = Integer.parseInt(token2);
    Anywhere you'd like in this area add:
    Code:
    } else if (token.equals("pkp")) {
    	p.pkp = Integer.parseInt(token2);
    Then search for:
    Code:
    characterfile.write("character-rights = ", 0, 19);
    Anywhere in this area add:
    Code:
    characterfile.write("pkp = ", 0, 6);
    characterfile.write(Integer.toString(p.pkp), 0, Integer.toString(p.pkp).length());
    characterfile.newLine();
    ^ Make sure you add it after another "characterfile.newLine();"


    Now go into PlayerAssistant.java go to:
    Code:
    public void applyDead() {
    And finally add:
    Code:
    if(c.duelStatus != 6) {
    			c.killerId = findKiller();
    			Client o = (Client) Server.playerHandler.players[c.killerId];
    			if(o != null) {
    				if (c.killerId != c.playerId)
    					if(c.inWild() && heightLevel == 0){
    						c.DC++;
    						o.KC++;
    						o.pkp += 1;
    						o.sendMessage("You have received @red@1 @bla@Pk Points after defeating @red@"+Misc.optimizeText(c.playerName)+"!");
    					}	
    				c.playerKilled = c.playerId;
    				if(o.duelStatus == 5) {
    					o.duelStatus++;
    				}
    			}
    		}
    Got 100 errors in playerassistant.java
    Reply With Quote  
     

  10. #9  
    Typical Swede


    Join Date
    Jul 2008
    Posts
    1,162
    Thanks given
    204
    Thanks received
    154
    Rep Power
    217
    Quote Originally Posted by i Leo i View Post
    Got 100 errors in playerassistant.java
    Remove the last bracket of the last codeblock code he posted.

    'Strange things did happen here no stranger would it be'
    ______________________________________________
    Reply With Quote  
     

  11. #10  
    Registered Member Eberwolf's Avatar
    Join Date
    Nov 2008
    Age
    30
    Posts
    210
    Thanks given
    10
    Thanks received
    17
    Rep Power
    34
    Quote Originally Posted by i Leo i View Post
    Got 100 errors in playerassistant.java
    That means you have either too many brackets or not enough, make sure you copied over all the closing brackets.


    Reply With Quote  
     

Page 1 of 2 12 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. How to add pk point system [pi] help
    By berdinx in forum Requests
    Replies: 2
    Last Post: 02-16-2013, 10:51 AM
  2. PI Pk Point System
    By deltanewb in forum Help
    Replies: 10
    Last Post: 01-25-2011, 02:04 AM
  3. [pi] Pk point system/shop/etc... [Payment: 20 usd]
    By Divine Life in forum Requests
    Replies: 4
    Last Post: 12-30-2010, 03:54 PM
  4. [PI] Pk points List [PI]
    By hellp45 in forum Help
    Replies: 1
    Last Post: 11-11-2010, 12:05 AM
  5. [PI] PK Point System
    By ipkerzi in forum Help
    Replies: 3
    Last Post: 08-06-2010, 10:30 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
  •