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

Damaging Cursed Item HELP!


BlazingShadow
 Share

Recommended Posts

Ok, I do this for you ;)

Open Client frmEditor_Item and add:

scrollbar:
name - scrlItemDamage
label:
name - lblItemDamage
caption - "Damage: "

Paste this to scrlItemDamage code:

```
Item(EditorIndex).ItemDamage = scrlItemDamage.Value
lblItemDamage.Caption = "Damage: " & scrlItemDamage.Value
```
Find:

```
Private Type ItemRec
```
Add to this type:

```
    ItemDamage As Long
```
Find in ItemEditorInit:

```
        frmEditor_Item.scrlRarity.Value = .Rarity
```
And add:

```
        frmEditor_Item.scrlItemDamage.Value = .ItemDamage
```
Ok now go to the Server

Find:

```
Private Type ItemRec
```
And add to this type:

```
    ItemDamage As Long
```
Find in HandleUseItem:

```
            Case ITEM_TYPE_WEAPON
```           
And under is:

```
                SetPlayerEquipment Index, GetPlayerInvItemNum(Index, InvNum), Weapon
                PlayerMsg Index, "You equip " & CheckGrammar(Item(GetPlayerInvItemNum(Index, InvNum)).Name), BrightGreen
                TakeInvItem Index, GetPlayerInvItemNum(Index, InvNum), 1

```
Add over this:

```
                If Item(GetPlayerInvItemNum(Index, InvNum)).ItemDamage > 0 Then
                    SetPlayerVital Index, HP, GetPlayerVital(Index, HP) - Item(GetPlayerInvItemNum(Index, InvNum)).ItemDamage
                End If
```
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...