Advertisement
gigajew

RuneScape Currency

Jul 25th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.68 KB | None | 0 0
  1.     'Format RuneScape currency as GP/K/M/B
  2.     Function CalculateStack(ByVal Value As Long) As String
  3.         Dim K As Double = Value / 1000
  4.         Dim M As Double = Value / 1000000
  5.         Dim B As Double = Value / 1000000000
  6.  
  7.         If K >= 1 Then
  8.             If M >= 1 Then
  9.                 If B >= 1 Then
  10.                     Return String.Format("{0}B", B)
  11.                 Else
  12.                     Return String.Format("{0}M", M)
  13.                 End If
  14.             Else
  15.                 Return String.Format("{0}K", K)
  16.             End If
  17.         Else
  18.             Return String.Format("{0}GP", Value.ToString)
  19.         End If
  20.  
  21.         Return Value.ToString
  22.     End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement