2024-01-10 17:34:07 +00:00
|
|
|
Scriptname _00E_MiningControl extends Quest Hidden
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
2024-01-10 17:34:07 +00:00
|
|
|
Function TransmuteOre(Form akSource, MineOreEnderal oreREF, int iCurrentResources)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
if akSource == _05E_FS_SaldrinsTouch
|
|
|
|
|
|
|
|
if oreREF.ResourceCountCurrent > 0
|
|
|
|
|
|
|
|
_00E_FS_MAGSaldrinsTouchM.Play(PlayerREF)
|
|
|
|
_00E_MAGEldritchCastIMOD.Apply()
|
|
|
|
Game.ShakeCamera(afStrength = 0.2)
|
|
|
|
|
2023-12-08 02:45:53 +00:00
|
|
|
float fGoldDivider = PlayerREF.GetActorValue("Alteration")/65
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-01-10 17:34:07 +00:00
|
|
|
GlobalVariable Property _00E_OreVeinsMined Auto
|