T_ScCrea_ArmorCenturionEquip
Tamriel_Data.esm
Variables
1
Local Variables
control
Source
1Begin T_ScCrea_ArmorCenturionEquip
2; Since we can't have "smart" leveled lists, such as "one sword or one crossbow and twenty bolts",
3; this script manages the centurion's equipment based on his leveled list result. That way, a single
4; creature is needed to provide for a variety of random armor centurion warriors, with crossbow and
5; bolts, darts, one-handed weapon and shield, or two-handed weapons without shield.
6
7short control ; determines how the script will work
8
9if ( ondeath == 1 )
10 set control to 5 ; avoids the "Golena Sadri Bug"...
11endif
12
13if ( control >= 5 )
14 return
15
16elseif ( control == 4 ) ; dwemer bot fights with darts
17 if ( getitemcount "T_Dwe_Regular_Dart_01" < 10 )
18 additem "T_Dwe_Regular_Dart_01" 10
19 endif
20
21elseif ( control == 3 ) ; dwemer bot is equipped with crossbow
22 if ( getitemcount "T_Dwe_Regular_Bolt_01" < 10 )
23 additem "T_Dwe_Regular_Bolt_01" 10
24 endif
25
26elseif ( control == 2 ) ; dwemer bot is equipped with 2H weapon
27 set control to 5
28
29elseif ( control == 1 ) ; dwemer bot is equipped with 1H weapon
30 set control to ( Player->GetLevel + 50 )
31 if ( control > Random100 )
32 additem "T_Dwe_Regular_ShieldTower_01" 1
33 equip "T_Dwe_Regular_ShieldTower_01"
34 else
35 additem "dwemer_shield" 1
36 equip "dwemer_shield"
37 endif
38 set control to 5
39
40elseif ( control == 0 )
41; Stupid "GetWeaponType" function being, well, not functional, I have no choice but to use that ugly
42; prescriptive code rather than the elegant, simple descriptive code that should have theoretically
43; been possible if Bethesda didn't hate modders. Grr. I'm bitter.
44; Anyway, this script is simply impossible to do without using a fucking list of all the possible
45; weapons the centurion can have, which means the script has to be updated if the leveled list is.
46
47 if ( GetItemCount "dwarven battle axe" > 0 )
48 set control to 2
49 elseif ( GetItemCount "dwarven claymore" > 0 )
50 set control to 2
51 elseif ( GetItemCount "dwarven halberd" > 0 )
52 set control to 2
53 elseif ( GetItemCount "dwarven mace" > 0 )
54 set control to 1
55 elseif ( GetItemCount "dwarven shortsword" > 0 )
56 set control to 1
57 elseif ( GetItemCount "dwarven spear" > 0 )
58 set control to 2
59 elseif ( GetItemCount "dwarven war axe" > 0 )
60 set control to 1
61 elseif ( GetItemCount "dwarven warhammer" > 0 )
62 set control to 2
63 elseif ( GetItemCount "dwemer jinksword" > 0 )
64 set control to 1
65 elseif ( GetItemCount "T_Dwe_Regular_Broadsword_01" > 0 )
66 set control to 1
67 elseif ( GetItemCount "T_Dwe_Regular_Dagger_01" > 0 )
68 set control to 1
69 elseif ( GetItemCount "T_Dwe_Regular_Longspear_01" > 0 )
70 set control to 2
71 elseif ( GetItemCount "T_Dwe_Regular_Longsword_01" > 0 )
72 set control to 1
73 elseif ( GetItemCount "T_Dwe_Regular_Staff_01" > 0 )
74 set control to 2
75 elseif ( GetItemCount "T_Dwe_Regular_Dart_01" > 0 )
76 additem "T_Dwe_Regular_Dart_01" 9
77 set control to 4
78 elseif ( GetItemCount "T_Dwe_Regular_Dart_Shock" > 0 )
79 additem "T_Dwe_Regular_Dart_Shock" 9
80 set control to 4
81 elseif ( GetItemCount "T_Dwe_Regular_CrossbowFix_01" > 0 )
82 set control to 3
83 endif
84
85endif
86
87End