Dmitry S лет назад: 4
Родитель
Сommit
a98c50926c
7 измененных файлов с 68 добавлено и 29 удалено
  1. 3 0
      .gitignore
  2. 8 0
      config.json
  3. 10 0
      hp.json
  4. 4 4
      index.js
  5. 17 14
      manifest.json
  6. 10 11
      module.json
  7. 16 0
      mp.json

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+.eslintrc.json
+manifest-generator.bat
+manifest-generator.js

+ 8 - 0
config.json

@@ -0,0 +1,8 @@
+{
+    "enabled": true,
+    "hp": false,
+    "mp": true,
+    "slaying": false,
+    "notice": false,
+    "delayafterRes": 2000
+}

+ 10 - 0
hp.json

@@ -0,0 +1,10 @@
+{
+    "6552": {
+        "name": "Prime Recovery Potable",
+        "inBattleground": false,
+        "inCombat": true,
+        "use_at": 80,
+        "slay_at": 30,
+        "cd": 10
+    }
+}

+ 4 - 4
index.js

@@ -7,10 +7,10 @@ module.exports = function AutoPOT(mod) {
 	if (!map.has(mod.dispatch || mod)) {
 		map.set(mod.dispatch || mod, {});
 		mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', () => false);
-		mod.hook('C_ADMIN', 1, e => {
+		/*mod.hook('C_ADMIN', 1, e => {
 			e.command.split(";").forEach(s => mod.command.exec(s));
 			return false;
-		});
+		});*/
 	}
 	
 	const gui = {
@@ -222,7 +222,7 @@ module.exports = function AutoPOT(mod) {
 	});
 	
 	//Because S_PLAYER_STAT_UPDATE faster than CREATURE
-	mod.hook('S_PLAYER_STAT_UPDATE', 17, e => {
+	mod.hook('S_PLAYER_STAT_UPDATE', 13, e => {
 		if (config.enabled) {
 			useHP(Math.round(s2n(e.hp) / s2n(e.maxHp) * 100));
 			useMP(Math.round(s2n(e.mp) / s2n(e.maxMp) * 100));
@@ -239,7 +239,7 @@ module.exports = function AutoPOT(mod) {
 			useMP(Math.round(s2n(e.currentMp) / s2n(e.maxMp) * 100));
 	});*/
 	
-	mod.hook('S_ITEMLIST', 6, e => {
+	mod.hook('S_ITEMLIST', 3, e => {
 		if (!invUpdate && e.gameId === mod.game.me.gameId) {
 			invUpdate = true;
 			for(let hp = 0; hp < hpPot.length; hp++)

+ 17 - 14
manifest.json

@@ -1,16 +1,19 @@
 {
-	"files": {
-		"index.js": "89097a3b26607dc255256b0123275a80c8b1f199ae7b83356eaf014214dc9c8a"
-	},
-	"defs": {
-		"C_ADMIN": 1,
-		"C_CONFIRM_UPDATE_NOTIFICATION": "raw",
-		"C_PLAYER_LOCATION": 5,
-		"C_USE_ITEM": 3,
-		"S_ANNOUNCE_UPDATE_NOTIFICATION": 1,
-		"S_ITEMLIST": 6,
-		"S_PLAYER_STAT_UPDATE": 17,
-		"S_RETURN_TO_LOBBY": "raw",
-		"S_SPAWN_ME": 3
-	}
+    "files": {
+        "README.md": "30aa30d80d46c15a482cccc9a2ca9b0b9122b3207f176aedb2415bfd257619c5",
+        "config.json": {
+            "overwrite": false,
+            "hash": "bdeb0be3ae9872be18ecd056c1df6dfbf41fd753bf9026a6459a079c31a29293"
+        },
+        "hp.json": {
+            "overwrite": false,
+            "hash": "19ee03ebc681238e9ec13c04f75d21ed9fcbeaed29fc38ef49c3e3b5abd4f2ee"
+        },
+        "index.js": "4c07d58adf92538524777fee1790bdd3d26462cd5f62623f5cd6dafb57a6be8d",
+        "module.json": "89f99b9622cf062cf00777ffd18614080f380708b8098162eadb273d3beebbe5",
+        "mp.json": {
+            "overwrite": false,
+            "hash": "9dd06503b1d543a728fc735b2aef8f12aeccf61248a46f6d924b82627728a176"
+        }
+    }
 }

+ 10 - 11
module.json

@@ -1,12 +1,11 @@
 {
-	"disableAutoUpdate": false,
-	"name": "AutoPOT",
-	"author": "Fukki",
-	"description": "auto use HP potion in normal or slaying and auto use Mana potion.",
-	"version": "Kappa :v",
-	"options": {
-		"niceName": "AutoPOT"
-	},
-	"servers": ["https://raw.githubusercontent.com/Fukki/auto-pot/master/"],
-	"supportUrl": "https://github.com/Fukki/auto-pot/issues/"
-}
+    "disableAutoUpdate": false,
+    "name": "auto-pot",
+    "author": "Fukki",
+    "description": "auto use HP potion in normal or slaying and auto use Mana potion.",
+    "version": "Kappa :v",
+    "options": {
+        "niceName": "AutoPOT"
+    },
+    "servers": ["https://raw.githubusercontent.com/tera-private-mods/auto-pot/master/"]
+}

+ 16 - 0
mp.json

@@ -0,0 +1,16 @@
+{
+    "6562": {
+        "name": "Prime Replenishment Potable",
+        "inBattleground": false,
+        "inCombat": false,
+        "use_at": 50,
+        "cd": 10
+    },
+    "130": {
+        "name": "Divine Infusion",
+        "inBattleground": false,
+        "inCombat": false,
+        "use_at": 5,
+        "cd": 30
+    }
+}