enderalse/scripts/source/_00e_lycanthropeinstanttransform.psc

68 lines
2.1 KiB
Plaintext

Scriptname _00E_LycanthropeInstantTransform extends activemagiceffect
Event OnKeyUp(int keyCode, float holdTime)
if keyCode == 48
goingBackToNormal()
endif
endevent
Event OnEffectStart(Actor akTarget, Actor akCaster)
RegisterForKey(48)
endevent
function goingBackToNormal()
; goingBackToHumanShader.Play(Game.GetPlayer())
Game.DisablePlayerControls(true, true, true, false, true, true, true)
Game.GetPlayer().ModAV("DamageResist", -10)
(playerTransformStorageQuest as playerTransformStorage).equipeItems()
; Game.GetPlayer().PlaceAtMe(PowerRacialWoodElfCommandAnimalExplosion01)
RegisterForAnimationEvent(Game.GetPlayer(), "TransformToHuman")
Game.GetPlayer().PlayIdle(WerewolfTransformBack)
Game.SetInCharGen(true, true, false)
UnRegisterForAnimationEvent(Game.GetPlayer(), "TransformToHuman")
Game.EnablePlayerControls(true, true, true, true, true, true, true)
Race orig_race = (playerTransformStorageQuest as playerTransformStorage).originalRace
Game.GetPlayer().SetRace(orig_race)
Game.GetPlayer().SetAttackActorOnSight(false)
Game.GetPlayer().RemoveFromFaction(PlayerWerewolfFaction)
Game.SetPlayerReportCrime(true)
;Game.SendWereWolfTransformation()
Game.SetBeastForm(False)
isTransformed.SetValue(0)
UnregisterforActorAction(0)
UnregisterforCrosshairRef()
UnregisterForAllKeys()
UnregisterForUpdate()
;goingBackToHumanShader.Stop(Game.GetPlayer())
;Debug.MessageBox(Game.GetPlayer().GetActorValue("Sneak")+" vs "+Game.GetPlayer().GetActorValue("Magicka")+" vs "+Game.GetPlayer().GetActorValue("MagickaRate")+" vs "+Game.GetPlayer().GetActorValue("Health")+" vs "+Game.GetPlayer().GetActorValue("Stamina")+" vs "+Game.GetPlayer().GetActorValue("UnarmedDamage")+" vs "+Game.GetPlayer().GetActorValue("DamageResist"))
endfunction
EffectShader Property goingBackToHumanShader Auto
GlobalVariable Property isTransformed Auto
Quest Property playerTransformStorageQuest Auto
Idle Property WerewolfTransformBack Auto
Explosion Property PowerRacialWoodElfCommandAnimalExplosion01 Auto
Faction Property PlayerWerewolfFaction Auto