Jump to content

Magic effect reverse engineering


Stealth21

Recommended Posts

For the first question, use "ModPCMiscStat 10 1" command.

Thanks, good to know.

#2 appears to be an actual bug in the game. It can be fixed with a script though, I'll include the fix in an update of one of my mods.

I am an owner of the one of the first DVDs released with that game, and I decided to make the additions to the "Unofficial Oblivion Patch" with some fixes (mostly orphography) and novations (like upgrade this and that item if it has a more powerful self type in the Oblivion.esm, for example, MG12AmuletX) while playing now, just for myself though. Can you, please, share that script with me if you don't mind that it is your intellectual property?)

Edited by Stealth21
Link to comment
Share on other sites

I have it somewhere as well as I did preordered the Special Edition with the septim coin and all other stuff that came with it. I do think I got it in the mailbox at the release date.

Link to comment
Share on other sites

Is DVD version of the game somehow different? I used it for a long time, but switched to GOG now.

Well... it is not. But it has an English voices (I do not like the translated, the englishmans were ensounding the characters with more expression than the translators) and a translated text I just used to. In GOG version there is an ability to play with an original English voices as well, but when I tried to play that, there are places when the voices are translated too (maybe they were because of the Unofficial Oblivion Patch though...)

 

Anyway, I have posted an update, featuring the aforementioned fix. You're welcome to take a look at how it's done (script is pretty simple, but it requires OBSE and MenuQue).

Yes, I thought that the fix could be an alternative menu. Good job. However, for me that is unacceptable, because I would like to not include the dependences such as MenuQue in this case.

Edited by Stealth21
Link to comment
Share on other sites

  • 2 months later...

Alright. Skipping the rewritting the STRP magic effect hardcoded script, I decided to create a spell with an idea as to capture NPCs into the white grand soulgem. I met the next problems while doing it:

1. There are setting variables with the text inside them. For example, I need sSoulCaptured. How to print it's text with the "Message" function? It always was a problem for me to find the info about the things with the percent such as %.0f for the floats/shorts/ints and etc for non-OBSE types of functions Message and MessageBox. To this moment, I am using an alternative way with GetStringGameSetting function, but is it have to be realized in this way?

 

2. The visual effect when the soul is successfully captured is unique. I would like to it be played using some function like "PlayMagicEffectVisuals DSPL", but comparing to the example code I provided, the visuals of it are almost same but with a purple whirl. But I need it without the whirl. Is it some way possible to trigger those visuals to be played? For the answer, I would like to get an exact command.

 

3. The most difficult question of the three here as I think. That spell can be interact not only between Player<->NPC but in this way NPC<->NPC too, so if a caster NPC have the empty grand soulgem and he/she successfully captured some target NPC's soul, that soulgem will be filled. Currently, the situation is if a multiple NPCs casted that spell to one person and that person becomes dead - all those caster NPCs will get their empty grand soulgems filled.

When the spell is applied to the target, that target will have the activeeffect from that spell.

So, the question is how to check that there is an activeeffect with an exact script was already casted to NPC? It is not GetNthActiveEffectCode because the target can have some another activeeffect with a script magic effect. I need that that activeeffect with a certain script be removed in case when the target was hit with the spell which will provide the same activeeffect.

-----------------------------------------------------------------------------------

Nothing was solved:

#1 Leaved as I described.

#2 Used STRP magic effect's visuals when the NPC affected with that spell is died and the soul of that NPC was captured (spell caster' have the grand empty soulgem which is filled with a grand soul as a result). Those visuals are the dark purple whirl (which is different comparing to the visuals from the soul capturing analogy).

#3 A workaround was thought out.

 

But that spell is ready. When the NPC is affected with that spell, it becomes look like a ghost but with less transparency. If NPC was a ghost from the beggining, that ghost NPC will be not affected with that part of the spell's script code which changes the transparency and applies the ghost shader effect visuals. Not only the player can catch the souls with that spell but also the NPCs can too. Casting that spell from the different casters will result that the only active effect from the last caster will exist (to avoid that all of the casters will catch the soul of that NPC). When soul is captured (the caster had the empty Azura's Star or an empty grand soulgem) through that spell, the visuals from the STRP magic effect will appear, the empty Azura's Star or the empty grand soulgem (the owner is also thought out, so you will not 'privatize' the stolen soulgem after that spell) would be filled with the grand soul, and if target NPC was not a ghost from the beginning, the spell's ghost effect visuals will disappear. If when soul was captured by the player, it's "souls captured" stat will raise to 1. Like the original soul trap behaviour, the spell can be dispelled, so for the right work of the spell's ghost visuals disappearing, it is thought out whenever the spell is survived from the dispel magic effect. So I think I foresee everything)

