Scripts

TR_m4_NPC_Atreno_Drenim

TR_Mainland.esm
Variables 8
Local Variables
TR_Map
control
controlQ
NoLore
greetOnce
T_Local_NPC
T_Local_NoLore
beenHit
Source
1Begin TR_m4_NPC_Atreno_Drenim 2 3; Script on NPC "TR_m4_Atreno Drenim". 4 5short TR_Map 6short control 7short controlQ 8short NoLore 9short greetOnce 10short T_Local_NPC 11short T_Local_NoLore 12short beenHit 13 14if ( OnDeath == 1 ) 15 Journal "TR_m4_wil_MannuScamps" 200 16endif 17 18if ( GetJournalIndex "TR_m4_wil_MannuScamps" == 100 ) 19 ; eventually leave the place 20 if ( CellChanged == 1 ) 21 set greetOnce to ( greetOnce + 1 ) 22 if ( greetOnce > 2 ) 23 if ( GetDisabled == 0 ) 24 disable 25 endif 26 endif 27 endif 28endif 29 30if ( GetPCCell "Mannu" != 1 ) 31 if ( GetDistance, player <= 256 ) 32 if ( greetOnce == 0 ) 33 ForceGreeting 34 Say, "vo\d\m\Flw_DM004.wav", "Thank you." 35 AiWander 0 0 20 10 0 0 0 36 set greetOnce to 1 37 endif 38 endif 39 return 40endif 41 42if ( "TR_m4_Atreno Drenim"->getAttacked == 1 ) 43 ; Not all scamps killed. Bad player! 44 ; Or the player attacked him. Double-bad player! 45 if ( beenHit == 0 ) 46 set beenHit to 1 47 endif 48endif 49 50if ( beenHit == 1 ) 51 if ( getWeaponDrawn == 0 ) 52 if ( getSpellReadied == 0 ) 53 set beenHit to 2 54 forcegreeting 55 stopcombat 56 return 57 endif 58 endif 59endif 60 61 62if ( TR_Map == 4 ) 63 return 64endif 65 66set TR_Map to 4 67 68End