enderalse/source/scripts/_00e_mq07b_bellscript.psc

115 lines
3.3 KiB
Plaintext

Scriptname _00E_MQ07b_BellScript extends ObjectReference
Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
_00E_MQ07b_sBellDoesntMove.Show()
EndIf
EndEvent
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If akAggressor == Game.GetPlayer() && akSource == _02E_UniGlockenhammer && MQ07b_DeusExMachina.GetCurrentStageID() == 65
BellSound.Play(Self)
Game.ShakeCamera()
BaseAngleX = Self.GetAngleX()
BaseAngleY = Self.GetAngleY()
BaseAngleZ = Self.GetAngleZ()
XPos = Self.GetPositionX()
YPos = Self.GetPositionY()
ZPos = Self.GetPositionZ()
Self.TranslateTo(XPos, YPos, ZPos, AngleX*0.5, AngleY*0.5, BaseAngleZ, 20, 20)
DoOnce = False
If MQ07b_BellVar.GetValue() == 0 && BellNumber == 1
MQ07b_BellVar.SetValue(1)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackYes)
Return
EndIf
If MQ07b_BellVar.GetValue() != 0 && BellNumber == 1
MQ07b_BellVar.SetValue(0)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackNo)
EndIf
If MQ07b_BellVar.GetValue() == 1 && BellNumber == 2
MQ07b_BellVar.SetValue(2)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackYes)
Return
EndIf
If MQ07b_BellVar.GetValue() == 4 && BellNumber == 2
MQ07b_DeusExMachina.SetCurrentStageID(70)
MQ07b_BellVar.SetValue(5)
Return
EndIf
if MQ07b_BellVar.GetValue() != 1 && BellNumber == 2 ;&& MQ07b_BellVar.GetValue() != 4
MQ07b_BellVar.SetValue(0)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackNo)
EndIf
If MQ07b_BellVar.GetValue() == 2 && BellNumber == 3
MQ07b_BellVar.SetValue(3)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackYes)
Return
EndIf
If MQ07b_BellVar.GetValue() != 2 && BellNumber == 3
MQ07b_BellVar.SetValue(0)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackNo)
EndIf
If MQ07b_BellVar.GetValue() == 3 && BellNumber == 4
MQ07b_BellVar.SetValue(MQ07b_BellVar.GetValue()+1)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackYes)
Return
EndIf
If MQ07b_BellVar.GetValue() != 3 && BellNumber == 4
MQ07b_BellVar.SetValue(0)
CaliaRef.Say(MQ07b_DeusExMachinaCaliaPuzzleFeedbackNo)
EndIf
EndIf
EndEvent
Event OnTranslationComplete()
If DoOnce == False
If TranslationCount == 0
Self.TranslateTo(XPos, YPos, ZPos, BaseAngleX, BaseAngleY, BaseAngleZ, 20, 20)
TranslationCount += 1
ElseIf TranslationCount == 1
Self.TranslateTo(XPos, YPos, ZPos, AngleX*-1*0.5, AngleY*-1*0.5, BaseAngleZ, 20, 20)
TranslationCount += 1
ElseIf TranslationCount == 2
Self.TranslateTo(XPos, YPos, ZPos, BaseAngleX, BaseAngleY, BaseAngleZ, 20, 20)
TranslationCount = 0
DoOnce = True
EndIf
EndIf
EndEvent
Float BaseAngleX
Float BaseAngleY
Float BaseAngleZ
Float XPos
Float YPos
Float ZPos
Float TranslationCount
Bool DoOnce = false
Message Property _00E_MQ07b_sBellDoesntMove Auto
Float Property AngleX Auto
Float Property AngleY Auto
Float Property AngleZ Auto
Int Property BellNumber Auto
Sound Property BellSound Auto
Weapon Property _02E_UniGlockenhammer Auto
Quest Property MQ07b_DeusExMachina Auto
GlobalVariable Property MQ07b_BellVar Auto
Topic Property MQ07b_DeusExMachinaCaliaPuzzleFeedbackYes Auto
Topic Property MQ07b_DeusExMachinaCaliaPuzzleFeedbackNo Auto
ObjectReference Property CaliaRef Auto