String[] or Player[]
|
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.
Good idea, hard to add though.
For the attackers though, I would make an ArrayList, something like:
And then like make a method to get the attacker. Then you could do like attackers.add(attackerID);Code:public static ArrayList<Player> attackers = new ArrayList<Players>();
I don't know... That's just an idea.
added
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.
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.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |