enderalse/source/scripts/_00e_mq11a_sc11_telekinesistriggersc.psc

28 lines
905 B
Plaintext

Scriptname _00E_MQ11a_SC11_TelekinesisTriggerSc extends ObjectReference
Event OnTriggerEnter(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
if (MQ11a_LeftTower.GetValueInt() == 3) && !(PlayerREF.HasSpell(_00E_MQ11a_SC12_Telekinesis)) && !(PlayerREF.HasSpell(Telekinesis))
PlayerREF.AddSpell(_00E_MQ11a_SC12_Telekinesis, 1)
PlayerREF.EquipSpell(_00E_MQ11a_SC12_Telekinesis, 0)
PlayerREF.EquipSpell(_00E_MQ11a_SC12_Telekinesis, 1)
EndIf
EndIf
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
if (MQ11a_LeftTower.GetValueInt() == 3) && (PlayerREF.HasSpell(_00E_MQ11a_SC12_Telekinesis))
PlayerREF.RemoveSpell(_00E_MQ11a_SC12_Telekinesis)
EndIf
EndIf
EndEvent
GlobalVariable Property Mq11a_LeftTower Auto
Spell Property _00E_MQ11a_SC12_Telekinesis Auto
Spell Property Telekinesis Auto
actor Property PlayerREF Auto