Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Counter kill and dead


iHero
 Share

Recommended Posts

**Client~Side**

In Type PlayerRec at the end before the End Type, add:

```
    Kill As Long
    Dead As Long
``` **Find:

```
    Call SetPlayerPK(i, Buffer.ReadLong)
```
Look for:

```
    Player(i).Kill = Buffer.ReadLong
    Player(i).Dead = Buffer.ReadLong
```
**Serve~Side**

In Type PlayerRec at the end before the End Type, add:

```
    Kill As Long
    Dead As Long
``` **In Sub AddChar and find it:

```
        Player(Index).Vital(Vitals.MP) = GetPlayerMaxVital(Index, Vitals.MP)
```
Add below:

```
        Player(Index).Kill = 0
        Player(Index).Dead = 0
```
Now in Sub PlayerAttackPlayer look for:

```
        If exp = 0 Then
            Call PlayerMsg(victim, "You lost no exp.", BrightRed)
            Call PlayerMsg(attacker, "You received no exp.", BrightBlue)
        Else
            Call SetPlayerExp(victim, GetPlayerExp(victim) - exp)
            SendEXP victim
            Call PlayerMsg(victim, "You lost " & exp & " exp.", BrightRed)
```
And add up:

```
        ' Kill and Dead
        Player(attacker).Kill = Player(attacker).Kill + 1
        Call PlayerMsg(attacker, "Now you have " & Player(attacker).Kill & " Kill's", BrightRed)
        Player(victim).Dead = Player(victim).Dead + 1
        Call PlayerMsg(victim, "Now you have " & Player(victim).Dead & " Deaths", BrightRed)
```
In Function PlayerData look for:

```
    Buffer.WriteLong GetPlayerPK(Index)
```
And add below:

```
    Buffer.WriteLong Player(Index).Kill
    Buffer.WriteLong Player(Index).Dead
```
Credits:

iHero****
Link to comment
Share on other sites

@vincent329:

> one part of you're post i dont understand first you go find (such and such code) then you put look for (such and such code) then it goes to server side that does not really make since

Find:

```
Call SetPlayerPK(i, Buffer.ReadLong)
```
Add this:

```
Player(i).Kill = Buffer.ReadLong
Player(i).Dead = Buffer.ReadLong
```That better:)?
Link to comment
Share on other sites

Okay, so this does actually work, but it only sends a player message to count the kills and deaths, which will get annoying after each and every kill and death you get. So I made some labels in frmMain that display your Kills and Deaths, and right now I'm remaking the Player Info Window, and placing all these stats in it, so that when you click on a player whose stats you want to see, it displays name, stats, player kills, player deaths, and NPC kills, NPC deaths, and I'll probably add more things like Guild, Class, etc.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...