Thread: 718/742 points system issue

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 718/742 points system issue 
    Registered Member
    Join Date
    Nov 2013
    Posts
    31
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    when i set up the points system some monsters add more points like 1-5 because i made a high-scores board for amount of monsters killed. I don't know how to make all monster give 1 point instead of random amounts.
    I figured it should work if u do + 1 but no.. monster amounts vary like nex gives 3 sunfreet gives 4 per kill others give 1 or 2. Any help would be appreciated. Thank you!


    player.java

    public int corp = 0;

    public int getCorp() {
    return corp;
    }

    public void setCorp(int corp) {
    this.corp = corp;
    }
    Npc.java

    if (getId() == 8133) {
    player.setCorp(player.getCorp() + 1);
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2013
    Posts
    31
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    bump
    Reply With Quote  
     

  3. #3  
    Donator


    Join Date
    Jan 2014
    Posts
    1,650
    Thanks given
    426
    Thanks received
    497
    Rep Power
    221
    So... what's the issue.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2013
    Posts
    31
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    the points for all npc don't come out as +1 some are like +2,+3, +4, so the points aren't going up by increments of +1
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jul 2013
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Try this. Instead of just have player.setCorp(player.getCorp() + 1);

    Try using it like this player.setCorp(player.getCorp() += 1);

    The green text is the changed code.

    Code:
    public int corp = 0;
    
    public int getCorp() {
    return corp;
    }
    
    public void setCorp(int corp) {
    this.corp = corp;
    }
    Npc.java
    
    if (getId() == 8133) {
    player.setCorp(player.getCorp() += 1);
    }
    Reply With Quote  
     

  6. #6  
    ( ͡° ͜ʖ ͡°)

    Magic's Avatar
    Join Date
    Mar 2009
    Age
    25
    Posts
    1,462
    Thanks given
    111
    Thanks received
    184
    Rep Power
    79
    privatize corp in the player class

    where do you have this in your NPC class?
    Quote Originally Posted by MaxXi View Post
    Your combat is so awsome that i almost forgot its the combat matrix coded.
    Quote Originally Posted by twobrosplay View Post
    Try allowing the batch file through your firewall?
    Quote Originally Posted by SS_Alophonse View Post
    i have no life u say ha anything u say kid.i doubt u can even get a girlfriend
    i bet u cant even code anything.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Nov 2013
    Posts
    31
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by hexo View Post
    Try this. Instead of just have player.setCorp(player.getCorp() + 1);

    Try using it like this player.setCorp(player.getCorp() += 1);

    The green text is the changed code.

    Code:
    public int corp = 0;
    
    public int getCorp() {
    return corp;
    }
    
    public void setCorp(int corp) {
    this.corp = corp;
    }
    Npc.java
    
    if (getId() == 8133) {
    player.setCorp(player.getCorp() += 1);
    }
    ive done that and many other ways can't figure it out. it just doesn't want to be +1.
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,417
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Quote Originally Posted by solarbear123 View Post
    ive done that and many other ways can't figure it out. it just doesn't want to be +1.
    Where are you adding it?
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Nov 2013
    Posts
    31
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Mayne View Post
    Where are you adding it?
    public void sendDrop(Player player, Drop drop) {
    }

    under sendDrop not in it.
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,417
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Quote Originally Posted by solarbear123 View Post
    public void sendDrop(Player player, Drop drop) {
    }

    under sendDrop not in it.
    Please post the full code.
    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. Replies: 31
    Last Post: 01-15-2016, 02:34 AM
  2. [718/742] - Point shop help
    By Mudaaa in forum Help
    Replies: 1
    Last Post: 07-10-2014, 01:36 PM
  3. Replies: 1
    Last Post: 04-02-2014, 12:21 PM
  4. Replies: 55
    Last Post: 09-22-2013, 09:53 PM
  5. 718 npc point system
    By legend 349 in forum Help
    Replies: 4
    Last Post: 12-07-2012, 12:02 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
  •