Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function ConsumeItem(ByVal argPartyslot As Integer, ByVal argInventoryIndex As Integer) As Boolean 'using atk for hp and magic for mp to save on space.
- If argPartyslot >= 0 And argPartyslot <= 3 Then
- If Inventory(argInventoryIndex).index > 0 Then
- If Inventory(argInventoryIndex).consumable Then
- If Party(argPartyslot).dead Then
- If Inventory(argInventoryIndex).handed2 Then
- If InsertItemInToInventory(Inventory(argInventoryIndex).index, -1) Then
- Party(argPartyslot).dead = False
- Party(argPartyslot).hp += Inventory(argInventoryIndex).atk
- Party(argPartyslot).mp += Inventory(argInventoryIndex).magic
- Return True
- Else
- Return False
- End If
- Else
- Return False
- End If
- Else
- If Inventory(argInventoryIndex).atk > 0 Then
- If Party(argPartyslot).hp < Party(argPartyslot).maxhp Then
- If InsertItemInToInventory(Inventory(argInventoryIndex).index, -1) Then
- Party(argPartyslot).hp += Inventory(argInventoryIndex).atk
- Return True
- Else
- Return False
- End If
- Else
- Return False
- End If
- Else
- If Party(argPartyslot).mp < Party(argPartyslot).maxmp Then
- If InsertItemInToInventory(Inventory(argInventoryIndex).index, -1) Then
- Party(argPartyslot).mp += Inventory(argInventoryIndex).magic
- Return True
- Else
- Return False
- End If
- Else
- Return False
- End If
- End If
- End If
- Else
- Return False
- End If
- Else
- Return False
- End If
- Else
- Return False
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment