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

[EO] Bind Type


hisherwin
 Share

Recommended Posts

I don't know if this is a good way on making it… i haven't tested it yet but by looking at the code it will work 100%

At

```

Sub PlayerUnequipItem(ByVal index As Long, ByVal EqSlot As Long)

```

after this code

```

If FindOpenInvSlot(index, GetPlayerEquipment(index, EqSlot)) > 0 Then

```

add

```

' Bind Working ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)

If Item(GetPlayerEquipment(index, EqSlot)).BindType = 2 Then Exit Sub

```

Next at

```

Sub PlayerMapDropItem(ByVal index As Long, ByVal invNum As Long, ByVal amount As Long)

```

after this code

```

If (GetPlayerInvItemNum(index, invNum) <= MAX_ITEMS) Then

```

add

```

' Work the Bind Type

If Item(GetPlayerInvItemNum(index, invNum)).BindType = 1 Then Exit Sub

```

There are alot of good ways to make a BindType , but i think this is the basic one..

Edit

at

```

Sub HandleSellItem(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

```

after this code

```

' seems to be valid

itemnum = GetPlayerInvItemNum(index, invSlot)

```

add below

```

' Bind Working

If Item(itemnum).BindType <> 0 Then Exit Sub

```

at

```

Sub HandleTradeItem(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

```

after this code

```

itemnum = GetPlayerInvItemNum(index, invSlot)

If itemnum <= 0 Or itemnum > MAX_ITEMS Then Exit Sub

```

add below

```

' Bind Working

If Item(itemnum).BindType <> 0 Then Exit Sub

```
Link to comment
Share on other sites

You should use PlayerInvRec not ItemRec. ItemRec is just used to set the default bound type, but if you want a proper system that allows you to set it based on equip or pickup then you want to use what I said. You can use either or both though.
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...