Browse Source

Update for zerk HP negative when unleash?

Now can set Valkyon Health Potion use lower than 0% like -30%
Fukki 8 years ago
parent
commit
5030940ac3
2 changed files with 6 additions and 4 deletions
  1. 5 3
      index.js
  2. 1 1
      manifest.json

+ 5 - 3
index.js

@@ -2,7 +2,7 @@ const path = require('path'); const fs = require('fs');
 module.exports = function AutoPOT(mod) {
 	const cmd = mod.command || mod.require.command;
 	let config = getConfig(), hpPot = getHP(), mpPot = getMP();
-	let gPot = null,isReady = false, isSlaying = false, isZergling = false, nowHP = 0, nowMP = 0;
+	let gPot = null, isReady = false, isSlaying = false, isZergling = false, nowHP = 0, nowMP = 0;
 	mod.game.initialize(['me', 'contract']);
 
 	cmd.add(['autopot', 'pot'], (arg1, arg2) => {
@@ -96,6 +96,10 @@ module.exports = function AutoPOT(mod) {
 		if (mod.game.me.is(e.target) && e.id === 401730)
 			setTimeout(() => {isZergling = false;}, 3000);
 	});
+	
+	function msg(msg) {
+		cmd.message(msg);
+	}
 
 	function useItem(itemId) {
 		mod.send('C_USE_ITEM', 3, {
@@ -161,7 +165,5 @@ module.exports = function AutoPOT(mod) {
 		return s2a;
 	}
 	
-	function msg(msg) {cmd.message(msg);}
-	
 	function jsonSave(name,data) {fs.writeFile(path.join(__dirname, name), JSON.stringify(data, null, 4), err => {});}
 }

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
 	"files": {
-		"index.js": "9c56f82455c451000ccec581c54518d204f4f8eb6c5e3329e9e15d910dcca4d0"
+		"index.js": "aa74002ae6bf38774f3c89038e1ec8a9a2b2739f9ce4f3511c1529830278d84a"
 	},
 	"defs": {
 		"C_USE_ITEM": 3,