Oblivion Game Data

Select game:

Search:

Select a record type:

SE05RewardSpellScript (0x00055754)

  • Record Type: SCPT
  • Editor ID: SE05RewardSpellScript
  • Form ID: 0x00055754
  • Source File: Oblivion.esm.mod
  • Patch Status: FormID has not been modified.
Parameter Value
SCTX
ScriptName SE05RewardSpellScript

;This script controls all the handling for the magic effect on the reward dagger for SE05

short init					;flag set when target is acquired	
short Random			;random number generated to determine spell cast

Ref Target				;Reference var set to target


Begin ScriptEffectStart
	if ( init == 0 )
		set Target to GetSelf
		set init to 1
	endif
End


Begin GameMode

	;First move the marker to the target, so we know where we're casting at
	if ( init == 1 )
		SE05SpellMarkRef.moveto Target 0,0,20
		set init to 2

	;Next, we determine which spell we're going to cast
	elseif ( init == 2 )
		set Random to GetRandomPercent
		
		;Once we've got the number, compare it against set values
		;whichever it matches determines what spell gets cast

		if ( Random == 99 )
			SE05SpellMarkRef.cast SE05DaggerParalyzeStrongSpell Target
;			MessageBox "Paralyze Applied"
		elseif ( Random >= 90 )
			SE05SpellMarkRef.Cast SE05DaggerParalyzeWeakSpell Target
;			MessageBox "Paralyze Applied"
		elseif ( Random >= 80 )
			SE05SpellMarkRef.Cast SE05DaggerSilenceSpell Target
;			MessageBox "Silence Applied"
		elseif ( Random >= 60 )
			SE05SpellMarkRef.Cast SE05DaggerDemoralizeSpell Target
;			MessageBox "Demoralize Applied"
		elseif ( Random >= 30 )
			SE05SpellMarkRef.Cast SE05DaggerFrenzySpell Target
;			MessageBox "Frenzy Applied"
		else
			SE05SpellMarkRef.Cast SE05DaggerBurdenSpell Target
;			MessageBox "Burden Applied"
		endif
		set init to 0 
	endif

End

Database last updated 11/02/2011
SCPT records last updated 10/31/2011