User:Uraxys/common.js

From Idle Clans wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// Testing
// mw.loader.load('//wiki.idleclans.com/index.php?title=User:Uraxys/scripts/test.js&action=raw&ctype=text/javascript');

// local IDE 
//mw.loader.load('http://mediawiki.localhost/src/mediawiki.js');

function testMath(base, multiplier) {
	base = base || 33.0;
	multiplier = multiplier || 30 + 25;

	var wasm_base64;
	var wasm_buffer;
	var wasm;
	var wasm_instance;
	function hw() {
		wasm_base64 = "AGFzbQEAAAABSQxgAn9/AGACf38Bf2ADf39/AX9gAX8AYAN/f38AYAF/AX9gBn9/f39/fwBgBH9/f38AYAR/f39/AX9gAABgAXwBfGADfHx/AXwDJSQFAwEAAQABAAAGBAcAAAIABAgACQMDCgsBAAAAAAABAQEAAgMEBQFwARQUBQMBABEGCQF/AUGAgMAACwcZAgZtZW1vcnkCAAxjYWxjdWxhdGVfeHAAFwkZAQBBAQsTHw0VDgYgGiMbDxwUCAwjGR4jGQreYySnJAIJfwF+IwBBEGsiCCQAAkACQAJAAkACQAJAAkAgAEH1AU8EQCAAQc3/e08NByAAQQtqIgBBeHEhBUHAicAAKAIAIglFDQRBACAFayEDAn9BACAFQYACSQ0AGkEfIAVB////B0sNABogBUEGIABBCHZnIgBrdkEBcSAAQQF0a0E+agsiB0ECdEGkhsAAaigCACIBRQRAQQAhAAwCC0EAIQAgBUEZIAdBAXZrQQAgB0EfRxt0IQQDQAJAIAEoAgRBeHEiBiAFSQ0AIAYgBWsiBiADTw0AIAEhAiAGIgMNAEEAIQMgASEADAQLIAEoAhQiBiAAIAYgASAEQR12QQRxakEQaigCACIBRxsgACAGGyEAIARBAXQhBCABDQALDAELQbyJwA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AEGQicAAQYSJwAA2AgBBhInAAEH8iMAANgIAQZiJwABBjInAADYCAEGMicAAQYSJwAA2AgBBoInAAEGUicAANgIAQZSJwABBjInAADYCAEGoicAAQZyJwAA2AgBBnInAAEGUicAANgIAQbCJwABBpInAADYCAEGkicAAQZyJwAA2AgBBuInAAEGsicAANgIAQayJwABBpInAADYCAEHQicAAIAFBD2pBeHEiAEEIayICNgIAQbSJwABBrInAADYCAEHIicAAIANBKGsiBCABIABrakEIaiIANgIAIAIgAEEBcjYCBCABIARqQSg2AgRB3InAAEGAgIABNgIADAgLIAIgBEkgASACTXINACAAKAIMIgRBAXENACAEQQF2IAZGDQMLQeCJwABB4InAACgCACIAIAEgACABSRs2AgAgASADaiEEQaSHwAAhAAJAAkADQCAEIAAoAgBHBEAgACgCCCIADQEMAgsLIAAoAgwiB0EBcQ0AIAdBAXYgBkYNAQtBpIfAACEAA0ACQCACIAAoAgAiBE8EQCAEIAAoAgRqIgcgAksNAQsgACgCCCEADAELC0HQicAAIAFBD2pBeHEiAEEIayIENgIAQciJwAAgA0EoayIJIAEgAGtqQQhqIgA2AgAgBCAAQQFyNgIEIAEgCWpBKDYCBEHcicAAQYCAgAE2AgAgAiAHQSBrQXhxQQhrIgAgACACQRBqSRsiBEEbNgIEQaSHwAApAgAhCiAEQRBqQayHwAApAgA3AgAgBCAKNwIIQbCHwAAgBjYCAEGoh8AAIAM2AgBBpIfAACABNgIAQayHwAAgBEEIajYCACAEQRxqIQADQCAAQQc2AgAgAEEEaiIAIAdJDQALIAIgBEYNByAEIAQoAgRBfnE2AgQgAiAEIAJrIgBBAXI2AgQgBCAANgIAIABBgAJPBEAgAiAAEAcMCAsgAEF4cUG0h8AAaiEBAn9BvInAACgCACIEQQEgAEEDdnQiAHFFBEBBvInAACAAIARyNgIAIAEMAQsgASgCCAshACABIAI2AgggACACNgIMIAIgATYCDCACIAA2AggMBwsgACABNgIAIAAgACgCBCADajYCBCABQQ9qQXhxQQhrIgYgBUEDcjYCBCAEQ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AzYCACADQYACTwRAIAAgAxAHDAILIANBeHFBtIfAAGohAQJ/QbyJwAAoAgAiBEEBIANBA3Z0IgNxRQRAQbyJwAAgAyAEcjYCACABDAELIAEoAggLIQQgASAANgIIIAQgADYCDCAAIAE2AgwgACAENgIIDAELIAIgAyAFaiIAQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIECyACQQhqIQMLIAhBEGokACADC/wFAQV/IABBCGsiASAAQQRrKAIAIgNBeHEiAGohAgJAAkACQAJAIANBAXENACADQQJxRQ0BIAEoAgAiAyAAaiEAIAEgA2siAUHMicAAKAIARgRAIAIoAgRBA3FBA0cNAUHEicAAIAA2AgAgAiACKAIEQX5xNgIEIAEgAEEBcjYCBCACIAA2AgAPCyABIAMQBQsCQAJAIAIoAgQiA0ECcUUEQCACQdCJwAAoAgBGDQIgAkHMicAAKAIARg0FIAIgA0F4cSICEAUgASAAIAJqIgBBAXI2AgQgACABaiAANgIAIAFBzInAACgCAEcNAUHEicAAIAA2AgAPCyACIANBfnE2AgQgASAAQQFyNgIEIAAgAWogADYCAAsgAEGAAkkNAiABIAAQB0EAIQFB5InAAEHkicAAKAIAQQFrIgA2AgAgAA0BQayHwAAoAgAiAARAA0AgAUEBaiEBIAAoAggiAA0ACwtB5InAAEH/HyABIAFB/x9NGzYCAA8LQdCJwAAgATYCAEHIicAAQciJwAAoAgAgAGoiADYCACABIABBAXI2AgRBzInAACgCACABRgRAQcSJwABBADYCAEHMicAAQQA2AgALIABB3InAACgCACIDTQ0AQdCJwAAoAgAiAkUNAEEAIQECQEHIicAAKAIAIgRBKUkNAEGkh8AAIQADQCACIAAoAgAiBU8EQCAFIAAoAgRqIAJLDQILIAAoAggiAA0ACwtBrIfAACgCACIABEADQCABQQFqIQEgACgCCCIADQALC0HkicAAQf8fIAEgAUH/H00bNgIAIAMgBE8NAEHcicAAQX82AgALDwsgAEF4cUG0h8AAaiECAn9BvInAACgCACIDQQEgAEEDdnQiAHFFBEBBvInAACAAIANyNgIAIAIMAQsgAigCCAshACACIAE2AgggACABNgIMIAEgAjYCDCABIAA2AggPC0HMicAAIAE2AgBBxInAAEHEicAAKAIAIABqIgA2AgAgASAAQQFyNgIEIAAgAWogADYCAAv9BAELfyMAQTBrIgIkACACQQM6ACwgAkEgNgIcIAJBADYCKCACQYCAwAA2AiQgAiAANgIgIAJBADYCFCACQQA2AgwCfwJAAkACQCABKAIQIgpFBEAgASgCDCIARQ0BIAEoAgghAyAAQQN0IQUgAEEBa0H/////AXFBAWohByABKAIAIQADQCAAQQRqKAIAIgQEQCACKAIgIAAoAgAgBCACKAIkKAIMEQIADQQLIAMoAgAgAkEMaiADKAIEEQEADQMgA0EIaiEDIABBCGohACAFQQhrIgUNAAsMAQsgASgCFCIARQ0AIABBBXQhCyAAQQFrQf///z9xQQFqIQcgASgCCCEIIAEoAgAhAANAIABBBGooAgAiAwRAIAIoAiAgACgCACADIAIoAiQoAgwRAgANAwsgAiAFIApqIgNBEGooAgA2AhwgAiADQRxqLQAAOgAsIAIgA0EYaigCADYCKCADQQxqKAIAIQRBACEJQQAhBgJAAkACQCADQQhqKAIAQQFrDgIAAgELIARBA3QgCGoiDCgCBEERRw0BIAwoAgAoAgAhBAtBASEGCyACIAQ2AhAgAiAGNgIMIANBBGooAgAhBAJAAkACQCADKAIAQQFrDgIAAgELIARBA3QgCGoiBigCBEERRw0BIAYoAgAoAgAhBAtBASEJCyACIAQ2AhggAiAJNgIUIAggA0EUaigCAEEDdGoiAygCACACQQxqIAMoAgQRAQANAiAAQQhqIQAgCyAFQSBqIgVHDQALCyAHIAEoAgRPDQEgAigCICABKAIAIAdBA3RqIgAoAgAgACgCBCACKAIkKAIMEQIARQ0BC0EBDAELQQALIAJBMGokAAv4AwECfyAAIAFqIQICQAJAIAAoAgQiA0EBcQ0AIANBAnFFDQEgACgCACIDIAFqIQEgACADayIAQcyJwAAoAgBGBEAgAigCBEEDcUEDRw0BQcSJwAAgATYCACACIAIoAgRBfnE2AgQgACABQQFyNgIEIAIgATYCAA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AgAiA0F4cSIFIAZBBEEIIANBA3EiAxtqSQ0DIANBACAFIAtLGw0EIAoQAQsgDQwGC0HBgMAAQS5B8IDAABAQAAtBgIHAAEEuQbCBwAAQEAALQcGAwABBLkHwgMAAEBAAC0GAgcAAQS5BsIHAABAQAAsgByAEIAxBAXFyQQJyNgIAIAQgCWoiBiADIARrIgNBAXI2AgRByInAACADNgIAQdCJwAAgBjYCACAKDAELIAoLDAILCyABIAJFDQAaQe2FwAAtAAAaIAIgARAYCyIDBEAgACACNgIIIAAgAzYCBCAAQQA2AgAPCyAAIAI2AgggACABNgIEDAILIABBADYCBAwBCyAAQQA2AgQLIABBATYCAAuKAQIDfwF+IwBBIGsiAiQAIAEoAgBBgICAgHhGBEAgASgCDCEDIAJBHGoiBEEANgIAIAJCgICAgBA3AhQgAkEUaiADEAIaIAJBEGogBCgCACIDNgIAIAIgAikCFCIFNwMIIAFBCGogAzYCACABIAU3AgALIABByILAADYCBCAAIAE2AgAgAkEgaiQAC2QAIwBBMGsiACQAQeyFwAAtAAAEQCAAQQI2AhAgAEHkgcAANgIMIABCATcCGCAAQQE2AiggACABNgIsIAAgAEEkajYCFCAAIABBLGo2AiQgAEEMakGMgsAAEBIACyAAQTBqJAALQQEBfyACIAAoAgAgACgCCCIDa0sEQCAAIAMgAhAKIAAoAgghAwsgACgCBCADaiABIAIQIhogACACIANqNgIIQQALTQECf0HthcAALQAAGiABKAIEIQIgASgCACEDQQhBBBAYIgFFBEBBBEEIECEACyABIAI2AgQgASADNgIAIABB2ILAADYCBCAAIAE2AgALRAEBfyMAQSBrIgMkACADQQE2AgQgA0IANwIMIANB6IPAADYCCCADIAE2AhwgAyAANgIYIAMgA0EYajYCACADIAIQEgALOQACQAJ/IAJBgIDEAEcEQEEBIAAgAiABKAIQEQEADQEaCyADDQFBAAsPCyAAIANBACABKAIMEQIAC7YCAQJ/IwBBIGsiAiQAIAJBATsBHCACIAE2AhggAiAANgIUIAJBlITAADYCECACQeiDwAA2AgwjAEEQayIBJAAgAkEMaiIAKAIIIgJFBEBB6IPAAEErQbiCwAAQEAALIAEgACgCDDYCDCABIAA2AgggASACNgIEIwBBEGsiACQAIAFBBGoiASgCACICKAIMIQMCQAJAAkACQCACKAIEDgIAAQILIAMNAUGAgMAAIQJBACEDDAILIAMNACACKAIAIgIoAgQhAyACKAIAIQIMAQsgACACNgIMIABBgICAgHg2AgAgAEH8gsAAIAEoAgQiACgCCCABKAIIIAAtABAgAC0AERAJAAsgACADNgIEIAAgAjYCACAAQeiCwAAgASgCBCIAKAIIIAEoAgggAC0AECAALQAREAkACzwBAX8jAEEgayIAJAAgAEEBNgIMIABBtIPAADYCCCAAQgA3AhQgAEGgg8AANgIQIABBCGpB2IPAABASAAslAQF/IAAoAgAiAUGAgICAeHJBgICAgHhHBEAgACgCBCABEB0LCxcBAX8gACgCACIBBEAgACgCBCABEB0LCyEAIAC9QoCAgICAgICAgH+DQv/////////vP4S/IACgnQumBAICfQF/IAJBAEcgALYhAyABtiIEQwAAAABeBEAgBEMAAMhClUMAAIA/kiADlLtEAAAAAAAAJECiIgAgABAWIgChmUQAAAAAAADgP2EEfCAARAAAAAAAAODDZiEFIAAgAEQAAAAAAADwv6BC////////////AAJ+IACZRAAAAAAAAOBDYwRAIACwDAELQoCAgICAgICAgH8LQoCAgICAgICAgH8gBRsgAET////////fQ2QbQgAgACAAYRtCAYNQGwUgAAtEAAAAAAAAJECjtiEDCwR9IANDZmamP5S7RAAAAAAAACRAoiIAIAAQFiIAoZlEAAAAAAAA4D9hBHwgAEQAAAAAAADgw2YhAiAAIABEAAAAAAAA8L+gQv///////////wACfiAAmUQAAAAAAADgQ2MEQCAAsAwBC0KAgICAgICAgIB/C0KAgICAgICAgIB/IAIbIABE////////30NkG0IAIAAgAGEbQgGDUBsFIAALRAAAAAAAACRAo7YFIAMLu0QAAAAAAAAkQKIiACAAEBYiAKGZRAAAAAAAAOA/YQR8IABEAAAAAAAA4MNmIQIgACAARAAAAAAAAPC/oEL///////////8AAn4g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{ return c.charCodeAt(0); }).buffer;
		WebAssembly.compile(wasm_buffer).then(function(x) {
			wasm = x;
			wasm_instance = new WebAssembly.Instance(wasm);
			var x = wasm_instance.exports.calculate_xp(base, multiplier, false);
			// to one decimal place
			console.log("Calculate xp:", x.toFixed(1));
		});
	}
	hw();
}

testMath();