01-06-2006, 09:35 PM
Author: Fear
Difficulty: 1/5
This is no big life changing tutorial, so don't think it is (I doubt you would anyway). It does, however, add a nice change to the game, because you don't always do the same damage. You do anywhere from 80% to 100% of it.
:: SERVER SIDE ::
Go to ModHandleData and find Sub HandleData.
Find:Replace this with:All the new code does, is randomize possible damage from 80% to 100%, and then subtracts your foes armor from it. Simple enough, PvP now has damage ranges.
Find:
Replace it with:That's all!
Difficulty: 1/5
This is no big life changing tutorial, so don't think it is (I doubt you would anyway). It does, however, add a nice change to the game, because you don't always do the same damage. You do anywhere from 80% to 100% of it.
:: SERVER SIDE ::
Go to ModHandleData and find Sub HandleData.
Find:
Code:
If Not CanPlayerCriticalHit(Index) Then
Damage = GetPlayerDamage(Index) - GetPlayerProtection(i)
Code:
If Not CanPlayerCriticalHit(Index) Then
n = Int((((GetPlayerDamage(Index) / 5) * 4) * Rnd) + 1)
If n < (n * 4 / 5) Then
n = (n * 4 / 5)
End If
Damage = n - GetPlayerProtection(i)
Find:
Code:
If Not CanPlayerCriticalHit(Index) Then
Damage = GetPlayerDamage(Index) -
Int(Npc(MapNpc(GetPlayerMap(Index), i).Num).DEF / 2)
Replace it with:
Code:
If Not CanPlayerCriticalHit(Index) Then
n = Int((((GetPlayerDamage(Index) / 5) * 4) * Rnd) + 1)
If n < (n * 4 / 5) Then
n = (n * 4 / 5)
End If
Damage = n -
Int(Npc(MapNpc(GetPlayerMap(Index), n).Num).DEF / 2)