Advertisement
Luciano_fuentes

¿Qué será?

Oct 6th, 2016
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. '@@ Autor: G Toyz
  4. '@@ Fecha: 04/10
  5. '@@ Creación: 22:23
  6.  
  7. Private Const refError   As String = "No cumples los requisitos"
  8. Private Const MAX_ARENAS As Byte = 3
  9.  
  10. Private Type uRetos
  11.     ID              As Integer
  12.     Pos             As WorldPos
  13.     X               As Byte
  14.     Y               As Byte
  15. End Type
  16.  
  17. Private Type tRetos
  18.     Rounds          As Byte
  19.     Users(1 To 3)   As uRetos
  20. End Type
  21.  
  22. Private Type Retos
  23.     Teams(1 To 2)   As tRetos
  24.     MAP_Arena       As Byte
  25.     Count           As Byte
  26.     Occupied        As Boolean
  27. End Type
  28.  
  29. Private Retos(1 To MAX_ARENAS) As Retos
  30. '_
  31. Private Sub Start_Arenas(ByVal N_Arena As Integer, _
  32.                          ByVal MAP_Arena As Byte, _
  33.                          ByVal Team1_X As Byte, _
  34.                          ByVal Team1_Y As Byte, _
  35.                          ByVal Team2_X As Byte, _
  36.                          ByVal Team2_Y As Byte)
  37.  
  38.     '@@ Cargar las X y Y de cada usuario en cada arena
  39.    '@@ El cálculo es para posicionar uno abajo del otro o viceversa.
  40.    
  41.     Dim LoopC As Long
  42.  
  43.     With Retos(N_Arena)
  44.         For LoopC = 1 To 3
  45.             .Teams(Team1).Users(LoopC).X = Team1_X
  46.             .Teams(Team1).Users(LoopC).Y = Team1_Y - 1 + LoopC
  47.             .Teams(Team2).Users(LoopC).X = Team2_X
  48.             .Teams(Team2).Users(LoopC).Y = Team2_Y + 1 - LoopC
  49.         Next LoopC
  50.         .MAP_Arena = MAP_Arena
  51.     End With
  52.    
  53. End Sub
  54.  
  55. Public Sub Load_Arenas()
  56.  
  57.     '@@ Pongan sus mapas y coordenadas.
  58.    '@@ Llamadas: Main.
  59.    
  60.     Call Start_Arenas(1, 1, 1, 1, 1, 1)
  61.     Call Start_Arenas(2, 1, 1, 1, 1, 1)
  62.     Call Start_Arenas(3, 1, 1, 1, 1, 1)
  63.  
  64. End Sub
  65.  
  66. Private Sub Send(ByVal IDPlayer1_Shipping As Integer, _
  67.                  ByVal IDPlayer2_Team_Shipping As Integer, _
  68.                  ByVal IDPlayer3_Team_Shipping As Integer, _
  69.                  ByVal IDPlayer1_Team_Receive As Integer, _
  70.                  ByVal IDPlayer2_Team_Receive As Integer, _
  71.                  ByVal IDPlayer3_Team_Receive As Integer, _
  72.                  ByVal Gold As Long, _
  73.                  ByVal Items As Boolean, _
  74.                  ByVal Potions As Integer)
  75.                  
  76.    
  77.  
  78. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement