Agus Admin
Mensajes : 69 Fecha de inscripción : 01/07/2008
| Tema: /DUELO 0.12.0 Miér Jul 02, 2008 6:06 am | |
| SERVERen el Private Enum ClientPacketID abajo de todo antes de end enum poner - Citación :
Duelo
Desp Abajo de - Citación :
Case ClientPacketID.CheckSlot '/SLOT Call HandleCheckSlot(UserIndex
poner - Citación :
Case ClientPacketID.Duelo Call HandleDuelo(UserIndex)
desp el codigo del HandleDuelo seria - Citación :
Private Sub HandleDuelo(ByVal UserIndex As Integer) With UserList(UserIndex) Call .incomingData.ReadByte If .Stats.ELV < 40 Then Call WriteConsoleMsg(UserIndex, "Tienes que ser mayor a nivel 40!!", FontTypeNames.FONTTYPE_INFO) Exit Sub ElseIf .flags.Muerto = 1 Then Call WriteConsoleMsg(UserIndex, "Estas muerto, solo los vivos pueden jugar!!!", FontTypeNames.FONTTYPE_INFO) Exit Sub ElseIf MapInfo(25).NumUsers = 2 Then Call WriteConsoleMsg(UserIndex, "La sala de duelos está llena.", FontTypeNames.FONTTYPE_INFO) Exit Sub ElseIf .Pos.map = 14 Then Call WriteConsoleMsg(UserIndex, "No podes a la arena de Duelos desde la carcel.", FontTypeNames.FONTTYPE_INFO) Exit Sub End If If .flags.EnDuelo = 1 Then Call WriteConsoleMsg(UserIndex, "Estas en Duelo !!!!.", FontTypeNames.FONTTYPE_INFO) Exit Sub End If If .flags.EnDuelo = 0 Then .flags.EnDuelo = 1 Call WarpUserChar(UserIndex, 25, RandomNumber(31, 36), RandomNumber(31, 36)) Call WriteConsoleMsg(UserIndex, "Bienvenido a la sala de duelos.", FontTypeNames.FONTTYPE_INFO) End If If MapInfo(25).NumUsers = 1 Then Call WriteConsoleMsg(SendTarget.ToAll, "Duelos> " & UserList(UserIndex).name & " espera contricante en la sala de duelos mayor a level 40, manden /DUELO.", FontTypeNames.FONTTYPE_INFO) Else Call WriteConsoleMsg(SendTarget.ToAll, "Duelos> " & UserList(UserIndex).name & " ha aceptado el duelo.", FontTypeNames.FONTTYPE_INFO) Exit Sub End If End With End Sub
desp en el sub user die abajo de todo poner - Citación :
If UserList(UserIndex).flags.EnDuelo = True Then UserList(UserIndex).flags.EnDuelo = False Call WarpUserChar(UserIndex, 1, 50, 50, True) Call WriteConsoleMsg(SendTarget.ToAll, "Duelos> " & UserList(UserIndex).name & " ha sido vencido.", FontTypeNames.FONTTYPE_INFO) Call WriteConsoleMsg(UserIndex, "Has Vuelto a Ulla", FontTypeNames.FONTTYPE_INFO) Exit Sub End If Exit Sub
ah y declarar en UserFlags - Citación :
EnDuelo As Byte
CLIENTEen el Private Enum ClientPacketID ( igual q en el server) abajo de todo antes de end enum poner - Citación :
Duelo
desp arriva de - Citación :
Public Sub WriteEnlist()
poner - Citación :
Public Sub WriteDuelo() Call outgoingData.WriteByte(ClientPacketID.Duelo) End Sub
desp arriva de - Citación :
Case "/RESUCITAR"
poner - Citación :
Case "/DUELO" Call WriteDuelo
| |
|