Scriptname _00E_Phasmalist_ControlSummon extends activemagiceffect ; script that is attached to the magic effect that summons the apparation. Since it should be an aimed spell, this effect just checks wether the summon is legal and ; eventually casts a spell whose explosion places a marker that really summons the apparation (_00E_Phasmalist_SummonApparitionSC) Actor Property PlayerREF auto _FS_Phasmalist_ControlQuest Property controlQuest auto Message Property illegalTrinket auto {Message objects whose title is the message that is displayed when the player tries to summon an apparation but wears no phasmalist trinket object} GlobalVariable Property summonDisabled auto Message Property cannotSummonNow auto Message Property _00E_Phasmalist_CantSummonInCombat auto Shout Property _00E_Phasmalist_A1_SummonApparationShout Auto Spell Property spellToCastOnSuccess auto Event OnEffectStart(Actor akTarget, Actor akCaster) ;If !PlayerREF.IsInCombat() If controlQuest.apparationAlias.getReference() != None controlQuest.apparationAlias.unsummon() (PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_Phasmalist_A1_SummonApparationShout, 0) return EndIf _00E_Phasmalist_TrinketSC trinket = controlQuest.apparationAlias.getEquippedTrinket() If trinket If !controlQuest.apparationAlias.canApparationExist(PlayerREF.getCurrentLocation()) || summonDisabled.getValue() == 1 Debug.MessageBox(cannotSummonNow.getName()) return EndIf spellToCastOnSuccess.Cast(PlayerREF) Else Debug.Notification(illegalTrinket.getName()) return EndIf ;Else ; _00E_Phasmalist_CantSummonInCombat.Show() ; ;EndIf Endevent