View difference between Paste ID: qQUpjncm and Kag9DkJ8
SHOW: | | - or go back to the newest paste.
1
;;; http://lex-ofp.narod.ru     Lex-OFP@yandex.ru	ICQ 471230703
2
;;; v1.1
3
?(isNull player): Exit
4
_Unit=_this select 0
5
_Reload=0
6
#Reload
7
;;; =====================================================Horn
8
_Horn = call loadFile format[":file read BT_DeLorean.db %1", "Horn"]
9
?(format["%1",_Horn]=="-1"): _Horn=["SHIFT","LBUTTON"]
10
11
_i=0; "if (_x=={SHIFT}) then {_Horn set [_i,{LSHIFT}]};if (_x=={CTRL}) then {_Horn set [_i,{LCTRL}]};if (_x=={ALT}) then {_Horn set [_i,{LALT}]};_i=_i+1" forEach _Horn
12
13
_Horn_count=(count _Horn)
14
?(_Horn_count<1) or (_Horn_count>3): _Horn=["SHIFT","LBUTTON"]; _Horn_count=2
15
_Horn1=_Horn select 0;_Horn2="null";_Horn3="null"
16
?(_Horn_count>1):_Horn2=_Horn select 1
17
?(_Horn_count>2):_Horn3=_Horn select 2
18
;;; =====================================================Reset
19
_Reset= call loadFile format[":file read BT_DeLorean.db %1", "Reset"]
20
?(format["%1",_Reset]=="-1"): _Reset=["SHIFT","LBUTTON","RBUTTON"]
21
22
_i=0; "if (_x=={SHIFT}) then {_Reset set [_i,{LSHIFT}]};if (_x=={CTRL}) then {_Reset set [_i,{LCTRL}]};if (_x=={ALT}) then {_Reset set [_i,{LALT}]};_i=_i+1" forEach _Reset
23
24
_Reset_count=(count _Reset)
25
?(_Reset_count<1) or (_Reset_count>3): _Reset=["SHIFT","LBUTTON","RBUTTON"]; _Reset_count=3
26
_Reset1=_Reset select 0;_Reset2="null";_Reset3="null"
27
?(_Reset_count>1):_Reset2=_Reset select 1
28
?(_Reset_count>2):_Reset3=_Reset select 2
29
;;; =====================================================off
30
_off= call loadFile format[":file read BT_DeLorean.db %1", "off"]
31
?(format["%1",_off]=="-1"): _off=["CTRL","LBUTTON","RBUTTON"]
32
33
_i=0; "if (_x=={SHIFT}) then {_off set [_i,{LSHIFT}]};if (_x=={CTRL}) then {_off set [_i,{LCTRL}]};if (_x=={ALT}) then {_off set [_i,{LALT}]};_i=_i+1" forEach _off
34
35
_off_count=(count _off)
36
?(_off_count<1) or (_off_count>3): _off=["CTRL","LBUTTON","RBUTTON"]; _off_count=3
37
_off1=_off select 0;_off2="null";_off3="null"
38
?(_off_count>1):_off2=_off select 1
39
?(_off_count>2):_off3=_off select 2
40
;;; =====================================================Left
41
_Left= call loadFile format[":file read BT_DeLorean.db %1", "Left"]
42
?(format["%1",_Left]=="-1"): _Left=["CTRL","LBUTTON"]
43
44
_i=0; "if (_x=={SHIFT}) then {_Left set [_i,{LSHIFT}]};if (_x=={CTRL}) then {_Left set [_i,{LCTRL}]};if (_x=={ALT}) then {_Left set [_i,{LALT}]};_i=_i+1" forEach _Left
45
46
_Left_count=(count _Left)
47
?(_Left_count<1) or (_Left_count>3): _Left=["CTRL","LBUTTON"]; _Left_count=2
48
_Left1=_Left select 0;_Left2="null";_Left3="null"
49
?(_Left_count>1):_Left2=_Left select 1
50
?(_Left_count>2):_Left3=_Left select 2
51
;;; =====================================================Right
52
_Right= call loadFile format[":file read BT_DeLorean.db %1", "Right"]
53
?(format["%1",_Right]=="-1"): _Right=["CTRL","RBUTTON"]
54
55
_i=0; "if (_x=={SHIFT}) then {_Right set [_i,{LSHIFT}]};if (_x=={CTRL}) then {_Right set [_i,{LCTRL}]};if (_x=={ALT}) then {_Right set [_i,{LALT}]};_i=_i+1" forEach _Right
56
57
_Right_count=(count _Right)
58
?(_Right_count<1) or (_Right_count>3): _Right=["CTRL","RBUTTON"]; _Right_count=2
59
_Right1=_Right select 0;_Right2="null";_Right3="null"
60-
; input multi returns "LSHIFT" and "RSHIFT" instead of "SHIFT", too keep compatibility use this:
60+
61-
_keys =+ FWATCH_INPUT_MULTI select 0
61+
62-
? "LSHIFT" in _keys || "RSHIFT" in _keys : _keys=_keys-["LSHIFT","RSHIFT"]; _keys=_keys+["SHIFT"]
62+
63-
? "LALT" in _keys || "RALT" in _keys : _keys=_keys-["LALT","RALT"]; _keys=_keys+["ALT"]
63+
64-
? "LCTRL" in _keys || "RCTRL" in _keys : _keys=_keys-["LCTRL","RCTRL"]; _keys=_keys+["CTRL"]
64+
65
_Status=0
66
67
; number is the sleep time
68
0.05 exec "..\fwatch\data\InputMulti.sqs"
69
@Format ["%1",count FWATCH_INPUT_MULTI] != "scalar"
70
71
#Loop
72
@(driver _Unit== player) or !(alive _Unit)
73
?!(alive _Unit): Exit
74
75
_keys = FWATCH_INPUT_MULTI select 0
76
77
;;; =====================================================Help
78
?( "F1" in _keys) and ( "LBUTTON" in _keys): _Reload=1;goto "Reload"
79
;;; =====================================================Reset
80
?(_Reset_count==1) and (_Reset1 in _keys): goto "Reset"
81
?(_Reset_count==2) and (_Reset1 in _keys) and (_Reset2 in _keys): goto "Reset"
82
?(_Reset_count==3) and (_Reset1 in _keys) and (_Reset2 in _keys) and (_Reset3 in _keys): goto "Reset"
83
;;; =====================================================Horn
84
?(_Horn_count==1) and (_Horn1 in _keys): goto "Horn"
85
?(_Horn_count==2) and (_Horn1 in _keys) and (_Horn2 in _keys): goto "Horn"
86
?(_Horn_count==3) and (_Horn1 in _keys) and (_Horn2 in _keys) and (_Horn3 in _keys): goto "Horn"
87
;;; =====================================================off
88
?(_off_count==1) and (_off1 in _keys): goto "off"
89
?(_off_count==2) and (_off1 in _keys) and (_off2 in _keys): goto "off"
90
?(_off_count==3) and (_off1 in _keys) and (_off2 in _keys) and (_off3 in _keys): goto "off"
91
;;; =====================================================L_R
92
?(_Left_count==1) and (_Left1 in _keys) and (_Status==2): goto "off"
93
?(_Left_count==2) and (_Left1 in _keys) and (_Left2 in _keys) and (_Status==2): goto "off"
94
?(_Left_count==3) and (_Left1 in _keys) and (_Left2 in _keys) and (_Left3 in _keys) and (_Status==2): goto "off"
95
;;; ===========================
96
?(_Right_count==1) and (_Right1 in _keys) and (_Status==1): goto "off"
97
?(_Right_count==2) and (_Right1 in _keys) and (_Right2 in _keys) and (_Status==1): goto "off"
98
?(_Right_count==3) and (_Right1 in _keys) and (_Right2 in _keys) and (_Right3 in _keys) and (_Status==1): goto "off"
99
;;; =====================================================Left
100
?(_Left_count==1) and (_Left1 in _keys) and (_Status==0): [_Unit,"L"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=1
101
?(_Left_count==2) and (_Left1 in _keys) and (_Left2 in _keys) and (_Status==0): [_Unit,"L"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=1
102
?(_Left_count==3) and (_Left1 in _keys) and (_Left2 in _keys) and (_Left3 in _keys) and (_Status==0): [_Unit,"L"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=1
103
104
;;; =====================================================Right
105
?(_Right_count==1) and (_Right1 in _keys) and (_Status==0): [_Unit,"R"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=2
106
?(_Right_count==2) and (_Right1 in _keys) and (_Right2 in _keys) and (_Status==0): [_Unit,"R"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=2
107
?(_Right_count==3) and (_Right1 in _keys) and (_Right2 in _keys) and (_Right3 in _keys) and (_Status==0): [_Unit,"R"] exec "\BT_DeLorean\Script\Povorotnik.sqs"; _Status=2
108
;;; =====================================================Sleep
109
#Sleep
110
~0.1
111
goto "Loop"
112
;;; =====================================================Help
113
#Help
114
_Reload=0
115
~2
116
goto "Loop"
117
;;; =====================================================Horn
118
#Horn
119
_Unit animate ["Trg_Horn", 1]
120
~2
121
goto "Loop"
122
;;; =====================================================Reset
123
#Reset
124
_Unit animate ["Triger_Reset",1]
125
_Unit AddWeapon "BT_DeLorean_TRG_Reset"
126
TRG_Addon_BT_DeLorean_Unit_R=_Unit
127
publicVariable"TRG_Addon_BT_DeLorean_Unit_R"
128
~2
129
goto "Loop"
130
;;; =====================================================off
131
#off
132
_Status=0
133
[_Unit,"Off"] exec "\BT_DeLorean\Script\Povorotnik.sqs"
134
~1
135
goto "Loop"
136
;;; =====================================================