me paso esto....
Este es el Sub MuereNpc q tengo
Sub MuereNpc(ByVal NpcIndex As Integer, ByVal UserIndex As Integer)
On Error GoTo errhandler
' Call LogTarea("Sub MuereNpc")
Dim MiNPC As npc
MiNPC = Npclist(NpcIndex)
If (esPretoriano(NpcIndex) = 4) Then
'seteamos todos estos 'flags' acorde para que cambien solos de alcoba
Dim i As Integer
Dim j As Integer
Dim NPCI As Integer
For i = 8 To 90
For j = 8 To 90
NPCI = MapData(Npclist(NpcIndex).Pos.Map, i, j).NpcIndex
If NPCI > 0 Then
If esPretoriano(NPCI) > 0 Then
Npclist(NPCI).Invent.ArmourEqpSlot = IIf(Npclist(NpcIndex).Pos.X > 50, 1, 5)
End If
End If
Next j
Next i
Call CrearClanPretoriano(MAPA_PRETORIANO, Npclist(NpcIndex).Pos.X, Npclist(NpcIndex).Pos.Y)
ElseIf esPretoriano(NpcIndex) > 0 Then
Npclist(NpcIndex).Invent.ArmourEqpSlot = 0
End If
'Quitamos el npc
Call QuitarNPC(NpcIndex)
If UserIndex > 0 Then ' Lo mato un usuario?
If MiNPC.flags.Snd3 > 0 Then Call SendData(ToPCArea, UserIndex, UserList(UserIndex).Pos.Map, "TW" & MiNPC.flags.Snd3)
UserList(UserIndex).flags.TargetNPC = 0
UserList(UserIndex).flags.TargetNpcTipo = 0
'El user que lo mato tiene mascotas?
If UserList(UserIndex).NroMacotas > 0 Then
Dim t As Integer
For t = 1 To MAXMASCOTAS
If UserList(UserIndex).MascotasIndex(t) > 0 Then
If Npclist(UserList(UserIndex).MascotasIndex(t)).TargetNPC = NpcIndex Then
Call FollowAmo(UserList(UserIndex).MascotasIndex(t))
End If
End If
Next t
End If
If MiNPC.Stats.Alineacion = 0 Then
If MiNPC.Numero = Guardias Then
Call VolverCriminal(UserIndex)
End If
If MiNPC.MaestroUser = 0 Then
Call AddtoVar(UserList(UserIndex).Reputacion.AsesinoRep, vlASESINO, MAXREP)
End If
ElseIf MiNPC.Stats.Alineacion = 1 Then
Call AddtoVar(UserList(UserIndex).Reputacion.PlebeRep, vlCAZADOR, MAXREP)
ElseIf MiNPC.Stats.Alineacion = 2 Then
Call AddtoVar(UserList(UserIndex).Reputacion.NobleRep, vlASESINO / 2, MAXREP)
ElseIf MiNPC.Stats.Alineacion = 4 Then
Call AddtoVar(UserList(UserIndex).Reputacion.PlebeRep, vlCAZADOR, MAXREP)
End If
If Not Criminal(UserIndex) And UserList(UserIndex).Faccion.FuerzasCaos = 1 Then Call ExpulsarFaccionCaos(UserIndex)
'Controla el nivel del usuario
Call CheckUserLevel(UserIndex)
End If ' Userindex > 0
If MiNPC.MaestroUser = 0 Then
'Tiramos el oro
Call NPCTirarOro(MiNPC)
'Tiramos el inventario
Call NPC_TIRAR_ITEMS(MiNPC)
End If
'ReSpawn o no
Call ReSpawnNpc(MiNPC)
Exit Sub
errhandler:
Call LogError("Error en MuereNpc")
End Sub
Y esto es el Sub CalcularDarExp Del SistemaCombate (Code)
'[KEVIN]
'
'[Alejo]
'Modifique un poco el sistema de exp por golpe, ahora
'son 2/3 de la exp mientras esta vivo, el resto se
'obtiene al matarlo.
'Ahora además
Sub CalcularDarExp(ByVal UserIndex As Integer, ByVal NpcIndex As Integer, ByVal ElDaño As Long)
Dim ExpSinMorir As Long
Dim ExpaDar As Long
Dim TotalNpcVida As Long
If ElDaño Npclist(NpcIndex).Stats.MinHP Then ElDaño = Npclist(NpcIndex).Stats.MinHP
'totalnpcvida _____ ExpSinMorir
'daño _____ (daño * ExpSinMorir) / totalNpcVida
ExpaDar = CLng((ElDaño) * (ExpSinMorir / TotalNpcVida))
If ExpaDar Npclist(NpcIndex).flags.ExpCount Then
ExpaDar = Npclist(NpcIndex).flags.ExpCount
Npclist(NpcIndex).flags.ExpCount = 0
Else
Npclist(NpcIndex).flags.ExpCount = Npclist(NpcIndex).flags.ExpCount - ExpaDar
End If
If ExpaDar > 0 Then
If UserList(UserIndex).PartyIndex > 0 Then
Call mdParty.ObtenerExito(UserIndex, ExpaDar, Npclist(NpcIndex).Pos.Map, Npclist(NpcIndex).Pos.X, Npclist(NpcIndex).Pos.Y)
Else
Call AddtoVar(UserList(UserIndex).Stats.Exp, ExpaDar, MAXEXP)
Call SendData(ToIndex, UserIndex, 0, "||Has ganado " & ExpaDar & " puntos de experiencia." & FONTTYPE_FIGHT)
End If
Call CheckUserLevel(UserIndex)
End If
'[/KEVIN]
End Sub
Fíjate si podes hacer algo con esto para sacar la exp. por golpe y si necesitas algo mas avísame.
Yo me fije algunas cosas pero no me da la exp. ni por golpe ni por nada