Jump to content

maximiliano1

Members
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

maximiliano1's Achievements

Bronze Poster

Bronze Poster (2/10)

2

Reputation

  1. Hi, title says it all! Also give me your price? (I lost my old pure acc and my mail was from 10minutemail)
  2. Any proof on this? I don't know how mirror client works.
  3. Jagex plans to ban third party clients: https://secure.runescape.com/m=news/third-party-clients-update?oldschool=1#_ga=2.240794755.1217738856.1655934763-1119098394.1649158362 Any thoughts on this? Many clients like osbot, poopbot, and others I'm not aware of are doomed? I believe it won't be possible to surpass? unless it's wrapped somehow to runelite client itself.
  4. I'd transform this code to Node based framework where each node has validate execute methods, this makes the code much cleaner
  5. @Malcolm .accessor.splatDamage values seem to override old hitsplat values, but not to reset them? I think it's a bug.
  6. Thx, will give it a go EDIT: mp.myPlayer().accessor.splatDamage works flawlessly
  7. I would like to see the damage hitsplats that are dealt by my Character, is that possible? (not xp changes, etc)
  8. Hi, I've had problem the ExperienceTracker not getting the combat xp fastly enough, so I've decided to implement my own combat xp tracker which tracks the experience via using the widgets, INSTRUCTIONS: In order to use the Xp drop tracker change the xp drop settings to following: 1. change the xp text to pink 2. don't use combined xp drop package State; import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.util.ExperienceTracker; import org.osbot.rs07.script.MethodProvider; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public class XpDropWidgetStateManager { MethodProvider mp; int latest_xp_drop = 0; ExperienceTracker range_xp_tracker; int gained_xp = 0; public ArrayList<Integer> values_widget = new ArrayList<>(); public ArrayList<Integer> values_skilltracker = new ArrayList<>(); int num_drops_to_save = 500; public XpDropWidgetStateManager(MethodProvider mp) { this.mp = mp; } public void initializeXPTracker() { this.range_xp_tracker = mp.getExperienceTracker(); this.range_xp_tracker.start(Skill.RANGED); this.gained_xp = this.range_xp_tracker.getGainedXP(Skill.RANGED); latest_xp_drop = 0; } private int RS2WidgetHeightComparator(RS2Widget lhs, RS2Widget rhs) { int lhs_height = lhs.getPosition().y; int rhs_height = rhs.getPosition().y; return Integer.compare(rhs_height, lhs_height); } private double getYDistance(RS2Widget src, RS2Widget target) { return Math.abs(src.getPosition().getY() - target.getPosition().getY()); } private RS2Widget getMyWidget() { List<RS2Widget> combat_icon_widgets = mp.getWidgets().filter(new Filter<RS2Widget>() { @Override public boolean match(RS2Widget rw) { return rw.getRootId() == 122 && rw.isVisible() && rw.getSpriteIndex1() != 203 && rw.getSpriteIndex1() != -1; } }); combat_icon_widgets.sort(this::RS2WidgetHeightComparator); if (combat_icon_widgets.size() > 0) { RS2Widget lowest_combat_icon_widget = combat_icon_widgets.get(0); List<RS2Widget> xp_drop_widgets = mp.getWidgets().filter(rw -> rw.getRootId() == 122 && rw.isVisible() && rw.getTextColor() == 16763080).stream().filter(o -> getYDistance(o, lowest_combat_icon_widget) < 1.0) .collect(Collectors.toList()); // mp.log(String.format("Size of xp widgets: %d", xp_drop_widgets.size())); if (xp_drop_widgets.size() == 1) { return xp_drop_widgets.get(0); } } return null; } public void print_array(ArrayList<Integer> array, String prefix) { mp.log("--------"); mp.log(prefix); String string = ""; for (int elem : array) { string += String.valueOf(elem) + ", "; } mp.log(string); } private boolean isMyWidgetWorking(RS2Widget widget) { return widget != null && widget.isVisible(); } public void saveToFile(String fileName, ArrayList<Integer> list) throws FileNotFoundException { PrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); for (int club : list) pw.println(club); pw.close(); } public /*JSONObject*/ int getXPDropInfo() { int dmg = 0; RS2Widget widget = getMyWidget(); if (isMyWidgetWorking(widget)) { String message = widget.getMessage(); dmg = Integer.parseInt(message) / 4; // mp.log(dmg); int curr_xp_drop = dmg * 4; if (latest_xp_drop != curr_xp_drop) { this.values_widget.add(curr_xp_drop); latest_xp_drop = curr_xp_drop; } int xp_gained_2 = this.range_xp_tracker.getGainedXP(Skill.RANGED); if (this.gained_xp != xp_gained_2) { num_drops_to_save += 1; int xp_change = xp_gained_2 - this.gained_xp; this.gained_xp = xp_gained_2; this.values_skilltracker.add(xp_change); } if (num_drops_to_save % 5 == 0) { this.print_array(this.values_widget, "Widget values"); this.print_array(this.values_skilltracker, "SkillTracker values"); } } return dmg; } } This code is using ExperienceTracker for debug purposes, so feel free to delete it/refractor the code to your needs
  9. I've tested as you advised by computing the xp change directly through the onGameTick and then computing via ExperienceTracker, but still after capturing the video and checking the timings, it seems that ExperienceTracker lags behind couple ticks compared to the actual xp change.
  10. So you're saying that the tick == update of the game and consequently the xp updates happen on tick updates? Didn't know that
×
×
  • Create New...