BvS Kaiju Battle Hotkeys

Hotkeys for battling Kaiju

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name           BvS Kaiju Battle Hotkeys
// @namespace      CampSoup1988
// @version        1.2
// @history        1.2 New domain - animecubedgaming.com - Channel28
// @history        1.1 Now https compatible (Updated by Channel28)
// @description    Hotkeys for battling Kaiju
// @include        http*://*animecubed.com/billy/bvs/villagemonsterfight.*
// @include        http*://*animecubedgaming.com/billy/bvs/villagemonsterfight.*
// @grant          none
// ==/UserScript==

function process_event(event) {
	if (event.keyCode==66){		//Bring Down the House Jutsu
		var jutsu=document.forms.namedItem("kat").elements;
		for(var i=0; i<jutsu.length; i++)
			if(jutsu[i].value=="Bring Down the House Jutsu")		//Bring Down the House Jutsu
				jutsu[i].wrappedJSObject.click();
		document.forms.namedItem("kat").wrappedJSObject.submit();	//Attempt Fight
	}
	if (event.keyCode==75){		//Kitsune Bakudan
		var jutsu=document.forms.namedItem("kat").elements;
		for(var i=0; i<jutsu.length; i++)
			if(jutsu[i].value=="Kitsune Bakudan")		//Kitsune Bakudan
				jutsu[i].wrappedJSObject.click();
		document.forms.namedItem("kat").wrappedJSObject.submit();	//Attempt Fight
	}
	if (event.keyCode==84){		//Throw a TsukiBall
		var jutsu=document.forms.namedItem("kat").elements;
		for(var i=0; i<jutsu.length; i++)
			if(jutsu[i].value=="throw")		//Throw a TsukiBall
				jutsu[i].wrappedJSObject.click();
	}
	if (event.keyCode==65){		//Attempt
		if(document.forms.namedItem("kat"))
			document.forms.namedItem("kat").wrappedJSObject.submit();	//Attempt Fight
		else
			document.forms.namedItem("battle").wrappedJSObject.submit();	//New Fight
	}
	if (event.keyCode==67)		//c
		document.forms.namedItem("chakra").wrappedJSObject.submit();	//Charge chakra
	}

window.addEventListener("keyup", process_event, false);