Scripts

karrodScript

Tribunal.esm
Variables 12
Local Variables
doOnce
kingOnce
OnPCHitMe
guardOnce
ModOnce
nohello
noflee
noattack
noidle
nohit
nointruder
nothief
Source
1Begin karrodScript 2;this script does a few things. it moves karrod where he needs to be for initial meeting, the bar, and the duel. it also mods his stats 3 4 5;global karrodFightStart variable 0-quest not active 1-moved to bar 2-moved back to throne room 3-helseth says go 6 7short doOnce 8short kingOnce 9short OnPCHitMe 10short guardOnce 11short ModOnce 12short nohello 13short noflee 14short noattack 15short noidle 16short nohit 17short nointruder 18short nothief 19 20if ( MenuMode == 1 ) 21 return 22endif 23 24if ( KingHit > 0 ) 25 if ( kingOnce == 0 ) 26 StartCombat Player 27 set kingOnce to -1 28 return 29 endif 30endif 31 32if ( KarrodFightStart < 2 ) 33 if ( OnPCHitMe == 1 ) 34 if ( GetHealth < 634 ) 35 SetHealth 634 36 if ( guardOnce == 0 ) 37 if ( GetJournalIndex TR_Champion == 20 ) 38 set guardOnce to -1 39 elseif ( KarrodFightStart == 1 ) 40 set guardOnce to -1 41 endif 42 endif 43 if ( guardonce == -1 ) 44 Set KarrodCheapShot to 1 45 PlaceAtPC "royal guard_karrod" 1 128 0 46 StopCombat Player 47 SetFight 30 48 set guardOnce to 0 49 endif 50 endif 51 Set OnPCHitMe to 0 52 endif 53endif 54 55if ( ModOnce == 0 ) 56 if ( KarrodFightStart > 1 ) 57 SetFight 30 58 SetFlee 0 59 Set ModOnce to -1 60 endif 61endif 62 63;this stops the fight and forces the Karrod greeting 64 65if ( GetJournalIndex TR_Champion >= 70 ) 66 if ( KarrodBeaten == 0 ) 67 if ( GetHealth <= 100 ) 68 if ( GetHealth < 1 ) 69 ;MessageBox "REVIVING KARROD. IS HE DEAD????" 70 resurrect 71 ModHealth 500 72 endif 73 if ( KarrodBeaten == 0 ) 74 Set KarrodBeaten to 1 75 StopCombat Player 76 SetFight 50 77 SetDisposition 90 78 SetFlee 0 79 ModHealth 100 80 ModFatigue 100 81 ForceGreeting 82 endif 83 endif 84 endif 85endif 86 87;this section lowers his stats if you've bribed ra'tesh 88 89if ( karrodBribe == 0 ) 90 return 91endif 92 93if ( karrodBribe == 1 ) 94 if ( doOnce == 0 ) 95 ModShortBlade -20 96 ModBlock -20 97 ModMediumArmor -20 98 ModStrength -40 99 ModSpeed -30 100 if ( GetHealth > 100 ) 101 ModHealth -100 102 endif 103 if ( GetFatigue > 100 ) 104 ModFatigue -100 105 endif 106 RemoveSpell "regenerate [ability]" 107 StartScript karrodMovement 108 Set doOnce to 1 109 endif 110endif 111 112 113;this brings them back up after the fight 114 115if ( doOnce == 1 ) 116 if ( karrodBribe == 1 ) 117 if ( KarrodBeaten > 0 ) 118 SetFight 50 119 SetDisposition 90 120 ModShortBlade 20 121 ModBlock 20 122 ModMediumArmor 20 123 ModStrength 40 124 ModSpeed 30 125 SetHealth 634 126 SetFatigue 631 127 AddSpell "regenerate [ability]" 128 set doOnce to 2 129 endif 130 endif 131endif 132 133 134 135 136 137 138End karrodScript