Created
December 20, 2013 06:46
-
-
Save mitsuru/8051250 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name bro3_auto_phantom | |
// @version 0.1 | |
// @description enter something useful | |
// @match http://m17.3gokushi.jp/card/event_battle_top.php?scope=4* | |
// @match http://m17.3gokushi.jp/card/event_battle_result.php* | |
// @match http://m17.3gokushi.jp/card/event_battle_attack.php* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js | |
// @copyright 2012+, You | |
// ==/UserScript== | |
var j$ = jQuery.noConflict(); | |
if (location.pathname == "/card/event_battle_top.php") { | |
if (j$(".npcBusho").length > 0) { | |
j$(".npcBusho").each(function() { | |
if (j$(this).find("dd:nth-child(2)")[0].innerText == "諸葛亮") { | |
return; | |
} | |
var no = j$(this).find("dd:nth-child(16)").text(); | |
j$(this).find("a").attr("href", "/card/event_battle_attack.php?entry_id="+no).removeAttr("onclick"); | |
var busho = j$(this).find("dl:nth-child(2) dd:nth-child(2)").text(); | |
var hp = j$(this).find("dd.hp").text(); | |
setTimeout(function() { | |
location.href="/card/event_battle_attack.php?entry_id="+no; | |
}, 500); | |
}); | |
} else { | |
setTimeout(function() { | |
location.reload(); | |
}, 1000 * 30); | |
} | |
setTimeout(function() { | |
location.reload(); | |
}, 10 * 1000); | |
} else | |
if (location.pathname == "/card/event_battle_attack.php") { | |
var disclose = j$(".battle_Column:nth-child(2) .right a")[1]; | |
if (disclose) { | |
setTimeout(function() { | |
disclose.click(); | |
}, 1000); | |
} else { | |
setTimeout(function() { | |
location.href="/card/event_battle_top.php?scope=4"; | |
}, 10000); | |
} | |
} else { | |
setTimeout(function() { | |
location.href = "/card/event_battle_top.php?scope=4"; | |
}, 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment