15-10-2008, 11:47 AM
Can someone take a look at the below code and help me out. The code works fine, for the most part, however I can't figure out the value1 and value2.
The problem comes when I try to use a currency for item1 and/or Item2 and I set a value for either. I.E.
If it fails, it gives me the failure message, however the inventory doesn't update showing that they have lost those items.
[spoiler][code]Sub Blacksmithing(index, Item1, value1, Item2, value2, reward, stackable, chance)
Dim emptyslot As String
Dim item1slot As String
Dim item2slot As String
Dim i As Byte
Dim x As Integer
Dim Dice1 As Byte
Dim Slevel As Integer
Dim StackReward As Integer
Dim RewardSlot As Byte
' IMPORTANT NOTES
' -stackable should be set to "True" if reward is a currency item.
' -the values of item1 and item2 should be 0 if they are not currency.
emptyslot = 0 'signifys that emptyslot was not found
item1slot = 0 'signifys that the item was not found
item2slot = 0 'signifys that the item was not found
i = 1
Do While i
The problem comes when I try to use a currency for item1 and/or Item2 and I set a value for either. I.E.
Code:
Call Blacksmithing(index, 1, 5, 2, 5, 3, false, 1)
If it fails, it gives me the failure message, however the inventory doesn't update showing that they have lost those items.
[spoiler][code]Sub Blacksmithing(index, Item1, value1, Item2, value2, reward, stackable, chance)
Dim emptyslot As String
Dim item1slot As String
Dim item2slot As String
Dim i As Byte
Dim x As Integer
Dim Dice1 As Byte
Dim Slevel As Integer
Dim StackReward As Integer
Dim RewardSlot As Byte
' IMPORTANT NOTES
' -stackable should be set to "True" if reward is a currency item.
' -the values of item1 and item2 should be 0 if they are not currency.
emptyslot = 0 'signifys that emptyslot was not found
item1slot = 0 'signifys that the item was not found
item2slot = 0 'signifys that the item was not found
i = 1
Do While i