73 lines
2.2 KiB
Plaintext
73 lines
2.2 KiB
Plaintext
|
;/ Decompiled by Champollion V1.0.1
|
||
|
Source : NirnrootACTIVATORScript.psc
|
||
|
Modified : 2012-06-01 20:37:54
|
||
|
Compiled : 2013-02-13 20:17:44
|
||
|
User : builds
|
||
|
Computer : BUILDFARM09
|
||
|
/;
|
||
|
scriptName NirnrootACTIVATORScript extends ObjectReference hidden
|
||
|
{Script to only be applied to the NirnrootACTIVATOR base object.}
|
||
|
|
||
|
;-- Properties --------------------------------------
|
||
|
Activator property NirnrootEmptyACTIVATOR auto
|
||
|
ObjectReference property NirnrootGlowReference auto hidden
|
||
|
Ingredient property Nirnroot auto
|
||
|
Activator property NirnrootGlowACTIVATOR auto
|
||
|
ObjectReference property EmptyRef auto hidden
|
||
|
Bool property HasBeenLoaded auto hidden
|
||
|
ObjectReference property NirnrootEmptyReference auto hidden
|
||
|
Perk Property _00E_Class_Theriantrophist_P04a_CarefulHarvest Auto
|
||
|
|
||
|
;-- Variables ---------------------------------------
|
||
|
Float NirnScale
|
||
|
|
||
|
;-- Functions ---------------------------------------
|
||
|
|
||
|
Event OnCellAttach()
|
||
|
|
||
|
if self.IsDisabled() == false
|
||
|
NirnrootGlowReference = self.PlaceAtMe(NirnrootGlowACTIVATOR as form, 1, false, false)
|
||
|
NirnrootEmptyReference = self.PlaceAtMe(NirnrootEmptyACTIVATOR as form, 1, false, false)
|
||
|
NirnrootEmptyReference.DisableNoWait(false)
|
||
|
endIf
|
||
|
endEvent
|
||
|
|
||
|
; Skipped compiler generated GotoState
|
||
|
|
||
|
; Skipped compiler generated GetState
|
||
|
|
||
|
Event OnReset()
|
||
|
|
||
|
if self.IsDisabled() == true
|
||
|
self.Enable(false)
|
||
|
self.GotoState("WaitingForHarvest")
|
||
|
endIf
|
||
|
endEvent
|
||
|
|
||
|
;-- State -------------------------------------------
|
||
|
state alreadyharvested
|
||
|
endState
|
||
|
|
||
|
;-- State -------------------------------------------
|
||
|
auto state waitingforharvest
|
||
|
|
||
|
Event onActivate(ObjectReference TriggerRef)
|
||
|
|
||
|
self.GotoState("AlreadyHarvested")
|
||
|
NirnScale = self.GetScale()
|
||
|
NirnrootEmptyReference.SetScale(NirnScale)
|
||
|
NirnrootEmptyReference.EnableNoWait(false)
|
||
|
int lycantrophebuff = utility.RandomInt(1 , 4)
|
||
|
If lycantrophebuff > 1 && (TriggerRef as actor).HasPerk(_00E_Class_Theriantrophist_P04a_CarefulHarvest)
|
||
|
(TriggerRef as actor).additem(Nirnroot as form, 2, false)
|
||
|
Else
|
||
|
(TriggerRef as actor).additem(Nirnroot as form, 1, false)
|
||
|
EndIf
|
||
|
|
||
|
game.IncrementStat("Nirnroots Found", 1)
|
||
|
NirnrootGlowReference.DisableNoWait(false)
|
||
|
NirnrootGlowReference.Delete()
|
||
|
self.DisableNoWait(false)
|
||
|
endEvent
|
||
|
endState
|