SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | public static class PrivateMatch | |
3 | { | |
4 | //Set Bullets Type Black Ops 2 - 1.17 | |
5 | #region Set BulletType | |
6 | public static class SetBullet | |
7 | { | |
8 | public static uint Offset_1 = 0x178136F; | |
9 | public static uint Offset_2 = Offset_1 - 0xC; | |
10 | public static uint Offset_3 = Offset_1 - 0x4; | |
11 | public static uint Offset_4 = Offset_1 - 0x170; | |
12 | public static uint Offset_5 = Offset_1 - 0x18C; | |
13 | public static uint Offset_6 = Offset_1 - 0xD; | |
14 | public static PS3API PS3 = new PS3API(); | |
15 | public static void SetMemoryClient(UInt32 Offset, Byte[] bytesm, UInt32 clientIndex) | |
16 | { | |
17 | PS3.SetMemory(Offset + (clientIndex * 0x5808), bytesm); | |
18 | } | |
19 | public static void GetMemoryClient(UInt32 Offset, byte[] buffer, UInt32 clientIndex) | |
20 | { | |
21 | PS3.GetMemory(Offset + (clientIndex * 0x5808), buffer); | |
22 | } | |
23 | ||
24 | public static byte[] GetBytes(string str) | |
25 | { | |
26 | byte[] bytes = new byte[str.Length * sizeof(char)]; | |
27 | System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length); | |
28 | return bytes; | |
29 | } | |
30 | public static void removenades(uint ClientIndex) | |
31 | { | |
32 | byte[] sky = new byte[] { 0x00 }; | |
33 | PS3.SetMemory((Offset_1) + (ClientIndex * 0x5808), sky); | |
34 | ||
35 | byte[] sky1 = new byte[] { 0x00 }; | |
36 | PS3.SetMemory((Offset_2) + (ClientIndex * 0x5808), sky1); | |
37 | ||
38 | } | |
39 | ||
40 | public static void removenades1(uint ClientIndex) | |
41 | { | |
42 | byte[] sky = new byte[] { 0x00 }; | |
43 | PS3.SetMemory((Offset_3) + (ClientIndex * 0x5808), sky); | |
44 | } | |
45 | ||
46 | public static void BulletType(int clientIndex, String BulletType) | |
47 | { | |
48 | removenades((uint)clientIndex); | |
49 | removenades1((uint)clientIndex); | |
50 | Byte[] OldWeap = new Byte[1]; | |
51 | if (BulletType == "None") | |
52 | SetMemoryClient(Offset_4, OldWeap, (UInt32)clientIndex); | |
53 | if (BulletType != "None" && count1 == 0) | |
54 | { | |
55 | GetMemoryClient(Offset_4, OldWeap, (UInt32)clientIndex); | |
56 | count1++; | |
57 | } | |
58 | byte[] Bullet; | |
59 | SetMemoryClient(Offset_4, new Byte[1], (UInt32)clientIndex); | |
60 | Thread.Sleep(20); | |
61 | ||
62 | switch (BulletType) | |
63 | { | |
64 | case "AGR Gun": | |
65 | Bullet = new Byte[] { 0x7A }; | |
66 | SetBulletType((int)clientIndex, Bullet); | |
67 | break; | |
68 | ||
69 | case "Test": | |
70 | Bullet = new Byte[] { 0xC3 }; | |
71 | SetBulletType((int)clientIndex, Bullet); | |
72 | break; | |
73 | ||
74 | case "AGR Rocket": | |
75 | Bullet = new Byte[] { 0x7B }; | |
76 | SetBulletType((int)clientIndex, Bullet); | |
77 | break; | |
78 | case "Dragonfire": | |
79 | Bullet = new Byte[] { 0x99 }; | |
80 | SetBulletType((int)clientIndex, Bullet); | |
81 | break; | |
82 | case "Escortdrone": | |
83 | Bullet = new Byte[] { 0x77 }; | |
84 | SetBulletType((int)clientIndex, Bullet); | |
85 | break; | |
86 | case "Guardian": | |
87 | Bullet = new Byte[] { 0x9F }; | |
88 | SetBulletType((int)clientIndex, Bullet); | |
89 | break; | |
90 | case "Hellstorm": | |
91 | Bullet = new Byte[] { 0x95 }; | |
92 | SetBulletType((int)clientIndex, Bullet); | |
93 | break; | |
94 | case "Hunter Killer": | |
95 | Bullet = new Byte[] { 0x8C }; | |
96 | SetBulletType((int)clientIndex, Bullet); | |
97 | break; | |
98 | case "Loadster": | |
99 | Bullet = new Byte[] { 0x97 }; | |
100 | SetBulletType((int)clientIndex, Bullet); | |
101 | break; | |
102 | case "Sentry Gun": | |
103 | Bullet = new Byte[] { 0x9E }; | |
104 | SetBulletType((int)clientIndex, Bullet); | |
105 | break; | |
106 | case "Stealth Chopper": | |
107 | Bullet = new Byte[] { 0x83 }; | |
108 | SetBulletType((int)clientIndex, Bullet); | |
109 | break; | |
110 | case "Swarm": | |
111 | Bullet = new Byte[] { 0x8F }; | |
112 | SetBulletType((int)clientIndex, Bullet); | |
113 | break; | |
114 | case "VTOL Bullet": | |
115 | Bullet = new Byte[] { 0x89 }; | |
116 | SetBulletType((int)clientIndex, Bullet); | |
117 | break; | |
118 | case "VTOL Rocket": | |
119 | Bullet = new Byte[] { 0x84 }; | |
120 | SetBulletType((int)clientIndex, Bullet); | |
121 | break; | |
122 | case "Warthog Bullet": | |
123 | Bullet = new Byte[] { 0x9B }; | |
124 | SetBulletType((int)clientIndex, Bullet); | |
125 | break; | |
126 | case "Warthog Rocket": | |
127 | Bullet = new Byte[] { 0x9C }; | |
128 | SetBulletType((int)clientIndex, Bullet); | |
129 | break; | |
130 | case "Disable": | |
131 | Bullet = new Byte[] { 0x00 }; | |
132 | SetBulletType((int)clientIndex, Bullet); | |
133 | break; | |
134 | } | |
135 | } | |
136 | public static void SetBulletType(int clientIndex, Byte[] Bullet) | |
137 | { | |
138 | SetMemoryClient(Offset_5, Bullet, (UInt32)clientIndex); | |
139 | SetMemoryClient(Offset_6, new Byte[] { 0xFF }, (UInt32)clientIndex); | |
140 | } | |
141 | } | |
142 | } | |
143 | public static class Online | |
144 | { | |
145 | #region Set BulletType | |
146 | public static class SetBullet | |
147 | { | |
148 | public static uint Offset_1 = 0x0178136b; | |
149 | public static uint Offset_2 = Offset_1 - 0xC; | |
150 | public static uint Offset_3 = Offset_1 - 0x4; | |
151 | public static uint Offset_4 = Offset_1 - 0x170; | |
152 | public static uint Offset_5 = Offset_1 - 0x18C; | |
153 | public static uint Offset_6 = Offset_1 - 0xD; | |
154 | public static PS3API PS3 = new PS3API(); | |
155 | public static void SetMemoryClient(UInt32 Offset, Byte[] bytesm, UInt32 clientIndex) | |
156 | { | |
157 | PS3.SetMemory(Offset + (clientIndex * 0x5808), bytesm); | |
158 | } | |
159 | public static void GetMemoryClient(UInt32 Offset, byte[] buffer, UInt32 clientIndex) | |
160 | { | |
161 | PS3.GetMemory(Offset + (clientIndex * 0x5808), buffer); | |
162 | } | |
163 | ||
164 | public static byte[] GetBytes(string str) | |
165 | { | |
166 | byte[] bytes = new byte[str.Length * sizeof(char)]; | |
167 | System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length); | |
168 | return bytes; | |
169 | } | |
170 | public static void removenades(uint ClientIndex) | |
171 | { | |
172 | byte[] sky = new byte[] { 0x00 }; | |
173 | PS3.SetMemory((Offset_1) + (ClientIndex * 0x5808), sky); | |
174 | ||
175 | byte[] sky1 = new byte[] { 0x00 }; | |
176 | PS3.SetMemory((Offset_2) + (ClientIndex * 0x5808), sky1); | |
177 | ||
178 | } | |
179 | ||
180 | public static void removenades1(uint ClientIndex) | |
181 | { | |
182 | byte[] sky = new byte[] { 0x00 }; | |
183 | PS3.SetMemory((Offset_3) + (ClientIndex * 0x5808), sky); | |
184 | } | |
185 | ||
186 | public static void BulletType(int clientIndex, String BulletType) | |
187 | { | |
188 | removenades((uint)clientIndex); | |
189 | removenades1((uint)clientIndex); | |
190 | Byte[] OldWeap = new Byte[1]; | |
191 | if (BulletType == "None") | |
192 | SetMemoryClient(Offset_4, OldWeap, (UInt32)clientIndex); | |
193 | if (BulletType != "None" && count1 == 0) | |
194 | { | |
195 | GetMemoryClient(Offset_4, OldWeap, (UInt32)clientIndex); | |
196 | count1++; | |
197 | } | |
198 | byte[] Bullet; | |
199 | SetMemoryClient(Offset_4, new Byte[1], (UInt32)clientIndex); | |
200 | Thread.Sleep(20); | |
201 | ||
202 | switch (BulletType) | |
203 | { | |
204 | case "AGR Gun": | |
205 | Bullet = new Byte[] { 0x7A }; | |
206 | SetBulletType((int)clientIndex, Bullet); | |
207 | break; | |
208 | ||
209 | case "Test": | |
210 | Bullet = new Byte[] { 0xC3 }; | |
211 | SetBulletType((int)clientIndex, Bullet); | |
212 | break; | |
213 | ||
214 | case "AGR Rocket": | |
215 | Bullet = new Byte[] { 0x7B }; | |
216 | SetBulletType((int)clientIndex, Bullet); | |
217 | break; | |
218 | case "Dragonfire": | |
219 | Bullet = new Byte[] { 0x99 }; | |
220 | SetBulletType((int)clientIndex, Bullet); | |
221 | break; | |
222 | case "Escortdrone": | |
223 | Bullet = new Byte[] { 0x77 }; | |
224 | SetBulletType((int)clientIndex, Bullet); | |
225 | break; | |
226 | case "Guardian": | |
227 | Bullet = new Byte[] { 0x9F }; | |
228 | SetBulletType((int)clientIndex, Bullet); | |
229 | break; | |
230 | case "Hellstorm": | |
231 | Bullet = new Byte[] { 0x95 }; | |
232 | SetBulletType((int)clientIndex, Bullet); | |
233 | break; | |
234 | case "Hunter Killer": | |
235 | Bullet = new Byte[] { 0x8C }; | |
236 | SetBulletType((int)clientIndex, Bullet); | |
237 | break; | |
238 | case "Loadster": | |
239 | Bullet = new Byte[] { 0x97 }; | |
240 | SetBulletType((int)clientIndex, Bullet); | |
241 | break; | |
242 | case "Sentry Gun": | |
243 | Bullet = new Byte[] { 0x9E }; | |
244 | SetBulletType((int)clientIndex, Bullet); | |
245 | break; | |
246 | case "Stealth Chopper": | |
247 | Bullet = new Byte[] { 0x83 }; | |
248 | SetBulletType((int)clientIndex, Bullet); | |
249 | break; | |
250 | case "Swarm": | |
251 | Bullet = new Byte[] { 0x8F }; | |
252 | SetBulletType((int)clientIndex, Bullet); | |
253 | break; | |
254 | case "VTOL Bullet": | |
255 | Bullet = new Byte[] { 0x89 }; | |
256 | SetBulletType((int)clientIndex, Bullet); | |
257 | break; | |
258 | case "VTOL Rocket": | |
259 | Bullet = new Byte[] { 0x84 }; | |
260 | SetBulletType((int)clientIndex, Bullet); | |
261 | break; | |
262 | case "Warthog Bullet": | |
263 | Bullet = new Byte[] { 0x9B }; | |
264 | SetBulletType((int)clientIndex, Bullet); | |
265 | break; | |
266 | case "Warthog Rocket": | |
267 | Bullet = new Byte[] { 0x9C }; | |
268 | SetBulletType((int)clientIndex, Bullet); | |
269 | break; | |
270 | case "Disable": | |
271 | Bullet = new Byte[] { 0x00 }; | |
272 | SetBulletType((int)clientIndex, Bullet); | |
273 | break; | |
274 | } | |
275 | } | |
276 | public static void SetBulletType(int clientIndex, Byte[] Bullet) | |
277 | { | |
278 | SetMemoryClient(Offset_5, Bullet, (UInt32)clientIndex); | |
279 | SetMemoryClient(Offset_6, new Byte[] { 0xFF }, (UInt32)clientIndex); | |
280 | } | |
281 | } | |
282 | } | |
283 | #endregion | |
284 | //How to spawn? | |
285 | //BulletType(dataGridView1.CurrentRow.Index, "VTOL Bullet"); //- To Spawn VTOL Bullet | |
286 | //Exmple in numericUpDown = BulletType((int)numericUpDown1.Value, "VTOL Bullet"); | |
287 | //Dont use "Test" ,its freeze the ps3. | |
288 | //Have Fun ;) | |
289 | //Thanks to Shark - Function, Unknuawn - Big thanks to him :-) |