Quest to include the script to define the ref variables which spell is operating with:

Title: zzSMNPCSoulTrapTargetsHandler

It's script: zzSMSENPCSoulTrapTargetsHanglerQuestSCRIPT

; When the NPC/creature is affected by the spell, that NPC/creature becomes actually affected by the
; active effect from that spell with an appropriate duration. Particular case when the spell contains
; the script effect among it's effects, the active effect from that spell applied will contain the certain
; script, BUT that scripted magic effect has no difference comparing to any another spell which contains
; script effect (means SCPT, code 1179010387) . There is no such function as to select/get refID variable
; of the active effect's script. Using the available in OBSE 0020 functions, it is possible to get the
; index of the corresponding ActiveEffect for the running script effect and the refID value of the actor
; the spell was casted by whom.
; If the same spell (means the same SpellID) is applied by the same caster, then this case that the last
; active effect will tell the same previous active effect to be finished. BUT
; if the same spell is applied by the different casters, then this leads not to the replacing of the seems
; same active effect, but instead to that target will be affected with the same script active effects of
; the SpellID spells. Though the scripts of those same active effects are equal, the values in their
; variables are separately own for the each one, so the casters are.
; The main purpose of this "quest" is to keep the ref variables in the game's memory like a global ones for
; the SESoulTrapNPCToWhiteSG spell process to operate with.

; Someone may consider this quest script and that spell as a prototype for the STRP hardcode magic
; effect script rewritement.

ref target1
ref target2
ref target3
ref target4
ref target5
ref target6
ref target7
ref target8
ref target9
ref target10
ref caster1
ref caster2
ref caster3
ref caster4
ref caster5
ref caster6
ref caster7
ref caster8
ref caster9
ref caster10
short wasNotGhost1
short wasNotGhost2
short wasNotGhost3
short wasNotGhost4
short wasNotGhost5
short wasNotGhost6
short wasNotGhost7
short wasNotGhost8
short wasNotGhost9
short wasNotGhost10

Begin GameMode

if ( GetGameLoaded == 1 )
	if ((( IsFormValid target1 ) == 0 ) || (( target1 != 0 ) && ( target1.GetDead == 1 )))
		let target1 := 0
		let caster1 := 0
		set wasNotGhost1 to 0
	endif
	if ((( IsFormValid target2 ) == 0 ) || (( target2 != 0 ) && ( target2.GetDead == 1 )))
		let target2 := 0
		let caster2 := 0
		set wasNotGhost2 to 0
	endif
	if ((( IsFormValid target3 ) == 0 ) || (( target3 != 0 ) && ( target3.GetDead == 1 )))
		let target3 := 0
		let caster3 := 0
		set wasNotGhost3 to 0
	endif
	if ((( IsFormValid target4 ) == 0 ) || (( target4 != 0 ) && ( target4.GetDead == 1 )))
		let target4 := 0
		let caster4 := 0
		set wasNotGhost4 to 0
	endif
	if ((( IsFormValid target5 ) == 0 ) || (( target5 != 0 ) && ( target5.GetDead == 1 )))
		let target5 := 0
		let caster5 := 0
		set wasNotGhost5 to 0
	endif
	if ((( IsFormValid target6 ) == 0 ) || (( target6 != 0 ) && ( target6.GetDead == 1 )))
		let target6 := 0
		let caster6 := 0
		set wasNotGhost6 to 0
	endif
	if ((( IsFormValid target7 ) == 0 ) || (( target7 != 0 ) && ( target7.GetDead == 1 )))
		let target7 := 0
		let caster7 := 0
		set wasNotGhost7 to 0
	endif
	if ((( IsFormValid target8 ) == 0 ) || (( target8 != 0 ) && ( target8.GetDead == 1 )))
		let target8 := 0
		let caster8 := 0
		set wasNotGhost8 to 0
	endif
	if ((( IsFormValid target9 ) == 0 ) || (( target9 != 0 ) && ( target9.GetDead == 1 )))
		let target9 := 0
		let caster9 := 0
		set wasNotGhost9 to 0
	endif
	if ((( IsFormValid target10 ) == 0 ) || (( target10 != 0 ) && ( target10.GetDead == 1 )))
		let target2 := 0
		let caster2 := 0
		set wasNotGhost2 to 0
	endif
endif

End

 

 

Spell:

ID: SESoulTrapNPCToWhiteSG

