-
Notifications
You must be signed in to change notification settings - Fork 0
/
diabloii.PIE
executable file
·187 lines (163 loc) · 4.25 KB
/
diabloii.PIE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/*
Health potion => keyboard.1 => shake nunchuck
Health potion => keyboard.2 => shake wiimonte
Magic potion => keyboard.3 => nunchuck.joystick.up
Health potion => keyboard.4 => nunchuck.joystick.down
Movement => Mouse pointer => wiimote + sensor bar
Close/Option => keyboard.escape => wiimote.home + nunchuck.Z
Town portal => keyboard.F4 => wiimote.CircleClockwise
2nd secondary skill => keyboard.F2 => wiimote.CrossArms (mapped to Bearman of Droid)
Show dropped items => keyboard.Alt => nunchuck.Z
Stay still => keyboard.Shift => nunchuck.C
Show equipped arms => keyboard.b => wiimote.home
Primary skill => mouse.leftClick => wiimote.B
Secondary skill => mouse.rightClick => wiimote.A
1st secondary skill => keyboard.F1 => wiimote.1
2nd secondary skill => keyboard.F2 => wiimote.2
3rd secondary skill => keyboard.F3 => wiimote.minus
4th secondary skill => keyboard.F4 => wiimote.plus (mapped to town portal)
5st secondary skill => keyboard.F5 => wiimote.dpad.left
6st secondary skill => keyboard.F6 => wiimote.dpad.down
7st secondary skill => keyboard.F7 => wiimote.dpad.right
8st secondary skill => keyboard.F8 => wiimote.dpad.up
*/
// Wiimote scans at 100hz and monitor refeshes itself typically at 60hz
GlovePIE.FrameRate = 100hz
mouse.LeftButton = wiimote.B
mouse.RightButton = wiimote.A
// Mouse movement
var.ButtonFreezeTime = 250ms
var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)
if wiimote.PointerVisible but not var.PointerBump then
mouse.x = wiimote.PointerX
mouse.y = wiimote.PointerY
end if
if nunchuck.shakiness > 20 then
Keyboard.1 = true
wait 50ms
Keyboard.1 = false
wait 1000ms
end if
if wiimote.shakiness > 20 then
Keyboard.2 = true
wait 50ms
Keyboard.2 = false
wait 1000ms
end if
if wiimote.Home = true and nunchuck.Z = true then
key.Escape = true
wait 50ms
key.Escape = false
end if
if wiimote.CrossArms = true and nunchuck.Z = true then
key.F2 = true
wait 50ms
key.F2 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.CircleClockwise = true then
key.F4 = true
wait 50ms
key.F4 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
key.Alt = nunchuck.Z
key.Shift = nunchuck.C
key.b = wiimote.Home
key.Three = nunchuck.Right
key.Four = nunchuck.Down
if wiimote.One = true then
key.F1 = true
wait 50ms
key.F1 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
end if
if wiimote.Two = true then
key.F2 = true
wait 50ms
key.F2 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.Minus = true then
key.F3 = true
wait 50ms
key.F3 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.Plus = true then
key.F4 = true
wait 50ms
key.F4 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.Left = true then
key.F5 = true
wait 50ms
key.F5 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.Down = true then
key.F6 = true
wait 50ms
key.F6 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.Right = true then
key.F7 = true
wait 50ms
key.F7 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if
if wiimote.Up = true then
key.F8 = true
wait 50ms
key.F8 = false
mouse.RightButton = true
wait 50ms
mouse.RightButton = false
key.F1 = true
wait 50ms
key.F1 = false
end if