[EO] Bind Type

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

Sorry i forgot the Can’t Sell and Can’t trade… i’ll fix it right away

[Fixed]

Finally!

Someone fixed this,thx.

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.

Log in to reply