Page 4 of 16 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 159

Thread: True A.I. for gore

  1. #31
    Join Date
    Mar 2006
    Location
    10 minutes from samans house
    Posts
    1,244
    They didn't block me from the forums.
  2. #32
    Join Date
    Dec 2005
    Location
    Central California
    Posts
    4,824
    LOL I'd reinstall Gore just to see this BS. sounds pretty funny.

    by "mocking" does it mean copying what a player does or follows them and does a bunch of animated moves? either way sounds goddamn funny imo.

    "ill give ur mom the short end of the stick " - Destruction
  3. #33
    Join Date
    Oct 2006
    Posts
    165
    Dave: see it?


    or r u not r33t enough?
    Attached Images Attached Images
  4. #34
    Join Date
    Oct 2006
    Posts
    165
    this is gonna be a long post, it's my algorithum code for gore. "open source"


    Code:
    Option Explicit
    Private Const OFFSET_4 = 4294967296#
    Private Const MAXINT_4 = 2147483647
    Private Const S11 = 7
    Private Const S12 = 12
    Private Const S13 = 17
    Private Const S14 = 22
    Private Const S21 = 5
    Private Const S22 = 9
    Private Const S23 = 14
    Private Const S24 = 20
    Private Const S31 = 4
    Private Const S32 = 11
    Private Const S33 = 16
    Private Const S34 = 23
    Private Const S41 = 6
    Private Const S42 = 10
    Private Const S43 = 15
    Private Const S44 = 21
    Private State(4) As Long
    Private ByteCounter As Long
    Private ByteBuffer(63) As Byte
    Private m_lOnBits(30)   As Long
    Private m_l2Power(30)   As Long
    Private Const BITS_TO_A_BYTE  As Long = 8
    Private Const BYTES_TO_A_WORD As Long = 4
    Private Const BITS_TO_A_WORD  As Long = BYTES_TO_A_WORD * BITS_TO_A_BYTE
    Private Property Get RegisterA() As String
        RegisterA = State(1)
    End Property
    Private Property Get RegisterB() As String
        RegisterB = State(2)
    End Property
    Private Property Get RegisterC() As String
        RegisterC = State(3)
    End Property
    Private Property Get RegisterD() As String
        RegisterD = State(4)
    End Property
    Private Sub Class_Initialize()
        m_lOnBits(0) = 1
        m_lOnBits(1) = 3
        m_lOnBits(2) = 7
        m_lOnBits(3) = 15
        m_lOnBits(4) = 31
        m_lOnBits(5) = 63
        m_lOnBits(6) = 127
        m_lOnBits(7) = 255
        m_lOnBits(8) = 511
        m_lOnBits(9) = 1023
        m_lOnBits(10) = 2047
        m_lOnBits(11) = 4095
        m_lOnBits(12) = 8191
        m_lOnBits(13) = 16383
        m_lOnBits(14) = 32767
        m_lOnBits(15) = 65535
        m_lOnBits(16) = 131071
        m_lOnBits(17) = 262143
        m_lOnBits(18) = 524287
        m_lOnBits(19) = 1048575
        m_lOnBits(20) = 2097151
        m_lOnBits(21) = 4194303
        m_lOnBits(22) = 8388607
        m_lOnBits(23) = 16777215
        m_lOnBits(24) = 33554431
        m_lOnBits(25) = 67108863
        m_lOnBits(26) = 134217727
        m_lOnBits(27) = 268435455
        m_lOnBits(28) = 536870911
        m_lOnBits(29) = 1073741823
        m_lOnBits(30) = 2147483647
        m_l2Power(0) = 1
        m_l2Power(1) = 2
        m_l2Power(2) = 4
        m_l2Power(3) = 8
        m_l2Power(4) = 16
        m_l2Power(5) = 32
        m_l2Power(6) = 64
        m_l2Power(7) = 128
        m_l2Power(8) = 256
        m_l2Power(9) = 512
        m_l2Power(10) = 1024
        m_l2Power(11) = 2048
        m_l2Power(12) = 4096
        m_l2Power(13) = 8192
        m_l2Power(14) = 16384
        m_l2Power(15) = 32768
        m_l2Power(16) = 65536
        m_l2Power(17) = 131072
        m_l2Power(18) = 262144
        m_l2Power(19) = 524288
        m_l2Power(20) = 1048576
        m_l2Power(21) = 2097152
        m_l2Power(22) = 4194304
        m_l2Power(23) = 8388608
        m_l2Power(24) = 16777216
        m_l2Power(25) = 33554432
        m_l2Power(26) = 67108864
        m_l2Power(27) = 134217728
        m_l2Power(28) = 268435456
        m_l2Power(29) = 536870912
        m_l2Power(30) = 1073741824
    End Sub
    Public Function Write_Gore_Auth_String(CDKEY As String, SEED_AuthString As String) As String
    On Error Resume Next
    Write_Gore_Auth_String = "I" & MD5_raw(CDKEY) & SHA1(SEED_AuthString)
    End Function
    Private Function LShift(ByVal lValue As Long, ByVal iShiftBits As Integer) As Long
        If iShiftBits = 0 Then
            LShift = lValue
            Exit Function
        ElseIf iShiftBits = 31 Then
            If lValue And 1 Then
                LShift = &H80000000
            Else
                LShift = 0
            End If
            Exit Function
        ElseIf iShiftBits <0> 31 Then
            Err.Raise 6
        End If
        If &#40;lValue And m_l2Power&#40;31 - iShiftBits&#41;&#41; Then
            LShift = &#40;&#40;lValue And m_lOnBits&#40;31 - &#40;iShiftBits + 1&#41;&#41;&#41; * _
            m_l2Power&#40;iShiftBits&#41;&#41; Or &H80000000
        Else
            LShift = &#40;&#40;lValue And m_lOnBits&#40;31 - iShiftBits&#41;&#41; * _
            m_l2Power&#40;iShiftBits&#41;&#41;
        End If
    End Function
    Private Function RShift&#40;ByVal lValue As Long, ByVal iShiftBits As Integer&#41; As Long
        If iShiftBits = 0 Then
            RShift = lValue
            Exit Function
        ElseIf iShiftBits = 31 Then
            If lValue And &H80000000 Then
                RShift = 1
            Else
                RShift = 0
            End If
            Exit Function
        ElseIf iShiftBits <0> 31 Then
            Err.Raise 6
        End If
        RShift = &#40;lValue And &H7FFFFFFE&#41; \ m_l2Power&#40;iShiftBits&#41;
        If &#40;lValue And &H80000000&#41; Then
            RShift = &#40;RShift Or &#40;&H40000000 \ m_l2Power&#40;iShiftBits - 1&#41;&#41;&#41;
        End If
    End Function
    Private Function AddUnsigned&#40;ByVal lX As Long, ByVal lY As Long&#41; As Long
        Dim lX4     As Long
        Dim lY4     As Long
        Dim lX8     As Long
        Dim lY8     As Long
        Dim lResult As Long
     
        lX8 = lX And &H80000000
        lY8 = lY And &H80000000
        lX4 = lX And &H40000000
        lY4 = lY And &H40000000
     
        lResult = &#40;lX And &H3FFFFFFF&#41; + &#40;lY And &H3FFFFFFF&#41;
     
        If lX4 And lY4 Then
            lResult = lResult Xor &H80000000 Xor lX8 Xor lY8
        ElseIf lX4 Or lY4 Then
            If lResult And &H40000000 Then
                lResult = lResult Xor &HC0000000 Xor lX8 Xor lY8
            Else
                lResult = lResult Xor &H40000000 Xor lX8 Xor lY8
            End If
        Else
            lResult = lResult Xor lX8 Xor lY8
        End If
     
        AddUnsigned = lResult
    End Function
    Private Function LRot&#40;ByVal x As Long, ByVal n As Long&#41; As Long
        LRot = LShift&#40;x, n&#41; Or RShift&#40;x, &#40;32 - n&#41;&#41;
    End Function
    Private Function ConvertToWordArray&#40;sMessage As String&#41; As Long&#40;&#41;
        Dim lMessageLength  As Long
        Dim lNumberOfWords  As Long
        Dim lWordArray&#40;&#41;    As Long
        Dim lBytePosition   As Long
        Dim lByteCount      As Long
        Dim lWordCount      As Long
        Dim lByte           As Long
        
        Const MODULUS_BITS      As Long = 512
        Const CONGRUENT_BITS    As Long = 448
        
        lMessageLength = Len&#40;sMessage&#41;
        
        lNumberOfWords = &#40;&#40;&#40;lMessageLength + _
            &#40;&#40;MODULUS_BITS - CONGRUENT_BITS&#41; \ BITS_TO_A_BYTE&#41;&#41; \ _
            &#40;MODULUS_BITS \ BITS_TO_A_BYTE&#41;&#41; + 1&#41; * _
            &#40;MODULUS_BITS \ BITS_TO_A_WORD&#41;
        ReDim lWordArray&#40;lNumberOfWords - 1&#41;
        
        lBytePosition = 0
        lByteCount = 0
        Do Until lByteCount >= lMessageLength
            lWordCount = lByteCount \ BYTES_TO_A_WORD
            
            lBytePosition = &#40;3 - &#40;lByteCount Mod BYTES_TO_A_WORD&#41;&#41; * BITS_TO_A_BYTE
            
            lByte = AscB&#40;Mid&#40;sMessage, lByteCount + 1, 1&#41;&#41;
            
            lWordArray&#40;lWordCount&#41; = lWordArray&#40;lWordCount&#41; Or LShift&#40;lByte, lBytePosition&#41;
            lByteCount = lByteCount + 1
        Loop
    
        lWordCount = lByteCount \ BYTES_TO_A_WORD
        lBytePosition = &#40;3 - &#40;lByteCount Mod BYTES_TO_A_WORD&#41;&#41; * BITS_TO_A_BYTE
    
        lWordArray&#40;lWordCount&#41; = lWordArray&#40;lWordCount&#41; Or _
            LShift&#40;&H80, lBytePosition&#41;
    
        lWordArray&#40;lNumberOfWords - 1&#41; = LShift&#40;lMessageLength, 3&#41;
        lWordArray&#40;lNumberOfWords - 2&#41; = RShift&#40;lMessageLength, 29&#41;
        
        ConvertToWordArray = lWordArray
    End Function
    Private Function SHA1&#40;sMessage As String&#41; As String
        Dim HASH&#40;4&#41;         As Long
        Dim M&#40;&#41;             As Long
        Dim W&#40;79&#41;           As Long
        Dim a, B, c, d, e   As Long
        Dim G, h, i, j      As Long
        Dim T1, T2          As Long
        
        HASH&#40;0&#41; = &H67452301
        HASH&#40;1&#41; = &HEFCDAB89
        HASH&#40;2&#41; = &H98BADCFE
        HASH&#40;3&#41; = &H10325476
        HASH&#40;4&#41; = &HC3D2E1F0
        
        M = ConvertToWordArray&#40;sMessage&#41;
        
        For i = 0 To UBound&#40;M&#41; Step 16
            a = HASH&#40;0&#41;
            B = HASH&#40;1&#41;
            c = HASH&#40;2&#41;
            d = HASH&#40;3&#41;
            e = HASH&#40;4&#41;
            
            For G = 0 To 15
                W&#40;G&#41; = M&#40;i + G&#41;
            Next G
            
            For G = 16 To 79
                W&#40;G&#41; = LRot&#40;W&#40;G - 3&#41; Xor W&#40;G - 8&#41; Xor W&#40;G - 14&#41; Xor W&#40;G - 16&#41;, 1&#41;
            Next G
            
            For j = 0 To 79
                
                If j <= 19 Then
                    T1 = &#40;B And c&#41; Or &#40;&#40;Not B&#41; And d&#41;
                    T2 = &H5A827999
                ElseIf j <= 39 Then
                    T1 = B Xor c Xor d
                    T2 = &H6ED9EBA1
                ElseIf j <= 59 Then
                    T1 = &#40;B And c&#41; Or &#40;B And d&#41; Or &#40;c And d&#41;
                    T2 = &H8F1BBCDC
                ElseIf j <= 79 Then
                    T1 = B Xor c Xor d
                    T2 = &HCA62C1D6
                End If
                
                h = AddUnsigned&#40;AddUnsigned&#40;AddUnsigned&#40;AddUnsigned&#40;LRot&#40;a, 5&#41;, T1&#41;, e&#41;, T2&#41;, W&#40;j&#41;&#41;
                e = d
                d = c
                c = LRot&#40;B, 30&#41;
                B = a
                a = h
            Next j
                
            HASH&#40;0&#41; = AddUnsigned&#40;a, HASH&#40;0&#41;&#41;
            HASH&#40;1&#41; = AddUnsigned&#40;B, HASH&#40;1&#41;&#41;
            HASH&#40;2&#41; = AddUnsigned&#40;c, HASH&#40;2&#41;&#41;
            HASH&#40;3&#41; = AddUnsigned&#40;d, HASH&#40;3&#41;&#41;
            HASH&#40;4&#41; = AddUnsigned&#40;e, HASH&#40;4&#41;&#41;
            
        Next i
        
        SHA1 = LCase&#40;Right&#40;"00000000" & Hex&#40;HASH&#40;0&#41;&#41;, 8&#41; & _
            Right&#40;"00000000" & Hex&#40;HASH&#40;1&#41;&#41;, 8&#41; & _
            Right&#40;"00000000" & Hex&#40;HASH&#40;2&#41;&#41;, 8&#41; & _
            Right&#40;"00000000" & Hex&#40;HASH&#40;3&#41;&#41;, 8&#41; & _
            Right&#40;"00000000" & Hex&#40;HASH&#40;4&#41;&#41;, 8&#41;&#41;
    End Function
    Private Function MD5_raw&#40;SourceString As String&#41; As String
    On Error Resume Next
    MD5Init
    MD5Update Len&#40;SourceString&#41;, StringToArray&#40;SourceString&#41;
    MD5Final
    MD5_raw = LCase&#40;GetValues&#41;
    End Function
    Private Function StringToArray&#40;InString As String&#41; As Byte&#40;&#41;
    On Error Resume Next
    Dim i As Integer, bytBuffer&#40;&#41; As Byte
    ReDim bytBuffer&#40;Len&#40;InString&#41;&#41;
    For i = 0 To Len&#40;InString&#41; - 1
        bytBuffer&#40;i&#41; = Asc&#40;Mid&#40;InString, i + 1, 1&#41;&#41;
    Next i
    StringToArray = bytBuffer
    End Function
    Private Function GetValues&#40;&#41; As String
    On Error Resume Next
        GetValues = LongToString&#40;State&#40;1&#41;&#41; & LongToString&#40;State&#40;2&#41;&#41; & LongToString&#40;State&#40;3&#41;&#41; & LongToString&#40;State&#40;4&#41;&#41;
    End Function
    Private Function LongToString&#40;Num As Long&#41; As String
    On Error Resume Next
    Dim a As Byte, B As Byte, c As Byte, d As Byte
    a = Num And &HFF&
    If a < 16 Then
        LongToString = "0" & Hex&#40;a&#41;
    Else
        LongToString = Hex&#40;a&#41;
    End If
    B = &#40;Num And &HFF00&&#41; \ 256
    If B < 16 Then
        LongToString = LongToString & "0" & Hex&#40;B&#41;
    Else
        LongToString = LongToString & Hex&#40;B&#41;
    End If
    c = &#40;Num And &HFF0000&#41; \ 65536
    If c < 16 Then
        LongToString = LongToString & "0" & Hex&#40;c&#41;
    Else
        LongToString = LongToString & Hex&#40;c&#41;
    End If
    If Num < 0 Then
        d = &#40;&#40;Num And &H7F000000&#41; \ 16777216&#41; Or &H80&
    Else
        d = &#40;Num And &HFF000000&#41; \ 16777216
    End If
    If d < 16 Then
        LongToString = LongToString & "0" & Hex&#40;d&#41;
    Else
        LongToString = LongToString & Hex&#40;d&#41;
    End If
    End Function
    Private Sub MD5Init&#40;&#41;
    On Error Resume Next
        ByteCounter = 0
        State&#40;1&#41; = UnsignedToLong&#40;1732584193#&#41;
        State&#40;2&#41; = UnsignedToLong&#40;4023233417#&#41;
        State&#40;3&#41; = UnsignedToLong&#40;2562383102#&#41;
        State&#40;4&#41; = UnsignedToLong&#40;271733878#&#41;
    End Sub
    Private Sub MD5Final&#40;&#41;
    On Error Resume Next
    Dim dblBits As Double, Padding&#40;72&#41; As Byte, lngBytesBuffered As Long
        Padding&#40;0&#41; = &H80
        dblBits = ByteCounter * 8
        lngBytesBuffered = ByteCounter Mod 64
        If lngBytesBuffered <56>= lngBufferRemaining Then
        For II = 0 To lngBufferRemaining - 1
            ByteBuffer&#40;lngBufferedBytes + II&#41; = InputBuffer&#40;II&#41;
        Next II
        MD5Transform ByteBuffer
        lngRem = &#40;InputLen&#41; Mod 64
        For i = lngBufferRemaining To InputLen - II - lngRem Step 64
            For j = 0 To 63
                ByteBuffer&#40;j&#41; = InputBuffer&#40;i + j&#41;
            Next j
            MD5Transform ByteBuffer
        Next i
        lngBufferedBytes = 0
    Else
        i = 0
    End If
    For K = 0 To InputLen - i - 1
        ByteBuffer&#40;lngBufferedBytes + K&#41; = InputBuffer&#40;i + K&#41;
    Next K
    End Sub
    Private Sub MD5Transform&#40;Buffer&#40;&#41; As Byte&#41;
    On Error Resume Next
    Dim x&#40;16&#41; As Long, a As Long, B As Long, c As Long, d As Long
    a = State&#40;1&#41;
    B = State&#40;2&#41;
    c = State&#40;3&#41;
    d = State&#40;4&#41;
    Decode 64, x, Buffer
    
    FF a, B, c, d, x&#40;0&#41;, S11, -680876936
    FF d, a, B, c, x&#40;1&#41;, S12, -389564586
    FF c, d, a, B, x&#40;2&#41;, S13, 606105819
    FF B, c, d, a, x&#40;3&#41;, S14, -1044525330
    FF a, B, c, d, x&#40;4&#41;, S11, -176418897
    FF d, a, B, c, x&#40;5&#41;, S12, 1200080426
    FF c, d, a, B, x&#40;6&#41;, S13, -1473231341
    FF B, c, d, a, x&#40;7&#41;, S14, -45705983
    FF a, B, c, d, x&#40;8&#41;, S11, 1770035416
    FF d, a, B, c, x&#40;9&#41;, S12, -1958414417
    FF c, d, a, B, x&#40;10&#41;, S13, -42063
    FF B, c, d, a, x&#40;11&#41;, S14, -1990404162
    FF a, B, c, d, x&#40;12&#41;, S11, 1804603682
    FF d, a, B, c, x&#40;13&#41;, S12, -40341101
    FF c, d, a, B, x&#40;14&#41;, S13, -1502002290
    FF B, c, d, a, x&#40;15&#41;, S14, 1236535329
        
    GG a, B, c, d, x&#40;1&#41;, S21, -165796510
    GG d, a, B, c, x&#40;6&#41;, S22, -1069501632
    GG c, d, a, B, x&#40;11&#41;, S23, 643717713
    GG B, c, d, a, x&#40;0&#41;, S24, -373897302
    GG a, B, c, d, x&#40;5&#41;, S21, -701558691
    GG d, a, B, c, x&#40;10&#41;, S22, 38016083
    GG c, d, a, B, x&#40;15&#41;, S23, -660478335
    GG B, c, d, a, x&#40;4&#41;, S24, -405537848
    GG a, B, c, d, x&#40;9&#41;, S21, 568446438
    GG d, a, B, c, x&#40;14&#41;, S22, -1019803690
    GG c, d, a, B, x&#40;3&#41;, S23, -187363961
    GG B, c, d, a, x&#40;8&#41;, S24, 1163531501
    GG a, B, c, d, x&#40;13&#41;, S21, -1444681467
    GG d, a, B, c, x&#40;2&#41;, S22, -51403784
    GG c, d, a, B, x&#40;7&#41;, S23, 1735328473
    GG B, c, d, a, x&#40;12&#41;, S24, -1926607734
        
    HH a, B, c, d, x&#40;5&#41;, S31, -378558
    HH d, a, B, c, x&#40;8&#41;, S32, -2022574463
    HH c, d, a, B, x&#40;11&#41;, S33, 1839030562
    HH B, c, d, a, x&#40;14&#41;, S34, -35309556
    HH a, B, c, d, x&#40;1&#41;, S31, -1530992060
    HH d, a, B, c, x&#40;4&#41;, S32, 1272893353
    HH c, d, a, B, x&#40;7&#41;, S33, -155497632
    HH B, c, d, a, x&#40;10&#41;, S34, -1094730640
    HH a, B, c, d, x&#40;13&#41;, S31, 681279174
    HH d, a, B, c, x&#40;0&#41;, S32, -358537222
    HH c, d, a, B, x&#40;3&#41;, S33, -722521979
    HH B, c, d, a, x&#40;6&#41;, S34, 76029189
    HH a, B, c, d, x&#40;9&#41;, S31, -640364487
    HH d, a, B, c, x&#40;12&#41;, S32, -421815835
    HH c, d, a, B, x&#40;15&#41;, S33, 530742520
    HH B, c, d, a, x&#40;2&#41;, S34, -995338651
        
    II a, B, c, d, x&#40;0&#41;, S41, -198630844
    II d, a, B, c, x&#40;7&#41;, S42, 1126891415
    II c, d, a, B, x&#40;14&#41;, S43, -1416354905
    II B, c, d, a, x&#40;5&#41;, S44, -57434055
    II a, B, c, d, x&#40;12&#41;, S41, 1700485571
    II d, a, B, c, x&#40;3&#41;, S42, -1894986606
    II c, d, a, B, x&#40;10&#41;, S43, -1051523
    II B, c, d, a, x&#40;1&#41;, S44, -2054922799
    II a, B, c, d, x&#40;8&#41;, S41, 1873313359
    II d, a, B, c, x&#40;15&#41;, S42, -30611744
    II c, d, a, B, x&#40;6&#41;, S43, -1560198380
    II B, c, d, a, x&#40;13&#41;, S44, 1309151649
    II a, B, c, d, x&#40;4&#41;, S41, -145523070
    II d, a, B, c, x&#40;11&#41;, S42, -1120210379
    II c, d, a, B, x&#40;2&#41;, S43, 718787259
    II B, c, d, a, x&#40;9&#41;, S44, -343485551
        
        
    State&#40;1&#41; = LongOverflowAdd&#40;State&#40;1&#41;, a&#41;
    State&#40;2&#41; = LongOverflowAdd&#40;State&#40;2&#41;, B&#41;
    State&#40;3&#41; = LongOverflowAdd&#40;State&#40;3&#41;, c&#41;
    State&#40;4&#41; = LongOverflowAdd&#40;State&#40;4&#41;, d&#41;
    End Sub
    Private Sub Decode&#40;Length As Integer, OutputBuffer&#40;&#41; As Long, InputBuffer&#40;&#41; As Byte&#41;
    On Error Resume Next
    Dim intDblIndex As Integer, intByteIndex As Integer, dblSum As Double
    intDblIndex = 0
    For intByteIndex = 0 To Length - 1 Step 4
        dblSum = InputBuffer&#40;intByteIndex&#41; + InputBuffer&#40;intByteIndex + 1&#41; * 256# + InputBuffer&#40;intByteIndex + 2&#41; * 65536# + InputBuffer&#40;intByteIndex + 3&#41; * 16777216#
        OutputBuffer&#40;intDblIndex&#41; = UnsignedToLong&#40;dblSum&#41;
        intDblIndex = intDblIndex + 1
    Next intByteIndex
    End Sub
    Private Function FF&#40;a As Long, B As Long, c As Long, d As Long, x As Long, s As Long, ac As Long&#41; As Long
        a = LongOverflowAdd4&#40;a, &#40;B And c&#41; Or &#40;Not &#40;B&#41; And d&#41;, x, ac&#41;
        a = LongLeftRotate&#40;a, s&#41;
        a = LongOverflowAdd&#40;a, B&#41;
    End Function
    Private Function GG&#40;a As Long, B As Long, c As Long, d As Long, x As Long, s As Long, ac As Long&#41; As Long
        a = LongOverflowAdd4&#40;a, &#40;B And d&#41; Or &#40;c And Not &#40;d&#41;&#41;, x, ac&#41;
        a = LongLeftRotate&#40;a, s&#41;
        a = LongOverflowAdd&#40;a, B&#41;
    End Function
    Private Function HH&#40;a As Long, B As Long, c As Long, d As Long, x As Long, s As Long, ac As Long&#41; As Long
        a = LongOverflowAdd4&#40;a, B Xor c Xor d, x, ac&#41;
        a = LongLeftRotate&#40;a, s&#41;
        a = LongOverflowAdd&#40;a, B&#41;
    End Function
    Private Function II&#40;a As Long, B As Long, c As Long, d As Long, x As Long, s As Long, ac As Long&#41; As Long
        a = LongOverflowAdd4&#40;a, c Xor &#40;B Or Not &#40;d&#41;&#41;, x, ac&#41;
        a = LongLeftRotate&#40;a, s&#41;
        a = LongOverflowAdd&#40;a, B&#41;
    End Function
    Private Function LongLeftRotate&#40;Value As Long, bits As Long&#41; As Long
    Dim lngSign As Long, lngI As Long
        bits = bits Mod 32
        If bits = 0 Then LongLeftRotate = Value&#58; Exit Function
        For lngI = 1 To bits
            lngSign = Value And &HC0000000
            Value = &#40;Value And &H3FFFFFFF&#41; * 2
            Value = Value Or &#40;&#40;lngSign < 0&#41; And 1&#41; Or &#40;CBool&#40;lngSign And &H40000000&#41; And &H80000000&#41;
        Next
        LongLeftRotate = Value
    End Function
    Private Function LongOverflowAdd&#40;Val1 As Long, Val2 As Long&#41; As Long
    Dim lngHighWord As Long, lngLowWord As Long, lngOverflow As Long
        lngLowWord = &#40;Val1 And &HFFFF&&#41; + &#40;Val2 And &HFFFF&&#41;
        lngOverflow = lngLowWord \ 65536
        lngHighWord = &#40;&#40;&#40;Val1 And &HFFFF0000&#41; \ 65536&#41; + &#40;&#40;Val2 And &HFFFF0000&#41; \ 65536&#41; + lngOverflow&#41; And &HFFFF&
        LongOverflowAdd = UnsignedToLong&#40;&#40;lngHighWord * 65536#&#41; + &#40;lngLowWord And &HFFFF&&#41;&#41;
    End Function
    Private Function LongOverflowAdd4&#40;Val1 As Long, Val2 As Long, val3 As Long, val4 As Long&#41; As Long
    Dim lngHighWord As Long, lngLowWord As Long, lngOverflow As Long
        lngLowWord = &#40;Val1 And &HFFFF&&#41; + &#40;Val2 And &HFFFF&&#41; + &#40;val3 And &HFFFF&&#41; + &#40;val4 And &HFFFF&&#41;
        lngOverflow = lngLowWord \ 65536
        lngHighWord = &#40;&#40;&#40;Val1 And &HFFFF0000&#41; \ 65536&#41; + &#40;&#40;Val2 And &HFFFF0000&#41; \ 65536&#41; + &#40;&#40;val3 And &HFFFF0000&#41; \ 65536&#41; + &#40;&#40;val4 And &HFFFF0000&#41; \ 65536&#41; + lngOverflow&#41; And &HFFFF&
        LongOverflowAdd4 = UnsignedToLong&#40;&#40;lngHighWord * 65536#&#41; + &#40;lngLowWord And &HFFFF&&#41;&#41;
    End Function
    Private Function UnsignedToLong&#40;Value As Double&#41; As Long
        If Value <0>= OFFSET_4 Then Error 6
        
        If Value <= MAXINT_4 Then
            UnsignedToLong = Value
        Else
            UnsignedToLong = Value - OFFSET_4
        End If
    End Function
    Private Function LongToUnsigned&#40;Value As Long&#41; As Double
        If Value < 0 Then
            LongToUnsigned = Value + OFFSET_4
        Else
            LongToUnsigned = Value
        End If
    End Function
  5. #35
    Join Date
    Oct 2006
    Posts
    165
    a few more helpful function's for all u code'ers out there



    Public Sub ReadText(IsMOTD As Boolean, MDat As String, RTB As RichTextBox)
    Dim T As Integer, W As String
    Code:
    If IsMOTD = True Then
        MDat = Get_MOTD&#40;MDat&#41;
    End If
    RTB.SelColor = vbYellow
    RTB.SelAlignment = 2
    RTB.SelFontSize = 8
    For T = 1 To Len&#40;MDat&#41;
        W = Mid&#40;MDat, T, 1&#41;
        If IsNumeric&#40;W&#41; Then
            If W = 1 Then
                RTB.SelColor = vbRed
                W = ""
            ElseIf W = 2 Then
                RTB.SelColor = vbGreen
                W = ""
            ElseIf W = 3 Then
                RTB.SelColor = vbYellow
                W = ""
            ElseIf W = 4 Then
                RTB.SelColor = vbBlue
                W = ""
            ElseIf W = 5 Then
                RTB.SelColor = vbCyan
                W = ""
            ElseIf W = 6 Then
                RTB.SelColor = &HC000C0
                W = ""
            ElseIf W = 7 Then
                RTB.SelColor = vbWhite
                W = ""
            ElseIf W = 8 Then
                RTB.SelColor = vbBlack
                W = ""
            ElseIf W = 9 Then
                RTB.SelColor = vbWhite
                W = ""
            End If
        ElseIf W = "^" Then
            W = ""
        ElseIf W = UCase&#40;W&#41; Then
            RTB.SelFontSize = 10
            RTB.SelText = RTB.SelText & W
            RTB.SelFontSize = 8
        Else
            RTB.SelText = RTB.SelText & W
        End If
    Next T
    End Sub
    
    Private Function Get_MOTD&#40;MDat As String&#41; As String
    Dim Str&#40;&#41; As String, Str2&#40;&#41; As String
    Str = Split&#40;MDat, String&#40;2, &HA&#41;&#41;
    Str2 = Split&#40;Str&#40;0&#41;, "SlamWireGORE1"&#41;
    Get_MOTD = Mid&#40;Str2&#40;1&#41;, 4, Len&#40;Str2&#40;1&#41;&#41; - 3&#41;
    End Function
    
    Public Sub Parse_Server_Rotation_Data&#40;SRDat As String&#41;
    Dim Str1&#40;&#41; As String, Str2&#40;&#41; As String, Str3&#40;&#41; As String, Str4&#40;&#41; As String, Str5&#40;&#41; As String, Str6&#40;&#41; As String, i As Integer
    Str1 = Split&#40;SRDat, Chr&#40;&H10&#41;&#41;
    Str2 = Split&#40;Str1&#40;3&#41;, Chr&#40;0&#41;&#41; '//Server Name
    Str3 = Split&#40;Str1&#40;6&#41;, Chr&#40;0&#41;&#41; '//Server Country
    Str4 = Split&#40;Str1&#40;34&#41;, Chr&#40;0&#41;&#41; '//Current Map
    lbl.Caption = Str2&#40;0&#41; & " / " & Str3&#40;0&#41;
    Str4 = Split&#40;SRDat, Chr&#40;&HA5&#41;&#41; '//Start Of Rotation data
    Str5 = Split&#40;Str4&#40;2&#41;, Chr&#40;&H11&#41;&#41;
    For i = 1 To UBound&#40;Str5&#41;
        Str6 = Split&#40;Str5&#40;i&#41;, Chr&#40;0&#41;&#41;
        Str6&#40;0&#41; = Replace&#40;Str6&#40;0&#41;, Chr&#40;0&#41;, ""&#41;
        If Str6&#40;0&#41; = "" Then
            'Do nothing
        Else
            Str6&#40;0&#41; = Replace&#40;Str6&#40;0&#41;, ",Extermination", ""&#41;
            lst.AddItem Str6&#40;0&#41; '//add map to lst
        End If
    Next i
    End Sub
  6. #36
    Join Date
    Oct 2006
    Posts
    165
    okay! now that all teh school'n is over.

    any more questions?
  7. #37
    Join Date
    Nov 2005
    Location
    St. Louis
    Posts
    5,405
    Quote Originally Posted by Deadly
    Stix, if you have MSN or AIM please add me:

    MSN- muthafuxenidea@hotmail.com
    AIM- monkeysalad371
    thnx
    NWPNWPNWPNWPNWPNWPNWP
    the greatest Fellows

  8. #38
    Join Date
    Nov 2005
    Location
    Marble, NC
    Posts
    4,609
    This would be great to terrorize euro-servers with.
    Quote Originally Posted by DESTRUCTION View Post
    im just trying to keep u on ur toes Fellow

  9. #39
    Quote Originally Posted by Spyder
    UM, yeah. I'm going to go with:

    That is the most badass mod in Gore ever.

    (i'm not r33t enuff tho )


    +repost the source in code brackets so smileys dont show up n wut not

  10. #40
    Join Date
    Oct 2006
    Posts
    165
    sup deadly? i added u

Similar Threads

  1. Who is teh true emo?
    By psycho in forum Gore / SE
    Replies: 14
    Last Post: 07-26-2007, 02:14 AM
  2. Is it true
    By MasterOfPuppets in forum Misc. Bullshit
    Replies: 8
    Last Post: 02-28-2007, 12:39 PM
  3. I R TEH TRUE GAMER :L
    By DESTRUCTION in forum General Chat
    Replies: 10
    Last Post: 02-08-2006, 10:41 PM
  4. i got gore!!!
    By TC0RN311 in forum General Chat
    Replies: 21
    Last Post: 01-25-2006, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •