7lym / KillerAge-7lym

// ==UserScript==
// @name        KillerAge-7lym
// @namespace   www.kingsage.ro
// @description mda
// @include     http://*.kingsage.*game.php*
// @version     1
// @grant       none
// ==/UserScript==
var coords = ["571|617",
"571|615",
"574|613",
"578|597",
"572|612",
"572|604",
"576|606",
"575|605",
"576|607",
"575|608",
"573|608",
"573|607",
"572|609",
"576|619",
"572|607",
"571|606",
"574|608",
"574|609",
"577|609",
"577|620",
"573|621",
"573|623",
"570|605",
"570|604",
"576|620",
"575|602",
"576|602",
"574|619",
"574|620",
"573|612",
"572|610",
"573|604",
"569|604",
"577|605",
"573|622",
"567|606",
"568|606",
"568|608",
"565|610",
"576|616",
"570|607",
"574|614",
"581|606",
"581|607",
"570|619",
"577|618",
"575|604",
"571|618",
"568|604",
"574|617",
"569|618",
"567|608",
"575|603",
"568|602",
"573|603",
"576|615",
"569|621",
"579|598",
"577|598",
"577|615",
"578|599",
"561|605",
"566|603",
"565|603",
"565|605",
"561|604",
"570|621",
"564|606",
"565|601",
"564|604",
"564|602",
"565|602",
"563|603",
"563|611",
"565|614",
"564|614",
"575|606",
"572|620",
"570|606",
"582|607",
"567|611",
"574|606",
"581|605",
"560|601",
"631|534",
"568|611",
"561|601",
"569|614",
"579|604",
"571|621",
"578|598",
"577|594",
"563|599",
"563|598",
"578|600",
"581|598",
"582|599",
"580|598",
"576|643",
"557|635",
"570|646",
"557|639",
"582|641",
"571|650",
"567|644",
"571|602",
"578|596",
"574|635",
"574|640",
"576|625",
"575|626",
"574|626",
"579|634",
"575|630",
"572|629",
"571|625",
"576|631",
"581|628",
"575|631",
"577|627",
"572|623",
"571|624",
"572|625",
"570|623",
"573|637",
"580|634",
"582|633",
"569|632",
"575|636",
"569|633",
"567|636",
"580|643",
"584|636",
"569|639",
"570|635",
"568|622",
"574|637",
"572|639",
"563|647",
"578|633",
"568|625",
"560|642",
"565|647",
"570|644",
"575|629",
"575|639",
"578|628",
"580|629",
"579|627",
];
var max = coords.length - 1;
var min = 0;

var buton = document.getElementById('attack_protect');
if (buton !== null)
{
  // window.location.reload(history.go(-1));
  var ora = document.getElementById('countup-time').innerHTML;
  var ora2 = ora.substring(ora.length - 10, ora.length - 8);
  buton.disabled = false;
  buton.focus();
  window.setTimeout(function () {
    if (ora2 == '00' || ora2 == '01' || ora2 == '02' || ora2 == '03' || ora2 == '04' || ora2 == '05' || ora2 == '06' || ora2 == '07')
    window.history.back();
     else
    buton.click();
  }, 1500);
  //alert(ora2);
} 
else
{


  var err = document.getElementsByClassName('error');
  if (err.length === 0)
  {
    window.setTimeout(function () {
    document.getElementsByName('kata') [0].value = '1';},1000);
    window.setTimeout(function () {
    document.getElementsByName('spy') [0].value = '1';},1500);
    window.setTimeout(function () {
    document.getElementsByName('bow') [0].value = '89';},2000);
    var cc = coords[Math.floor(Math.random() * (max - min + 1) + min)];
    var cc1 = cc.substring(0, 3);
    var cc2 = cc.substring(4, 7);
    window.setTimeout(function () {
    document.getElementById('send_x').value = cc1;},2300);
    window.setTimeout(function () {
    document.getElementById('send_y').value = cc2;},2500);
    window.setTimeout(function () {
    document.getElementsByName('attack') [0].click();},3000);
  } 
  else
  {
    document.getElementsByName('kata') [0].value = '999';
    alert('Out of Chakra!:) Coded by 7lym:)');
  }
}