Scripts

TR_m4_NPC_V_Ilvaalmu_script

TR_Mainland.esm
Variables 20
Local Variables
done
nolore
noflee
noidle
nointruder
nothief
SayOnce
unbound
xpos
ypos
zpos
TR_Map
control
controlQ
T_Local_Vampire
T_Local_NPC
T_Local_NoLore
checkBlood
doOnce
state
Source
1Begin TR_m4_NPC_V_Ilvaalmu_script 2 3; Script on NPC TR_m4_V_Ilvaalmu (a vampire). 4 5short done 6short nolore 7short noflee 8short noidle 9short nointruder 10short nothief 11short SayOnce 12short unbound 13short xpos 14short ypos 15short zpos 16short TR_Map 17short control 18short controlQ 19short T_Local_Vampire 20short T_Local_NPC 21short T_Local_NoLore 22short checkBlood 23short doOnce 24short state 25 26if ( GetHealth < 5 ) 27 if ( GetJournalIndex "TR_m4_T_IlvaalmuUnbound" < 30 ) 28 set unbound to 10 29 SetHealth 0 30 AddItem "ingred_vampire_dust_01" 1 31 if ( GetJournalIndex "TR_m4_T_IlvaalmuUnbound" != 25 ) 32 Journal "TR_m4_T_IlvaalmuUnbound" 30 33 elseif ( GetJournalIndex "TR_m4_T_IlvaalmuUnbound" == 25 ) 34 Journal "TR_m4_T_IlvaalmuUnbound" 50 35 endif 36 endif 37endif 38 39 40if ( SayOnce == 0 ) 41 if ( GetDistance, player < 180 ) 42 if ( SayDone == 1 ) 43 Say, "vo\d\f\Hlo_DF112.mp3", "Do you need a servant, master?" 44 set SayOnce to 1 45 endif 46 endif 47endif 48 49if ( unbound == 1 ) 50 if ( MenuMode == 0 ) 51 set xpos to ( GetPos, X ) 52 set ypos to ( GetPos, Y ) 53 set zpos to ( GetPos, Z ) 54 set zpos to (zpos +20) 55 Placeitem "sprigganup" xpos ypos zpos 0 ;places effect 56 PlaySound "hearthit2" 57 PositionCell, 5300, 5336, 11601, 0, "Arvel Ancestral Tomb" 58 AiWander 0 0 0 0 0 0 0 0 59 Journal "TR_m4_T_IlvaalmuUnbound" 20 60 RemoveSpell, "resist normal weapons_50" 61 RemoveSpell, "TR_m4_ilvaalmu_icebreath" 62 RemoveSpell, "TR_m4_ilvaalmu_abi" 63 "TR_m4_V_Ilvaalmu"->removeitem TR_m4_ilvaalmu_amulet 1 64 "TR_m4_V_Ilvaalmu"->removeitem slave_bracer_left 1 65 "TR_m4_V_Ilvaalmu"->removeitem slave_bracer_right 1 66 "TR_m4_ArvelTomb_Chest_1"->enable 67 "TR_m4_ArvelTomb_Chest_2"->enable 68 "TR_m4_ArvelTomb_Chest_3"->enable 69 ;PositionCell, -28160, -108640, 928, 0, "Teyn" 70 set unbound to 2 71 endif 72endif 73 74;Vanilla global PCVampire 75;Vanilla global PCWerewolf 76;Tamriel_Data global T_Glob_PorphyricInfected 77 78;----------------------------------------------- 79; Check player infection/vampire status 80;----------------------------------------------- 81 82if ( CellChanged ) 83 set checkBlood to 0 84 set state to 0 85 86 if ( T_Glob_PorphyricInfected ) 87 elseif ( player->GetSpell "Vampire Blood Quarra" ) 88 elseif ( player->GetSpell "Vampire Blood Aundae" ) 89 elseif ( player->GetSpell "Vampire Blood Berne" ) 90 elseif ( PCVampire != 0 ) 91 elseif ( PCWerewolf == 1 ) 92 else 93 ;Player isn't infected/vampire/cured vampire/werewolf 94 set checkBlood to 1 95 endif 96endif 97 98if ( MenuMode ) 99 return 100endif 101 102;------------------------------------------------ 103; Player was not infected before changing cell, 104; so constantly check for infection and then run 105; this clan's specific global script 106;------------------------------------------------ 107 108if ( checkBlood ) 109 if ( player->GetSpellEffects "T_Vamp_Dis_Orlukh" ) 110 if ( ScriptRunning "T_ScVamp_Orlukh_PC" != 1 ) 111 StartScript "T_ScVamp_Orlukh_PC" 112 endif 113 endif 114endif 115 116;------------------------------------------------ 117; Apply vampire spells/abilities to this NPC once 118;------------------------------------------------ 119 120if ( doOnce == 0 ) 121 AddSpell "T_Vamp_Dis_Orlukh" 122 AddSpell "T_Vamp_Ab_Orlukh" 123 AddSpell "Vampire Attributes" 124 AddSpell "Vampire Skills" 125 AddSpell "Vampire Immunities" 126 AddSpell "Vampire Sun Damage" 127 AddSpell "Vampire Touch" 128 ModRestoration 75 129 ;set province-specific location variable for dialogue here 130 set TR_Map to 4 131 set doOnce to 1 132endif 133 134end