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

Drop all items if your a player killer.


Legolas Td
 Share

Recommended Posts

Ok, soo i got vb6 to load the server code right today. So i figured i would add this system, test it, and release it too you guys. "Sadly i still cant edit the client side…. Wont load the rich text box?".

Ok soo this basicly works by making you drop your items only if you are a Playerkiller when you die.
What will be added in V.2:
Non-Player killers will drop their item of highest value on death.

OK this is a very very simple server sided edit, you do not have to touch the client side at all.
First off go to modPlayer and find this:

>! ```
  ' Drop all worn items
    For i = 1 To Equipment.Equipment_Count - 1
        If GetPlayerEquipment(index, i) > 0 Then
            PlayerMapDropItem index, GetPlayerEquipment(index, i), 0
        End If
    Next
```

And replace that with this:

>! ```
'Drop inventory items, Will make this only apply to player killers.
      If GetPlayerPK(index) = YES Then
    For i = 1 To MAX_INV
    PlayerMapDropItem index, i, GetPlayerInvItemValue(index, i)
    Next
>!     'Send all equiped items to the inventory to be dumped.
    For i = 1 To Equipment.Equipment_Count - 1
        If GetPlayerEquipment(index, i) > 0 Then
            PlayerMapDropItem index, GetPlayerEquipment(index, i), 0
        End If

        'Send Weapon
        GiveInvItem index, GetPlayerEquipment(index, Weapon), 0
        SetPlayerEquipment index, 0, Weapon
        'Send Armor
        GiveInvItem index, GetPlayerEquipment(index, Armor), 0
        SetPlayerEquipment index, 0, Armor
        'Send Shield
        GiveInvItem index, GetPlayerEquipment(index, Shield), 0
        SetPlayerEquipment index, 0, Shield
        'Send Helmet
        GiveInvItem index, GetPlayerEquipment(index, Helmet), 0
        SetPlayerEquipment index, 0, Helmet

    Next
>!     'Drop *equipped* inventory items
    For i = 1 To MAX_INV
        PlayerMapDropItem index, i, 0
    Next
    End If
```

And BAM! your done.
Credits to:
Elbereth for the whole dropping base.
To me for making it only affect player killers.

Have Fun,
Regards,
Legloas Td.
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...