Okay thank you very much I can see how I can use the case command now.
Sorry I'm a bit confused, this is what I got currently
Select Collection
` Mining
If ObjInUseCheck=01001
Case 1
// Copper
CurrentItemCode = 10103001010
CurrentItemCode$ = str$(CurrentItemCode#)
ObjWeight#=(val(mid$(CurrentItemCode$,9))+ val(mid$(CurrentItemCode$,10)) + val(mid$(CurrentItemCode$,11)))/10
Endcase
Case 2
// Tin
CurrentItemCode = 10203001100
CurrentItemCode$ = str$(CurrentItemCode#)
ObjWeight#=(val(mid$(CurrentItemCode$,9))+ val(mid$(CurrentItemCode$,10)) + val(mid$(CurrentItemCode$,11)))/10
Endcase
Case 3
Iron = Iron + 1
Endcase
Case 4
Coal = Coal + 1
Endcase
endif
` Smithing (Not Working Correctly!!)
Case 5
If UsingFurnace=0 then UsingFurnace=1
EndCase
` Farming
` Hunting
` Cooking
` Looting
Endselect
` Dosn't Work ATM in putting it in one part of the array!
If CurrentItemCode>0
` Find if Slot Exist
If Inventory(InventorySelection,0)= CurrentItemCode and InventorySelectionDone=0
InventorySelectionDone=1 : Inventory(InventorySelection,1) = Inventory(InventorySelection,1) + 1 : Weight#=Weight#+ObjWeight# : InventorySelectionDone=0 : InventorySelection=0
endif
` If Slot dosn't exist for object
If Inventory(InventorySelection,0)=0 and InventorySelectionDone=0
InventorySelectionDone=1 : Inventory(InventorySelection,0) = CurrentItemCode : Inventory(InventorySelection,1) = Inventory(InventorySelection,1) + 1 : Weight#=Weight#+ObjWeight# : InventorySelectionDone=0 : InventorySelection=0
endif
` Go through inventory to Max
If InventorySelection<28 and InventorySelectionDone=0 then InventorySelection=InventorySelection+1 else InventorySelection=0
endif