Skip to content

Commit

Permalink
Improved AutoSword
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertex-Client authored Apr 14, 2017
1 parent d438684 commit df1e25f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Vertex Client PE.js
Original file line number Diff line number Diff line change
Expand Up @@ -9438,14 +9438,16 @@ VertexClientPE.fancyChat = function(str) {
Server.sendChat(newMsg);
}

/*
ALTERNATIVE WAY
VertexClientPE.getItemInSlot = function(newSlot) {
let oldSlot = Player.getSelectedSlotId();
Player.setSelectedSlotId(newSlot);
let itemId = Player.getCarriedItem();
Player.setSelectedSlotId(oldSlot);

return itemId;
}
} */

VertexClientPE.getSwordDamage = function(i) {
switch(i) {
Expand All @@ -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];
Expand Down

0 comments on commit df1e25f

Please sign in to comment.