Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(consoleAddr) {
- function PtcHack(cmd, on, off, active) {
- this.command = cmd;
- this.on = on;
- this.off = off;
- this.active = (active === undefined ? false : active);
- }
- PtcHack.prototype.toggle = function() {
- this.active = !this.active;
- var cmd = this.command + ' ' + (this.active ? this.on : this.off);
- Console.push(cmd);
- };
- function MemoryHack(address, on, off, size, active) {
- this.address = address;
- this.on = on;
- this.off = off;
- this.size = size;
- this.active = (active === undefined ? false : active);
- }
- MemoryHack.prototype.toggle = function() {
- this.active = !this.active;
- Memory.copy(this.address, (this.active ? this.on : this.off), this.size);
- };
- var chams = new PtcHack('SkelModelStencil', '1.0', '0.0');
- var wireframe = new PtcHack('WireFrame', '1.0', '0.0');
- var nofog = new PtcHack('FogEnable', '1.0', '0.0');
- var showfps = new PtcHack('ShowFPS', '1.0', '0.0');
- var superbullet = new MemoryHack(0x37511606, "\x33\xC0\x90", "\x0F\x94\xC0", 3);
- Console.init(consoleAddr);
- Keyboard.onkeydown = function(keycode) {
- switch(keycode) {
- case 0x61: // VK_NUMPAD1
- chams.toggle(); break;
- case 0x62: // VK_NUMPAD2
- wireframe.toggle(); break;
- case 0x63: // VK_NUMPAD3
- nofog.toggle(); break;
- case 0x64: // VK_NUMPAD4
- showfps.toggle(); break;
- case 0x64: // VK_NUMPAD5
- superbullet.toggle(); break;
- default: break;
- }
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement