enderalse/source/scripts/_00e_fs_forgottenstories_functions.psc

65 lines
1.9 KiB
Plaintext

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
;=====================================================================================
; PROPERTIES
;=====================================================================================
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