Name: Sin allforgiveness

Type: Spell

Auto-Calculate: Unchecked

Spell Level: Journeyman

Spell Cost: 80

ScriptEffectName: Sin allforgiveness (soul trap)

Range: Target

Duration: 15

School: Restoration

Visuals Effect: Soul trap

Effect is Hostile: Checked

Script: zzSMSESoulTrapNPCToWhiteSoulGemSpellScript

scn zzSMSESoulTrapNPCToWhiteSoulGemSpellScript

ref target
ref caster
ref iter
short ActiveEffectNumber
short ActiveEffectIter
short ActiveEffectMax
short ActionDone
short ActionCouldBe
string_var TextForPlayer

short targetNumber

short NotSurvivedAfterDisspel

Begin ScriptEffectStart

set ActiveEffectNumber to GetScriptActiveEffectIndex
let target := GetSelf
let caster := GetNthActiveEffectCaster ActiveEffectNumber

if ( target.IsActor != 1 ) || ( target.IsCreature == 1 ) || ( target.GetDead == 1 )
	target.DispelNthActiveEffect ActiveEffectNumber
	return
endif

if ( zzSMNPCSoulTrapTargetsHandler.caster1 == 0 ) ; && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster1 := caster
	let zzSMNPCSoulTrapTargetsHandler.target1 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost1 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 1
else;if ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target1 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster1 := caster
		set targetNumber to 1
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster2 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster2 := caster
	let zzSMNPCSoulTrapTargetsHandler.target2 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost2 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 2
elseif ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target2 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster2 := caster
		set targetNumber to 2
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster3 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster3 := caster
	let zzSMNPCSoulTrapTargetsHandler.target3 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost3 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 3
