Everything posted by Ateria
-
Prayer flicking (NPC Animations)
That seems to work for the tasks so far, thanks
-
Prayer flicking (NPC Animations)
I was going to do that, but it's for a slayer script and with the amount of tasks there are, i'd have to go through enum and add attack animations one by one after getting them in-game which'd take a long time. Is it not possible to do it another way?
-
Prayer flicking (NPC Animations)
Here's the current code I have for prayer flicking: private void handlePrayerFlicking() { if (getSkills().getStatic(Skill.PRAYER) >= 37 && !canFlickMage) canFlickMage = true; if (getSkills().getStatic(Skill.PRAYER) >= 40 && !canFlickRange) canFlickRange = true; if (getSkills().getStatic(Skill.PRAYER) >= 43 && !canFlickMelee) canFlickMelee = true; if (myPlayer().getInteracting() != null && myPlayer().getInteracting() instanceof NPC) { NPC npc = ((NPC) myPlayer().getInteracting()); if (npc.getHealthPercent() > 0 && npc.exists()) { if (!npc.isAnimating() && !getPrayer() .isActivated(currentNPCAttackStyle.equalsIgnoreCase("mage") ? PrayerButton.PROTECT_FROM_MAGIC : currentNPCAttackStyle.equalsIgnoreCase("range") ? PrayerButton.PROTECT_FROM_MISSILES : PrayerButton.PROTECT_FROM_MELEE)) { if ((canFlickMage && currentNPCAttackStyle.equalsIgnoreCase("mage")) || (canFlickRange && currentNPCAttackStyle.equalsIgnoreCase("range")) || (canFlickMelee && currentNPCAttackStyle.equalsIgnoreCase("melee"))) { if (getPrayer() .set(currentNPCAttackStyle.equalsIgnoreCase("mage") ? PrayerButton.PROTECT_FROM_MAGIC : currentNPCAttackStyle.equalsIgnoreCase("range") ? PrayerButton.PROTECT_FROM_MISSILES : PrayerButton.PROTECT_FROM_MELEE, true)) { } else { } } } else { if (getPrayer().isActivated( currentNPCAttackStyle.equalsIgnoreCase("mage") ? PrayerButton.PROTECT_FROM_MAGIC : currentNPCAttackStyle.equalsIgnoreCase("range") ? PrayerButton.PROTECT_FROM_MISSILES : PrayerButton.PROTECT_FROM_MELEE)) { Sleep.waitCondition(() -> npc.isAnimating() || npc.getHealthPercent() == 0, 300, 1500); if (getPrayer() .set(currentNPCAttackStyle.equalsIgnoreCase("mage") ? PrayerButton.PROTECT_FROM_MAGIC : currentNPCAttackStyle.equalsIgnoreCase("range") ? PrayerButton.PROTECT_FROM_MISSILES : PrayerButton.PROTECT_FROM_MELEE, false)) { } else { } } } } } } This works fine with most npcs, other than those that have longer attack delays, like hill giants. Whenever the npc performs their defense animation, prayer will still flick as they're 'animating'. I only want the prayer to flick off if it's their attack animation. Is it possible to determine if the current animation an npc is performing is their defense animation or is there a better way to add prayer flicking?
-
Stealth Quester
Yep, realised after I posted, sorry.
-
Stealth Quester
Animal magnetism: [INFO][Bot #1][10/07 12:52:58 PM]: Loaded 4 built-in random solvers! [INFO][Bot #1][10/07 12:53:28 PM]: started in normal mode [INFO][Bot #1][10/07 12:53:31 PM]: [ERROR] Current quest: Animal Magnetism [INFO][Bot #1][10/07 12:53:31 PM]: [ERROR] You do not meet the requirements for the current quest [INFO][Bot #1][10/07 12:53:32 PM]: [PROGRESS] Task complete [INFO][Bot #1][10/07 12:53:32 PM]: [PROGRESS] Task complete [INFO][Bot #1][10/07 12:53:32 PM]: Terminating script Stealth Quester... [INFO][Bot #1][10/07 12:53:32 PM]: Script Stealth Quester has exited! I do have the requirements https://i.imgur.com/ZJq2ZxW.png
-
Profit per hour
The profit is way off with that, this is the code now: double profitPerHour = (long) ((looted * (3600000.0 / elapsedTime))*3600000)/(hours <= 0 ? 1 : hours); and here's the estimated profit after running for 16 mins: Edit: Nevermind, this code works as intended, thanks @battleguard double profitPerHour = (long) (looted * (3600000.0 / elapsedTime))/(hours <= 0 ? 1 : hours);
-
Profit per hour
I have two integers, looted (the total price of all items looted) and the current running time in hours/minutes/seconds. To get the profit per hour initially, I did looted / (hours <= 0 ? 1 : hours) The problem with this is, it will only update hourly, and it'll almost always be incorrect as it only goes by the hours. So the script would need to be run for a minimum of 1 hour, then it would only update every hour. Is it possible to get the current estimated profit per hour from these two integers? (so it'll update every second with an estimated hourly profit)
- Get Slayer Task
-
Get Slayer Task
Sorry, should've gone into more detail. I've already got the enchanted gem in the inventory, how would I parse the text from the chatbox after checking the kills left? if (getInventory().interact("Check", "Enchanted gem")) { log("Checked kills-left."); if (getChatbox().contains(MessageType.GAME, "You're assigned to kill")) { //parse the text return "Parsed text from chatbox?"; } } else { log("Couldn't interact with enchanted gem."); }
-
Get Slayer Task
How could I get the players current slayer task?
-
Perfect Agility AIO
Flawless so far, however at Canifis, it sometimes clicks the first obstacle (Tall tree) too quickly after clicking the final one so the click doesn't register. Then takes around 20 seconds or so to click it again, looks really bot-like. Waiting a second or so longer would be great or retrying the obstacle sooner.
-
Perfect Thiever AIO
Doesn't register stun time correctly (doesn't change timer on paint + keeps trying to thieve men while stunned).
-
Stealth Quester
Nope, stealth injection with all normal settings. It did buy a spade from grand exchange i believe, just didn't withdraw it for the quest.
-
Stealth Quester
Didn't bring a spade or try to obtain one from the other side of the mansion during ernest the chicken. (Need a spade to find the key in the compost - can't search it with your hands)