Scripts

Werewolfwilderness

Bloodmoon.esm
Variables 9
Local Variables
nolore
doonce
npcwerewolf
isnight
isdead
time
xpos
ypos
zpos
Source
1Begin Werewolfwilderness 2 3;This script is for the werewolves in wilderness placed randomly, very hard to find 4;they change to werewolf during night, are lunatic NPC's during day 5 6short nolore 7short doonce 8short npcwerewolf 9short isnight 10short isdead 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 27 28set isnight to 1 ;nighttime by default 29if ( GameHour < 21 ) ; daytime 30 if ( GameHour > 6 ) 31 set isnight to 0 32 endif 33endif 34 35if (isnight == 0) ;daytime 36 if ( npcwerewolf == 1 ) ;NPC is a werewolf 37 if (doonce==1) 38 ;place the effect 39 set xpos to ( GetPos, X ) 40 set ypos to ( GetPos, Y ) 41 set zpos to ( GetPos, Z ) 42 Placeitem "wildwerewolf" xpos ypos zpos 0 43 ;change to human 44 set time to ( time + GetSecondsPassed ) 45 If ( time >= 1 ) 46 Undowerewolf 47 set doonce to 0 48 set npcwerewolf to 0 49 endif 50 endif 51 endif 52 endif 53elseif (isnight == 1) ;nighttime 54 If (doonce==0) 55 ;place the effect 56 set xpos to ( GetPos, X ) 57 set ypos to ( GetPos, Y ) 58 set zpos to ( GetPos, Z ) 59 Placeitem "wildwerewolf" xpos ypos zpos 0 60 ;change to werewolf 61 set time to ( time + GetSecondsPassed ) 62 If ( time >= 1 ) 63 Becomewerewolf 64 addspell "werewolf blood" 65 set doonce to 1 66 set npcwerewolf to 1 67 set time to 0 68 endif 69 endif 70 endif 71endif 72 73End Werewolfwilderness