Mirage Source
Inventory Update and Spell Help. - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Inventory Update and Spell Help. (/showthread.php?tid=2249)



Inventory Update and Spell Help. - deathknight - 15-10-2008

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.
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