maximiliano1
-
Posts
22 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by maximiliano1
-
-
Yeah IntelliJ all the way, Eclipse sucks
-
Hi, title says it all! Also give me your price? (I lost my old pure acc and my mail was from 10minutemail)
-
Any proof on this? I don't know how mirror client works.
- 1
-
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.
-
I'd transform this code to Node based framework where each node has validate execute methods, this makes the code much cleaner
- 1
-
@Malcolm .accessor.splatDamage values seem to override old hitsplat values, but not to reset them? I think it's a bug.
-
On 10/12/2021 at 12:23 AM, Malcolm said:
Try to access the XCharacter class or anything that inherits from it and you might find what you're looking for
Thx, will give it a go
EDIT: mp.myPlayer().accessor.splatDamage works flawlessly
-
I would like to see the damage hitsplats that are dealt by my Character, is that possible? (not xp changes, etc)
-
On 9/26/2021 at 2:35 AM, Gunman said:
This worked for me on Ubuntu 20
java -jar "OSBot 2.6.33.jar" -autologin -bot 0:0:0000 -world 430
Thx bro
-
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
-
On 9/24/2021 at 3:33 AM, Gunman said:
Yes it does. List of CLI commands
https://osbot.org/forum/topic/118831-cli-commands-table/Doesn't seem to work on Linux for me
-
This method doesn't work anymore?
-
On 9/21/2021 at 9:45 PM, ProjectPact said:
Game ticks occur every ~600 ms
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.
-
37 minutes ago, ProjectPact said:
Game ticks occur every ~600 ms
So you're saying that the tick == update of the game and consequently the xp updates happen on tick updates? Didn't know that
-
@HeizThanks, but I'm making a pking script, so I need exact time of the XP drop not the one that is based on the onLoop callback...
-
Hi, my Scripts needs exact time of xp drops, there's no such event handler for this (I couldn't find myself from the javadocs)?
Looking for f2p r2h pure (40 att 54 str, 48 range ideally, 1, def 1 pray)
in Requests
Posted
This kid asks me for 10$ + bond for that, LMAO