[Guide] GlobalChat-Function 4 VB
Add this to your Char.ini
Code:
[item29]
type=ETC
ID=3851
amount=10
This gives you 10Unit GlobalChatting
Add this to your modGameServer.bas
This is the opCode:
Code:
Case "75BD" 'Global Chatting
SendMessage 6, PlayerData(index).Charname, Mid(dData, 23, (Len(dData) - 22)), True
Now my SendMessage-Function (usable for nearby ALL ChatTypes)
Code:
Public Function SendMessage(ChatType As Integer, Name As String, Message As String, MessageInUnicode As Boolean)
Dim HexMessage As String
Dim HexWithOhs As String
fData = "6736" & "0000"
fData = fData & "0" & ChatType
pLen = Len(Name)
If Not ChatType = 7 Then
fData = fData & WordFromInteger(pLen)
fData = fData & cv_HexFromString(Name)
End If
If MessageInUnicode = False Then
HexMessage = cv_HexFromString(Message)
For i = 1 To Len(HexMessage) Step 2
HexWithOhs = HexWithOhs & Mid(HexMessage, i, 2) & "00"
Next i
fData = fData & WordFromInteger(Len(Message))
fData = fData & HexWithOhs
Else
fData = fData & (WordFromInteger(Len(Message) / 4))
fData = fData & Message
End If
pLen = (Len(fData) -
/ 2
fData = WordFromInteger(pLen) & fData
For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i
End Function
Now you can use the GlobalChatting Item in your inventory. Have fun