January 15, 20206 yr Yo, yeah. i would like to use the singlefilter since it would make my code whole lotta cleaner but does it eat more cpu? im noob :d ty RS2Widget w = widgets.singleFilter(widgets.getAll(), f -> f.isVisible() && f.getMessage().equals("ok") && f.getTextColor() == 138573512); if (w != null) interact(); VS RS2Widget w = widgets.getWidgetContainingText("ok"); if (w != null && w.isVisible() && w.getTextColor() == 15837581) interact();
January 15, 20206 yr I believe both would require roughly the same amount since I think they would both have to loop through all the active widgets to retrieve the correct one. Also once you have searched once for the widget you can than reuse that variable instead of searching for the widget again. That way you will only have to run that code once.
Create an account or sign in to comment