All pastes #927791 Raw Edit

Stuff

public text v1 · immutable
·published 2008-03-04 15:34 UTC
rendered paste body
Public Class Form1

    Dim levels(0 To 17) As String
    Dim categoryvalues() As String
    Dim categorydescs() As String
    Dim categoryopts() As String
    Public currentcat As String
    Dim currentopt As Int32

    Function setvalues()
        If (currentcat = "level") Then
            ReDim categoryvalues(0 To 17)
            ReDim categorydescs(0 To 17)
            ReDim categoryopts(0 To 17)

            categoryopts(0) = "TipFile"
            categorydescs(0) = "The name of your Tip File"
            categoryvalues(0) = "tipfile.tip"
            categoryopts(1) = "NwsFile"
            categorydescs(1) = "The name of your News File"
            categoryvalues(1) = "tipfile.nws"
            categoryopts(2) = "LvlFile"
            categorydescs(2) = "The name of your .lvl file"
            categoryvalues(2) = "hockey.lvl"
            categoryopts(3) = "VehFile"
            categorydescs(3) = "The name of your .veh file"
            categoryvalues(3) = "hockey.veh"
            categoryopts(4) = "ItmFile"
            categorydescs(4) = "The name of your .itm file"
            categoryvalues(4) = "hockey.itm"
            categoryopts(5) = "RpgFile"
            categorydescs(5) = "The name of your .rpg file"
            categoryvalues(5) = "hockey.rpg"
            categoryopts(6) = "LioFile"
            categorydescs(6) = "The name of your .lio file"
            categoryvalues(6) = "hocket.lio"
            categoryopts(7) = "BriefingFile"
            categorydescs(7) = "A .wav file that is started up when a player types ?briefing"
            categoryvalues(7) = "unknown.wav"
            categoryopts(8) = "AmbientPercent"
            categorydescs(8) = "The volume % from the master volume option (modifyable by player) at which ambient sounds are applied (1000 = 100%)."
            categoryvalues(8) = "700"
            categoryopts(9) = "Gravity"
            categorydescs(9) = "Gravity used for vehicles in the .VEH (-25 = default)"
            categoryvalues(9) = "-25"
            categoryopts(10) = "ForceViewNews"
            categorydescs(10) = "Force player to read Zone News when entering. (Boolean)"
            categoryvalues(10) = "1"
            categoryopts(11) = "LightColorWhite"
            categorydescs(11) = "Definition of default color pallette (White)."
            categoryvalues(11) = "0xffffff"
            categoryopts(12) = "LightColorRed"
            categorydescs(12) = "Definition of default color pallette (Red)."
            categoryvalues(12) = "0xff0000"
            categoryopts(13) = "LightColorGreen"
            categorydescs(13) = "Definition of default color pallette (Green)."
            categoryvalues(13) = "0x00ff00"
            categoryopts(14) = "LightColorBlue"
            categorydescs(14) = "Definition of default color pallette (Blue)"
            categoryvalues(14) = "0x0000ff"
            categoryopts(15) = "CeilingHeight"
            categorydescs(15) = "Maximum height applicable in the zone, considered as absolute roof."
            categoryvalues(15) = "2048"
            categoryopts(16) = "SmartDistance"
            categorydescs(16) = "No Description"
            categoryvalues(16) = "200"
            categoryopts(17) = "Isometric"
            categorydescs(17) = "Whether the client is to handle the zone as Isometric(2.5D) or as flat top- down (2D); 0 - Flat, 1- ISO."
            categoryvalues(17) = "0"
        End If
        Return True
    End Function

    Function save()
        If currentcat = "level" Then
            For i = 0 To 17
                levels(i) = categoryvalues(i)
            Next i
        End If
        Return True
    End Function

    Private Sub Categories_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Categories.SelectedIndexChanged
        Editables.Items.Clear()

        save()
        If (Categories.SelectedIndex() = 0) Then
            currentcat = "level"
            setvalues()
        End If

        For i = 0 To 17
            Editables.Items.Add(categoryopts(i))
        Next i
    End Sub

    Private Sub Editables_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Editables.SelectedIndexChanged
        Description.Clear()
        Description.AppendText(categorydescs(Editables.SelectedIndex))
        Valuebox.Clear()
        Valuebox.AppendText(categoryvalues(Editables.SelectedIndex))
    End Sub

    Private Sub Valuebox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Valuebox.TextChanged
        categoryvalues(Editables.SelectedIndex) = Valuebox.Text
    End Sub
End Class