Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- A MAP GAME Mod by Rebin
- javascript:var s=document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='//pastebin.com/raw.php?i=NgvJm66K';void(0);
- */
- 'use strict';
- function Mod(){
- $('<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js">').appendTo('body');
- jQuery.fn.outerHTML = function(s) { return s ? this.before(s).remove() : jQuery("<p>").append(this.eq(0).clone()).html(); };
- window.document.title='|MIAU A GAME';
- this.initTimer = setInterval(function(){ this.checkInit(); }.bind(this), 20);
- }
- Mod.prototype.checkInit = function(){
- if(typeof(game) != "undefined"){
- if(game.loaded){
- clearInterval(this.initTimer);
- this.init();
- }
- }
- }
- Mod.prototype.init = function(){
- // TIMERS
- this.timers = {
- update: false,
- };
- // Updater
- this.timers.update = setInterval(function(){ this.update(); }.bind(this), 42);
- // check
- console.log(game.adventure.stages - game.adventure.stage + " stages left");
- }
- Mod.prototype.update = function(){
- if("undefined" === typeof _) return;
- if(game.adventure.stage == 0){
- this.setKeks("result#",this.getKeks("result#")+1);
- this.setKeks("result"+game.adventure.reward,this.getKeks("result"+game.adventure.reward)+1);
- clearInterval(this.timers.update);
- location.reload();
- }
- }
- Mod.prototype.getKeks = function(name){
- var parts = document.cookie.split(" " + name + "=");
- if(parts.length == 2){
- return parseInt(parts.pop().split(";").shift());
- }
- return 0;
- }
- Mod.prototype.setKeks = function(Bezeichner,Wert){
- document.cookie=Bezeichner+"="+Wert+";expires=Fri, 16 Oct 2222 14:19:54 GMT;";
- }
- Mod.prototype.terminate = function(){
- _.each(this.elements, function(element){
- if(_.isArray(element)){
- _.each(element, function(el){ el.remove(); });
- }else{
- element.remove();
- }
- });
- clearInterval(this.timers.update);
- window.m = undefined;
- }
- // Start
- if(!window.m){window.m = new Mod();}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement