16-10-2007, 05:17 PM
Basicly I remade the TakeItem for this one. I didn't see TakeItem fitting my need on my travel system.
Add this in a module:
[code]Function TakeGold(ByVal index As Long, ByVal ItemNum As Long, ByVal ItemVal As Long) As Boolean
Dim i As Long, N As Long
TakeGold = False
' Check for subscript out of range
If IsPlaying(index) = False Or ItemNum MAX_ITEMS Then
Exit Function
End If
For i = 1 To MAX_INV
' Check to see if the player has the item
If GetPlayerInvItemNum(index, i) = ItemNum Then
If Item(ItemNum).Type = ITEM_TYPE_CURRENCY Then
' Is what we are trying to take away more then what they have? If so just set it to zero
If ItemVal
Add this in a module:
[code]Function TakeGold(ByVal index As Long, ByVal ItemNum As Long, ByVal ItemVal As Long) As Boolean
Dim i As Long, N As Long
TakeGold = False
' Check for subscript out of range
If IsPlaying(index) = False Or ItemNum MAX_ITEMS Then
Exit Function
End If
For i = 1 To MAX_INV
' Check to see if the player has the item
If GetPlayerInvItemNum(index, i) = ItemNum Then
If Item(ItemNum).Type = ITEM_TYPE_CURRENCY Then
' Is what we are trying to take away more then what they have? If so just set it to zero
If ItemVal