TR_m1_q67_Fa2_scamp_scpt
TR_Mainland.esm
Variables
4
Local Variables
state
control
goldcount
cycles
Source
1Begin TR_m1_q67_Fa2_scamp_scpt
2
3short state
4short control
5short goldcount
6short cycles
7
8if ( state == 0 )
9 PlaySound3D "conjuration hit"
10 set state to 1
11 return
12elseif ( state == 1 )
13 while ( cycles < 3 )
14 set cycles to ( cycles + 1 )
15 if ( player->GetItemCount T_IngMine_PearlBlack_01 > 0 )
16 player->removeitem "T_IngMine_PearlBlack_01" 1
17 set goldcount to ( goldcount + 300 )
18 endif
19 endwhile
20 set cycles to 0
21 while ( cycles < 2 )
22 set cycles to ( cycles + 1 )
23 if ( player->GetItemCount T_IngMine_Sapphire_01 > 0 )
24 player->removeitem "T_IngMine_Sapphire_01" 1
25 set goldcount to ( goldcount + 200 )
26 endif
27 endwhile
28 set cycles to 0
29 while ( cycles < 3 )
30 set cycles to ( cycles + 1 )
31 if ( player->GetItemCount ingred_ruby_01 > 0 )
32 player->removeitem "ingred_ruby_01" 1
33 set goldcount to ( goldcount + 200 )
34 endif
35 endwhile
36 set cycles to 0
37 if ( player->GetItemCount ingred_emerald_01 > 0 )
38 player->removeitem "ingred_emerald_01" 1
39 set goldcount to ( goldcount + 150 )
40 endif
41 while ( cycles < 3 )
42 set cycles to ( cycles + 1 )
43 if ( player->GetItemCount ingred_diamond_01 > 0 )
44 player->removeitem "ingred_diamond_01" 1
45 set goldcount to ( goldcount + 250 )
46 endif
47 endwhile
48 set cycles to 0
49 set goldcount to ( 2800 - goldcount )
50 if ( goldcount > 0 )
51 ModPCCrimeLevel goldcount
52 set control to 1
53 endif
54 set state to 2
55 return
56elseif ( state == 2 )
57 ForceGreeting
58 set state to 3
59endif
60
61End