enderalse/source/scripts/_00e_epondeath.psc

35 lines
999 B
Plaintext

Scriptname _00E_EPOnDeath extends ObjectReference
{Monster death: Experience points are given to the player}
Event OnDeath(Actor akKiller)
If akKiller == None || (akKiller.GetFactionRank(EPFaction) >= 0) || akKiller.HasEffectKeyword(BlameSpellKeyword) || HasBlameSpell
If RewardExp == 0
RewardExp = 50
EndIf
_00E_EPHandler.GiveEP(RewardExp)
EndIf
endEvent
Event OnDying(Actor akKiller)
; needs to be conditioned because of other scripts, for example _00E_FrenzySC, setting this bool too, otherwise it's unclear which OnDying Event gets evaluated first
If self.HasEffectKeyword(BlameSpellKeyword)
HasBlameSpell = true
EndIf
EndEvent
bool Property HasBlameSpell Auto hidden ; Do not edit this. This bool is used to determine whether a spell triggered by a trap or another magic effect (which should give the player EP) killed this actor.
Keyword Property BlameSpellKeyword Auto
Faction Property EPFaction Auto
Actor Property PlayerREF Auto
Int Property RewardExp auto