enderalse/scripts/source/_00e_fs_forgottenstories_functions.psc

75 lines
2.2 KiB
Plaintext
Raw Normal View History

Scriptname _00E_FS_ForgottenStories_Functions extends Quest
;=====================================================================================
; EVENTS
;=====================================================================================
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function TransmuteOre(Form akSource, MineOreScript oreREF, int iCurrentResources)
if akSource == _05E_FS_SaldrinsTouch
if oreREF.ResourceCountCurrent > 0
_00E_FS_MAGSaldrinsTouchM.Play(PlayerREF)
_00E_MAGEldritchCastIMOD.Apply()
Game.ShakeCamera(afStrength = 0.2)
float fGoldDivider = PlayerREF.GetAV("Alteration")/65
if fGoldDivider < 0.5
fGoldDivider = 0.5
endif
float iGoldAmount = ((oreREF.Ore.GetGoldValue()/1.5*fGoldDivider))*oreREF.ResourceCountTotal
oreREF.ResourceCountCurrent = 0
PlayerREF.AddItem(Gold001, iGoldAmount as int)
oreREF.damageObject(50)
;DrScOreOpen.play(oreREF)
oreREF.setDestroyed(true)
_00E_OreVeinsMined.SetValueInt(_00E_OreVeinsMined.GetValueInt() +1)
Else
MiningDepletedMessage.Show()
MAGFail.Play(PlayerREF)
EndIf
EndIf
EndFunction
Function showActorHealthBars(Actor a)
GUI_ActorHealthBarPanel.addActors(a)
Endfunction
Function hideActorHealthBars(Actor a)
GUI_ActorHealthBarPanel.removeActors(a)
Endfunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
_00E_GUI_ActorHealthBar Property GUI_ActorHealthBarPanel auto
Actor Property PlayerREF Auto
Projectile Property AlterPosProjectile Auto
MiscObject Property Gold001 Auto
Sound Property _00E_FS_MAGSaldrinsTouchM Auto
Sound Property MAGFail Auto
Spell Property _05E_FS_SaldrinsTouch Auto
Message Property MiningDepletedMessage Auto
ImageSpaceModifier Property _00E_MAGEldritchCastIMOD Auto
GlobalVariable Property _00E_OreVeinsMined Auto