Scripts

TR_m3_akuband_spider_sc

TR_Mainland.esm
Variables 3
Local Variables
control
controlA
timer
Source
1Begin TR_m3_akuband_spider_sc 2 3; control states 4; 0 = remove combo spells so it doesn't use them 5; 1 = ready to combo, combat AI should use bolt_1 automatically 6; 2 = bolt_1 cast, casting bolt_2 7; 3 = bolt_2 cast, casting bolt_3 8; 4 = bolt_3 cast, cooldown for 7 seconds 9; 10 = dead, stop doing things 10 11; controlA states 12; 0 = ready to cast repair on the sphere 13; 1 = in the middle of a combo, will not cast repair 14; 10 = dead, stop doing things 15 16; timer used for cooldown on bolt combo 17 18short control 19short controlA 20float timer 21 22if ( OnDeath ) 23 set controlA to 10 24 set control to 10 25endif 26 27if ( control == 0 ) 28 RemoveSpell "tr_m3_akuband_bolt_2" 29 RemoveSpell "tr_m3_akuband_bolt_3" 30 RemoveSpell "tr_m3_akuband_repair" 31 set control to 1 32endif 33 34if ( control == 1 ) 35 if ( GetSpellEffects "tr_m3_akuband_bolt_1" ) 36 set control to 2 37 set controlA to 1 38 endif 39elseif ( control == 2 ) 40 cast "tr_m3_akuband_bolt_2" player 41 if ( GetSpellEffects "tr_m3_akuband_bolt_2" ) 42 set control to 3 43 endif 44elseif ( control == 3 ) 45 cast "tr_m3_akuband_bolt_3" player 46 if ( GetSpellEffects "tr_m3_akuband_bolt_3" ) 47 set control to 4 48 set controlA to 0 49 set timer to 0 50 RemoveSpell "tr_m3_akuband_bolt_1" 51 endif 52elseif ( control == 4 ) 53 set timer to ( timer + GetSecondsPassed ) 54 if ( timer > 7 ) 55 AddSpell "tr_m3_akuband_bolt_1" 56 set control to 1 57 endif 58endif 59 60if ( controlA == 0 ) 61 if ( "tr_m3_akuband_sphere"->GetHealth < 125 ) 62 if ( GetSpellEffects "tr_m3_akuband_repair" == 0 ) 63 ExplodeSpell "tr_m3_akuband_repair" 64 endif 65 endif 66endif 67 68End