-
Notifications
You must be signed in to change notification settings - Fork 121
Rev killer, Barrows updates #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
| Microbot.log("Drinking"); | ||
| if(Rs2GameObject.interact(rej, "Drink")){ | ||
| if(rej.click("Drink")){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break if you're not executing it on the client thread?
|
|
||
| public void fightrev(revKillerConfig config){ | ||
| Rs2NpcModel Rev = (Rs2Npc.getNpc(config.selectedRev().getName())); | ||
| Rs2NpcModel Rev = Rs2Npc.getNpc(config.selectedRev().getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with rs2NpcCache
| if(!Rs2Dialogue.isInDialogue()){ | ||
| Microbot.log("At the cave, clicking."); | ||
| if(Rs2GameObject.interact(31555, "Enter")){ | ||
| if(Microbot.getRs2TileObjectCache().query().withId(31555).nearest().click("Enter")){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with rs2TileObjectCache
| if(revenentKnight() == null) return; | ||
|
|
||
| if(Rs2Npc.attack("Revenant knight")){ | ||
| if(Rs2Npc.interact(revenentKnight(), "Attack")){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with rs2NpcCache
|
|
||
| if(Rs2GroundItem.isItemBasedOnValueOnGround(500,10)){ | ||
| return; | ||
| if(goodLootOnGround()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-picking, but please apply proper formatting: a space after if and after the closing )
| if(!super.isRunning()){ | ||
| break; | ||
| List<Rs2TileItemModel> itemsOnGround = Microbot.getRs2TileItemCache().query().where(it -> it.getWorldLocation().distanceTo(Rs2Player.getWorldLocation()) < 12 && !it.getName().contains("arrow") && it.getTotalGeValue() > 500).toList(); | ||
| List<Rs2TileItemModel> BlightedItemsOnGround = Microbot.getRs2TileItemCache().query().where(it -> it.getWorldLocation().distanceTo(Rs2Player.getWorldLocation()) < 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable names should be camelCase
| break; | ||
| List<Rs2TileItemModel> itemsOnGround = Microbot.getRs2TileItemCache().query().where(it -> it.getWorldLocation().distanceTo(Rs2Player.getWorldLocation()) < 12 && !it.getName().contains("arrow") && it.getTotalGeValue() > 500).toList(); | ||
| List<Rs2TileItemModel> BlightedItemsOnGround = Microbot.getRs2TileItemCache().query().where(it -> it.getWorldLocation().distanceTo(Rs2Player.getWorldLocation()) < 12 | ||
| && (it.getName().toLowerCase().contains("blighted") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would personally keep the strings in a static final Set/List and iterate over it
| sleepUntil(()-> !Rs2Player.isAnimating() && !Rs2Inventory.isFull(), 1500); | ||
| } | ||
| } | ||
| if(!Rs2Inventory.isFull()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An else would be more appropriate here instead of this if
| } | ||
| } | ||
| if(!Rs2Inventory.isFull()){ | ||
| if(Microbot.getRs2TileItemCache().query().withId(theItem.getId()).nearest() != null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use injected version instead of static one.
| if(Rs2Player.isMoving()){ | ||
| sleepUntil(()-> !Rs2Player.isMoving(), Rs2Random.between(3000,6000)); | ||
| if(!Rs2Inventory.isFull()){ | ||
| if(Microbot.getRs2TileItemCache().query().withId(theItem.getId()).nearest() != null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use injected version instead of static one.
Rev killer, Barrows updates (#298) * fix(BarrowsScript): numerous bug fixes * fix(RevKillerScript): numerous bug fixes
numerous bug fixes