Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TakeGold
#1
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)