Oblivion Game Data

Select game:

Search:

Select a record type:

LairVileMinionScript (0xDH007977)

  • Record Type: SCPT
  • Editor ID: LairVileMinionScript
  • Form ID: 0xDH007977
  • Source File: DLCVileLair.esp.mod
  • Patch Status: FormID has not been modified.
Parameter Value
SCTX
scn LairVileMinionScript

short Slay
short Killcheck
short Randomkill
short ReturnHome
short Success
short Doonce
short Leaves
short Home
float CurrentTime
float CurrentDay

;This makes the Dark Minion look like he has left the lair

begin OnPackageEnd LairVileMinionKill

if ( Leaves == 0 )
	if ( Player.GetInSameCell LairVileMinionRef == 1 )
		Playsound DRSLadder
		Disable
		set Slay to 0
		set KillCheck to 1
		set Leaves to 1
	else
		Disable
		set Slay to 0
		set KillCheck to 1
		set Leaves to 1
	endif
endif

end

begin gamemode

;This checks for a successful kill after about a day

if ( KillCheck == 1 ) && ( CurrentDay == 0 )
	set Home to 0
	set ReturnHome to 0
	set CurrentDay to GameDaysPassed
	set CurrentTime to GameHour
endif

if ( KillCheck == 1 )
	if GameDaysPassed > ( CurrentDay + 2 )
		Set RandomKill to GetRandomPercent
		if RandomKill < 75
			Messagebox "Your Dark Minion has performed his dark deed. Another soul belongs to Sithis. Your infamy has increased by 1."
			ModPCInfamy 1 
			Set CurrentDay to 0
			Set Success to 1
			Set ReturnHome to 1
			Set KillCheck to 0
		else
			Messagebox "Your Dark Minion has failed his task."
			Set CurrentDay to 0
			Set ReturnHome to 1
			Set KillCheck to 0
		endif
	endif
endif

;This puts the Minion Back where he was

if ( ReturnHome == 1 ) && ( Home == 0 )
	Moveto LairVileMinionReturnsMarker
	Enable
	Evp
	Set Leaves to 0
	Set Home to 1
endif

end
	
;This puts things in the loot chest for slaying

begin OnPackageEnd LairVileMinionReturnHomeSuccess

if ( Success == 1 )
	LairVileMinionChestRef.AddItem LairVileRewardsGoldLeveledList 1
	LairVileMinionChestRef.AddItem LL0LootJewelry25 1
	LairVileMinionChestRef.AddItem LL1LootArmorAllMagic10 1
	LairVileMinionChestRef.AddItem LL1LootWeapon0Magic10 1
	LairVileMinionChestRef.AddItem LL1LootWeapon25 1
	LairVileMinionChestRef.AddItem LL1LootSoulGems10 1
	LairVileMinionChestRef.AddItem LL0LootLockPick25 1
	LairVileMinionChestRef.AddItem LL2NPCPotionsStealth25 1
	LairVileMinionChestRef.Additem LL2NPCPotionsPoison25 1
	Evp
	Set Success to 0
endif

end

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