Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub LoadUserStats(ByVal UserIndex As Integer, ByRef UserFile As clsIniManager)
- '*************************************************
- 'Author: Unknown
- 'Last modified: 11/19/2009
- '11/19/2009: Pato - Load the EluSkills and ExpSkills
- '*************************************************
- Dim LoopC As Long
- With UserList(UserIndex)
- With .Stats
- For LoopC = 1 To NUMATRIBUTOS
- .UserAtributos(LoopC) = CInt(UserFile.GetValue("ATRIBUTOS", "AT" & LoopC))
- .UserAtributosBackUP(LoopC) = .UserAtributos(LoopC)
- Next LoopC
- For LoopC = 1 To NUMSKILLS
- .UserSkills(LoopC) = val(UserFile.GetValue("SKILLS", "SK" & LoopC))
- .EluSkills(LoopC) = val(UserFile.GetValue("SKILLS", "ELUSK" & LoopC))
- .ExpSkills(LoopC) = val(UserFile.GetValue("SKILLS", "EXPSK" & LoopC))
- Next LoopC
- For LoopC = 1 To MAXUSERHECHIZOS
- .UserHechizos(LoopC) = val(UserFile.GetValue("Hechizos", "H" & LoopC))
- Next LoopC
- .GLD = CLng(UserFile.GetValue("STATS", "GLD"))
- .Banco = CLng(UserFile.GetValue("STATS", "BANCO"))
- .MaxHp = CInt(UserFile.GetValue("STATS", "MaxHP"))
- .MinHp = CInt(UserFile.GetValue("STATS", "MinHP"))
- .MinSta = CInt(UserFile.GetValue("STATS", "MinSTA"))
- .MaxSta = CInt(UserFile.GetValue("STATS", "MaxSTA"))
- .MaxMAN = CInt(UserFile.GetValue("STATS", "MaxMAN"))
- .MinMAN = CInt(UserFile.GetValue("STATS", "MinMAN"))
- .MaxHIT = CInt(UserFile.GetValue("STATS", "MaxHIT"))
- .MinHIT = CInt(UserFile.GetValue("STATS", "MinHIT"))
- .MaxAGU = CByte(UserFile.GetValue("STATS", "MaxAGU"))
- .MinAGU = CByte(UserFile.GetValue("STATS", "MinAGU"))
- .MaxHam = CByte(UserFile.GetValue("STATS", "MaxHAM"))
- .MinHam = CByte(UserFile.GetValue("STATS", "MinHAM"))
- .SkillPts = CInt(UserFile.GetValue("STATS", "SkillPtsLibres"))
- .Exp = CDbl(UserFile.GetValue("STATS", "EXP"))
- .ELU = CLng(UserFile.GetValue("STATS", "ELU"))
- .ELV = CByte(UserFile.GetValue("STATS", "ELV"))
- .UsuariosMatados = CLng(UserFile.GetValue("MUERTES", "UserMuertes"))
- .NPCsMuertos = CInt(UserFile.GetValue("MUERTES", "NpcsMuertes"))
- End With
- With .flags
- Dim Consejo As eFaction
- Consejo = CByte(UserFile.GetValue("FLAGS", "CONSEJO"))
- If Consejo = Armada Then
- .Privilegios = .Privilegios Or PlayerType.RoyalCouncil
- ElseIf .Consejo = Legion Then
- .Privilegios = .Privilegios Or PlayerType.ChaosCouncil
- End If
- End With
- End With
- End Sub
- Sub LoadUserReputacion(ByVal UserIndex As Integer, ByRef UserFile As clsIniManager)
- '***************************************************
- 'Author: Unknown
- 'Last Modification: -
- '
- '***************************************************
- With UserList(UserIndex).Reputacion
- .AsesinoRep = val(UserFile.GetValue("REP", "Asesino"))
- .BandidoRep = val(UserFile.GetValue("REP", "Bandido"))
- .BurguesRep = val(UserFile.GetValue("REP", "Burguesia"))
- .LadronesRep = val(UserFile.GetValue("REP", "Ladrones"))
- .NobleRep = val(UserFile.GetValue("REP", "Nobles"))
- .PlebeRep = val(UserFile.GetValue("REP", "Plebe"))
- .Promedio = val(UserFile.GetValue("REP", "Promedio"))
- End With
- End Sub
- Sub LoadUserInit(ByVal UserIndex As Integer, ByRef UserFile As clsIniManager)
- '*************************************************
- 'Author: Unknown
- 'Last modified: 19/11/2006
- 'Loads the Users RECORDs
- '23/01/2007 Pablo (ToxicWaste) - Agrego NivelIngreso, FechaIngreso, MatadosIngreso y NextRecompensa.
- '23/01/2007 Pablo (ToxicWaste) - Quito CriminalesMatados de Stats porque era redundante.
- '*************************************************
- Dim LoopC As Long
- Dim ln As String
- With UserList(UserIndex)
- With .Faccion
- .ArmadaReal = CByte(UserFile.GetValue("FACCIONES", "EjercitoReal"))
- .FuerzasCaos = CByte(UserFile.GetValue("FACCIONES", "EjercitoCaos"))
- .CiudadanosMatados = CLng(UserFile.GetValue("FACCIONES", "CiudMatados"))
- .CriminalesMatados = CLng(UserFile.GetValue("FACCIONES", "CrimMatados"))
- .RecibioArmaduraCaos = CByte(UserFile.GetValue("FACCIONES", "rArCaos"))
- .RecibioArmaduraReal = CByte(UserFile.GetValue("FACCIONES", "rArReal"))
- .RecibioExpInicialCaos = CByte(UserFile.GetValue("FACCIONES", "rExCaos"))
- .RecibioExpInicialReal = CByte(UserFile.GetValue("FACCIONES", "rExReal"))
- .RecompensasCaos = CLng(UserFile.GetValue("FACCIONES", "recCaos"))
- .RecompensasReal = CLng(UserFile.GetValue("FACCIONES", "recReal"))
- .Reenlistadas = CByte(UserFile.GetValue("FACCIONES", "Reenlistadas"))
- .NivelIngreso = CInt(UserFile.GetValue("FACCIONES", "NivelIngreso"))
- .FechaIngreso = UserFile.GetValue("FACCIONES", "FechaIngreso")
- .MatadosIngreso = CInt(UserFile.GetValue("FACCIONES", "MatadosIngreso"))
- .NextRecompensa = CInt(UserFile.GetValue("FACCIONES", "NextRecompensa"))
- End With
- With .flags
- .Muerto = CByte(UserFile.GetValue("FLAGS", "Muerto"))
- .Escondido = CByte(UserFile.GetValue("FLAGS", "Escondido"))
- .Hambre = CByte(UserFile.GetValue("FLAGS", "Hambre"))
- .Sed = CByte(UserFile.GetValue("FLAGS", "Sed"))
- .Desnudo = CByte(UserFile.GetValue("FLAGS", "Desnudo"))
- .Navegando = CByte(UserFile.GetValue("FLAGS", "Navegando"))
- .Envenenado = CByte(UserFile.GetValue("FLAGS", "Envenenado"))
- .Paralizado = CByte(UserFile.GetValue("FLAGS", "Paralizado"))
- 'Matrix
- .lastMap = val(UserFile.GetValue("FLAGS", "LastMap"))
- End With
- If .flags.Paralizado = 1 Then
- .Counters.Paralisis = IntervaloParalizado
- End If
- .Counters.Pena = CLng(UserFile.GetValue("COUNTERS", "Pena"))
- .Counters.AsignedSkills = CByte(val(UserFile.GetValue("COUNTERS", "SkillsAsignados")))
- .email = UserFile.GetValue("CONTACTO", "Email")
- .Genero = UserFile.GetValue("INIT", "Genero")
- .clase = UserFile.GetValue("INIT", "Clase")
- .raza = UserFile.GetValue("INIT", "Raza")
- .Hogar = UserFile.GetValue("INIT", "Hogar")
- .Char.heading = CInt(UserFile.GetValue("INIT", "Heading"))
- With .OrigChar
- .Head = CInt(UserFile.GetValue("INIT", "Head"))
- .body = CInt(UserFile.GetValue("INIT", "Body"))
- .WeaponAnim = CInt(UserFile.GetValue("INIT", "Arma"))
- .ShieldAnim = CInt(UserFile.GetValue("INIT", "Escudo"))
- .CascoAnim = CInt(UserFile.GetValue("INIT", "Casco"))
- .heading = eHeading.SOUTH
- End With
- #If ConUpTime Then
- .UpTime = CLng(UserFile.GetValue("INIT", "UpTime"))
- #End If
- If .flags.Muerto = 0 Then
- .Char = .OrigChar
- Else
- .Char.body = iCuerpoMuerto
- .Char.Head = iCabezaMuerto
- .Char.WeaponAnim = NingunArma
- .Char.ShieldAnim = NingunEscudo
- .Char.CascoAnim = NingunCasco
- End If
- .desc = UserFile.GetValue("INIT", "Desc")
- .Pos.Map = CInt(ReadField(1, UserFile.GetValue("INIT", "Position"), 45))
- .Pos.X = CInt(ReadField(2, UserFile.GetValue("INIT", "Position"), 45))
- .Pos.Y = CInt(ReadField(3, UserFile.GetValue("INIT", "Position"), 45))
- .Invent.NroItems = CInt(UserFile.GetValue("Inventory", "CantidadItems"))
- '[KEVIN]--------------------------------------------------------------------
- '***********************************************************************************
- .BancoInvent.NroItems = CInt(UserFile.GetValue("BancoInventory", "CantidadItems"))
- 'Lista de objetos del banco
- For LoopC = 1 To MAX_BANCOINVENTORY_SLOTS
- ln = UserFile.GetValue("BancoInventory", "Obj" & LoopC)
- .BancoInvent.Object(LoopC).ObjIndex = CInt(ReadField(1, ln, 45))
- .BancoInvent.Object(LoopC).Amount = CInt(ReadField(2, ln, 45))
- Next LoopC
- '------------------------------------------------------------------------------------
- '[/KEVIN]*****************************************************************************
- 'Lista de objetos
- For LoopC = 1 To MAX_INVENTORY_SLOTS
- ln = UserFile.GetValue("Inventory", "Obj" & LoopC)
- .Invent.Object(LoopC).ObjIndex = val(ReadField(1, ln, 45))
- .Invent.Object(LoopC).Amount = val(ReadField(2, ln, 45))
- .Invent.Object(LoopC).Equipped = val(ReadField(3, ln, 45))
- Next LoopC
- 'Obtiene el indice-objeto del arma
- .Invent.WeaponEqpSlot = CByte(UserFile.GetValue("Inventory", "WeaponEqpSlot"))
- If .Invent.WeaponEqpSlot > 0 Then
- .Invent.WeaponEqpObjIndex = .Invent.Object(.Invent.WeaponEqpSlot).ObjIndex
- End If
- 'Obtiene el indice-objeto del armadura
- .Invent.ArmourEqpSlot = CByte(UserFile.GetValue("Inventory", "ArmourEqpSlot"))
- If .Invent.ArmourEqpSlot > 0 Then
- .Invent.ArmourEqpObjIndex = .Invent.Object(.Invent.ArmourEqpSlot).ObjIndex
- .flags.Desnudo = 0
- Else
- .flags.Desnudo = 1
- End If
- 'Obtiene el indice-objeto del escudo
- .Invent.EscudoEqpSlot = CByte(UserFile.GetValue("Inventory", "EscudoEqpSlot"))
- If .Invent.EscudoEqpSlot > 0 Then
- .Invent.EscudoEqpObjIndex = .Invent.Object(.Invent.EscudoEqpSlot).ObjIndex
- End If
- 'Obtiene el indice-objeto del casco
- .Invent.CascoEqpSlot = CByte(UserFile.GetValue("Inventory", "CascoEqpSlot"))
- If .Invent.CascoEqpSlot > 0 Then
- .Invent.CascoEqpObjIndex = .Invent.Object(.Invent.CascoEqpSlot).ObjIndex
- End If
- 'Obtiene el indice-objeto barco
- .Invent.BarcoSlot = CByte(UserFile.GetValue("Inventory", "BarcoSlot"))
- If .Invent.BarcoSlot > 0 Then
- .Invent.BarcoObjIndex = .Invent.Object(.Invent.BarcoSlot).ObjIndex
- End If
- 'Obtiene el indice-objeto municion
- .Invent.MunicionEqpSlot = CByte(UserFile.GetValue("Inventory", "MunicionSlot"))
- If .Invent.MunicionEqpSlot > 0 Then
- .Invent.MunicionEqpObjIndex = .Invent.Object(.Invent.MunicionEqpSlot).ObjIndex
- End If
- '[Alejo]
- 'Obtiene el indice-objeto anilo
- .Invent.AnilloEqpSlot = CByte(UserFile.GetValue("Inventory", "AnilloSlot"))
- If .Invent.AnilloEqpSlot > 0 Then
- .Invent.AnilloEqpObjIndex = .Invent.Object(.Invent.AnilloEqpSlot).ObjIndex
- End If
- .Invent.MochilaEqpSlot = val(UserFile.GetValue("Inventory", "MochilaSlot"))
- If .Invent.MochilaEqpSlot > 0 Then
- .Invent.MochilaEqpObjIndex = .Invent.Object(.Invent.MochilaEqpSlot).ObjIndex
- End If
- .NroMascotas = CInt(UserFile.GetValue("MASCOTAS", "NroMascotas"))
- For LoopC = 1 To MAXMASCOTAS
- .MascotasType(LoopC) = val(UserFile.GetValue("MASCOTAS", "MAS" & LoopC))
- Next LoopC
- ln = UserFile.GetValue("Guild", "GUILDINDEX")
- If IsNumeric(ln) Then
- .GuildIndex = CInt(ln)
- Else
- .GuildIndex = 0
- End If
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement