Giter Club home page Giter Club logo

coal-bag-plugin's Introduction

Coal Bag Plugin

Adds a counter to the coal bag.

Description

The plugin is simple, it adds a counter to the coal bag to tell you how much coal is in the coal bag. The counter only updates when you add coal manually into the bag. It will not update when coal is added automatically while the bag is opened.

This plugin is a modified version of Adam's esspouch plugin.

Help

If you find a issue please open a issue on this repository with a description of what's happening and how to reproduce the issue.

Version History

  • 1.5
    • Fix Issue #4
      • Check for the widget on onClientTick instead of onGameTick as it's possible to close the widget on the same game tick that it opens.
  • 1.4 (Thank you to keyosk for this update!)
    • Added a configurable color for the counter
    • Both chat messages and widget messages are now evaluated as they can be different.
    • Cleaned up code and bug fixes
  • 1.3
    • Updated coal bag empty message as it changed in one of the latest game updates
    • Cleaned up code
  • 1.2
    • Fix Issue #2
      • Game will no longer error when completing temple trekks or when receiving a new cluescroll step.
    • Counter updates properly when one piece of coal is left in the bag when emptying.
  • 1.1
    • Fix Issue #1
      • Counter should account for Smithing Cape of Accomplishment.
      • Counter now displays the correct amount of coal in bag when emptied.
    • Changed name to "Coal Bag"
  • 1.0
    • Initial Release

coal-bag-plugin's People

Contributors

keyosk avatar wolfftech avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

wevel

coal-bag-plugin's Issues

NumberFormatException when dialog is open.

Getting this error when this interface is open:

java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:662)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at com.coalbagplugin.CoalBagPlugin.onGameTick(CoalBagPlugin.java:121)
at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:66)
at net.runelite.client.eventbus.EventBus.post(EventBus.java:219)
at net.runelite.client.callback.Hooks.clientMainLoop(Hooks.java:187)
at client.gd(client.java:48480)
at client.ak(client.java)
at aa.hx(aa.java:362)
at aa.run(aa.java:316)
at java.base/java.lang.Thread.run(Thread.java:832)

image

Closing the widget dialog on the same tick as it opens causes the counter not to update.

As pointed out by Keyosk

One thing to note, there's an edge case I was unable to solve for, I looked into var and pbits and was unable to see an alternative to following chat and widget messages, but there's a possibility to close the Widget dialog on the same tick as it opens. onGameTick misses the widget and message in this scenario.

When doing blast furnace for a few hours I was able to see this happen a few times when my clicks were occurring really fast. Checking the bag or attempting to empty the bag following that will get you the right message and 0 quantity.

I can't really think of any way to get around this, so any suggestions are welcome.

Coal bag counter displays 0 when it contains 9

When you have a smithing cape, the counter resets to 0 when you empty it the first time.

I believe this can be fixed if you add an if statement when setting it to 0 that subtracts 27 if the current number is 28 or higher.

Bag contents count doesnt update

The coal count is only updating when I check, fill or empty it, I tried uninstalling and reinstalling but the issue persists.

I even let my character sit for a couple seconds after mining coal but that didn't change the count either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.