ITRA.FRM
上传用户:ling1220
上传日期:2007-01-10
资源大小:313k
文件大小:95k
- VERSION 5.00
- Object = "{33101C00-75C3-11CF-A8A0-444553540000}#1.0#0"; "CSWSK32.OCX"
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form Form1
- Appearance = 0 'Flat
- BackColor = &H00000000&
- Caption = "Imagica Telnet Client"
- ClientHeight = 6915
- ClientLeft = 1605
- ClientTop = 2295
- ClientWidth = 7965
- BeginProperty Font
- Name = "Times New Roman"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Icon = "ITRA.frx":0000
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 6915
- ScaleWidth = 7965
- Begin SocketWrenchCtrl.Socket Socket1
- Left = 4920
- Top = 6120
- _Version = 65536
- _ExtentX = 741
- _ExtentY = 741
- _StockProps = 0
- AutoResolve = -1 'True
- Backlog = 1
- Binary = -1 'True
- Blocking = -1 'True
- Broadcast = 0 'False
- BufferSize = 0
- HostAddress = ""
- HostFile = ""
- HostName = ""
- InLine = 0 'False
- Interval = 0
- KeepAlive = 0 'False
- Library = ""
- Linger = 0
- LocalPort = 0
- LocalService = ""
- Protocol = 0
- RemotePort = 0
- RemoteService = ""
- ReuseAddress = -1 'True
- Route = -1 'True
- Timeout = 0
- Type = 1
- Urgent = 0 'False
- End
- Begin TabDlg.SSTab SSTab1
- Height = 6345
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 7905
- _ExtentX = 13944
- _ExtentY = 11192
- _Version = 327681
- Tabs = 5
- TabsPerRow = 5
- TabHeight = 520
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Times New Roman"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- TabCaption(0) = "Session"
- TabPicture(0) = "ITRA.frx":030A
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Statusbar"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "talkstate(0)"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "triggerstate(0)"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "talkstate(1)"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).Control(4)= "triggerstate(1)"
- Tab(0).Control(4).Enabled= 0 'False
- Tab(0).Control(5)= "Inputtext"
- Tab(0).Control(5).Enabled= 0 'False
- Tab(0).Control(6)= "Timer1"
- Tab(0).Control(6).Enabled= 0 'False
- Tab(0).Control(7)= "Mudtime"
- Tab(0).Control(7).Enabled= 0 'False
- Tab(0).Control(8)= "Command12"
- Tab(0).Control(8).Enabled= 0 'False
- Tab(0).Control(9)= "Picture1"
- Tab(0).Control(9).Enabled= 0 'False
- Tab(0).Control(10)= "SocketState(1)"
- Tab(0).Control(10).Enabled= 0 'False
- Tab(0).Control(11)= "SocketState(0)"
- Tab(0).Control(11).Enabled= 0 'False
- Tab(0).Control(12)= "Showcommw"
- Tab(0).Control(12).Enabled= 0 'False
- Tab(0).Control(13)= "Command15"
- Tab(0).Control(13).Enabled= 0 'False
- Tab(0).Control(14)= "Textboxtmp"
- Tab(0).Control(14).Enabled= 0 'False
- Tab(0).Control(15)= "TextBox"
- Tab(0).Control(15).Enabled= 0 'False
- Tab(0).Control(16)= "Command25"
- Tab(0).Control(16).Enabled= 0 'False
- Tab(0).Control(17)= "SelUser"
- Tab(0).Control(17).Enabled= 0 'False
- Tab(0).ControlCount= 18
- TabCaption(1) = "Connect"
- TabPicture(1) = "ITRA.frx":0326
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Label1"
- Tab(1).Control(0).Enabled= 0 'False
- Tab(1).Control(1)= "Label2"
- Tab(1).Control(1).Enabled= 0 'False
- Tab(1).Control(2)= "Label4"
- Tab(1).Control(2).Enabled= 0 'False
- Tab(1).Control(3)= "Label7"
- Tab(1).Control(3).Enabled= 0 'False
- Tab(1).Control(4)= "Label15"
- Tab(1).Control(4).Enabled= 0 'False
- Tab(1).Control(5)= "Mudport"
- Tab(1).Control(5).Enabled= 0 'False
- Tab(1).Control(6)= "Mudurl"
- Tab(1).Control(6).Enabled= 0 'False
- Tab(1).Control(7)= "Command1"
- Tab(1).Control(7).Enabled= 0 'False
- Tab(1).Control(8)= "Mudlist"
- Tab(1).Control(8).Enabled= 0 'False
- Tab(1).Control(9)= "Command6"
- Tab(1).Control(9).Enabled= 0 'False
- Tab(1).Control(10)= "Command7"
- Tab(1).Control(10).Enabled= 0 'False
- Tab(1).Control(11)= "Outputonconnect"
- Tab(1).Control(11).Enabled= 0 'False
- Tab(1).Control(12)= "mudname"
- Tab(1).Control(12).Enabled= 0 'False
- Tab(1).Control(13)= "Command13"
- Tab(1).Control(13).Enabled= 0 'False
- Tab(1).Control(14)= "Users"
- Tab(1).Control(14).Enabled= 0 'False
- Tab(1).Control(15)= "Command22"
- Tab(1).Control(15).Enabled= 0 'False
- Tab(1).Control(16)= "Command24"
- Tab(1).Control(16).Enabled= 0 'False
- Tab(1).Control(17)= "Command29"
- Tab(1).Control(17).Enabled= 0 'False
- Tab(1).ControlCount= 18
- TabCaption(2) = "Configure"
- TabPicture(2) = "ITRA.frx":0342
- Tab(2).ControlEnabled= 0 'False
- Tab(2).Control(0)= "Frame1"
- Tab(2).Control(0).Enabled= 0 'False
- Tab(2).Control(1)= "Frame2"
- Tab(2).Control(1).Enabled= 0 'False
- Tab(2).Control(2)= "Frame3"
- Tab(2).Control(2).Enabled= 0 'False
- Tab(2).Control(3)= "Command14"
- Tab(2).Control(3).Enabled= 0 'False
- Tab(2).Control(4)= "SoundfileSelect"
- Tab(2).Control(4).Enabled= 0 'False
- Tab(2).ControlCount= 5
- TabCaption(3) = "Notepad"
- TabPicture(3) = "ITRA.frx":035E
- Tab(3).ControlEnabled= 0 'False
- Tab(3).Control(0)= "Notepad"
- Tab(3).Control(0).Enabled= 0 'False
- Tab(3).ControlCount= 1
- TabCaption(4) = "Credits"
- TabPicture(4) = "ITRA.frx":037A
- Tab(4).ControlEnabled= 0 'False
- Tab(4).Control(0)= "Label6"
- Tab(4).Control(0).Enabled= 0 'False
- Tab(4).Control(1)= "Label9"
- Tab(4).Control(1).Enabled= 0 'False
- Tab(4).Control(2)= "Label11"
- Tab(4).Control(2).Enabled= 0 'False
- Tab(4).Control(3)= "Label12"
- Tab(4).Control(3).Enabled= 0 'False
- Tab(4).Control(4)= "versionlabel"
- Tab(4).Control(4).Enabled= 0 'False
- Tab(4).Control(5)= "Label13"
- Tab(4).Control(5).Enabled= 0 'False
- Tab(4).Control(6)= "Picture2"
- Tab(4).Control(6).Enabled= 0 'False
- Tab(4).Control(7)= "Picture3"
- Tab(4).Control(7).Enabled= 0 'False
- Tab(4).ControlCount= 8
- Begin VB.CommandButton Command29
- Caption = "Refresh"
- Height = 255
- Left = -73440
- TabIndex = 88
- Top = 5220
- Width = 675
- End
- Begin VB.ComboBox SelUser
- Height = 330
- Left = 4440
- Style = 2 'Dropdown List
- TabIndex = 86
- Top = 420
- Width = 1455
- End
- Begin VB.CommandButton Command24
- Caption = "Add"
- Height = 255
- Left = -71040
- TabIndex = 84
- Top = 4860
- Width = 735
- End
- Begin VB.CommandButton Command22
- Caption = "Del"
- Height = 255
- Left = -71040
- TabIndex = 83
- Top = 4500
- Width = 735
- End
- Begin VB.FileListBox Users
- Height = 720
- Left = -73440
- Pattern = "*.dat"
- TabIndex = 82
- Top = 4440
- Width = 2355
- End
- Begin VB.PictureBox Picture3
- AutoSize = -1 'True
- Height = 540
- Left = -74760
- Picture = "ITRA.frx":0396
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 81
- Top = 480
- Width = 540
- End
- Begin VB.PictureBox Picture2
- AutoSize = -1 'True
- BackColor = &H0080C0FF&
- Height = 3015
- Left = -73440
- Picture = "ITRA.frx":06A0
- ScaleHeight = 2955
- ScaleWidth = 5100
- TabIndex = 73
- Top = 3000
- Width = 5160
- End
- Begin VB.CommandButton Command25
- Caption = "Tips"
- Height = 255
- Left = 6000
- TabIndex = 65
- Top = 420
- Width = 615
- End
- Begin VB.Frame SoundfileSelect
- BackColor = &H8000000A&
- Caption = "Select a Soundfile"
- Height = 3255
- Left = -70920
- TabIndex = 59
- Top = 2160
- Visible = 0 'False
- Width = 3495
- Begin VB.CommandButton Command27
- Caption = "Refresh"
- Height = 255
- Left = 1080
- TabIndex = 85
- Top = 2880
- Width = 855
- End
- Begin VB.CommandButton Command20
- Caption = "Play"
- Height = 255
- Left = 240
- TabIndex = 63
- Top = 2880
- Width = 735
- End
- Begin VB.CommandButton Command18
- Caption = "Close"
- Height = 285
- Left = 2520
- TabIndex = 61
- Top = 2880
- Width = 855
- End
- Begin VB.FileListBox SoundFiles
- Height = 2400
- Left = 60
- TabIndex = 60
- Top = 240
- Width = 3255
- End
- End
- Begin RichTextLib.RichTextBox TextBox
- Height = 4410
- Left = 150
- TabIndex = 3
- Top = 825
- Width = 7365
- _ExtentX = 12991
- _ExtentY = 7779
- _Version = 393217
- BackColor = 0
- Enabled = -1 'True
- HideSelection = 0 'False
- ScrollBars = 2
- DisableNoScroll = -1 'True
- RightMargin = 10000
- TextRTF = $"ITRA.frx":4F3B
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin RichTextLib.RichTextBox Textboxtmp
- Height = 615
- Left = 5325
- TabIndex = 43
- Top = 5625
- Visible = 0 'False
- Width = 2190
- _ExtentX = 3863
- _ExtentY = 1085
- _Version = 393217
- Enabled = -1 'True
- TextRTF = $"ITRA.frx":5038
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.CommandButton Command15
- Caption = "Paste"
- Height = 285
- Left = 3600
- TabIndex = 53
- Top = 420
- Width = 765
- End
- Begin VB.PictureBox Showcommw
- AutoSize = -1 'True
- Height = 300
- Left = 3150
- Picture = "ITRA.frx":5135
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 52
- ToolTipText = "Show/Hide Communication Window"
- Top = 450
- Width = 300
- End
- Begin VB.PictureBox SocketState
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 270
- Index = 0
- Left = 2025
- Picture = "ITRA.frx":5237
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 45
- ToolTipText = "Connect with current selected mud."
- Top = 450
- Width = 270
- End
- Begin VB.PictureBox SocketState
- AutoSize = -1 'True
- Height = 300
- Index = 1
- Left = 2025
- Picture = "ITRA.frx":5339
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 44
- ToolTipText = "Disconnect"
- Top = 450
- Width = 300
- End
- Begin VB.CommandButton Command14
- Caption = "Save Settings"
- Height = 315
- Left = -68760
- TabIndex = 42
- Top = 3900
- Width = 1140
- End
- Begin VB.CommandButton Command13
- Caption = "Save Settings"
- Height = 315
- Left = -73440
- TabIndex = 41
- Top = 480
- Width = 1140
- End
- Begin VB.Frame Frame3
- Caption = "Speech/Translation"
- Height = 3465
- Left = -70440
- TabIndex = 33
- Top = 360
- Width = 3105
- Begin VB.ListBox Translation
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1530
- Left = 150
- TabIndex = 39
- Top = 300
- Width = 2595
- End
- Begin VB.CommandButton Command8
- Caption = "Del"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2205
- TabIndex = 38
- Top = 1920
- Width = 555
- End
- Begin VB.CommandButton Command9
- Caption = "Add"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1620
- TabIndex = 37
- Top = 1920
- Width = 555
- End
- Begin VB.ComboBox SpeechCmds
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- Left = 150
- Style = 2 'Dropdown List
- TabIndex = 36
- Top = 3000
- Width = 1695
- End
- Begin VB.CommandButton Command10
- Caption = "Add"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1920
- TabIndex = 35
- Top = 3060
- Width = 555
- End
- Begin VB.CommandButton Command11
- Caption = "Del"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2520
- TabIndex = 34
- Top = 3060
- Width = 555
- End
- Begin VB.Label Label8
- Caption = "Speechcommands to translate, remove all to translate always:"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 240
- TabIndex = 40
- Top = 2280
- Width = 2565
- End
- End
- Begin VB.Frame Frame2
- Caption = "Triggers"
- Height = 3450
- Left = -74880
- TabIndex = 25
- Top = 3180
- Width = 7550
- Begin VB.CommandButton Command28
- Caption = "Import Settings"
- Height = 315
- Left = 4680
- TabIndex = 87
- Top = 720
- Width = 1395
- End
- Begin VB.CommandButton Command21
- Caption = "Play"
- Height = 255
- Left = 4560
- TabIndex = 80
- Top = 2640
- Width = 495
- End
- Begin VB.CommandButton Command5
- Caption = "Del"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 6840
- TabIndex = 68
- Top = 2400
- Width = 435
- End
- Begin VB.CommandButton Command4
- Caption = "Add"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 6360
- TabIndex = 67
- Top = 2400
- Width = 435
- End
- Begin VB.ComboBox sCommands
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "ITRA.frx":543B
- Left = 4680
- List = "ITRA.frx":543D
- Style = 2 'Dropdown List
- TabIndex = 66
- Top = 2040
- Width = 2535
- End
- Begin VB.CommandButton Command19
- Caption = "..."
- Height = 255
- Left = 4200
- TabIndex = 62
- Top = 2640
- Width = 255
- End
- Begin VB.TextBox EditSounds
- Height = 315
- Left = 120
- TabIndex = 58
- Top = 2640
- Width = 3975
- End
- Begin VB.CommandButton Command17
- Caption = "Del"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3960
- TabIndex = 57
- Top = 2280
- Width = 435
- End
- Begin VB.CommandButton Command16
- Caption = "Add"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3480
- TabIndex = 56
- Top = 2280
- Width = 435
- End
- Begin VB.ComboBox Sounds
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "ITRA.frx":543F
- Left = 120
- List = "ITRA.frx":5441
- Style = 2 'Dropdown List
- TabIndex = 55
- Top = 2280
- Width = 3255
- End
- Begin VB.TextBox Edittrigger
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 975
- Left = 120
- MultiLine = -1 'True
- TabIndex = 29
- Top = 960
- Width = 4335
- End
- Begin VB.ComboBox Trigger
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "ITRA.frx":5443
- Left = 120
- List = "ITRA.frx":5445
- Style = 2 'Dropdown List
- TabIndex = 28
- Top = 360
- Width = 3255
- End
- Begin VB.CommandButton Command2
- Caption = "Add"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3480
- TabIndex = 27
- Top = 360
- Width = 435
- End
- Begin VB.CommandButton Command3
- Caption = "Del"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3960
- TabIndex = 26
- Top = 360
- Width = 435
- End
- Begin VB.Label Label3
- Caption = "Sound triggers"
- Height = 255
- Left = 120
- TabIndex = 70
- Top = 2040
- Width = 1695
- End
- Begin VB.Label Label5
- Caption = "Communication Window triggers"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 4680
- TabIndex = 69
- Top = 1560
- Width = 2595
- End
- Begin VB.Label Label17
- Caption = "Commands done on trigger (press enter after each command !)"
- Height = 255
- Left = 120
- TabIndex = 30
- Top = 720
- Width = 4335
- End
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 315
- Left = 225
- Picture = "ITRA.frx":5447
- ScaleHeight = 285
- ScaleWidth = 270
- TabIndex = 23
- ToolTipText = "Newbie Info :-)"
- Top = 450
- Width = 300
- End
- Begin VB.CommandButton Command12
- Caption = "Pause"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 6660
- TabIndex = 22
- Top = 420
- Width = 765
- End
- Begin VB.CommandButton Mudtime
- Caption = "Tick: 0"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 750
- TabIndex = 21
- ToolTipText = "Click to reset the timer."
- Top = 450
- Width = 1065
- End
- Begin VB.Timer Timer1
- Interval = 1000
- Left = 675
- Top = 375
- End
- Begin VB.TextBox mudname
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = -73470
- TabIndex = 19
- Top = 1635
- Width = 4635
- End
- Begin VB.TextBox Outputonconnect
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1575
- Left = -73470
- MultiLine = -1 'True
- TabIndex = 16
- Top = 2835
- Width = 4665
- End
- Begin VB.CommandButton Command7
- Caption = "Add"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = -70155
- TabIndex = 15
- Top = 1275
- Width = 615
- End
- Begin VB.CommandButton Command6
- Caption = "Del"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = -69435
- TabIndex = 14
- Top = 1275
- Width = 615
- End
- Begin VB.ComboBox Mudlist
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- Left = -73470
- Style = 2 'Dropdown List
- TabIndex = 13
- Top = 915
- Width = 4695
- End
- Begin VB.Frame Frame1
- Caption = "Other Features"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 2520
- Left = -74850
- TabIndex = 10
- Top = 525
- Width = 4560
- Begin VB.CheckBox showtip
- Caption = "Show Tip of on startup"
- Height = 255
- Left = 360
- TabIndex = 72
- Top = 1680
- Value = 1 'Checked
- Width = 2295
- End
- Begin VB.CommandButton Command26
- Caption = "Set Colors"
- Height = 255
- Left = 3120
- TabIndex = 71
- Top = 1080
- Width = 1215
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 3840
- Top = 1080
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin VB.CommandButton Command23
- Caption = "Set Font"
- Height = 255
- Left = 3120
- TabIndex = 64
- Top = 1440
- Width = 1215
- End
- Begin VB.CheckBox Soundson
- Caption = "Play Sounds"
- Height = 240
- Left = 360
- TabIndex = 54
- Top = 1440
- Value = 1 'Checked
- Width = 3690
- End
- Begin VB.CheckBox Commwindowshow
- Caption = "Show Commwindow"
- Height = 240
- Left = 360
- TabIndex = 51
- Top = 1200
- Width = 3690
- End
- Begin VB.CheckBox ANSIstate
- Caption = "ANSI-Color"
- Height = 240
- Left = 360
- TabIndex = 50
- Top = 960
- Value = 1 'Checked
- Width = 1290
- End
- Begin VB.TextBox TickCount
- Alignment = 1 'Right Justify
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 150
- TabIndex = 31
- Text = "70"
- Top = 1995
- Width = 510
- End
- Begin VB.CheckBox Triggerson
- Caption = "Check for triggers"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 360
- TabIndex = 20
- Top = 480
- Value = 1 'Checked
- Width = 3255
- End
- Begin VB.CheckBox Check1
- Caption = "Random noises/actions"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 360
- TabIndex = 12
- Top = 720
- Value = 1 'Checked
- Width = 3255
- End
- Begin VB.CheckBox Translate
- Caption = "Local Translation outgoing speech/Aliases"
- Height = 240
- Left = 360
- TabIndex = 11
- Top = 240
- Value = 1 'Checked
- Width = 3645
- End
- Begin VB.Label Label14
- Caption = "Nr. of seconds for a mud hour/tick (zero to diable)"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 750
- TabIndex = 32
- Top = 1995
- Width = 3075
- End
- End
- Begin VB.TextBox Notepad
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 4935
- Left = -74880
- MultiLine = -1 'True
- ScrollBars = 3 'Both
- TabIndex = 9
- Top = 600
- Width = 7455
- End
- Begin VB.CommandButton Command1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Connect"
- Height = 315
- Left = -74640
- TabIndex = 6
- Top = 480
- Width = 1140
- End
- Begin VB.TextBox Mudurl
- Enabled = 0 'False
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = -73470
- TabIndex = 5
- Top = 2055
- Width = 4635
- End
- Begin VB.TextBox Mudport
- Enabled = 0 'False
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = -73470
- TabIndex = 4
- Top = 2460
- Width = 990
- End
- Begin VB.ComboBox Inputtext
- BackColor = &H00000000&
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 330
- ItemData = "ITRA.frx":58B1
- Left = 150
- List = "ITRA.frx":58B3
- TabIndex = 1
- Top = 5250
- Width = 6315
- End
- Begin VB.PictureBox triggerstate
- AutoSize = -1 'True
- Height = 300
- Index = 1
- Left = 2400
- Picture = "ITRA.frx":58B5
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 47
- ToolTipText = "Don't check for triggers"
- Top = 450
- Width = 300
- End
- Begin VB.PictureBox talkstate
- AutoSize = -1 'True
- Height = 300
- Index = 1
- Left = 2775
- Picture = "ITRA.frx":59B7
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 49
- ToolTipText = "Don't translate speech"
- Top = 450
- Width = 300
- End
- Begin VB.PictureBox triggerstate
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 270
- Index = 0
- Left = 2400
- Picture = "ITRA.frx":5AB9
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 46
- ToolTipText = "Check for triggers"
- Top = 450
- Visible = 0 'False
- Width = 270
- End
- Begin VB.PictureBox talkstate
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 270
- Index = 0
- Left = 2775
- Picture = "ITRA.frx":5BBB
- ScaleHeight = 240
- ScaleWidth = 240
- TabIndex = 48
- ToolTipText = "Translate speech"
- Top = 450
- Visible = 0 'False
- Width = 270
- End
- Begin VB.Label Label13
- Alignment = 2 'Center
- Caption = "Imagica Telnet Client"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 27.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = -74160
- TabIndex = 79
- Top = 360
- Width = 6255
- End
- Begin VB.Label versionlabel
- Alignment = 2 'Center
- Caption = "Version"
- Height = 255
- Left = -72480
- TabIndex = 78
- Top = 1080
- Width = 2295
- End
- Begin VB.Label Label12
- Caption = "Visit Imagica MUD !! telnet to: www.imagica.net port 4000 or visit the homepage at: http://www.imagica.net"
- Height = 735
- Left = -74760
- TabIndex = 77
- Top = 2040
- Width = 3015
- End
- Begin VB.Label Label11
- Alignment = 2 'Center
- Caption = "patrick@fictional.net - http://www.fictional.net"
- Height = 255
- Left = -73200
- TabIndex = 76
- Top = 1680
- Width = 3855
- End
- Begin VB.Label Label9
- Alignment = 2 'Center
- Caption = "Programmed by Patrick van Venetien (Venice). Copyright ImagicaMUD"
- Height = 315
- Left = -74520
- TabIndex = 75
- Top = 1440
- Width = 6225
- End
- Begin VB.Label Label6
- Alignment = 1 'Right Justify
- Caption = $"ITRA.frx":5CBD
- Height = 855
- Left = -71640
- TabIndex = 74
- Top = 2040
- Width = 4095
- End
- Begin VB.Label Label15
- Caption = "Mudlist:"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = -74460
- TabIndex = 24
- Top = 930
- Width = 930
- End
- Begin VB.Label Label7
- Alignment = 1 'Right Justify
- Caption = "Name:"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = -74475
- TabIndex = 18
- Top = 1635
- Width = 855
- End
- Begin VB.Label Label4
- Caption = "Output on connect"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 705
- Left = -74595
- TabIndex = 17
- Top = 2835
- Width = 1245
- End
- Begin VB.Label Label2
- Alignment = 1 'Right Justify
- Caption = "Port:"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = -74235
- TabIndex = 8
- Top = 2475
- Width = 615
- End
- Begin VB.Label Label1
- Alignment = 1 'Right Justify
- Caption = "Address:"
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = -74475
- TabIndex = 7
- Top = 2055
- Width = 855
- End
- Begin VB.Label Statusbar
- Appearance = 0 'Flat
- BackColor = &H8000000A&
- BeginProperty Font
- Name = "Courier New"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 300
- Left = 120
- TabIndex = 2
- Top = 5580
- Width = 5970
- End
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Const TELCMD_IAC = 255
- Const TELCMD_DONT = 254
- Const TELCMD_DO = 253
- Const TELCMD_WONT = 252
- Const TELCMD_WILL = 251
- Const TELCMD_SB = 250
- Const TELCMD_NOP = 241
- Const TELCMD_SE = 240
- Const TELOPT_BINARY = 0
- Const TELOPT_ECHO = 1
- Const TELOPT_TTYPE = 24
- Const TELQUAL_IS = 0
- Const TELQUAL_SEND = 1
- Dim Mudconnect(255) As String ' output on connect
- Dim Triggertxt(255) As String ' output on trigger()
- Dim Soundstxt(255) As String ' output on trigger()
- Dim lastcolor
- Dim lasttime
- Public DefaultMudColor, DefaultMudBackcolor
- Public DefaultComColor, DefaultComBackcolor
- Dim EnglishW(255) As String
- Dim MuddishW(255) As String
- Sub AddColText(ParseCol As String)
- On Error Resume Next
- Dim CcStart, CcEnd, cCode
- Dim StartCcP, EndCcP, oldSel, OldLen ', LastColor
- CcStart = (Chr(27) + "[")
- 'CcStart = ".["
- CcEnd = "m"
- 'LastColor = RGB(255, 255, 255)
- If ANSIstate.Value = 1 Then
- Do
- Textboxtmp.SelStart = Len(Textboxtmp.Text)
- Textboxtmp.SelColor = DefaultMudColor
- Textboxtmp.SelBold = False
- Textboxtmp.SelUnderline = False
- Textboxtmp.SelItalic = False
-
-
- Textboxtmp.SelLength = 0
-
- StartCcP = InStr(ParseCol, CcStart)
- If StartCcP < 1 Then
- Exit Do
- End If
-
- EndCcP = InStr(StartCcP, ParseCol, CcEnd)
-
- If EndCcP < 1 Then
- Exit Do
- End If
- cCode = Mid(ParseCol, StartCcP + Len(CcStart), 2)
-
- If lastcolor = 1 Then
- Textboxtmp.SelBold = True
- ElseIf lastcolor = 4 Then
- Textboxtmp.SelUnderline = True
- ElseIf lastcolor = 2 Then
- Textboxtmp.SelItalic = True
- Else
- Textboxtmp.SelColor = lastcolor
- End If
-
- Textboxtmp.SelText = Left(ParseCol, StartCcP - 1)
- lastcolor = retColorCode(cCode)
-
- ParseCol = Mid(ParseCol, EndCcP + 1)
-
- 'TextBox.SelStart = StartCcP
- 'TextBox.SelLength = 0 ' Len(TextBox.Text)
-
- Loop
- Else
- Textboxtmp.SelStart = Len(Textboxtmp.Text)
- Textboxtmp.SelColor = DefaultMudColor
- Textboxtmp.SelBold = False
- Textboxtmp.SelUnderline = False
- Textboxtmp.SelItalic = False
- Textboxtmp.SelLength = 0
- End If
- Textboxtmp.SelText = ParseCol
- Textboxtmp.SelStart = Len(Textboxtmp.Text)
- ' TextBox.SelStart = oldSel
- ' TextBox.SelLength = OldLen
- End Sub
- Sub ConnectNow()
- On Error Resume Next
- If Socket1.Connected Then
- Command1.Enabled = False
- Socket1.Shutdown = 1
- Else
- Mudurl.Text = Trim$(Mudurl.Text)
- Mudport.Text = Trim$(Mudport.Text)
- If Len(Mudurl.Text) = 0 Then
- MsgBox "No host name specified"
- Exit Sub
- End If
- Socket1.AddressFamily = AF_INET
- Socket1.Protocol = IPPROTO_TCP
- Socket1.SocketType = SOCK_STREAM
- Socket1.LocalPort = IPPORT_ANY
- Socket1.RemotePort = IPPORT_TELNET
- Socket1.Binary = True
- Socket1.BufferSize = 2048
- Socket1.Blocking = False
- On Error Resume Next
- Screen.MousePointer = 11 ' Hourglass
- Command1.Enabled = False
- Socket1.HostName = Mudurl.Text
- If Err <> 0 Then
- Screen.MousePointer = 0 'Default
- Command1.Enabled = True
- ' HostName.SetFocus
- Exit Sub
- End If
- If Len(Mudport.Text) > 0 Then
- Socket1.RemoteService = Mudport.Text
- If Err <> 0 Then
- Screen.MousePointer = 0 'Default
- Command1.Enabled = True
- ' PortName.SetFocus
- Exit Sub
- End If
- End If
- Socket1.Connect
-
- Screen.MousePointer = 0 ' Default
- End If
- End Sub
- Sub LoadAll(datfile As String)
- If datfile = "users" Then Exit Sub
- On Error Resume Next
- 'Notepad
- Dim AllData, linedata, lastdata
- ChDir App.Path
- Notepad.Text = ""
- AllData = ""
- linedata = ""
- lastdata = ""
- If Dir("notepad.txt") <> "" Then
- Open "notepad.txt" For Input As #1
- Do
- Line Input #1, linedata
- Notepad.Text = Notepad.Text + linedata + vbCrLf
- Loop Until EOF(1)
- Close #1
- End If
- '~ML~ Mudlist (i) 'mudlist <ip:port>
- 'Mudconnect(i) 'on connect
- '~TR~ Trigger(i)
- 'Triggertxt(i)
- '~AC~Actions(i)
- '~TL~Translation(i)
- '~END~
- Dim i
- If LCase(datfile) = "intra.dat" Then
- Mudlist.Clear
- For i = 0 To 255
- Mudconnect(i) = ""
- Next i
- Else
- Sounds.Clear
- Trigger.Clear
- SpeechCmds.Clear
- sCommands.Clear
- Translation.Clear
-
- For i = 0 To 255
- Triggertxt(i) = ""
- Soundstxt(i) = ""
- EnglishW(i) = ""
- MuddishW(i) = ""
- Next i
-
- End If
- LoadDat (App.Path + "" + datfile)
- TextBox.Font.Name = CommonDialog1.FontName
- TextBox.Font.Size = CommonDialog1.FontSize
- TextBox.Font.Bold = CommonDialog1.FontBold
- TextBox.Font.Italic = CommonDialog1.FontItalic
- Textboxtmp.Font.Name = CommonDialog1.FontName
- Textboxtmp.Font.Size = CommonDialog1.FontSize
- Textboxtmp.Font.Bold = CommonDialog1.FontBold
- Textboxtmp.Font.Italic = CommonDialog1.FontItalic
- CommWindow.CommText.Font.Name = CommonDialog1.FontName
- CommWindow.CommText.Font.Size = CommonDialog1.FontSize
- CommWindow.CommText.Font.Bold = CommonDialog1.FontBold
- CommWindow.CommText.Font.Italic = CommonDialog1.FontItalic
- End Sub
- Sub LoadDat(datfile As String)
- Dim AllData, linedata, lastdata
- AllData = ""
- linedata = ""
- lastdata = ""
- Dim McI, TrI, Act, Tra, Spe, LIndex, SdI, i
- McI = Mudlist.ListCount - 1
- TrI = Trigger.ListCount - 1
- Tra = Translation.ListCount - 1
- Act = sCommands.ListCount - 1
- Spe = SpeechCmds.ListCount - 1
- SdI = Sounds.ListCount - 1
- LIndex = Mudlist.ListCount - 1
- If Dir(datfile) <> "" Then
- Open datfile For Input As #1
- Do
- Line Input #1, linedata
-
- ' Print #1, "~MLIDX!" + Str(Mudlist.ListIndex)
- If Left(linedata, 7) = "~CUSER!" Then
- lastdata = ""
- User = Mid(linedata, InStr(linedata, "!") + 1)
-
- ElseIf Left(linedata, 5) = "~TOP!" Then
- lastdata = ""
- Form1.Top = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~LEFT!" Then
- lastdata = ""
- Form1.Left = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~BMCL!" Then
- lastdata = ""
- DefaultMudBackcolor = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~BCCL!" Then
- lastdata = ""
- DefaultComBackcolor = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~STIP!" Then
- lastdata = ""
- showtip.Value = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~TMCL!" Then
- lastdata = ""
- DefaultMudColor = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~TCCL!" Then
- lastdata = ""
- DefaultComColor = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 7) = "~WIDTH!" Then
- lastdata = ""
- Form1.Width = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 7) = "~FNAME!" Then
- lastdata = ""
- CommonDialog1.FontName = Mid(linedata, InStr(linedata, "!") + 1)
- ElseIf Left(linedata, 7) = "~FITAL!" Then
- lastdata = ""
- CommonDialog1.FontItalic = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 7) = "~FSIZE!" Then
- lastdata = ""
- CommonDialog1.FontSize = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 7) = "~FBOLD!" Then
- lastdata = ""
- CommonDialog1.FontBold = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 7) = "~COMMW!" Then
- lastdata = ""
- Commwindowshow.Value = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 7) = "~SOUND!" Then
- lastdata = ""
- Soundson.Value = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 8) = "~HEIGHT!" Then
- lastdata = ""
- Form1.Height = Val(Mid(linedata, InStr(linedata, "!") + 1))
- ElseIf Left(linedata, 6) = "~TICK!" Then
- lastdata = ""
- TickCount = Mid(linedata, InStr(linedata, "!") + 1)
- ElseIf Left(linedata, 7) = "~MLIDX!" Then
- lastdata = ""
- LIndex = Val(Mid(linedata, InStr(linedata, "!") + 1))
-
- ElseIf lastdata = "~ML!" Then
- Mudconnect(McI) = Mudconnect(McI) + linedata + vbCrLf
-
- ElseIf Left(linedata, 4) = "~ML!" Then
- lastdata = "~ML!"
- McI = McI + 1
- Mudlist.AddItem Mid(linedata, InStr(linedata, "!") + 1), McI
-
- ElseIf Left(linedata, 4) = "~TR!" Then
- lastdata = "~TR!"
- TrI = TrI + 1
- Trigger.AddItem Mid(linedata, InStr(linedata, "!") + 1), TrI
-
- ElseIf Left(linedata, 4) = "~SD!" Then
- lastdata = "~SD!"
- SdI = SdI + 1
- Sounds.AddItem Mid(linedata, InStr(linedata, "!") + 1), SdI
-
- ElseIf Left(linedata, 4) = "~SP!" Then
- lastdata = ""
- Spe = Spe + 1
-
- SpeechCmds.AddItem Mid(linedata, InStr(linedata, "!") + 1), Spe
- ElseIf Left(linedata, 4) = "~AC!" Then
- lastdata = ""
- Act = Act + 1
- sCommands.AddItem Mid(linedata, InStr(linedata, "!") + 1), Act
- ElseIf Left(linedata, 4) = "~TL!" Then
- lastdata = ""
- Tra = Tra + 1
- Translation.AddItem Mid(linedata, InStr(linedata, "!") + 1), Tra
- ElseIf lastdata = "~TR!" Then
- Triggertxt(TrI) = Triggertxt(TrI) + linedata + vbCrLf
- ElseIf lastdata = "~SD!" Then
- Soundstxt(SdI) = Soundstxt(SdI) + linedata
- Else
- lastdata = ""
- End If
-
- Loop Until EOF(1)
- Close #1
- End If
- If Mudlist.ListCount = 0 Then Mudlist.AddItem "www.imagica.net:4000/Imagica MUD": LIndex = 0
- Mudlist.ListIndex = LIndex
- UpdateW
- End Sub
- Sub SaveAll(datfile As String)
- On Error Resume Next
- If datfile = "users" Then Exit Sub
- Dim i
- Dim ItraDat As Boolean
- ChDir App.Path
- Open "notepad.txt" For Output As #1
- If Not Err Then Print #1, Notepad.Text;
- Close #1
- '~ML~ Mudlist (i) 'mudlist <ip:port>
- 'Mudconnect(i) 'on connect
- '~TR~ Trigger(i)
- 'Triggertxt(i)
- '~AC~Actions(i)
- '~TL~Translation(i)
- '~END~
- If Err Then
- MsgBox "An error occured. please retry action."
- Exit Sub
- End If
- If LCase(datfile) = "itra.dat" Then
- ItraDat = True
- End If
- Open App.Path + "" + datfile For Output As #1
-
- If ItraDat Then
- Print #1, "~CUSER!" + User
- Print #1, "~MLIDX!" + Str(Mudlist.ListIndex)
- If Form1.WindowState = 0 Then
-
- Print #1, "~TOP!" + Str(Form1.Top)
- Print #1, "~LEFT!" + Str(Form1.Left)
- Print #1, "~WIDTH!" + Str(Form1.Width)
- Print #1, "~HEIGHT!" + Str(Form1.Height)
- End If
-
- Print #1, "~STIP!" + Str(showtip.Value)
-
- Print #1, "~BMCL!" + Str(DefaultMudBackcolor)
- Print #1, "~BCCL!" + Str(DefaultComBackcolor)
- Print #1, "~TMCL!" + Str(DefaultMudColor)
- Print #1, "~TCCL!" + Str(DefaultComColor)
-
- Print #1, "~COMMW!" + Str(Commwindowshow.Value)
- Print #1, "~SOUND!" + Str(Soundson.Value)
-
- For i = 0 To 255
- If Mudlist.List(i) <> "" Then
- Print #1, "~ML!" + Mudlist.List(i)
- If Mudconnect(i) <> "" Then
- Print #1, Mudconnect(i);
- If Right(Mudconnect(i), 2) <> vbCrLf Then Print #1, vbCrLf
- End If
- End If
- Next i
-
- Else
-
- Print #1, "~FNAME!" + CommonDialog1.FontName
- Print #1, "~FSIZE!" + Str(CommonDialog1.FontSize)
- Print #1, "~FBOLD!" + Str(CommonDialog1.FontBold)
- Print #1, "~FITAL!" + Str(CommonDialog1.FontItalic)
- If Val(TickCount.Text) <> 0 Then
- Print #1, "~TICK!" + Str(Val(TickCount.Text))
- End If
- For i = 0 To 255
- If Trigger.List(i) <> "" Then
- Print #1, "~TR!" + Trigger.List(i)
- If Triggertxt(i) <> "" Then
- Print #1, Triggertxt(i);
- If Right(Triggertxt(i), 2) <> vbCrLf Then Print #1, vbCrLf
- End If
- End If
- If Sounds.List(i) <> "" Then
- Print #1, "~SD!" + Sounds.List(i)
- If Soundstxt(i) <> "" Then
- Print #1, Soundstxt(i);
- If Right(Soundstxt(i), 2) <> vbCrLf Then Print #1, vbCrLf
- End If
- End If
- If SpeechCmds.List(i) <> "" Then
- Print #1, "~SP!" + SpeechCmds.List(i)
- End If
- If sCommands.List(i) <> "" Then
- Print #1, "~AC!" + sCommands.List(i)
- End If
- If Translation.List(i) <> "" Then
- Print #1, "~TL!" + Translation.List(i)
- End If
- Next i
- End If
- Close #1
- End Sub
- Function Translateit(iEnglish As String) As String
- Dim SearchP
- Dim i
- For i = 0 To SpeechCmds.ListCount - 1
- If iEnglish Like SpeechCmds.List(i) + " *" Then
- SearchP = 1
- Exit For
- Else
- SearchP = 0
- End If
- Next i
- If SearchP = 0 And SpeechCmds.ListCount > 0 Then
- Translateit = iEnglish
- Exit Function
- End If
- For i = 0 To Translation.ListCount - 1
- SearchP = 1
- SearchP = InStr(SearchP, UCase(iEnglish), UCase(EnglishW(i)))
- Do While SearchP > 0
- iEnglish = Left(iEnglish, SearchP - 1) + MuddishW(i) + Mid(iEnglish, SearchP + Len(EnglishW(i)))
- SearchP = SearchP + Len(MuddishW(i))
- SearchP = InStr(SearchP, iEnglish, EnglishW(i))
- Loop
- Next i
- Translateit = iEnglish
- End Function
- Sub TriggerCheck(InComing As String)
- Dim txtincoming
- txtincoming = InComing 'input
- InComing = UCase(InComing)
- If Triggerson.Value = 0 Then Exit Sub
- Dim SearchP
- Dim i
- Dim temptrigger, triggtxt As String
- For i = 0 To Trigger.ListCount - 1
-
- '-------------
- If InStr(Trigger.List(i), "*") Then
- Dim j, tmpfront, tmpback
- Dim vals(9)
- 'txtincoming = UCase(InComing) 'input
- triggtxt = Triggertxt(i) 'output
- temptrigger = UCase(Trigger.List(i))
- If UCase(txtincoming) Like "*" + temptrigger + "*" Then
- SearchP = 1
- Do While Not UCase(txtincoming) Like temptrigger + "*"
- txtincoming = Mid(txtincoming, 2)
- Loop
-
- Do While Not UCase(txtincoming) Like temptrigger
- txtincoming = Left(txtincoming, Len(txtincoming) - 1)
- Loop
- Err.Clear
- On Error Resume Next
- For j = 0 To 9
- txtincoming = Mid(txtincoming, InStr(temptrigger, "*"))
- temptrigger = Mid(temptrigger, InStr(temptrigger, "*") + 1)
- If Err Then Exit For
- Do
- vals(j) = vals(j) + Left(txtincoming, 1)
- txtincoming = Mid(txtincoming, 2)
- Loop Until UCase(txtincoming) Like temptrigger
- Next j
- For j = 0 To 9
- If InStr(triggtxt, "$" + Trim(Str(j))) Then
- tmpfront = InStr(triggtxt, "$" + Trim(Str(j))) - 1
- tmpback = tmpfront + 3
- triggtxt = Left(triggtxt, tmpfront) + vals(j) + Mid(triggtxt, tmpback)
- End If
- Next j
- ' TempTrigger = Triggtxt
- 'TempTrigger = Triggertxt(i)
- SearchP = -1
- End If
-
- '---------------
- Else
- SearchP = 1
- SearchP = InStr(SearchP, InComing, UCase(Trigger.List(i)))
- 'triggtxt = Triggertxt(i)
- End If
- If SearchP > 0 Then
- Socket1.Write Triggertxt(i), Len(Triggertxt(i))
- ElseIf SearchP < 0 Then
- Socket1.Write triggtxt, Len(triggtxt)
- End If
-
- Next i
- End Sub
- Sub SoundCheck(InComing As String)
- On Error Resume Next
- InComing = UCase(InComing)
- If Soundson.Value = 0 Then Exit Sub
- Dim SearchP
- Dim i, iret
- For i = 0 To Sounds.ListCount - 1
- SearchP = 1
- SearchP = InStr(SearchP, InComing, UCase(Sounds.List(i)))
- If SearchP > 0 Then
- Call sndPlaySound(App.Path + "sounds" + Soundstxt(i), &H1 Or &H2 Or &H10)
- 'SND_ASYNC = 1
- 'SND_NODEFAULT = &H2
- 'SND_NOSTOP = &H10
- 'SND_NOWAIT = &H2000
- End If
- Next i
- End Sub
- Sub CommCheck()
- 'If Triggerson.Value = 0 Then Exit Sub
- Dim SearchP
- Dim i
- Dim TempText
- TempText = Textboxtmp.Text
- For i = 0 To sCommands.ListCount - 1
- SearchP = 1
- SearchP = InStr(SearchP, UCase(Textboxtmp.Text), UCase(sCommands.List(i)))
- If SearchP > 0 Then
- 'CommWindow.CommText.SelText = (Left(TempText, InStr(TempText, Chr(10)) + 1))
- Exit For
- End If
- Next i
- If SearchP = 0 Then Exit Sub
- CommWindow.CommText.SelStart = Len(CommWindow.CommText.Text)
- CommWindow.CommText.SelColor = DefaultComColor
- 'CommWindow.CommText.SelText = Textboxtmp.Text
- Dim cri
- Do While InStr(TempText, Chr(10))
- For i = 0 To sCommands.ListCount - 1
- SearchP = 1
- SearchP = InStr(SearchP, UCase(Textboxtmp.Text), UCase(sCommands.List(i)))
- If SearchP > 0 Then
- CommWindow.CommText.SelText = (Left(TempText, InStr(TempText, Chr(10))))
- Exit For
- End If
- Next i
- TempText = Mid(TempText, InStr(TempText, Chr(10)) + 1)
- Loop
- End Sub
- Sub UpdateW()
- Dim i
- For i = 0 To Translation.ListCount - 1
- EnglishW(i) = Left(Translation.List(i), InStr(Translation.List(i), ">") - 1)
- MuddishW(i) = Mid(Translation.List(i), InStr(Translation.List(i), ">") + 1)
- Next i
- End Sub
- Private Sub Command1_Click()
- LoadAll ("users/" + SelUser.List(SelUser.ListIndex))
- ConnectNow
- End Sub
- Private Sub Command10_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- iQuestion = "Give the commands you use to speak your language:"
- iTitle = "Speech"
- iDefault = ""
- tempstring = InputBox(iQuestion, iTitle, iDefault)
- If tempstring <> "" Then SpeechCmds.AddItem tempstring
- End Sub
- Private Sub Command11_Click()
- On Error Resume Next
- SpeechCmds.RemoveItem SpeechCmds.ListIndex
- End Sub
- Private Sub Command12_Click()
- If Command12.Caption = "Pause" Then
- Command12.Caption = "Unpause"
- Command12.Tag = "1"
- Else
- Command12.Caption = "Pause"
- Command12.Tag = "0"
- End If
- Inputtext.SetFocus
- End Sub
- Private Sub Command13_Click()
- SaveAll ("itra.dat")
- SaveAll ("users/" + User)
- End Sub
- Private Sub Command14_Click()
- SaveAll ("itra.dat")
- SaveAll ("users/" + User)
- End Sub
- Private Sub Command15_Click()
- On Error Resume Next
- Dim sChar As String
- sChar = Clipboard.GetText(1)
- Socket1.Write sChar, Len(sChar)
- End Sub
- Private Sub Command16_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- iQuestion = "Give a trigger-value." + vbCrLf
- iTitle = "Setup Sound Trigger"
- iDefault = ""
- tempstring = InputBox(iQuestion, iTitle, iDefault)
- If tempstring <> "" Then Sounds.AddItem tempstring
- If tempstring <> "" Then Soundstxt(Sounds.NewIndex) = ""
- End Sub
- Private Sub Command17_Click()
- On Error Resume Next
- Soundstxt(Sounds.ListIndex) = ""
- Dim i
- For i = Sounds.ListIndex To Sounds.ListCount
- Soundstxt(i) = Soundstxt(i + 1)
- Next i
- Sounds.RemoveItem Sounds.ListIndex
- End Sub
- Private Sub Command18_Click()
- SoundfileSelect.Visible = False
- End Sub
- Private Sub Command19_Click()
- SoundfileSelect.Visible = True
- End Sub
- Private Sub Command2_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- iQuestion = "Give a trigger-value." + vbCrLf + _
- "Use * in place of possible values and " + _
- "Use $0 - $9 in the commands done, " + vbCrLf + _
- "Example: " + vbCrLf + _
- "Incoming text: You get 200 coins" + vbCrLf + _
- "Your trigger on this text: You get * coins" + vbCrLf + _
- "Your command for this trigger: split $0" + vbCrLf
- iTitle = "Setup Trigger"
- iDefault = ""
- tempstring = InputBox(iQuestion, iTitle, iDefault)
- If tempstring <> "" Then Trigger.AddItem tempstring
- If tempstring <> "" Then Triggertxt(Trigger.NewIndex) = ""
- End Sub
- Private Sub Command20_Click()
- Call sndPlaySound(App.Path + "sounds" + SoundFiles.filename, SYNC)
- End Sub
- Private Sub Command21_Click()
- On Error Resume Next
- Call sndPlaySound(App.Path + "sounds" + Soundstxt(Sounds.ListIndex), SYNC)
- End Sub
- Private Sub Command22_Click()
- On Error Resume Next
- Kill App.Path + "users" + Users.filename
- RefreshUsers
- End Sub
- Private Sub Command23_Click()
- On Error Resume Next
- CommonDialog1.Flags = cdlCFBoth ' Flags property must be set
- ' to cdlCFBoth, ' cdlCFPrinterFonts,
- ' or cdlCFScreenFonts before ' using ShowFont method.
- CommonDialog1.ShowFont ' Display Font common dialog box.
- TextBox.Font.Name = CommonDialog1.FontName
- TextBox.Font.Size = CommonDialog1.FontSize
- TextBox.Font.Bold = CommonDialog1.FontBold
- TextBox.Font.Italic = CommonDialog1.FontItalic
- Textboxtmp.Font.Name = CommonDialog1.FontName
- Textboxtmp.Font.Size = CommonDialog1.FontSize
- Textboxtmp.Font.Bold = CommonDialog1.FontBold
- Textboxtmp.Font.Italic = CommonDialog1.FontItalic
- CommWindow.CommText.Font.Name = CommonDialog1.FontName
- CommWindow.CommText.Font.Size = CommonDialog1.FontSize
- CommWindow.CommText.Font.Bold = CommonDialog1.FontBold
- CommWindow.CommText.Font.Italic = CommonDialog1.FontItalic
- End Sub
- Private Sub Command24_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- Dim username
- iTitle = "Setup Trigger"
- iDefault = ""
- iQuestion = "Give the name of the new Character. The new character will get the current settings."
- username = InputBox(iQuestion, iTitle, iDefault)
- If username <> "" Then
- User = username + ".dat"
- End If
-
- SaveAll ("itra.dat")
- SaveAll ("users" + User)
- RefreshUsers
- End Sub
- Private Sub Command25_Click()
- Load Quick_Tip
- Quick_Tip.Show
- End Sub
- Private Sub Command26_Click()
- MsgBox "Select mudwindow Background color"
- CommonDialog1.Color = TextBox.BackColor
- CommonDialog1.ShowColor
- DefaultMudBackcolor = CommonDialog1.Color
- Textboxtmp.BackColor = DefaultMudBackcolor
- TextBox.BackColor = DefaultMudBackcolor
- MsgBox "Select mudwindow Text color"
- CommonDialog1.Color = DefaultMudColor
- CommonDialog1.ShowColor
- DefaultMudColor = CommonDialog1.Color
-
-
- MsgBox "Select Communicationswindow Background color"
- CommonDialog1.Color = CommWindow.CommText.BackColor
- CommonDialog1.ShowColor
- DefaultComBackcolor = CommonDialog1.Color
- CommWindow.CommText.BackColor = DefaultComBackcolor
-
- CommonDialog1.Color = DefaultComColor
- MsgBox "Select Communicationwindow Text color"
- CommonDialog1.ShowColor
- DefaultComColor = CommonDialog1.Color
- End Sub
- Private Sub Command27_Click()
- SoundFiles.Refresh
- End Sub
- Private Sub Command28_Click()
- Dim filenme As String
- MsgBox "Select the .dat file to import settings from."
- CommonDialog1.Filter = ".dat"
- CommonDialog1.ShowOpen
- filenme = CommonDialog1.filename
- If filenme <> "" And Right(filenme, 4) = ".dat" Then
- LoadDat (filenme)
- End If
- End Sub
- Private Sub Command29_Click()
- RefreshUsers
- End Sub
- Private Sub Command3_Click()
- On Error Resume Next
- Triggertxt(Trigger.ListIndex) = ""
- Dim i
- For i = Trigger.ListIndex To Trigger.ListCount
- Triggertxt(i) = Triggertxt(i + 1)
- Next i
- Trigger.RemoveItem Trigger.ListIndex
- End Sub
- Private Sub Command4_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- iQuestion = "Give an part of text that occurs on communication (like ""tells you""."
- iTitle = "Action"
- iDefault = ""
- tempstring = InputBox(iQuestion, iTitle, iDefault)
- If tempstring <> "" Then sCommands.AddItem tempstring
- End Sub
- Private Sub Command5_Click()
- On Error Resume Next
- sCommands.RemoveItem sCommands.ListIndex
- End Sub
- Private Sub Command6_Click()
- On Error Resume Next
- Dim i
- Mudconnect(Mudlist.ListIndex) = ""
- For i = Mudlist.ListIndex To Mudlist.ListCount
- Mudconnect(i) = Mudconnect(i + 1)
- Next i
- Mudlist.RemoveItem Mudlist.ListIndex
- End Sub
- Private Sub Command7_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- Dim mudname, Mudurl, Mudport
- iTitle = "Setup Trigger"
- iDefault = ""
- iQuestion = "Give the description of the mud"
- mudname = InputBox(iQuestion, iTitle, iDefault)
- iQuestion = "Give the port the mud listens on"
- Mudport = InputBox(iQuestion, iTitle, iDefault)
- iQuestion = "Give the IP address/name of the mud (no port)"
- Mudurl = InputBox(iQuestion, iTitle, iDefault)
- Mudlist.AddItem Mudurl + ":" + Mudport + "/" + mudname
- Mudconnect(Mudlist.NewIndex) = ""
- Mudlist.ListIndex = Mudlist.NewIndex
- End Sub
- Private Sub Command8_Click()
- On Error Resume Next
- Translation.RemoveItem Translation.ListIndex
- UpdateW
- End Sub
- Private Sub Command9_Click()
- Dim tempstring As String
- Dim iQuestion, iTitle, iDefault As String
- Dim iEnglish, iMuddish
- iTitle = "Translation"
- iDefault = ""
- iQuestion = "Give a (english) word to translate:" + vbCrLf
- iEnglish = InputBox(iQuestion, iTitle, iDefault)
- iQuestion = "Give the word it should be replaced with:" + vbCrLf
- iMuddish = InputBox(iQuestion, iTitle, iDefault)
- Translation.AddItem iEnglish + ">" + iMuddish
- UpdateW
- End Sub
- Private Sub Commwindowshow_Click()
- If Commwindowshow.Value = 1 Then
- Load CommWindow
- CommWindow.Show
- Else
- Unload CommWindow
- End If
- End Sub
- Private Sub EditSounds_LostFocus()
- On Error Resume Next
- EditSounds.Enabled = False
- Soundstxt(Sounds.ListIndex) = EditSounds.Text
- EditSounds.Text = "Select a trigger to edit"
- End Sub
- Private Sub Edittrigger_Change()
- If Edittrigger.Enabled Then
- Triggertxt(Trigger.ListIndex) = Edittrigger.Text
- End If
- End Sub
- Private Sub Edittrigger_LostFocus()
- On Error Resume Next
- Edittrigger.Enabled = False
- Triggertxt(Trigger.ListIndex) = Edittrigger.Text
- Edittrigger.Text = "Select a trigger to edit"
- End Sub
- Private Sub Form_Load()
- Dim i
- On Error Resume Next
- SelUser.Clear
- If Dir(App.Path + "users*.dat") = "" Then
- MkDir (App.Path + "users")
- End If
-
- Users.Path = App.Path + "users"
- User = "Default.dat"
- Form1.Left = (Screen.Width / 2) - (Form1.Width / 2)
- Form1.Top = (Screen.Height / 2) - (Form1.Height / 2)
- lastcolor = RGB(255, 255, 255)
- versionlabel.Caption = "Imagica Telnet Client V" + Str(App.Major) + "." + Str(App.Minor)
-
- DefaultMudColor = RGB(255, 255, 255)
- DefaultComColor = RGB(255, 255, 255)
-
- If Dir(App.Path + "sounds.") <> "" Then
- SoundFiles.Path = App.Path + "sounds"
- Else
- MkDir App.Path + "sounds"
- MsgBox "Put custom sounds (.WAV) in: " + App.Path + "sounds"
- End If
-
- LoadAll ("itra.dat")
- If User = "" Then
- User = "Default.dat"
- If Dir(App.Path + "usersdefault.dat") = "" Then
- SaveAll ("usersdefault.dat")
- End If
- End If
-
- LoadAll ("users" + User)
-
- RefreshUsers
-
- TextBox.BackColor = DefaultMudBackcolor
- Textboxtmp.BackColor = DefaultMudBackcolor
-
- 'TextBox.Enabled = False
- 'Command1.Default = True
- TextBox.SelColor = DefaultMudColor
- If Commwindowshow.Value = 1 Then
- Load CommWindow
- CommWindow.Show
- End If
-
- 'show tip of the day
- If showtip.Value = 1 Then
- Load Quick_Tip
- Quick_Tip.Show
- End If
-
- End Sub
- Sub RefreshUsers()
- On Error Resume Next
- Dim i
- Users.Refresh
- SelUser.Clear
- For i = 0 To Users.ListCount
- If Users.List(i) <> "" Then SelUser.AddItem Users.List(i)
- Next i
- For i = 0 To SelUser.ListCount - 1
- If SelUser.List(i) = User Then SelUser.ListIndex = i
- Next i
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- SaveAll ("itra.dat")
- SaveAll ("users" + User)
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- SSTab1.Width = Form1.Width - 40
- SSTab1.Height = Form1.Height - 320
- Notepad.Width = Form1.Width - 270
- Notepad.Height = SSTab1.Height - 770
- TextBox.Width = Form1.Width - 270
- TextBox.Height = Form1.Height - (TextBox.Top + (Inputtext.Height * 3))
- TextBox.RightMargin = TextBox.Width - 350
- Inputtext.Top = TextBox.Top + TextBox.Height
- Inputtext.Width = TextBox.Width
- StatusBar.Top = Inputtext.Top + Inputtext.Height
- StatusBar.Width = Inputtext.Width
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- If Socket1.Connected Then Socket1.Disconnect
- End
- End Sub
- Private Sub Inputtext_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyPageUp Or KeyCode = vbKeyPageDown Then
- TextBox.SetFocus
- KeyCode = 0
- End If
- End Sub
- Private Sub inputtext_KeyPress(KeyAscii As Integer)
- Dim sChar As String
- Dim retval, foundi, i
- If KeyAscii = 13 Then
- 'KeyAscii = 0
- ' sChar = Chr$(KeyAscii)
- ' Socket1.SendLen = Len(InputBox.Text)
- If Translate.Value = 1 Then
- sChar = Translateit(Inputtext.Text) + vbCrLf
- Else
- sChar = Inputtext.Text + vbCrLf
- End If
- If Socket1.Connected Then
- Socket1.Write sChar, Len(sChar)
- End If
- Inputtext.AddItem Inputtext.Text
-
- Dim Templist
- Templist = Inputtext.List(Inputtext.NewIndex)
- For i = Inputtext.NewIndex To 0 Step -1
- Inputtext.List(i) = Inputtext.List(i - 1)
- Next i
- Inputtext.List(0) = Templist
-
- If Inputtext.ListCount > 15 Then Inputtext.RemoveItem 15
- Inputtext.Text = ""
- End If
- 'KeyAscii = 0
- End Sub
- Private Sub Mudlist_Click()
- On Error Resume Next
- Dim tempstring
- Outputonconnect.Enabled = True
- Outputonconnect.Text = Mudconnect(Mudlist.ListIndex)
- tempstring = Mudlist.List(Mudlist.ListIndex)
- Mudurl = Mid(tempstring, 1, InStr(tempstring, ":") - 1)
- Mudport = Mid(tempstring, InStr(tempstring, ":") + 1, (InStr(tempstring, "/") - InStr(tempstring, ":")) - 1)
- mudname = Mid(tempstring, InStr(tempstring, "/") + 1)
- End Sub
- Private Sub mudtime_Click()
- Timer1.Tag = ""
- Inputtext.SetFocus
- End Sub
- Private Sub Outputonconnect_Change()
- If Outputonconnect.Enabled Then
- Mudconnect(Mudlist.ListIndex) = Outputonconnect.Text
- End If
- End Sub
- Private Sub Outputonconnect_LostFocus()
- Outputonconnect.Enabled = False
- Mudconnect(Mudlist.ListIndex) = Outputonconnect.Text
- Outputonconnect.Text = "Select a Mud to edit it's connectoutput"
- End Sub
- Private Sub SelUser_Change()
- On Error Resume Next
- User = SelUser.List(SelUser.ListIndex)
- LoadAll ("users" + User)
- End Sub
- Private Sub SelUser_Click()
- On Error Resume Next
- User = SelUser.List(SelUser.ListIndex)
- LoadAll ("users" + User)
- End Sub
- Private Sub SelUser_LostFocus()
- On Error Resume Next
- User = SelUser.List(SelUser.ListIndex)
- LoadAll ("users" + User)
- End Sub
- Private Sub Showcommw_Click()
- If Commwindowshow.Value = 1 Then
- Commwindowshow.Value = 0
- Commwindowshow_Click
-
- Else
- Commwindowshow = 1
- End If
- End Sub
- Private Sub Socket1_Connect()
- Screen.MousePointer = 0 ' Normal
- StatusBar.Caption = "Disconnect"
- Command1.Enabled = True
- ' TextBox.Enabled = True
- TextBox.SetFocus
- If Len(Socket1.PeerName) > 0 Then
- SocketState(0).Visible = False
- SocketState(1).Visible = True
- Command1.Caption = "Disconnect"
- TextBox.SelStart = Len(TextBox.Text)
- TextBox.SelColor = RGB(255, 255, 255)
- TextBox.SelText = "#Connected to: " + Socket1.PeerName + vbCrLf
- StatusBar.Caption = "Connected to: " + Socket1.PeerName
- Socket1.Write Mudconnect(Mudlist.ListIndex), Len(Mudconnect(Mudlist.ListIndex))
- SSTab1.Tab = 0
- End If
- End Sub
- Private Sub Socket1_Disconnect()
- SocketState(1).Visible = False
- SocketState(0).Visible = True
- TextBox.SelStart = Len(TextBox.Text)
- TextBox.SelColor = RGB(255, 255, 255)
- TextBox.SelText = "#Disconnected from: " + Socket1.PeerName + vbCrLf
- Socket1.Disconnect
- StatusBar.Caption = "Not Connected. (Imagica Telnet Client)"
- ' TextBox.Text = ""
- ' TextBox.Enabled = False
- Command1.Caption = "Connect"
- Command1.Enabled = True
- End Sub
- Private Sub Socket1_LastError(ErrCode As Integer, ErrMsg As String, Response As Integer)
- MsgBox ErrMsg, 48, Form1.Caption
- Command1.Enabled = True
- End Sub
- Private Sub Socket1_Read(DataLength As Integer, IsUrgent As Integer)
- Dim sBuffer As String, sOutput As String, sReply As String
- Dim nRead As Integer, nIndex As Integer, nChar As Integer
- Dim nCmd As Integer, nOpt As Integer, nQual As Integer
- nRead = Socket1.Read(sBuffer, DataLength)
- nIndex = 1
- While nIndex <= nRead
- nChar = Asc(Mid$(sBuffer, nIndex, 1))
- '
- ' If this is the Telnet IAC (Is A Command) character, then
- ' the next byte is the command
- '
- If nChar = TELCMD_IAC Then
- nIndex = nIndex + 1: nCmd = Asc(Mid$(sBuffer, nIndex, 1))
- Select Case nCmd
- '
- ' Two IAC bytes means that this isn't really a command
- '
- Case TELCMD_IAC
- sOutput = sOutput + Chr$(nChar)
- '
- ' The SB (sub-option) command tells us that the server
- ' wants to negotiate. In this case, the only sub-option
- ' that we will deal with is the terminal type
- '
- Case TELCMD_SB
- nIndex = nIndex + 1: nOpt = Asc(Mid$(sBuffer, nIndex, 1))
- nIndex = nIndex + 1: nQual = Asc(Mid$(sBuffer, nIndex, 1))
- If nOpt = TELOPT_TTYPE Then
- '
- ' Build a sub-option reply string and send it to
- ' the server. In this case, we're saying that we are
- ' a DEC VT100 terminal
- '
- sReply = Chr$(TELCMD_IAC) + Chr$(TELCMD_SB) + Chr$(nOpt) + Chr$(TELQUAL_IS) + "DEC-VT100" + Chr$(TELCMD_IAC) + Chr$(TELCMD_SE)
- Socket1.Write sReply, Len(sReply)
- End If
- '
- ' The DO, DONT, WILL and WONT commands are sent by the server
- ' to tell us what it is capable (or not capable) of, and the
- ' options that it would like us to use; the next byte is the
- ' option code
- '
- Case TELCMD_DO, TELCMD_DONT, TELCMD_WILL, TELCMD_WONT
- nIndex = nIndex + 1: nOpt = Asc(Mid$(sBuffer, nIndex, 1))
- Select Case nOpt
- '
- ' The only options that we'll deal with is binary mode,
- ' echo and terminal type
- '
- Case TELOPT_BINARY, TELOPT_ECHO, TELOPT_TTYPE
- If nCmd = TELCMD_DO Then
- sReply = Chr$(TELCMD_IAC) + Chr$(TELCMD_WILL) + Chr$(nOpt)
- Socket1.Write sReply, 3
- ElseIf nCmd = TELCMD_WILL Then
- sReply = Chr$(TELCMD_IAC) + Chr$(TELCMD_DO) + Chr$(nOpt)
- Socket1.Write sReply, 3
- End If
- '
- ' For anything else, tell the server that we wont
- ' support it, or don't want the server to
- '
- Case Else
- If nCmd = TELCMD_DO Then
- sReply = Chr$(TELCMD_IAC) + Chr$(TELCMD_WONT) + Chr$(nOpt)
- Socket1.Write sReply, 3
- ElseIf nCmd = TELCMD_WILL Then
- sReply = Chr$(TELCMD_IAC) + Chr$(TELCMD_DONT) + Chr$(nOpt)
- Socket1.Write sReply, 3
- End If
- End Select
- End Select
- Else
- sOutput = sOutput + Chr$(nChar)
- End If
- nIndex = nIndex + 1
- Wend
- '
- ' Append the output to the edit control
- '
- If Len(sOutput) > 0 Then
- ' TextBox.SelStart = 65535: TextBox.SelLength = 0
- Dim TempStart
- ' TempStart = Len(TextBox.Text)
- ' TextBox.Text = TextBox.Text + sOutput
- ' ReplaceStringColors (TempStart)
-
- Textboxtmp.TextRTF = Textboxtmp.TextRTF + sOutput
- If Command12.Tag = "1" Then
- ' TextBox.SelStart = OlSelstart
- ' TextBox.SelLength = OlSellength
- Else
- Dim OlSelstart, OlSellength
-
- AddColText (sOutput)
-
- ' Dim Soutput2, OutputLn
- ' Soutput2 = sOutput + vbCrLf
- ' Do While Soutput2 <> ""
- ' OutputLn = Left(Soutput2, InStr(Soutput2, vbCrLf) - 1)
- ' Soutput2 = Mid(Soutput2, InStr(Soutput2, vbCrLf) + 2)
- ' If OutputLn = "" Then OutputLn = Soutput2
-
- TriggerCheck (sOutput)
- ' Loop
-
- SoundCheck (sOutput)
- If Commwindowshow.Value Then CommCheck
-
- TextBox.SelStart = Len(TextBox.TextRTF)
- TextBox.SelLength = 0
- TextBox.SelRTF = Textboxtmp.TextRTF
- Textboxtmp.TextRTF = ""
- TextBox.SelStart = Len(TextBox.TextRTF)
- End If
- ' TextBox.SelStart = Len(TextBox.Text)
- 'replace ANSI color codes with RTF colors
- End If
- End Sub
- Public Function retColorCode(ByVal cd As String)
- '4 underlind 1 fat 2 Dark
- Select Case Val(cd)
- Case 0 'for normal display
- retColorCode = RGB(240, 240, 240)
- Case 1 'for bold on
- retColorCode = 1
- Case 2 'for Dark on
- retColorCode = 2
- Case 4 ' underline (mono only)
- retColorCode = 4
- Case 5 ' blink on
- retColorCode = RGB(240, 240, 240)
- Case 7 'reverse video on
- retColorCode = RGB(240, 240, 240)
- Case 8 'nondisplayed (invisible)
- retColorCode = RGB(0, 0, 0)
- Case 30 'black foreground
- retColorCode = RGB(0, 0, 0)
- Case 31 'red foreground
- retColorCode = RGB(240, 0, 0)
- Case 32 'green foreground
- retColorCode = RGB(0, 240, 0)
- Case 33 'yellow foreground
- retColorCode = RGB(240, 240, 0)
- Case 34 'blue foreground
- retColorCode = RGB(0, 0, 240)
- Case 35 'magenta foreground
- retColorCode = RGB(240, 0, 240)
- Case 36 'cyan foreground
- retColorCode = RGB(0, 240, 240)
- Case 37 'white foreground
- retColorCode = RGB(240, 240, 240)
- Case 40 'black background
- retColorCode = "#FFFFFF"
- Case 41 'red background
- retColorCode = "#FFFFFF"
- Case 42 'green background
- retColorCode = "#FFFFFF"
- Case 43 'yellow background
- retColorCode = "#FFFFFF"
- Case 44 'blue background
- retColorCode = "#FFFFFF"
- Case 45 'magenta background
- retColorCode = "#FFFFFF"
- Case 46 'cyan background
- retColorCode = "#FFFFFF"
- Case 47 'white background
- retColorCode = "#FFFFFF"
- End Select
- End Function
- Private Sub socketstate_Click(Index As Integer)
- LoadAll ("users/" + SelUser.List(SelUser.ListIndex))
- ConnectNow
- End Sub
- Private Sub SoundFiles_DblClick()
- On Error Resume Next
- Soundstxt(Sounds.ListIndex) = SoundFiles.filename
- 'SoundfileSelect.Visible = False
- End Sub
- Private Sub Sounds_Click()
- On Error Resume Next
- EditSounds.Enabled = True
- EditSounds.SetFocus
- EditSounds.Text = Soundstxt(Sounds.ListIndex)
- End Sub
- Private Sub SSTab1_Click(PreviousTab As Integer)
- TextBox.TextRTF = TextBox.TextRTF
- TextBox.SelStart = Len(TextBox.Text)
- TextBox.SelLength = 0
- Inputtext.SetFocus
- End Sub
- Private Sub talkstate_Click(Index As Integer)
- If Translate.Value = 1 Then
- talkstate(1).Visible = False
- talkstate(0).Visible = True
- Translate.Value = 0
- Else
- talkstate(0).Visible = False
- talkstate(1).Visible = True
- Translate.Value = 1
- End If
- End Sub
- Private Sub EditSounds_Change()
- On Error Resume Next
- If EditSounds.Enabled Then
- Soundstxt(Sounds.ListIndex) = EditSounds.Text
- End If
- End Sub
- Private Sub TextBox_Change()
- If Len(TextBox.Text) > 10000 Then
- TextBox.SelStart = 0
- TextBox.SelLength = 2000
- TextBox.SelText = ""
-
- 'TextBox.SelColor = RGB(255, 255, 255)
- TextBox.SelStart = 31000
- TextBox.SelLength = 0
-
- End If
- End Sub
- Private Sub TextBox_KeyPress(KeyAscii As Integer)
- Inputtext.SetFocus
- Inputtext.Text = Inputtext.Text + Chr(KeyAscii)
- Inputtext.SelStart = Len(Inputtext.Text)
- If Chr(KeyAscii) Like "[A-Za-z0-9]" Then
- KeyAscii = 0
- End If
- 'KeyAscii = 0
- End Sub
- Private Sub TextBox_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Command12.Caption = "Unpause"
- Command12.Tag = "1"
- End Sub
- Private Sub TextBox_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Command12.Caption = "Pause"
- Command12.Tag = "0"
- If TextBox.SelText <> "" Then Clipboard.SetText TextBox.SelText, 1
- End Sub
- Private Sub tickcount_Change()
- If Val(TickCount) < 1 Then
- Mudtime.Visible = False
- Timer1.Enabled = False
- Else
- Mudtime.Visible = True
- Timer1.Enabled = True
- End If
- End Sub
- Private Sub Timer1_Timer()
- Timer1.Tag = Str(Val(Timer1.Tag) + 1)
- If Val(Timer1.Tag) >= Val(TickCount.Text) Then
- Timer1.Tag = ""
- Mudtime.Enabled = True
- End If
- If Val(TickCount.Text) - Val(Timer1.Tag) < 5 Then Mudtime.Enabled = Not Mudtime.Enabled
- Mudtime.Caption = "Tick: " + Str(Val(TickCount.Text) - Val(Timer1.Tag))
- End Sub
- Private Sub Trigger_Click()
- On Error Resume Next
- Edittrigger.Enabled = True
- Edittrigger.SetFocus
- Edittrigger.Text = Triggertxt(Trigger.ListIndex)
- End Sub
- Private Sub triggerstate_Click(Index As Integer)
- On Error Resume Next
- If Triggerson.Value = 1 Then
- triggerstate(1).Visible = False
- triggerstate(0).Visible = True
- Triggerson.Value = 0
- Else
- triggerstate(0).Visible = False
- triggerstate(1).Visible = True
- Triggerson.Value = 1
- End If
- End Sub