August 14, 201510 yr Well, tried looking to better paint methods (ExperienceTracker api), and I'm not the best @ scripting and Java but I'm positive I did this right... I've already defined ExperienceTracker as: (Don't criticize my naming) ExperienceTracker xpTrack= new ExperienceTracker(); So in my onStart method, I have this: xpTrack.start(Skill.MINING); Then my paint, as well, these don't even show up: g.drawString("Experience: " + xpTrack.getGainedXP(Skill.MINING) + " (" + xpTrack.getGainedXPPerHour(Skill.MINING) + ")", 15, 101); g.drawString("Level: " + this.beginningLevel + " (" + xpTrack.getGainedLevels(Skill.MINING) + ")", 15, 115); And I wasn't getting any errors... but the log for when I started the script: [INFO][Bot #1][08/13 07:31:44 PM]: Thanks for using WWFMiner! [INFO][Bot #1][08/13 07:31:44 PM]: Error in script onExit(): WWFMiner [INFO][Bot #1][08/13 07:31:44 PM]: Script WWFMiner has exited!
August 14, 201510 yr I'm guessing you need to call xpTrack.exchangeContext(this); Also you should post these into the scripting help section so others (ie starting scripters) can benefit from this too
August 14, 201510 yr Author I'm guessing you need to call xpTrack.exchangeContext(this); Also you should post these into the scripting help section so others (ie starting scripters) can benefit from this too Oop, true. I'll move it there, and I'll see if that is the problem.
August 14, 201510 yr I'm guessing you need to call xpTrack.exchangeContext(this); Also you should post these into the scripting help section so others (ie starting scripters) can benefit from this too Oop, true. I'll move it there, and I'll see if that is the problem. noobs initialize your global instance using the getter method from method provider do it on the onStart ExperienceTracker xpTrack; onStart() { this.xpTrack = getExperienceTracker(); } Edited August 14, 201510 yr by jos3dpay
August 14, 201510 yr noobs initialize your global instance using the getter method from method provider do it on the onStart ExperienceTracker xpTrack; onStart() { this.xpTrack = getExperienceTracker(); } No. Don't do eet.
August 14, 201510 yr Author noobs initialize your global instance using the getter method from method provider do it on the onStart ExperienceTracker xpTrack; onStart() { this.xpTrack = getExperienceTracker(); } Much thank.
Create an account or sign in to comment