glBattleSearch

gl helper

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         glBattleSearch
// @namespace    http://tampermonkey.net/
// @version      2024-01-16
// @description  gl helper
// @author       omni
// @include        /^https{0,1}:\/\/((www|qrator|my)\.(heroeswm|lordswm)\.(ru|com)|178\.248\.235\.15)\/leader_guild.php/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=heroeswm.ru
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var turnId = {amummy:{id:933,hp:80},acrossbowman:{id:1021,hp:24},air:{id:153,hp:30},ancienent:{id:238,hp:181},ancientpig:{id:691,hp:15},angel:{id:132,hp:180},anubis:{id:917,hp:160},arcaneelf:{id:261,hp:12},archer:{id:2,hp:7},archlich:{id:146,hp:55},archmage:{id:104,hp:30},armorgnom:{id:982,hp:55},assassin:{id:56,hp:14},assida:{id:847,hp:30},axegnom:{id:985,hp:10},banditka:{id:729,hp:8},banshee:{id:515,hp:110},battlegriffin:{id:36,hp:35},battlegriffon:{id:493,hp:52},battlemage:{id:578,hp:29},battlerager:{id:960,hp:30},bear:{id:172,hp:22},bearrider:{id:161,hp:25},behemoth:{id:131,hp:210},berserker:{id:163,hp:25},bigspider:{id:724,hp:55},blackbearrider:{id:162,hp:30},blackknight:{id:272,hp:90},blackwidow:{id:661,hp:14},bloodsister:{id:315,hp:24},boar:{id:690,hp:17},boarrider:{id:318,hp:14},bobbit:{id:895,hp:6},bonedragon:{id:133,hp:150},brawler:{id:114,hp:20},brigand:{id:725,hp:5},briskrider:{id:316,hp:50},brute:{id:254,hp:8},cavalier:{id:90,hp:90},cbal:{id:791,hp:65},cerberus:{id:75,hp:15},champion:{id:495,hp:100},chieftain:{id:436,hp:48},colossus:{id:106,hp:175},conscript:{id:34,hp:6},cpirate:{id:677,hp:4},crossman:{id:257,hp:8},crusader:{id:672,hp:30},cursed:{id:522,hp:20},cursedent:{id:664,hp:215},cyclop:{id:89,hp:85},cyclopking:{id:237,hp:95},cyclopod:{id:537,hp:100},dancer:{id:25,hp:12},darkbird:{id:544,hp:60},darkrider:{id:51,hp:40},ddhigh:{id:587,hp:34},deephydra:{id:149,hp:125},defender:{id:157,hp:7},devil:{id:82,hp:166},dgolem:{id:520,hp:350},diamondgolem:{id:660,hp:60},djinn:{id:39,hp:40},djinn_sultan:{id:105,hp:45},djinn_vizier:{id:579,hp:50},druid:{id:26,hp:34},druideld:{id:120,hp:38},dryad:{id:255,hp:6},eadaughter:{id:333,hp:35},earth:{id:154,hp:75},efreeti:{id:280,hp:90},elf:{id:19,hp:10},elgargoly:{id:256,hp:16},enforcer:{id:35,hp:7},executioner:{id:335,hp:40},familiar:{id:80,hp:6},fatpirate:{id:651,hp:100},fatpirateup:{id:652,hp:120},fcentaur:{id:310,hp:6},fire:{id:155,hp:43},firebird:{id:536,hp:65},firedragon:{id:168,hp:230},flamelord:{id:958,hp:120},footman:{id:10,hp:16},foulhydra:{id:746,hp:125},foulwyvern:{id:337,hp:105},fury:{id:53,hp:16},ghost:{id:11,hp:8},giant:{id:792,hp:100},giantarch:{id:817,hp:100},gnomon:{id:728,hp:9},goblin:{id:14,hp:3},goblinarcher:{id:314,hp:3},goblinmag:{id:545,hp:3},goblinus:{id:329,hp:3},gogachi:{id:285,hp:13},greendragon:{id:103,hp:200},gremlin:{id:9,hp:5},griffon:{id:3,hp:30},grimrider:{id:121,hp:50},harpooner:{id:378,hp:10},harpy:{id:200,hp:15},harpyhag:{id:201,hp:15},hellcharger:{id:76,hp:50},hellhound:{id:74,hp:15},hellkon:{id:290,hp:66},highwayman:{id:730,hp:24},hobgoblin:{id:33,hp:4},horneddemon:{id:77,hp:13},hornedoverseer:{id:79,hp:13},hotdog:{id:288,hp:15},hydra:{id:50,hp:80},hyenarider:{id:859,hp:14},imp:{id:78,hp:4},impergriffin:{id:117,hp:35},inquisitor:{id:145,hp:80},iron_golem:{id:12,hp:18},jdemon:{id:289,hp:13},kachok:{id:601,hp:50},kamneed:{id:202,hp:45},kamnegryz:{id:203,hp:55},leprekon:{id:610,hp:7},lich:{id:29,hp:50},mage:{id:16,hp:18},magneticgolem:{id:259,hp:28},maiden:{id:49,hp:16},manticore:{id:754,hp:80},marksman:{id:42,hp:10},mastergremlin:{id:32,hp:6},masterhunter:{id:72,hp:14},masterlich:{id:341,hp:55},matriarch:{id:239,hp:90},mauler:{id:320,hp:12},mcentaur:{id:309,hp:10},medusa:{id:752,hp:25},medusaup:{id:753,hp:30},megogachi:{id:287,hp:13},mercarcher:{id:20,hp:8},mercfootman:{id:21,hp:24},minotaur:{id:55,hp:31},minotaurguard:{id:70,hp:35},mistress:{id:745,hp:100},mountaingr:{id:339,hp:12},mummy:{id:268,hp:50},ncentaur:{id:311,hp:9},negro:{id:849,hp:17},nightmare:{id:150,hp:66},nomad:{id:897,hp:30},obsgargoyle:{id:44,hp:20},ocean:{id:848,hp:30},ogre:{id:24,hp:50},ogrebrutal:{id:535,hp:70},ogremagi:{id:119,hp:65},ogreshaman:{id:855,hp:55},orc:{id:23,hp:12},orcchief:{id:73,hp:18},orcrubak:{id:534,hp:20},orcshaman:{id:546,hp:13},outlaw:{id:727,hp:6},outlawup:{id:896,hp:8},peasant:{id:4,hp:4},pegasus:{id:625,hp:30},pikeman:{id:1004,hp:15},piratemonster:{id:644,hp:190},piratka:{id:649,hp:10},piratkaup:{id:650,hp:12},pitfiend:{id:83,hp:110},pitlord:{id:236,hp:120},pity:{id:291,hp:140},pixel:{id:17,hp:5},plaguezombie:{id:40,hp:17},plant:{id:624,hp:60},poltergeist:{id:512,hp:20},priest:{id:37,hp:54},priestess:{id:852,hp:35},priestessup:{id:853,hp:35},pristineunicorn:{id:588,hp:80},rakshasa_kshatra:{id:580,hp:135},rakshasa_raja:{id:108,hp:140},rakshasa_rani:{id:93,hp:120},rapukk:{id:283,hp:99},reptiloid:{id:850,hp:80},reptiloidup:{id:851,hp:90},robber:{id:726,hp:5},rocbird:{id:30,hp:55},rotzombie:{id:270,hp:23},runekeeper:{id:961,hp:65},runepatriarch:{id:165,hp:70},runepriest:{id:164,hp:60},saboteurgremlin:{id:253,hp:6},satyr:{id:626,hp:36},savageent:{id:589,hp:175},sceletonwar:{id:267,hp:5},scout:{id:52,hp:10},sdaughter:{id:332,hp:35},seducer:{id:485,hp:26},shadowdragon:{id:102,hp:200},shadow_witch:{id:94,hp:80},shamancyclop:{id:860,hp:105},shamaness:{id:331,hp:30},shieldguard:{id:158,hp:12},shootpirate:{id:646,hp:15},shootpirateup:{id:647,hp:18},silverunicorn:{id:147,hp:77},skeleton:{id:1,hp:4},skeletonarcher:{id:28,hp:4},skeletonpirate:{id:604,hp:4},skeletonpirateup:{id:606,hp:4},skirmesher:{id:160,hp:12},skmarksman:{id:340,hp:6},slayer:{id:334,hp:34},snowwolf:{id:942,hp:50},spearwielder:{id:159,hp:10},spectre:{id:68,hp:19},spegasus:{id:629,hp:30},spider:{id:198,hp:9},spiderpois:{id:199,hp:11},sprite:{id:31,hp:6},squire:{id:71,hp:26},stalker:{id:696,hp:15},steelgolem:{id:69,hp:24},stone_gargoyle:{id:8,hp:15},succubus:{id:81,hp:20},succubusmis:{id:122,hp:30},taskmaster:{id:317,hp:40},tengu:{id:793,hp:45},thane:{id:166,hp:100},thiefarcher:{id:124,hp:40},thiefmage:{id:125,hp:30},thiefwarrior:{id:123,hp:45},throwgnom:{id:993,hp:24},thunderbird:{id:148,hp:65},thunderlord:{id:167,hp:120},trapper:{id:386,hp:7},treant:{id:92,hp:175},troglodyte:{id:750,hp:5},troglodyteup:{id:751,hp:6},troll:{id:204,hp:150},unicorn:{id:38,hp:57},vampire:{id:15,hp:30},vampirelord:{id:118,hp:35},vampireprince:{id:513,hp:40},vermin:{id:281,hp:6},vindicator:{id:260,hp:23},vulture:{id:731,hp:40},wardancer:{id:41,hp:12},warmong:{id:330,hp:20},warrior:{id:319,hp:12},water:{id:156,hp:43},wdancer:{id:258,hp:14},whitebearrider:{id:959,hp:30},wight:{id:91,hp:95},wolfraider:{id:43,hp:12},wolfrider:{id:18,hp:10},wraith:{id:235,hp:100},wyvern:{id:336,hp:90},zealot:{id:494,hp:80},zombie:{id:5,hp:17},zpirate:{id:679,hp:150},archangel:{id:249,hp:220},seraph2:{id:496,hp:220},spectraldragon:{id:300,hp:160},ghostdragon:{id:514,hp:150},titan:{id:107,hp:190},stormtitan:{id:581,hp:190},emeralddragon:{id:100,hp:200},crystaldragon:{id:590,hp:200},ancientbehemoth:{id:301,hp:250},dbehemoth:{id:538,hp:280},cursedbehemoth:{id:861,hp:250},blackdragon:{id:101,hp:240},reddragon:{id:747,hp:235},archdevil:{id:292,hp:199},archdemon:{id:293,hp:211},magmadragon:{id:169,hp:280},lavadragon:{id:962,hp:275},untamedcyc:{id:433,hp:225},bloodeyecyc:{id:399,hp:235},cyclopus:{id:397,hp:220},paladin:{id:234,hp:100},efreetisultan:{id:282,hp:100},naga:{id:673,hp:110},golddragon:{id:609,hp:169},pharaoh:{id:269,hp:70},deadknight:{id:273,hp:100},zhryak:{id:284,hp:99},ballista:{id:85,hp:200},tent:{id:0,hp:0},piratemonsterup:{id:645,hp:200},blacktroll:{id:205,hp:180},zasad:{id:1047,hp:70},magicel:{id:662,hp:80},scorp:{id:923,hp:4},duneraider:{id:921,hp:12},scorpup:{id:924,hp:5},dromad:{id:919,hp:40},duneraiderup:{id:922,hp:12},shakal:{id:925,hp:24},slon:{id:931,hp:100},priestmoon:{id:929,hp:50},slonup:{id:932,hp:110},shakalup:{id:926,hp:30},dromadup:{id:920,hp:45},priestsun:{id:930,hp:55},anubisup:{id:918,hp:200},scarab:{id:927,hp:6},scarabup:{id:928,hp:6},tenguup:{id:937,hp:60},gnoll:{id:1041,hp:6},brigandup:{id:1038,hp:6},verblud:{id:1060,hp:35},gnollum:{id:1042,hp:6},krokodil:{id:1067,hp:70},krokodilup:{id:1068,hp:80},gnollsh:{id:1089,hp:6},smaster:{id:1095,hp:84},manticoreup:{id:755,hp:80},apirate:{id:612,hp:13},bpirate:{id:611,hp:16},wendigoup:{id:945,hp:35},whitetiger:{id:631,hp:35},dgolemup:{id:521,hp:400},exile:{id:1040,hp:28},banditkaup:{id:936,hp:9},nomadup:{id:938,hp:33},spearthrower:{id:1114,hp:19},gatekeeper:{id:1132,hp:120},gnollup:{id:1138,hp:9},gnollka:{id:1139,hp:6},gnollboss:{id:1140,hp:36},pushkar:{id:1055,hp:64},robberup:{id:1044,hp:6},sekhmet:{id:1062,hp:50},valkyrie:{id:1185,hp:61},goblinshaman:{id:1193,hp:5},poukai:{id:1194,hp:120},monk:{id:1221,hp:20},warden:{id:1223,hp:39},snowwolfup:{id:1165,hp:53},necrodogup:{id:1325,hp:9},necrodog:{id:1324,hp:8},blackarcher:{id:1311,hp:13},deadarcher:{id:1312,hp:16},ork:{id:1346,hp:24},grib:{id:1187,hp:20},gribok:{id:1188,hp:16}};
    var imgId = {mundus:'acrossbowman',assasin:'assassin',ocean:'assida',knight:'cavalier',crossbowman:'crossman',cursed_:'cursed',cyclopod_:'cyclopod',lizardrider:'darkrider',dd_:'druid',ddeld:'druideld',dryad_:'dryad',firebird_:'firebird',gog:'gogachi',nightmare:'hellcharger',demondog:'hellhound',hellstallion:'hellkon',hdemon:'horneddemon',fdemon:'hornedoverseer',firehound:'hotdog',golem:'iron_golem',lepr:'leprekon',hunterelf:'masterhunter',magog:'megogachi',minotaurguard_:'minotaurguard',stallion:'nightmare',obsgargoly:'obsgargoyle',assida:'ocean',paesant:'peasant',pitfiend_:'pitfiend',pitlord_:'pitlord',pitspawn:'pity',pp:'pixel',rakshas:'rakshasa_rani',roc:'rocbird',witch:'shadow_witch',cyclopshaman:'shamancyclop',sceleton:'skeleton',sceletonarcher:'skeletonarcher',dpirate:'skeletonpirate',dpirateup:'skeletonpirateup',swordman:'squire',gargoly:'stone_gargoyle',succub:'succubus',succubusm:'succubusmis',ent:'treant',bladedancer:'wardancer',winddancer:'wdancer',hobwolfrider:'wolfraider',abehemoth:'ancientbehemoth',bbehemoth:'cursedbehemoth',zhrica:'priestmoon',zhricaup:'priestsun',mmaster:'smaster',jpirate:'spearthrower',witchdoctor:'goblinshaman',paokai:'poukai',deaddog:'necrodogup',blackdog:'necrodog'};
    let tr = document.getElementsByClassName("s_art_inside");
    for (let i = 0; i < 3; i++) {
        let cre = tr[i].getElementsByClassName("cre_creature");
        let checkSum = 0;
        let hp = 0;
        let f = true;
        for (let j = 0; j < cre.length; j++) {
            let id = cre[j].innerHTML.match(/name=([^\"]+)/)[1];
            let count = cre[j].querySelector("#add_now_count").innerHTML;
            checkSum += turnId[id].id*count;
            hp += turnId[id].hp*count;
        }
        if ((checkSum > 0) && (hp > 0)) {
            tr[i].getElementsByTagName("div")[0].innerHTML += "<div style = 'margin-left:10px'><a href = 'https://daily.heroeswm.ru/leader/bandits.php?hp=" + hp + "&sum=" + checkSum + "'>Поиск боя на Daily</a></div>";
        }
    }
})();