Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. Namespace Network.Messages.Game.Character.Creation
  2. Public Class CharacterCreationRequestMessage
  3.  
  4. Public name As String = Myform.TextCharacterName.Text
  5. Public breed As Integer = Myform.IdBreed(0)
  6. Public sex As Boolean = False
  7. Public colors As New List(Of Integer)
  8. Private Const protocolId As UInteger = 160
  9.  
  10. Private Function Color() As String
  11.  
  12. Dim Rand As New Random
  13.  
  14. Dim color1 As Integer = Rand.Next(0, 255)
  15. Dim color2 As Integer = Rand.Next(0, 255)
  16. Dim color3 As Integer = Rand.Next(0, 255)
  17.  
  18. Return color1.ToString & color2.ToString & color3.ToString
  19.  
  20. End Function
  21.  
  22. Public Sub Pack()
  23.  
  24. Log("[" & TimeOfDay & "] Début de la création du personnage " & name)
  25.  
  26. If Myform.RadioGenre.Checked Then
  27. sex = False
  28. ElseIf Myform.RadioGenre2.Checked Then
  29. sex = True
  30. End If
  31.  
  32. Dim Message As New Dofus.DofusMessage
  33.  
  34. Message.WriteString(name)
  35. Message.WriteByte(breed)
  36. Message.WriteBoolean(sex)
  37.  
  38. Dim _loc_2 As UInteger = 0
  39. While (_loc_2 < 6)
  40. Message.WriteUInt(colors(_loc_2))
  41. _loc_2 = _loc_2 + 1
  42. End While
  43.  
  44. Sock.Send(Message, protocolId)
  45.  
  46. End Sub
  47.  
  48. End Class
  49. End Namespace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement