From df1e25ffe6cddfbf235af59a94b46e6b84780d54 Mon Sep 17 00:00:00 2001 From: Vertex Client Date: Fri, 14 Apr 2017 20:31:00 +0200 Subject: [PATCH] Improved AutoSword --- Vertex Client PE.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Vertex Client PE.js b/Vertex Client PE.js index 761a44f..6163200 100644 --- a/Vertex Client PE.js +++ b/Vertex Client PE.js @@ -9438,6 +9438,8 @@ VertexClientPE.fancyChat = function(str) { Server.sendChat(newMsg); } +/* +ALTERNATIVE WAY VertexClientPE.getItemInSlot = function(newSlot) { let oldSlot = Player.getSelectedSlotId(); Player.setSelectedSlotId(newSlot); @@ -9445,7 +9447,7 @@ VertexClientPE.getItemInSlot = function(newSlot) { Player.setSelectedSlotId(oldSlot); return itemId; -} +} */ VertexClientPE.getSwordDamage = function(i) { switch(i) { @@ -9459,7 +9461,7 @@ VertexClientPE.autoSword = function(a, v) { let swordIds = []; let bestSlot = [null, null]; for(let i = 0; i <= 8; i++) { - let itemInSlot = VertexClientPE.getItemInSlot(i); + let itemInSlot = Player.getInventorySlot(i); if(itemInSlot == 268) { if(bestSlot[1] != 283 && bestSlot[1] != 272 && bestSlot[1] != 267 && bestSlot[1] != 276) { bestSlot = [i, itemInSlot];