2024-02-05 00:33:58 +00:00
|
|
|
Scriptname _00E_DigControl extends Quest Hidden
|
|
|
|
|
|
|
|
import Utility
|
|
|
|
|
|
|
|
bool function Dig()
|
|
|
|
|
|
|
|
; Play the mauling animation in werewolf form
|
|
|
|
if PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace
|
|
|
|
if PlayerREF.IsInCombat()
|
|
|
|
_00E_TreasureMarkerScript_sCannotDigInCombat.Show()
|
|
|
|
return false
|
|
|
|
endif
|
|
|
|
Game.DisablePlayerControls(true, true, true, true, true, true, true, true)
|
|
|
|
Debug.SendAnimationEvent(PlayerREF, "pa_KillWerewolfPairedMaulingWithHuman")
|
|
|
|
Wait(4.8)
|
|
|
|
Game.EnablePlayerControls()
|
|
|
|
return true
|
|
|
|
endif
|
|
|
|
|
|
|
|
if PlayerREF.GetItemCount(ShovelKeyword) == 0
|
|
|
|
_00E_TreasureMarkerScript_sShovelNeeded.Show()
|
|
|
|
return false
|
|
|
|
endif
|
|
|
|
|
|
|
|
if PlayerREF.IsInCombat()
|
|
|
|
_00E_TreasureMarkerScript_sCannotDigInCombat.Show()
|
|
|
|
return false
|
|
|
|
endif
|
|
|
|
|
|
|
|
Game.DisablePlayerControls(true, true, true, true, true, true, true, true)
|
|
|
|
Game.SetPlayerAIDriven()
|
|
|
|
|
|
|
|
bool isFirstPerson = PlayerREF.GetAnimationVariableBool("IsFirstPerson")
|
|
|
|
|
|
|
|
; Start digging
|
|
|
|
Game.ForceThirdPerson()
|
|
|
|
|
2024-02-13 08:33:32 +00:00
|
|
|
If isFirstPerson ; Give some time for the camera to settle on switch to 3p
|
2024-02-05 00:33:58 +00:00
|
|
|
Wait(0.5)
|
2024-02-13 08:33:32 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
Form[] equippedTorches = New Form[2]
|
|
|
|
bool bUnequippingTorch = _00E_TorchControl.UnequipTorches(equippedTorches)
|
|
|
|
if bUnequippingTorch
|
|
|
|
; Give some time for torch unequip animations to settle
|
2024-02-05 00:33:58 +00:00
|
|
|
Wait(0.25)
|
2024-02-13 08:33:32 +00:00
|
|
|
endif
|
2024-02-05 00:33:58 +00:00
|
|
|
|
2024-02-13 08:33:32 +00:00
|
|
|
_00E_EquipControl.SheatheWeapon(PlayerREF)
|
|
|
|
Wait(0.5)
|
|
|
|
|
2024-02-05 00:33:58 +00:00
|
|
|
Debug.SendAnimationEvent(PlayerREF, "IdleSmelterEnter")
|
|
|
|
Wait(5.0)
|
|
|
|
|
|
|
|
; Stop digging
|
|
|
|
Debug.SendAnimationEvent(PlayerREF, "IdleForceDefaultState")
|
|
|
|
|
2024-02-05 01:29:37 +00:00
|
|
|
_00E_TorchControl.ReequipTorches(equippedTorches)
|
2024-02-13 08:33:32 +00:00
|
|
|
Wait(1.0)
|
2024-02-05 00:33:58 +00:00
|
|
|
|
|
|
|
Game.SetPlayerAIDriven(false)
|
|
|
|
Game.EnablePlayerControls()
|
|
|
|
|
|
|
|
If isFirstPerson
|
|
|
|
Game.ForceFirstPerson()
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
Actor Property PlayerRef Auto
|
|
|
|
|
|
|
|
Message Property _00E_TreasureMarkerScript_sCannotDigInCombat Auto
|
|
|
|
Message Property _00E_TreasureMarkerScript_sShovelNeeded Auto
|
|
|
|
|
|
|
|
Keyword Property ShovelKeyword Auto
|
|
|
|
|
|
|
|
Idle Property DefaultSheathe Auto
|
|
|
|
|
|
|
|
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
|