Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.76 KB | None | 0 0
  1. Sub LoadUserStats(ByVal UserIndex As Integer, ByRef UserFile As clsIniManager)
  2. '*************************************************
  3. 'Author: Unknown
  4. 'Last modified: 11/19/2009
  5. '11/19/2009: Pato - Load the EluSkills and ExpSkills
  6. '*************************************************
  7. Dim LoopC As Long
  8.  
  9. With UserList(UserIndex)
  10. With .Stats
  11. For LoopC = 1 To NUMATRIBUTOS
  12. .UserAtributos(LoopC) = CInt(UserFile.GetValue("ATRIBUTOS", "AT" & LoopC))
  13. .UserAtributosBackUP(LoopC) = .UserAtributos(LoopC)
  14. Next LoopC
  15.  
  16. For LoopC = 1 To NUMSKILLS
  17. .UserSkills(LoopC) = val(UserFile.GetValue("SKILLS", "SK" & LoopC))
  18. .EluSkills(LoopC) = val(UserFile.GetValue("SKILLS", "ELUSK" & LoopC))
  19. .ExpSkills(LoopC) = val(UserFile.GetValue("SKILLS", "EXPSK" & LoopC))
  20. Next LoopC
  21.  
  22. For LoopC = 1 To MAXUSERHECHIZOS
  23. .UserHechizos(LoopC) = val(UserFile.GetValue("Hechizos", "H" & LoopC))
  24. Next LoopC
  25.  
  26. .GLD = CLng(UserFile.GetValue("STATS", "GLD"))
  27. .Banco = CLng(UserFile.GetValue("STATS", "BANCO"))
  28.  
  29. .MaxHp = CInt(UserFile.GetValue("STATS", "MaxHP"))
  30. .MinHp = CInt(UserFile.GetValue("STATS", "MinHP"))
  31.  
  32. .MinSta = CInt(UserFile.GetValue("STATS", "MinSTA"))
  33. .MaxSta = CInt(UserFile.GetValue("STATS", "MaxSTA"))
  34.  
  35. .MaxMAN = CInt(UserFile.GetValue("STATS", "MaxMAN"))
  36. .MinMAN = CInt(UserFile.GetValue("STATS", "MinMAN"))
  37.  
  38. .MaxHIT = CInt(UserFile.GetValue("STATS", "MaxHIT"))
  39. .MinHIT = CInt(UserFile.GetValue("STATS", "MinHIT"))
  40.  
  41. .MaxAGU = CByte(UserFile.GetValue("STATS", "MaxAGU"))
  42. .MinAGU = CByte(UserFile.GetValue("STATS", "MinAGU"))
  43.  
  44. .MaxHam = CByte(UserFile.GetValue("STATS", "MaxHAM"))
  45. .MinHam = CByte(UserFile.GetValue("STATS", "MinHAM"))
  46.  
  47. .SkillPts = CInt(UserFile.GetValue("STATS", "SkillPtsLibres"))
  48.  
  49. .Exp = CDbl(UserFile.GetValue("STATS", "EXP"))
  50. .ELU = CLng(UserFile.GetValue("STATS", "ELU"))
  51. .ELV = CByte(UserFile.GetValue("STATS", "ELV"))
  52.  
  53.  
  54. .UsuariosMatados = CLng(UserFile.GetValue("MUERTES", "UserMuertes"))
  55. .NPCsMuertos = CInt(UserFile.GetValue("MUERTES", "NpcsMuertes"))
  56. End With
  57.  
  58. With .flags
  59. Dim Consejo As eFaction
  60. Consejo = CByte(UserFile.GetValue("FLAGS", "CONSEJO"))
  61.  
  62. If Consejo = Armada Then
  63. .Privilegios = .Privilegios Or PlayerType.RoyalCouncil
  64. ElseIf .Consejo = Legion Then
  65. .Privilegios = .Privilegios Or PlayerType.ChaosCouncil
  66. End If
  67.  
  68. End With
  69. End With
  70. End Sub
  71.  
  72. Sub LoadUserReputacion(ByVal UserIndex As Integer, ByRef UserFile As clsIniManager)
  73. '***************************************************
  74. 'Author: Unknown
  75. 'Last Modification: -
  76. '
  77. '***************************************************
  78.  
  79. With UserList(UserIndex).Reputacion
  80. .AsesinoRep = val(UserFile.GetValue("REP", "Asesino"))
  81. .BandidoRep = val(UserFile.GetValue("REP", "Bandido"))
  82. .BurguesRep = val(UserFile.GetValue("REP", "Burguesia"))
  83. .LadronesRep = val(UserFile.GetValue("REP", "Ladrones"))
  84. .NobleRep = val(UserFile.GetValue("REP", "Nobles"))
  85. .PlebeRep = val(UserFile.GetValue("REP", "Plebe"))
  86. .Promedio = val(UserFile.GetValue("REP", "Promedio"))
  87. End With
  88.  
  89. End Sub
  90.  
  91. Sub LoadUserInit(ByVal UserIndex As Integer, ByRef UserFile As clsIniManager)
  92. '*************************************************
  93. 'Author: Unknown
  94. 'Last modified: 19/11/2006
  95. 'Loads the Users RECORDs
  96. '23/01/2007 Pablo (ToxicWaste) - Agrego NivelIngreso, FechaIngreso, MatadosIngreso y NextRecompensa.
  97. '23/01/2007 Pablo (ToxicWaste) - Quito CriminalesMatados de Stats porque era redundante.
  98. '*************************************************
  99. Dim LoopC As Long
  100. Dim ln As String
  101.  
  102. With UserList(UserIndex)
  103. With .Faccion
  104. .ArmadaReal = CByte(UserFile.GetValue("FACCIONES", "EjercitoReal"))
  105. .FuerzasCaos = CByte(UserFile.GetValue("FACCIONES", "EjercitoCaos"))
  106. .CiudadanosMatados = CLng(UserFile.GetValue("FACCIONES", "CiudMatados"))
  107. .CriminalesMatados = CLng(UserFile.GetValue("FACCIONES", "CrimMatados"))
  108. .RecibioArmaduraCaos = CByte(UserFile.GetValue("FACCIONES", "rArCaos"))
  109. .RecibioArmaduraReal = CByte(UserFile.GetValue("FACCIONES", "rArReal"))
  110. .RecibioExpInicialCaos = CByte(UserFile.GetValue("FACCIONES", "rExCaos"))
  111. .RecibioExpInicialReal = CByte(UserFile.GetValue("FACCIONES", "rExReal"))
  112. .RecompensasCaos = CLng(UserFile.GetValue("FACCIONES", "recCaos"))
  113. .RecompensasReal = CLng(UserFile.GetValue("FACCIONES", "recReal"))
  114. .Reenlistadas = CByte(UserFile.GetValue("FACCIONES", "Reenlistadas"))
  115. .NivelIngreso = CInt(UserFile.GetValue("FACCIONES", "NivelIngreso"))
  116. .FechaIngreso = UserFile.GetValue("FACCIONES", "FechaIngreso")
  117. .MatadosIngreso = CInt(UserFile.GetValue("FACCIONES", "MatadosIngreso"))
  118. .NextRecompensa = CInt(UserFile.GetValue("FACCIONES", "NextRecompensa"))
  119. End With
  120.  
  121. With .flags
  122. .Muerto = CByte(UserFile.GetValue("FLAGS", "Muerto"))
  123. .Escondido = CByte(UserFile.GetValue("FLAGS", "Escondido"))
  124.  
  125. .Hambre = CByte(UserFile.GetValue("FLAGS", "Hambre"))
  126. .Sed = CByte(UserFile.GetValue("FLAGS", "Sed"))
  127. .Desnudo = CByte(UserFile.GetValue("FLAGS", "Desnudo"))
  128. .Navegando = CByte(UserFile.GetValue("FLAGS", "Navegando"))
  129. .Envenenado = CByte(UserFile.GetValue("FLAGS", "Envenenado"))
  130. .Paralizado = CByte(UserFile.GetValue("FLAGS", "Paralizado"))
  131.  
  132. 'Matrix
  133. .lastMap = val(UserFile.GetValue("FLAGS", "LastMap"))
  134. End With
  135.  
  136. If .flags.Paralizado = 1 Then
  137. .Counters.Paralisis = IntervaloParalizado
  138. End If
  139.  
  140.  
  141. .Counters.Pena = CLng(UserFile.GetValue("COUNTERS", "Pena"))
  142. .Counters.AsignedSkills = CByte(val(UserFile.GetValue("COUNTERS", "SkillsAsignados")))
  143.  
  144. .email = UserFile.GetValue("CONTACTO", "Email")
  145.  
  146. .Genero = UserFile.GetValue("INIT", "Genero")
  147. .clase = UserFile.GetValue("INIT", "Clase")
  148. .raza = UserFile.GetValue("INIT", "Raza")
  149. .Hogar = UserFile.GetValue("INIT", "Hogar")
  150. .Char.heading = CInt(UserFile.GetValue("INIT", "Heading"))
  151.  
  152.  
  153. With .OrigChar
  154. .Head = CInt(UserFile.GetValue("INIT", "Head"))
  155. .body = CInt(UserFile.GetValue("INIT", "Body"))
  156. .WeaponAnim = CInt(UserFile.GetValue("INIT", "Arma"))
  157. .ShieldAnim = CInt(UserFile.GetValue("INIT", "Escudo"))
  158. .CascoAnim = CInt(UserFile.GetValue("INIT", "Casco"))
  159.  
  160. .heading = eHeading.SOUTH
  161. End With
  162.  
  163. #If ConUpTime Then
  164. .UpTime = CLng(UserFile.GetValue("INIT", "UpTime"))
  165. #End If
  166.  
  167. If .flags.Muerto = 0 Then
  168. .Char = .OrigChar
  169. Else
  170. .Char.body = iCuerpoMuerto
  171. .Char.Head = iCabezaMuerto
  172. .Char.WeaponAnim = NingunArma
  173. .Char.ShieldAnim = NingunEscudo
  174. .Char.CascoAnim = NingunCasco
  175. End If
  176.  
  177.  
  178. .desc = UserFile.GetValue("INIT", "Desc")
  179.  
  180. .Pos.Map = CInt(ReadField(1, UserFile.GetValue("INIT", "Position"), 45))
  181. .Pos.X = CInt(ReadField(2, UserFile.GetValue("INIT", "Position"), 45))
  182. .Pos.Y = CInt(ReadField(3, UserFile.GetValue("INIT", "Position"), 45))
  183.  
  184. .Invent.NroItems = CInt(UserFile.GetValue("Inventory", "CantidadItems"))
  185.  
  186. '[KEVIN]--------------------------------------------------------------------
  187. '***********************************************************************************
  188. .BancoInvent.NroItems = CInt(UserFile.GetValue("BancoInventory", "CantidadItems"))
  189. 'Lista de objetos del banco
  190. For LoopC = 1 To MAX_BANCOINVENTORY_SLOTS
  191. ln = UserFile.GetValue("BancoInventory", "Obj" & LoopC)
  192. .BancoInvent.Object(LoopC).ObjIndex = CInt(ReadField(1, ln, 45))
  193. .BancoInvent.Object(LoopC).Amount = CInt(ReadField(2, ln, 45))
  194. Next LoopC
  195. '------------------------------------------------------------------------------------
  196. '[/KEVIN]*****************************************************************************
  197.  
  198.  
  199. 'Lista de objetos
  200. For LoopC = 1 To MAX_INVENTORY_SLOTS
  201. ln = UserFile.GetValue("Inventory", "Obj" & LoopC)
  202. .Invent.Object(LoopC).ObjIndex = val(ReadField(1, ln, 45))
  203. .Invent.Object(LoopC).Amount = val(ReadField(2, ln, 45))
  204. .Invent.Object(LoopC).Equipped = val(ReadField(3, ln, 45))
  205. Next LoopC
  206.  
  207. 'Obtiene el indice-objeto del arma
  208. .Invent.WeaponEqpSlot = CByte(UserFile.GetValue("Inventory", "WeaponEqpSlot"))
  209. If .Invent.WeaponEqpSlot > 0 Then
  210. .Invent.WeaponEqpObjIndex = .Invent.Object(.Invent.WeaponEqpSlot).ObjIndex
  211. End If
  212.  
  213. 'Obtiene el indice-objeto del armadura
  214. .Invent.ArmourEqpSlot = CByte(UserFile.GetValue("Inventory", "ArmourEqpSlot"))
  215. If .Invent.ArmourEqpSlot > 0 Then
  216. .Invent.ArmourEqpObjIndex = .Invent.Object(.Invent.ArmourEqpSlot).ObjIndex
  217. .flags.Desnudo = 0
  218. Else
  219. .flags.Desnudo = 1
  220. End If
  221.  
  222. 'Obtiene el indice-objeto del escudo
  223. .Invent.EscudoEqpSlot = CByte(UserFile.GetValue("Inventory", "EscudoEqpSlot"))
  224. If .Invent.EscudoEqpSlot > 0 Then
  225. .Invent.EscudoEqpObjIndex = .Invent.Object(.Invent.EscudoEqpSlot).ObjIndex
  226. End If
  227.  
  228. 'Obtiene el indice-objeto del casco
  229. .Invent.CascoEqpSlot = CByte(UserFile.GetValue("Inventory", "CascoEqpSlot"))
  230. If .Invent.CascoEqpSlot > 0 Then
  231. .Invent.CascoEqpObjIndex = .Invent.Object(.Invent.CascoEqpSlot).ObjIndex
  232. End If
  233.  
  234. 'Obtiene el indice-objeto barco
  235. .Invent.BarcoSlot = CByte(UserFile.GetValue("Inventory", "BarcoSlot"))
  236. If .Invent.BarcoSlot > 0 Then
  237. .Invent.BarcoObjIndex = .Invent.Object(.Invent.BarcoSlot).ObjIndex
  238. End If
  239.  
  240. 'Obtiene el indice-objeto municion
  241. .Invent.MunicionEqpSlot = CByte(UserFile.GetValue("Inventory", "MunicionSlot"))
  242. If .Invent.MunicionEqpSlot > 0 Then
  243. .Invent.MunicionEqpObjIndex = .Invent.Object(.Invent.MunicionEqpSlot).ObjIndex
  244. End If
  245.  
  246. '[Alejo]
  247. 'Obtiene el indice-objeto anilo
  248. .Invent.AnilloEqpSlot = CByte(UserFile.GetValue("Inventory", "AnilloSlot"))
  249. If .Invent.AnilloEqpSlot > 0 Then
  250. .Invent.AnilloEqpObjIndex = .Invent.Object(.Invent.AnilloEqpSlot).ObjIndex
  251. End If
  252.  
  253. .Invent.MochilaEqpSlot = val(UserFile.GetValue("Inventory", "MochilaSlot"))
  254. If .Invent.MochilaEqpSlot > 0 Then
  255. .Invent.MochilaEqpObjIndex = .Invent.Object(.Invent.MochilaEqpSlot).ObjIndex
  256. End If
  257.  
  258. .NroMascotas = CInt(UserFile.GetValue("MASCOTAS", "NroMascotas"))
  259. For LoopC = 1 To MAXMASCOTAS
  260. .MascotasType(LoopC) = val(UserFile.GetValue("MASCOTAS", "MAS" & LoopC))
  261. Next LoopC
  262.  
  263. ln = UserFile.GetValue("Guild", "GUILDINDEX")
  264. If IsNumeric(ln) Then
  265. .GuildIndex = CInt(ln)
  266. Else
  267. .GuildIndex = 0
  268. End If
  269. End With
  270.  
  271. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement