Scripts

werewolf_connor

Bloodmoon.esm
Variables 10
Local Variables
nolore
doonce
npcwerewolf
isnight
isdead
attack
time
xpos
ypos
zpos
Source
1begin werewolf_connor 2 3;werewolves during night time; nothing during day; for connor tomb 4 5short nolore 6short doonce 7short npcwerewolf 8short isnight 9short isdead 10short attack 11float time 12float xpos 13float ypos 14float zpos 15 16if ( Menumode ==1 ) 17 return 18endif 19 20if (isdead==1) 21 return 22endif 23 24if (ondeath==1) 25 set isdead to 1 26endif 27set isnight to 1 ;nighttime by default 28if ( GameHour < 21 ) ; daytime 29 if ( GameHour > 6 ) 30 set isnight to 0 31 endif 32endif 33 34if (isnight == 0) ;daytime 35 if ( npcwerewolf == 1 ) ;NPC is a werewolf 36 if (doonce==1) 37 ;place the effect 38 set xpos to ( GetPos, X ) 39 set ypos to ( GetPos, Y ) 40 set zpos to ( GetPos, Z ) 41 Placeitem "wildwerewolf" xpos ypos zpos 0 42 ;change to human 43 set time to ( time + GetSecondsPassed ) 44 If ( time >= 1 ) 45 Undowerewolf 46 set doonce to 0 47 set npcwerewolf to 0 48 endif 49 endif 50 endif 51 endif 52elseif (isnight == 1) ;nighttime 53 If (doonce==0) 54 ;place the effect 55 set xpos to ( GetPos, X ) 56 set ypos to ( GetPos, Y ) 57 set zpos to ( GetPos, Z ) 58 Placeitem "wildwerewolf" xpos ypos zpos 0 59 ;change to werewolf 60 set time to ( time + GetSecondsPassed ) 61 If ( time >= 1 ) 62 Becomewerewolf 63 addspell "werewolf blood" 64 set doonce to 1 65 set npcwerewolf to 1 66 set time to 0 67 endif 68 endif 69 endif 70endif 71 72end werewolf_connorscr