Mirage Engine
Adding Minimum Message Length - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Adding Minimum Message Length (/showthread.php?tid=52)



Adding Minimum Message Length - Tutorial Bot - 01-06-2006

Author: Renegade
Difficulty: 1/5

This will increase the amount of characters per line someone must type for it to be sent.

:: CLIENT SIDE ::
Find:
Code:
' Broadcast message
        If Mid(MyText, 1, 1) = "'" Then
              ChatText = Mid(MyText, 2, Len(MyText) - 1)
              If Len(Trim(ChatText)) > 0 Then
                  Call BroadcastMsg(ChatText)
              End If
              MyText = ""
              Exit Sub
        End If
Replace with:
Code:
' Broadcast message
        If Mid(MyText, 1, 1) = "'" Then
              ChatText = Mid(MyText, 2, Len(MyText) - 1)
              If Len(Trim(ChatText)) > 10 Then
                  Call BroadcastMsg(ChatText)
              End If
              MyText = ""
              Exit Sub
        End If
Find:
Code:
' Global Message
              If Mid(MyText, 1, 1) = """" Then
                  ChatText = Mid(MyText, 2, Len(MyText) - 1)
                  If Len(Trim(ChatText)) > 0 Then
                      Call GlobalMsg(ChatText)
                  End If
                  MyText = ""
                  Exit Sub
              End If
Replace with:
Code:
' Global Message
              If Mid(MyText, 1, 1) = """" Then
                  ChatText = Mid(MyText, 2, Len(MyText) - 1)
                  If Len(Trim(ChatText)) > 10 Then
                      Call GlobalMsg(ChatText)
                  End If
                  MyText = ""
                  Exit Sub
              End If
Change the "> 10" to how many letters you want each message to be.

That's all!