Unknown command
From VbGORE Visual Basic Online RPG Engine
Normally in vbGORE, if you type a command that is not on the command list, it will be said as normal text. I wanted to change this an add a 'Unknown Command' message :)
In the GameClient, in Input.bas, search for <vb>Private Function Input_GetCommand(ByVal CommandString As String) As Boolean</vb>
Then, above or underneath that function, add <vb>Private Function Input_UnknownCommand() As Boolean
'***************************************************************** 'Checks if the command started with / '*****************************************************************
'Check for the command passed If (Left$(EnterTextBuffer, 1)) = "/" Then Input_UnknownCommand = True Else Input_UnknownCommand = False
End Function</vb>
Now, also in Input.bas, search for
<vb>'*** No commands sent, send as text ***</vb>
You should find this: <vb> Else
'*** No commands sent, send as text ***
EnterTextBuffer = Trim$(EnterTextBuffer)
sndBuf.Allocate 2 + Len(EnterTextBuffer)
sndBuf.Put_Byte DataCode.Comm_Talk
sndBuf.Put_String EnterTextBuffer
'We just sent a chat message, so check if it had triggers!
Engine_NPCChat_CheckForChatTriggers EnterTextBuffer
End If</vb>
ABOVE that block (including the else) add this code:
<vb> ElseIf Input_UnknownCommand Then
Engine_AddToChatTextBuffer "Unknown Command", FontColor_Info</vb>