elseif ( zzSMNPCSoulTrapTargetsHandler.caster3 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target3 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster3 := caster
		set targetNumber to 3
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster4 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster4 := caster
	let zzSMNPCSoulTrapTargetsHandler.target4 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost4 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 4
elseif ( zzSMNPCSoulTrapTargetsHandler.caster4 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target4 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster4 := caster
		set targetNumber to 4
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster5 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster5 := caster
	let zzSMNPCSoulTrapTargetsHandler.target5 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost5 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 5
elseif ( zzSMNPCSoulTrapTargetsHandler.caster5 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target5 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster5 := caster
		set targetNumber to 5
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster6 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster6 := caster
	let zzSMNPCSoulTrapTargetsHandler.target6 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost6 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 6
elseif ( zzSMNPCSoulTrapTargetsHandler.caster6 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target6 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster6 := caster
		set targetNumber to 6
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster7 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster7 := caster
	let zzSMNPCSoulTrapTargetsHandler.target7 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost7 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 7
elseif ( zzSMNPCSoulTrapTargetsHandler.caster7 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target7 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster7 := caster
		set targetNumber to 7
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster8 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster8 := caster
	let zzSMNPCSoulTrapTargetsHandler.target8 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost8 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 8
elseif ( zzSMNPCSoulTrapTargetsHandler.caster8 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target8 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster8 := caster
		set targetNumber to 8
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster9 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster9 := caster
	let zzSMNPCSoulTrapTargetsHandler.target9 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost9 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 9
elseif ( zzSMNPCSoulTrapTargetsHandler.caster9 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target9 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster9 := caster
		set targetNumber to 9
	endif
endif
if ( zzSMNPCSoulTrapTargetsHandler.caster10 == 0 ) && ( targetNumber == 0 )
	let zzSMNPCSoulTrapTargetsHandler.caster10 := caster
	let zzSMNPCSoulTrapTargetsHandler.target10 := target
	if ( target.HasSpell AbGhostNPC != 1 )
		set zzSMNPCSoulTrapTargetsHandler.wasNotGhost10 to 1
		target.SetActorAlpha 0.8
		target.PlayMagicShaderVisuals ghosteffect
	else
		target.PlayMagicShaderVisuals effectSoulTrap
	endif		
	set targetNumber to 10
elseif ( zzSMNPCSoulTrapTargetsHandler.caster10 != 0 ) && ( targetNumber == 0 )
	if ( zzSMNPCSoulTrapTargetsHandler.target10 == target )
		let zzSMNPCSoulTrapTargetsHandler.caster10 := caster
		set targetNumber to 10
	endif
endif

;let TotalEffects := target.GetActiveEffectCodes
;let ActiveEffectMax := target.GetActiveEffectCount
;While ( ActiveEffectIter < ActiveEffectMax )
;	let iter := TotalEffects[ActiveEffectIter]
;	if ( target.GetNthActiveEffectCode ActiveEffectIter == 1179010387 )
;		set ActiveEffectIter to ActiveEffectMax
;	else
;		set ActiveEffectIter to ActiveEffectIter + 1
;	endif
;loop

if ( targetNumber == 0 )
	if ( caster == Player )
		Message "10 targets only can be handled by the Sheogorath's powers simultaneously for this spell" 4
	endif
	target.DispelNthActiveEffect ActiveEffectNumber
	return
endif

let ActiveEffectMax := target.GetActiveEffectCount

End

;Begin OnMagicEffectHit target, DSPL
;set NotSurvivedAfterDisspel to 1
;End

Begin ScriptEffectUpdate

if (( targetNumber == 1 ) && ( zzSMNPCSoulTrapTargetsHandler.caster1 != caster )) || (( targetNumber == 2 ) && ( zzSMNPCSoulTrapTargetsHandler.caster2 != caster )) || (( targetNumber == 3 ) && ( zzSMNPCSoulTrapTargetsHandler.caster3 != caster )) || (( targetNumber == 4 ) && ( zzSMNPCSoulTrapTargetsHandler.caster4 != caster )) || (( targetNumber == 5 ) && ( zzSMNPCSoulTrapTargetsHandler.caster5 != caster ))
	set ActiveEffectNumber to GetScriptActiveEffectIndex
	target.DispelNthActiveEffect ActiveEffectNumber
endif
if (( targetNumber == 6 ) && ( zzSMNPCSoulTrapTargetsHandler.caster6 != caster )) || (( targetNumber == 7 ) && ( zzSMNPCSoulTrapTargetsHandler.caster7 != caster )) || (( targetNumber == 8 ) && ( zzSMNPCSoulTrapTargetsHandler.caster8 != caster )) || (( targetNumber == 9 ) && ( zzSMNPCSoulTrapTargetsHandler.caster9 != caster )) || (( targetNumber == 10 ) && ( zzSMNPCSoulTrapTargetsHandler.caster10 != caster ))
	set ActiveEffectNumber to GetScriptActiveEffectIndex
	target.DispelNthActiveEffect ActiveEffectNumber
endif

if ( target.GetActiveEffectCount != ActiveEffectMax )
	if ( NotSurvivedAfterDisspel == 1 )
		set NotSurvivedAfterDisspel to 2
	elseif ( NotSurvivedAfterDisspel == 2 )
		set NotSurvivedAfterDisspel to 0
	endif
	let ActiveEffectMax := target.GetActiveEffectCount
	While ( ActiveEffectIter < ActiveEffectMax )
		if ( target.GetNthActiveEffectCode ActiveEffectIter == 1280332612 )
			set ActiveEffectIter to ActiveEffectMax
			set NotSurvivedAfterDisspel to 1
		else
			set ActiveEffectIter to ActiveEffectIter + 1
		endif
	loop
	set ActiveEffectIter to 0
endif

if ( target.GetDead == 1 )
	set ActiveEffectNumber to GetScriptActiveEffectIndex
	let caster := GetNthActiveEffectCaster ActiveEffectNumber
	if ( caster.GetItemCount AzurasStar > 0 )
	; Even Azura bowes to the Sheogorath's mind...
		ForEach iter <- caster
			if ( iter.GetBaseObject == AzurasStar ) && ( iter.GetCurrentSoulLevel == 0 ) && ( ActionDone == 0 )
				iter.SetCurrentSoulLevel 5
				set ActionDone to 1
			endif
		loop
	endif
	if ( ActionDone == 0 )
		ForEach iter <- caster
			if ( iter.GetBaseObject == SoulGemEmpty5Grand ) && ( iter.GetCurrentSoulLevel == 0 ) && ( iter.GetRefCount == 1 ) && ( ActionDone == 0 )
				iter.SetCurrentSoulLevel 5
				set ActionDone to 1
			elseif ( iter.GetBaseObject == SoulGemEmpty5Grand ) && ( iter.GetCurrentSoulLevel == 0 ) && ( iter.GetRefCount > 1 )
				set ActionCouldBe to 1
			endif
		loop
	endif
	if ( ActionDone == 0 ) && ( ActionCouldBe == 1 )
		ForEach iter <- caster
		if ( iter.GetBaseObject == SoulGemEmpty5Grand ) && ( iter.GetCurrentSoulLevel == 0 ) && ( iter.GetRefCount > 1 ) && ( ActionDone == 0 )
			set ActionCouldBe to ( iter.GetRefCount - 1 )
			if ( iter.GetOwner != 0 )
				let OtherGuy := iter.GetOwner
			endif
			iter.RemoveMeIR
			set ActionDone to 1
		endif
		loop
		let iter := CreateTempRef SoulGemEmpty5Grand
		iter.SetRefCount 1
		iter.SetCurrentSoulLevel 5
		if ( OtherGuy != 0 )
			iter.SetOwner OtherGuy
		endif
		iter.CopyIR caster
		let iter := CreateTempRef SoulGemEmpty5Grand
		iter.SetRefCount ActionCouldBe
		iter.SetCurrentSoulLevel 0
		if ( OtherGuy != 0 )
			iter.SetOwner OtherGuy
			let OtherGuy := 0
		endif
		iter.CopyIR caster
	endif
	if ( ActionDone == 1 )
		caster.PlaySound ITMSoulTrap
		target.PlayMagicEffectVisuals STRP 3
		if ( caster == Player )
;			ModPCMiscStat 10 1 - placed here will oddly result that it will be neither applied twicely
;			but rather raised to 2 instead of to 1.
			let TextForPlayer := GetStringGameSetting sSoulCaptured
			MessageEx "%z" TextForPlayer 3
		endif
	else
		if ( caster == Player )
			let TextForPlayer := GetStringGameSetting sSoulGemTooSmall
			MessageEx "%z" TextForPlayer 3
		endif
	endif
	let iter := 0
endif

End

Begin ScriptEffectFinish

set ActiveEffectNumber to GetScriptActiveEffectIndex

if ( ActionDone == 1 ) && ( caster == Player )
	ModPCMiscStat 10 1
endif

if (( target.GetDead == 1 ) || (( GetNthActiveEffectTimeElapsed ActiveEffectNumber ) > (( GetNthActiveEffectDuration ActiveEffectNumber ) - 0.01 )) || ( NotSurvivedAfterDisspel != 0 ))
	if ( targetNumber == 1 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster1 )
		let zzSMNPCSoulTrapTargetsHandler.caster1 := 0
		let zzSMNPCSoulTrapTargetsHandler.target1 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost1 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost1 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 2 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster2 )
		let zzSMNPCSoulTrapTargetsHandler.caster2 := 0
		let zzSMNPCSoulTrapTargetsHandler.target2 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost2 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost2 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 3 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster3 )
		let zzSMNPCSoulTrapTargetsHandler.caster3 := 0
		let zzSMNPCSoulTrapTargetsHandler.target3 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost3 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost3 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 4 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster4 )
		let zzSMNPCSoulTrapTargetsHandler.caster4 := 0
		let zzSMNPCSoulTrapTargetsHandler.target4 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost4 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost4 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 5 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster5 )
		let zzSMNPCSoulTrapTargetsHandler.caster5 := 0
		let zzSMNPCSoulTrapTargetsHandler.target5 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost5 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost5 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 6 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster6 )
		let zzSMNPCSoulTrapTargetsHandler.caster6 := 0
		let zzSMNPCSoulTrapTargetsHandler.target6 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost6 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost6 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 7 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster7 )
		let zzSMNPCSoulTrapTargetsHandler.caster7 := 0
		let zzSMNPCSoulTrapTargetsHandler.target7 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost7 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost7 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 8 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster8 )
		let zzSMNPCSoulTrapTargetsHandler.caster8 := 0
		let zzSMNPCSoulTrapTargetsHandler.target8 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost8 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost8 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 9 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster9 )
		let zzSMNPCSoulTrapTargetsHandler.caster9 := 0
		let zzSMNPCSoulTrapTargetsHandler.target9 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost9 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost9 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	elseif ( targetNumber == 10 ) && ( caster == zzSMNPCSoulTrapTargetsHandler.caster10 )
		let zzSMNPCSoulTrapTargetsHandler.caster10 := 0
		let zzSMNPCSoulTrapTargetsHandler.target10 := 0
		if ( zzSMNPCSoulTrapTargetsHandler.wasNotGhost10 == 1 )
			target.SetActorAlpha 1
			target.StopMagicShaderVisuals ghosteffect
			set zzSMNPCSoulTrapTargetsHandler.wasNotGhost10 to 0
		else
			target.StopMagicShaderVisuals effectSoulTrap
		endif
	endif
endif
End
Who is the seller of it: Earil in the "Earil's Mysteries" from the New Sheot's Crucible.

 

Edited by Stealth21
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...