[Aporte] Carga de recursos de ImperiumAO - Dx8 (Parte2)
Página 1 de 1.
[Aporte] Carga de recursos de ImperiumAO - Dx8 (Parte2)
*** COMIENZA EL SISTEMA DE MAPAS ***
Ahora buscamos:
Buscamos Sub LoadOBJData() y lo reemplazamos todo por:
Ahora buscamos:
Ahora buscamos:
- Código:
Sub SwitchMap
- Código:
Sub SwitchMap(ByVal MapRoute As String)
Audio.StopWave
On Error GoTo ErrorHandler
Dim fh As Integer
Dim MH As tMapHeader
Dim Blqs() As tDatosBloqueados
Dim L1() As Long
Dim L2() As tDatosGrh
Dim L3() As tDatosGrh
Dim L4() As tDatosGrh
Dim Triggers() As tDatosTrigger
Dim Luces() As tDatosLuces
Dim Particulas() As tDatosParticulas
Dim Objetos() As tDatosObjs
Dim NPCs() As tDatosNPC
Dim TEs() As tDatosTE
Dim i As Long
Dim j As Long
fh = FreeFile
Open App.path & "\Mapas\mapa" & MapRoute & ".csm" For Binary Access Read As fh
Get #fh, , MH
Get #fh, , MapSize
Get #fh, , MapDat
ReDim MapData(MapSize.XMin To MapSize.XMax, MapSize.YMin To MapSize.YMax) As MapBlock
ReDim L1(MapSize.XMin To MapSize.XMax, MapSize.YMin To MapSize.YMax) As Long
Get #fh, , L1
With MH
If .NumeroBloqueados > 0 Then
ReDim Blqs(1 To .NumeroBloqueados)
Get #fh, , Blqs
For i = 1 To .NumeroBloqueados
MapData(Blqs(i).X, Blqs(i).Y).Blocked = 1
Next i
End If
If .NumeroLayers(2) > 0 Then
ReDim L2(1 To .NumeroLayers(2))
Get #fh, , L2
For i = 1 To .NumeroLayers(2)
InitGrh MapData(L2(i).X, L2(i).Y).Graphic(2), L2(i).grhindex
Next i
End If
If .NumeroLayers(3) > 0 Then
ReDim L3(1 To .NumeroLayers(3))
Get #fh, , L3
For i = 1 To .NumeroLayers(3)
InitGrh MapData(L3(i).X, L3(i).Y).Graphic(3), L3(i).grhindex
Next i
End If
If .NumeroLayers(4) > 0 Then
ReDim L4(1 To .NumeroLayers(4))
Get #fh, , L4
For i = 1 To .NumeroLayers(4)
InitGrh MapData(L4(i).X, L4(i).Y).Graphic(4), L4(i).grhindex
Next i
End If
If .NumeroTriggers > 0 Then
ReDim Triggers(1 To .NumeroTriggers)
Get #fh, , Triggers
For i = 1 To .NumeroTriggers
MapData(Triggers(i).X, Triggers(i).Y).Trigger = Triggers(i).Trigger
Next i
End If
If .NumeroParticulas > 0 Then
ReDim Particulas(1 To .NumeroParticulas)
Get #fh, , Particulas
'ACA VA EL SISTEMA DE PARTÍCULAS EN EL MAPDATA(X,Y).PART...
End If
If .NumeroLuces > 0 Then
ReDim Luces(1 To .NumeroLuces)
Get #fh, , Luces
'ACÁ VA EL SISTEMA DE LUCES
End If
If .NumeroOBJs > 0 Then
ReDim Objetos(1 To .NumeroOBJs)
Get #fh, , Objetos
For i = 1 To .NumeroOBJs
'Erase OBJs
MapData(Objetos(i).X, Objetos(i).Y).ObjGrh.grhindex = 0
Next i
End If
If .NumeroNPCs > 0 Then
ReDim NPCs(1 To .NumeroNPCs)
Get #fh, , NPCs
For i = 1 To .NumeroNPCs
MapData(NPCs(i).X, NPCs(i).Y).NPCIndex = NPCs(i).NPCIndex
Next
End If
End With
Close fh
For j = MapSize.YMin To MapSize.YMax
For i = MapSize.XMin To MapSize.XMax
If L1(i, j) > 0 Then
InitGrh MapData(i, j).Graphic(1), L1(i, j)
End If
Next i
Next j
MapDat.map_name = Trim$(MapDat.map_name)
CurMap = MapRoute
Exit Sub
ErrorHandler:
If fh <> 0 Then Close fh
End Sub
- Código:
Private Type tMapSize
XMax As Integer
XMin As Integer
YMax As Integer
YMin As Integer
End Type
Private Type tMapHeader
NumeroBloqueados As Long
NumeroLayers(2 To 4) As Long
NumeroTriggers As Long
NumeroLuces As Long
NumeroParticulas As Long
NumeroNPCs As Long
NumeroOBJs As Long
NumeroTE As Long
End Type
Private Type tDatosBloqueados
X As Integer
Y As Integer
End Type
Private Type tDatosGrh
X As Integer
Y As Integer
grhindex As Long
End Type
Private Type tDatosTrigger
X As Integer
Y As Integer
Trigger As Integer
End Type
Private Type tDatosLuces
X As Integer
Y As Integer
color As Long
Rango As Byte
End Type
Private Type tDatosParticulas
X As Integer
Y As Integer
Particula As Long
End Type
Private Type tDatosNPC
X As Integer
Y As Integer
NPCIndex As Integer
End Type
Private Type tDatosObjs
X As Integer
Y As Integer
OBJIndex As Integer
ObjAmmount As Integer
End Type
Private Type tDatosTE
X As Integer
Y As Integer
DestM As Integer
DestX As Integer
DestY As Integer
End Type
Private Type tMapDat
map_name As String * 64
battle_mode As Byte
backup_mode As Byte
restrict_mode As String * 4
music_number As String * 16
zone As String * 16
terrain As String * 16
ambient As String * 16
base_light As Long
letter_grh As Long
extra1 As Long
extra2 As Long
extra3 As String * 32
End Type
Private MapSize As tMapSize
Private MapDat As tMapDat
Buscamos Sub LoadOBJData() y lo reemplazamos todo por:
- Código:
Sub LoadOBJData()
'***************************************************
'Author: Unknown
'Last Modification: -
'
'***************************************************
'###################################################
'# ATENCION PELIGRO #
'###################################################
'
'¡¡¡¡ NO USAR GetVar PARA LEER DESDE EL OBJ.DAT !!!!
'
'El que ose desafiar esta LEY, se las tendrá que ver
'con migo. Para leer desde el OBJ.DAT se deberá usar
'la nueva clase clsLeerInis.
'
'Alejo
'
'###################################################
'Call LogTarea("Sub LoadOBJData")
On Error GoTo Errhandler
If frmMain.Visible Then frmMain.txStatus.Caption = "Cargando base de datos de los objetos."
'*****************************************************************
'Carga la lista de objetos
'*****************************************************************
Dim Object As Integer
Dim Leer As New clsIniReader
Call Leer.Initialize(DatPath & "Obj.dat")
'obtiene el numero de obj
NumObjDatas = val(Leer.GetValue("INIT", "NumObjs"))
frmCargando.cargar.min = 0
frmCargando.cargar.max = NumObjDatas
frmCargando.cargar.Value = 0
ReDim Preserve ObjData(1 To NumObjDatas) As ObjData
For Object = 1 To NumObjDatas
ObjData(Object).name = Leer.GetValue("OBJ" & Object, "Name")
'Pablo (ToxicWaste) Log de Objetos.
ObjData(Object).Log = val(Leer.GetValue("OBJ" & Object, "Log"))
ObjData(Object).NoLog = val(Leer.GetValue("OBJ" & Object, "NoLog"))
'07/09/07
ObjData(Object).GrhIndex = val(Leer.GetValue("OBJ" & Object, "GrhIndex"))
If ObjData(Object).GrhIndex = 0 Then
ObjData(Object).GrhIndex = ObjData(Object).GrhIndex
End If
ObjData(Object).OBJType = val(Leer.GetValue("OBJ" & Object, "ObjType"))
ObjData(Object).Newbie = val(Leer.GetValue("OBJ" & Object, "Newbie"))
ObjData(Object).SubTipo = val(Leer.GetValue("OBJ" & Object, "SubTipo"))
With ObjData(Object)
Select Case ObjData(Object).OBJType
Case eOBJType.otArmadura
If .SubTipo = 1 Then
ObjData(Object).CascoAnim = val(Leer.GetValue("OBJ" & Object, "Anim"))
ElseIf .SubTipo = 2 Then
ObjData(Object).ShieldAnim = val(Leer.GetValue("OBJ" & Object, "Anim"))
End If
ObjData(Object).Real = val(Leer.GetValue("OBJ" & Object, "Real"))
ObjData(Object).Caos = val(Leer.GetValue("OBJ" & Object, "Caos"))
ObjData(Object).Milicia = val(Leer.GetValue("OBJ" & Object, "Milicia"))
ObjData(Object).LingH = val(Leer.GetValue("OBJ" & Object, "LingH"))
ObjData(Object).LingP = val(Leer.GetValue("OBJ" & Object, "LingP"))
ObjData(Object).LingO = val(Leer.GetValue("OBJ" & Object, "LingO"))
ObjData(Object).SkHerreria = val(Leer.GetValue("OBJ" & Object, "SkHerreria"))
ObjData(Object).AnilloPower = val(Leer.GetValue("obj" & Object, "AnilloPower"))
Case eOBJType.otNudillos
ObjData(Object).LingH = val(Leer.GetValue("OBJ" & Object, "LingH"))
ObjData(Object).LingP = val(Leer.GetValue("OBJ" & Object, "LingP"))
ObjData(Object).LingO = val(Leer.GetValue("OBJ" & Object, "LingO"))
ObjData(Object).SkHerreria = val(Leer.GetValue("OBJ" & Object, "SkHerreria"))
ObjData(Object).MaxHIT = val(Leer.GetValue("OBJ" & Object, "MaxHIT"))
ObjData(Object).MinHIT = val(Leer.GetValue("OBJ" & Object, "MinHIT"))
ObjData(Object).WeaponAnim = val(Leer.GetValue("OBJ" & Object, "Anim"))
Case eOBJType.otWeapon
ObjData(Object).WeaponAnim = val(Leer.GetValue("OBJ" & Object, "Anim"))
ObjData(Object).Apuñala = val(Leer.GetValue("OBJ" & Object, "Apuñala"))
ObjData(Object).Envenena = val(Leer.GetValue("OBJ" & Object, "Envenena"))
ObjData(Object).MaxHIT = val(Leer.GetValue("OBJ" & Object, "MaxHIT"))
ObjData(Object).MinHIT = val(Leer.GetValue("OBJ" & Object, "MinHIT"))
ObjData(Object).proyectil = val(Leer.GetValue("OBJ" & Object, "Proyectil"))
ObjData(Object).Municion = val(Leer.GetValue("OBJ" & Object, "Municiones"))
ObjData(Object).StaffPower = val(Leer.GetValue("OBJ" & Object, "StaffPower"))
ObjData(Object).StaffDamageBonus = val(Leer.GetValue("OBJ" & Object, "StaffDamageBonus"))
ObjData(Object).Refuerzo = val(Leer.GetValue("OBJ" & Object, "Refuerzo"))
ObjData(Object).LingH = val(Leer.GetValue("OBJ" & Object, "LingH"))
ObjData(Object).LingP = val(Leer.GetValue("OBJ" & Object, "LingP"))
ObjData(Object).LingO = val(Leer.GetValue("OBJ" & Object, "LingO"))
ObjData(Object).SkHerreria = val(Leer.GetValue("OBJ" & Object, "SkHerreria"))
ObjData(Object).Real = val(Leer.GetValue("OBJ" & Object, "Real"))
ObjData(Object).Caos = val(Leer.GetValue("OBJ" & Object, "Caos"))
Case eOBJType.otInstrumentos
ObjData(Object).Snd1 = val(Leer.GetValue("OBJ" & Object, "SND1"))
ObjData(Object).Snd2 = val(Leer.GetValue("OBJ" & Object, "SND2"))
ObjData(Object).Snd3 = val(Leer.GetValue("OBJ" & Object, "SND3"))
ObjData(Object).Real = val(Leer.GetValue("OBJ" & Object, "Real"))
ObjData(Object).Caos = val(Leer.GetValue("OBJ" & Object, "Caos"))
ObjData(Object).Milicia = val(Leer.GetValue("OBJ" & Object, "Milicia"))
Case eOBJType.otMinerales
ObjData(Object).MinSkill = val(Leer.GetValue("OBJ" & Object, "MinSkill"))
Case eOBJType.otPuertas, eOBJType.otBotellaVacia, eOBJType.otBotellaLlena
ObjData(Object).IndexAbierta = val(Leer.GetValue("OBJ" & Object, "IndexAbierta"))
ObjData(Object).IndexCerrada = val(Leer.GetValue("OBJ" & Object, "IndexCerrada"))
ObjData(Object).IndexCerradaLlave = val(Leer.GetValue("OBJ" & Object, "IndexCerradaLlave"))
Case otPociones
ObjData(Object).TipoPocion = val(Leer.GetValue("OBJ" & Object, "TipoPocion"))
ObjData(Object).MaxModificador = val(Leer.GetValue("OBJ" & Object, "MaxModificador"))
ObjData(Object).MinModificador = val(Leer.GetValue("OBJ" & Object, "MinModificador"))
ObjData(Object).DuracionEfecto = val(Leer.GetValue("OBJ" & Object, "DuracionEfecto"))
Case eOBJType.otBarcos
ObjData(Object).MinSkill = val(Leer.GetValue("OBJ" & Object, "MinSkill"))
ObjData(Object).MaxHIT = val(Leer.GetValue("OBJ" & Object, "MaxHIT"))
ObjData(Object).MinHIT = val(Leer.GetValue("OBJ" & Object, "MinHIT"))
Case eOBJType.otFlechas
ObjData(Object).MaxHIT = val(Leer.GetValue("OBJ" & Object, "MaxHIT"))
ObjData(Object).MinHIT = val(Leer.GetValue("OBJ" & Object, "MinHIT"))
ObjData(Object).Envenena = val(Leer.GetValue("OBJ" & Object, "Envenena"))
ObjData(Object).Paraliza = val(Leer.GetValue("OBJ" & Object, "Paraliza"))
Case eOBJType.otAnillo 'Pablo (ToxicWaste)
ObjData(Object).LingH = val(Leer.GetValue("OBJ" & Object, "LingH"))
ObjData(Object).LingP = val(Leer.GetValue("OBJ" & Object, "LingP"))
ObjData(Object).LingO = val(Leer.GetValue("OBJ" & Object, "LingO"))
ObjData(Object).SkHerreria = val(Leer.GetValue("OBJ" & Object, "SkHerreria"))
Case eOBJType.otPasajes
ObjData(Object).DesdeMap = val(Leer.GetValue("OBJ" & Object, "Desde"))
ObjData(Object).HastaMap = val(Leer.GetValue("OBJ" & Object, "Map"))
ObjData(Object).HastaX = val(Leer.GetValue("OBJ" & Object, "X"))
ObjData(Object).HastaY = val(Leer.GetValue("OBJ" & Object, "Y"))
Case eOBJType.otContenedores
ObjData(Object).CuantoAgrega = val(Leer.GetValue("OBJ" & Object, "CuantoAgrega"))
End Select
End With
ObjData(Object).Ropaje = val(Leer.GetValue("OBJ" & Object, "NumRopaje"))
ObjData(Object).HechizoIndex = val(Leer.GetValue("OBJ" & Object, "HechizoIndex"))
ObjData(Object).LingoteIndex = val(Leer.GetValue("OBJ" & Object, "LingoteIndex"))
ObjData(Object).MineralIndex = val(Leer.GetValue("OBJ" & Object, "MineralIndex"))
ObjData(Object).MaxHP = val(Leer.GetValue("OBJ" & Object, "MaxHP"))
ObjData(Object).MinHP = val(Leer.GetValue("OBJ" & Object, "MinHP"))
ObjData(Object).Mujer = val(Leer.GetValue("OBJ" & Object, "Mujer"))
ObjData(Object).Hombre = val(Leer.GetValue("OBJ" & Object, "Hombre"))
ObjData(Object).MinHam = val(Leer.GetValue("OBJ" & Object, "MinHam"))
ObjData(Object).MinSed = val(Leer.GetValue("OBJ" & Object, "MinAgu"))
ObjData(Object).MinDef = val(Leer.GetValue("OBJ" & Object, "MINDEF"))
ObjData(Object).MaxDef = val(Leer.GetValue("OBJ" & Object, "MAXDEF"))
ObjData(Object).def = (ObjData(Object).MinDef + ObjData(Object).MaxDef) / 2
ObjData(Object).RazaTipo = val(Leer.GetValue("OBJ" & Object, "RazaTipo"))
ObjData(Object).RazaEnana = val(Leer.GetValue("OBJ" & Object, "RazaEnana"))
ObjData(Object).MinELV = val(Leer.GetValue("OBJ" & Object, "MinELV"))
ObjData(Object).NoSeCae = val(Leer.GetValue("OBJ" & Object, "NoSeCae"))
ObjData(Object).Valor = val(Leer.GetValue("OBJ" & Object, "Valor"))
ObjData(Object).Crucial = val(Leer.GetValue("OBJ" & Object, "Crucial"))
ObjData(Object).Cerrada = val(Leer.GetValue("OBJ" & Object, "abierta"))
If ObjData(Object).Cerrada = 1 Then
ObjData(Object).Llave = val(Leer.GetValue("OBJ" & Object, "Llave"))
ObjData(Object).clave = val(Leer.GetValue("OBJ" & Object, "Clave"))
End If
'Puertas y llaves
ObjData(Object).clave = val(Leer.GetValue("OBJ" & Object, "Clave"))
ObjData(Object).texto = Leer.GetValue("OBJ" & Object, "Texto")
ObjData(Object).GrhSecundario = val(Leer.GetValue("OBJ" & Object, "VGrande"))
ObjData(Object).Agarrable = val(Leer.GetValue("OBJ" & Object, "Agarrable"))
ObjData(Object).ForoID = Leer.GetValue("OBJ" & Object, "ID")
'CHECK: !!! Esto es provisorio hasta que los de Dateo cambien los valores de string a numerico
Dim i As Integer
Dim N As Integer
Dim S As String
i = 1: N = 1
S = Leer.GetValue("OBJ" & Object, "CP" & i)
Do While Len(S) > 0
If ClaseToEnum(S) > 0 Then ObjData(Object).ClaseProhibida(N) = ClaseToEnum(S)
If N = NUMCLASES Then Exit Do
N = N + 1: i = i + 1
S = Leer.GetValue("OBJ" & Object, "CP" & i)
Loop
ObjData(Object).ClaseTipo = val(Leer.GetValue("OBJ" & Object, "ClaseTipo"))
ObjData(Object).DefensaMagicaMax = val(Leer.GetValue("OBJ" & Object, "DefensaMagicaMax"))
ObjData(Object).DefensaMagicaMin = val(Leer.GetValue("OBJ" & Object, "DefensaMagicaMin"))
ObjData(Object).SkCarpinteria = val(Leer.GetValue("OBJ" & Object, "SkCarpinteria"))
If ObjData(Object).SkCarpinteria > 0 Then
ObjData(Object).Madera = val(Leer.GetValue("OBJ" & Object, "Madera"))
End If
frmCargando.cargar.Value = frmCargando.cargar.Value + 1
Next Object
Set Leer = Nothing
Exit Sub
Errhandler:
MsgBox "error cargando objetos " & Err.Number & ": " & Err.description
End Sub
Ahora buscamos:
- Código:
Public Function EsNewbie(ByVal UserIndex As Integer) As Boolean
- Código:
Public Function ClaseToEnum(ByVal Clase As String) As eClass
Dim i As Byte
For i = 1 To NUMCLASES
If UCase$(ListaClases(i)) = UCase$(Clase) Then
ClaseToEnum = i
End If
Next i
End Function
- Código:
Public Type ObjData
name As String 'Nombre del obj
OBJType As eOBJType 'Tipo enum que determina cuales son las caract del obj
GrhIndex As Integer ' Indice del grafico que representa el obj
GrhSecundario As Integer
'Solo contenedores
MaxItems As Integer
Conte As Inventario
Apuñala As Byte
HechizoIndex As Integer
ForoID As String
MinHP As Integer ' Minimo puntos de vida
MaxHP As Integer ' Maximo puntos de vida
SubTipo As Byte
MineralIndex As Integer
LingoteInex As Integer
proyectil As Integer
Municion As Integer
Crucial As Byte
Newbie As Integer
'Pasajes By Ladder
DesdeMap As Long
HastaMap As Long
HastaY As Byte
HastaX As Byte
NecesitaSkill As Byte
CantidadSkill As Byte
'Pociones
TipoPocion As Byte
MaxModificador As Integer
MinModificador As Integer
DuracionEfecto As Long
MinSkill As Integer
LingoteIndex As Integer
MinHIT As Integer 'Minimo golpe
MaxHIT As Integer 'Maximo golpe
MinHam As Integer
MinSed As Integer
def As Integer
MinDef As Integer ' Armaduras
MaxDef As Integer ' Armaduras
Ropaje As Integer 'Indice del grafico del ropaje
WeaponAnim As Integer ' Apunta a una anim de armas
ShieldAnim As Integer ' Apunta a una anim de escudo
CascoAnim As Integer
Valor As Long ' Precio
Cerrada As Integer
Llave As Byte
clave As Long 'si clave=llave la puerta se abre o cierra
IndexAbierta As Integer
IndexCerrada As Integer
IndexCerradaLlave As Integer
RazaTipo As Byte '1 Altas 2 Bajas 3 Orcas
RazaEnana As Byte
MinELV As Byte
CuantoAgrega As Integer ' Para los contenedores
Mujer As Byte
Hombre As Byte
Envenena As Byte
Paraliza As Byte
Agarrable As Byte
LingH As Integer
LingO As Integer
LingP As Integer
Madera As Integer
PielLobo As Integer
PielOsoPardo As Integer
PielOsoPolar As Integer
SkSastreria As Integer
SkHerreria As Integer
SkCarpinteria As Integer
texto As String
'Clases que no tienen permitido usar este obj
ClaseProhibida(1 To NUMCLASES) As eClass
ClaseTipo As Byte
Snd1 As Integer
Snd2 As Integer
Snd3 As Integer
Real As Integer
Caos As Integer
Milicia As Integer
StaffPower As Integer
NoSeCae As Integer
AnilloPower As Integer
StaffDamageBonus As Integer
DefensaMagicaMax As Integer
DefensaMagicaMin As Integer
Refuerzo As Byte
Log As Byte 'es un objeto que queremos loguear? Pablo (ToxicWaste) 07/09/07
NoLog As Byte 'es un objeto que esta prohibido loguear?
Upgrade As Integer
Guante As Integer
Acuchilla As Integer
End Type
- Código:
Public Enum eOBJType
otUseOnce = 1 ' 1 Comidas
otWeapon = 2
otArmadura = 3
otArboles = 4
otGuita = 5
otPuertas = 6
otContenedores = 7
otCarteles = 8
otLlaves = 9
otForos = 10
otPociones = 11
otLibros = 12
otBebidas = 13
otLeña = 14
otFuego = 15
otESCUDO = 16
otCASCO = 17
otAnillo = 18
otTeleport = 19
otMuebles = 20
otItemsMagicos = 21
otYacimiento = 22
otMinerales = 23
otPergaminos = 24
otInstrumentos = 26
otYunque = 27
otFragua = 28
otLingotes = 29
otPieles = 30
otBarcos = 31
otFlechas = 32
otBotellaVacia = 33
otBotellaLlena = 34
otManchas = 35 'No se usa
otRuna = 38
otPasajes = 36
otMapa = 37
otBolsas = 39 ' Blosas de Oro (contienen más de 10k de oro)
otPozos = 40 'Pozos Mágicos
otEsposas = 41
otRaíces = 42
otCadáveres = 43
otMonturas = 44
otPuestos = 45 ' Puestos de Entrenamiento
otNudillos = 46
otAnillos = 47
otCorreo = 48
otAnilloEspec = 49
otCualquiera = 1000
End Enum
- Código:
Public Const MAX_NORMAL_INVENTORY_SLOTS As Byte = 30
- Código:
Public Const MAX_NORMAL_INVENTORY_SLOTS As Byte = 25
- Código:
Public Function GetWeaponAnim(ByVal UserIndex As Integer, ByVal ObjIndex As Integer) As Integer
- Código:
Public Function GetWeaponAnim(ByVal UserIndex As Integer, ByVal ObjIndex As Integer) As Integer
'***************************************************
'Author: Torres Patricio (Pato)
'Last Modification: 03/29/10
'
'***************************************************
Dim Tmp As Integer
With UserList(UserIndex)
GetWeaponAnim = ObjData(ObjIndex).WeaponAnim
End With
End Function
- Código:
Buscar Public Function PuedeAcuchillar(ByVal UserIndex As Integer) As Boolean
- Código:
If PuedeAcuchillar(UserIndex) Then
Call DoAcuchillar(UserIndex, NpcIndex, 0, daño)
End If
- Código:
Public Function getMaxInventorySlots(ByVal UserIndex As Integer) As Byte
- Código:
If .MaderaElfica > 0 Then Call QuitarObjetos(LeñaElfica, .MaderaElfica * CantidadItems, UserIndex)
- Código:
If .MaderaElfica > 0 Then
If Not TieneObjetos(LeñaElfica, .MaderaElfica * Cantidad, UserIndex) Then
If ShowMsg Then Call WriteConsoleMsg(UserIndex, "No tienes suficiente madera élfica.", FontTypeNames.FONTTYPE_INFO)
CarpinteroTieneMateriales = False
Exit Function
End If
End If
- Código:
If .MaderaElfica > 0 Then
If Not TieneObjetos(LeñaElfica, CInt(.MaderaElfica - ObjData(ItemIndex).MaderaElfica * PORCENTAJE_MATERIALES_UPGRADE), UserIndex) Then
Call WriteConsoleMsg(UserIndex, "No tienes suficiente madera élfica.", FontTypeNames.FONTTYPE_INFO)
TieneMaterialesUpgrade = False
Exit Function
End If
End If
- Código:
If .MaderaElfica > 0 Then Call QuitarObjetos(LeñaElfica, CInt(.MaderaElfica - ObjData(ItemIndex).MaderaElfica * PORCENTAJE_MATERIALES_UPGRADE), UserIndex)
- Código:
Case eOBJType.otMochilas
If .flags.Muerto = 1 Then
Call WriteConsoleMsg(UserIndex, "¡¡Estas muerto!! Solo podes usar items cuando estas vivo. ", FontTypeNames.FONTTYPE_INFO)
Exit Sub
End If
If .Invent.Object(Slot).Equipped Then
Call Desequipar(UserIndex, Slot)
Exit Sub
End If
If .Invent.MochilaEqpObjIndex > 0 Then
Call Desequipar(UserIndex, .Invent.MochilaEqpSlot)
End If
.Invent.Object(Slot).Equipped = 1
.Invent.MochilaEqpObjIndex = ObjIndex
.Invent.MochilaEqpSlot = Slot
.CurrentInventorySlots = MAX_NORMAL_INVENTORY_SLOTS + Obj.MochilaType * 5
Call WriteAddSlots(UserIndex, Obj.MochilaType)
- Código:
'Solo se habilita la ropa exclusiva para Drows por ahora. Pablo (ToxicWaste)
If (.raza <> eRaza.Drow) And ObjData(ItemIndex).RazaDrow Then
CheckRazaUsaRopa = False
End If
- Código:
'¿Hay un arbol donde clickeo?
If ObjData(DummyInt).OBJType = eOBJType.otArboles And .Invent.WeaponEqpObjIndex = HACHA_LEÑADOR Then
Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_TALAR, .Pos.X, .Pos.Y))
Call DoTalar(UserIndex)
ElseIf ObjData(DummyInt).OBJType = eOBJType.otArbolElfico And .Invent.WeaponEqpObjIndex = HACHA_LEÑA_ELFICA Then
If .Invent.WeaponEqpObjIndex = HACHA_LEÑA_ELFICA Then
Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_TALAR, .Pos.X, .Pos.Y))
Call DoTalar(UserIndex, True)
Else
Call WriteConsoleMsg(UserIndex, "El hacha utilizado no es suficientemente poderosa.", FontTypeNames.FONTTYPE_INFO)
End If
End If
- Código:
If ObjData(DummyInt).OBJType = eOBJType.otArboles And .Invent.WeaponEqpObjIndex = HACHA_LEÑADOR Then
Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_TALAR, .Pos.X, .Pos.Y))
Call DoTalar(UserIndex)
End If
- Código:
Call .WriteInteger(Obj.MaderaElfica)
- Código:
EsObjetoFijo = OBJType = eOBJType.otForos Or _
OBJType = eOBJType.otCarteles Or _
OBJType = eOBJType.otArboles Or _
OBJType = eOBJType.otYacimiento
Temas similares
» [Aporte] Carga de recursos de ImperiumAO - Dx8 (Parte1)
» [Aporte] Carga de recursos de ImperiumAO - Dx8 (Parte3)
» [Problema] Carga de recursos comprimidos IAO Clon
» [Aporte] Interfaces ImperiumAO 1.5.0
» [Aporte] Carga particula en mapa desde un Frm
» [Aporte] Carga de recursos de ImperiumAO - Dx8 (Parte3)
» [Problema] Carga de recursos comprimidos IAO Clon
» [Aporte] Interfaces ImperiumAO 1.5.0
» [Aporte] Carga particula en mapa desde un Frm
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.