|
@@ -62,7 +62,7 @@ module.exports = function AutoPOT(mod) {
|
|
|
if (config.hp && isReady) {
|
|
if (config.hp && isReady) {
|
|
|
nowHP = Math.round(parseInt(e.hp) / parseInt(e.maxHp) * 100);
|
|
nowHP = Math.round(parseInt(e.hp) / parseInt(e.maxHp) * 100);
|
|
|
for (let hp = 0; hp < hpPot.length; hp++) {
|
|
for (let hp = 0; hp < hpPot.length; hp++) {
|
|
|
- if (!hpPot[hp][1].inCd && hpPot[hp][1].amount > 0 && ((!isSlaying && nowHP <= hpPot[hp][1].use_at && (hpPot[hp][1].inCombat ? mod.game.me.inCombat : true)) || (isSlaying && nowHP <= hpPot[hp][1].slay_at && mod.game.me.inCombat)) && (hpPot[hp][1].inBattleground ? isBattleground : true)) {
|
|
|
|
|
|
|
+ if (!hpPot[hp][1].inCd && hpPot[hp][1].amount > 0 && ((!isSlaying && nowHP <= hpPot[hp][1].use_at && (hpPot[hp][1].inCombat ? mod.game.me.inCombat : true)) || (isSlaying && nowHP <= hpPot[hp][1].slay_at && mod.game.me.inCombat)) && (hpPot[hp][1].inBattleground ? isBattleground : !isBattleground)) {
|
|
|
useItem(hpPot[hp]); hpPot[hp][1].inCd = true; hpPot[hp][1].amount--; setTimeout(function () {hpPot[hp][1].inCd = false;}, hpPot[hp][1].cd * 1000);
|
|
useItem(hpPot[hp]); hpPot[hp][1].inCd = true; hpPot[hp][1].amount--; setTimeout(function () {hpPot[hp][1].inCd = false;}, hpPot[hp][1].cd * 1000);
|
|
|
if (config.notice) msg(`Used ${hpPot[hp][1].name}, ${(hpPot[hp][1].amount)} left.`);
|
|
if (config.notice) msg(`Used ${hpPot[hp][1].name}, ${(hpPot[hp][1].amount)} left.`);
|
|
|
}
|
|
}
|
|
@@ -71,7 +71,7 @@ module.exports = function AutoPOT(mod) {
|
|
|
if (config.mp && isReady) {
|
|
if (config.mp && isReady) {
|
|
|
nowMP = Math.round(parseInt(e.mp) / parseInt(e.maxMp) * 100);
|
|
nowMP = Math.round(parseInt(e.mp) / parseInt(e.maxMp) * 100);
|
|
|
for (let mp = 0; mp < mpPot.length; mp++) {
|
|
for (let mp = 0; mp < mpPot.length; mp++) {
|
|
|
- if (!mpPot[mp][1].inCd && mpPot[mp][1].amount > 0 && nowMP <= mpPot[mp][1].use_at && (mpPot[mp][1].inCombat ? mod.game.me.inCombat : true) && (mpPot[mp][1].inBattleground ? isBattleground : true)) {
|
|
|
|
|
|
|
+ if (!mpPot[mp][1].inCd && mpPot[mp][1].amount > 0 && nowMP <= mpPot[mp][1].use_at && (mpPot[mp][1].inCombat ? mod.game.me.inCombat : true) && (mpPot[mp][1].inBattleground ? isBattleground : !isBattleground)) {
|
|
|
useItem(mpPot[mp]); mpPot[mp][1].inCd = true; mpPot[mp][1].amount--; setTimeout(function () {mpPot[mp][1].inCd = false;}, mpPot[mp][1].cd * 1000);
|
|
useItem(mpPot[mp]); mpPot[mp][1].inCd = true; mpPot[mp][1].amount--; setTimeout(function () {mpPot[mp][1].inCd = false;}, mpPot[mp][1].cd * 1000);
|
|
|
if (config.notice) msg(`Used ${mpPot[mp][1].name}, ${(mpPot[mp][1].amount)} left.`);
|
|
if (config.notice) msg(`Used ${mpPot[mp][1].name}, ${(mpPot[mp][1].amount)} left.`);
|
|
|
}
|
|
}
|