Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
60 lines
1.7 KiB
4 months ago
|
Scriptname _00E_MiningControl extends Quest Hidden
|
||
3 years ago
|
|
||
|
;=====================================================================================
|
||
|
; FUNCTIONS
|
||
|
;=====================================================================================
|
||
|
|
||
4 months ago
|
Function TransmuteOre(Form akSource, MineOreEnderal oreREF, int iCurrentResources)
|
||
3 years ago
|
|
||
|
if akSource == _05E_FS_SaldrinsTouch
|
||
|
|
||
|
if oreREF.ResourceCountCurrent > 0
|
||
|
|
||
|
_00E_FS_MAGSaldrinsTouchM.Play(PlayerREF)
|
||
|
_00E_MAGEldritchCastIMOD.Apply()
|
||
|
Game.ShakeCamera(afStrength = 0.2)
|
||
|
|
||
5 months ago
|
float fGoldDivider = PlayerREF.GetActorValue("Alteration")/65
|
||
3 years ago
|
|
||
|
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
|
||
|
|
||
4 months ago
|
GlobalVariable Property _00E_OreVeinsMined Auto
|