Thread: Adding your hits?

Results 1 to 10 of 10
  1. #1 Adding your hits? 
    Banned
    Join Date
    May 2009
    Posts
    1,220
    Thanks given
    4
    Thanks received
    61
    Rep Power
    0
    Ok my next idea is to add a thing that makes it so that the person who does the most damage on a person within the last 60 seconds gets the kill.

    I need a few things though, i sat down for a good 10 minutes trying to think of something.. Nothing. Can anyone give me a headstart at this? Like how i can get the hits of the person and add them to some data file or something? Like it makes a .txt file with the players name and all the people who have attacked him within the past 60 seconds. Then after the person is dead, logs out, or is out of combat for 30 seconds, the file deletes so it doesn't take up room.

    Just a little idea, idk where to start, a lot of 525 servers have this but it seems like it would take for ever.
    Reply With Quote  
     

  2. #2  
    crypt or blood
    Guest
    String[] or Player[]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    Good idea, hard to add though.

    For the attackers though, I would make an ArrayList, something like:

    Code:
    public static ArrayList<Player> attackers = new ArrayList<Players>();
    And then like make a method to get the attacker. Then you could do like attackers.add(attackerID);

    I don't know... That's just an idea.
    Attempting to develop a multi-revision library. See it on GitHub.
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    May 2009
    Posts
    1,220
    Thanks given
    4
    Thanks received
    61
    Rep Power
    0
    Quote Originally Posted by Deadly Uzi View Post
    Good idea, hard to add though.

    For the attackers though, I would make an ArrayList, something like:

    Code:
    public static ArrayList<Player> attackers = new ArrayList<Players>();
    And then like make a method to get the attacker. Then you could do like attackers.add(attackerID);

    I don't know... That's just an idea.
    wow nice, would've never thought of that. I'll try to work on this tomorrow, I know the code to make a new file and what not and delete, and making the timers will be simple enough, just confuses you when you try to think of it all at once.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    Yeah I see what you mean. Add my MSN if you need more help:

    [email protected]
    Attempting to develop a multi-revision library. See it on GitHub.
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    May 2009
    Posts
    1,220
    Thanks given
    4
    Thanks received
    61
    Rep Power
    0
    added
    Reply With Quote  
     

  7. #7  
    crypt or blood
    Guest
    maybe a List<Integer[]> containing the players ID and the amount of damage they have done. Then when the player/npc dies, reset the list.
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    May 2009
    Posts
    1,220
    Thanks given
    4
    Thanks received
    61
    Rep Power
    0
    Quote Originally Posted by crypt or blood View Post
    maybe a List<Integer[]> containing the players ID and the amount of damage they have done. Then when the player/npc dies, reset the list.
    maybe in the melee voids i can add
    Code:
    addMaxHit();
    
    
    public void MaxHit() {
    (write something here to get the hit(too tired to think atm))
    (Something here to add it to the list)
    }
    I'll think this through tomorrow
    Reply With Quote  
     

  9. #9  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    Why would you want to make a new ArrayList containing the attacker ID's? That's the whole point of the first one. When you are being attacked(Combat method) find a way to get the attackers ID. Then all you have to do is add the ID to the ArrayList. (attackers.add(attackerID))

    EDIT: Also, I think a simple integer should be sufficient for counting the damage done. Just do something like.

    attacker.damageDone += PLAYER_MELEE_DAMAGE

    Also, Austin, you're offline on MSN?
    Attempting to develop a multi-revision library. See it on GitHub.
    Reply With Quote  
     

  10. #10  
    Banned
    Join Date
    May 2009
    Posts
    1,220
    Thanks given
    4
    Thanks received
    61
    Rep Power
    0
    Quote Originally Posted by Deadly Uzi View Post
    Why would you want to make a new ArrayList containing the attacker ID's? That's the whole point of the first one. When you are being attacked(Combat method) find a way to get the attackers ID. Then all you have to do is add the ID to the ArrayList. (attackers.add(attackerID))

    EDIT: Also, I think a simple integer should be sufficient for counting the damage done. Just do something like.

    attacker.damageDone += PLAYER_MELEE_DAMAGE

    Also, Austin, you're offline on MSN?
    No, i got the older version of msn so it takes a little bit to add,

    add me, [email protected].

    im going to bed though, nite.
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •