March 24, 20241 yr yo dudes I got this going like 1000 times a second and my whole machine glitched out I had a look at lines 240 and 210 210 is just a 300ms sleep 240 is this: if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) { Is it to do with external libraries the error or some multi threading something? I don't get it. Spoiler [ERROR][03/24 04:06:32 PM]: Uncaught exception! java.lang.NullPointerException at org.osbot.rs07.input.mouse.ClientMouseEventHandler.generateBotMouseEvent(wl:240) at org.osbot.rs07.input.mouse.ClientMouseEventHandler.IiiIiiiIiii(wl:1) at org.osbot.rs07.input.mouse.ClientMouseEventHandler.mouseMoved(wl:210) at java.awt.Component.processMouseMotionEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
March 24, 20241 yr 1 hour ago, TheCongregation said: yo dudes I got this going like 1000 times a second and my whole machine glitched out I had a look at lines 240 and 210 210 is just a 300ms sleep 240 is this: if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) { Is it to do with external libraries the error or some multi threading something? I don't get it. Hide contents [ERROR][03/24 04:06:32 PM]: Uncaught exception! java.lang.NullPointerException at org.osbot.rs07.input.mouse.ClientMouseEventHandler.generateBotMouseEvent(wl:240) at org.osbot.rs07.input.mouse.ClientMouseEventHandler.IiiIiiiIiii(wl:1) at org.osbot.rs07.input.mouse.ClientMouseEventHandler.mouseMoved(wl:210) at java.awt.Component.processMouseMotionEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Nullpointer on some code when trying to interact with it I beliieve, hard to tell with just 1 line of code 😉 Show some more? Edited March 24, 20241 yr by Khaleesi
March 25, 20241 yr Author 8 hours ago, Khaleesi said: Nullpointer on some code when trying to interact with it I beliieve, hard to tell with just 1 line of code 😉 Show some more? Here in context is lines 206 to 246 which are in the onloop I do semi-often get Osbot Error: "problem with finding Prayer Button ULTMATE STRENGTH" but it never really harms or slows down things and so I usually ignore it Spoiler if (targetedPlayerName != null && !myPlayer().isUnderAttack()) { log("attack mode"); if (getSkills().getDynamic(Skill.PRAYER) >= 1) {getPrayer().set(PrayerButton.ULTIMATE_STRENGTH, true);} 210 - sleep(random(200, 300)); Player targetedPlayer = getPlayerByName(targetedPlayerName); // Get the Player object // Check if snare spell can be cast and it hasn't been casted yet if (!snareSpellCasted && canCastSnareSpell()) { castSnareSpell(targetedPlayer); snareSpellCasted = true; snareCastTime = System.currentTimeMillis(); // Record the current time sleep(random(200, 300)); } // Check if bind spell can be cast and it hasn't been casted yet if (!bindSpellCasted && canCastBindSpell()) { castBindSpell(targetedPlayer); bindSpellCasted = true; bindCastTime = System.currentTimeMillis(); // Record the current time sleep(random(200, 300)); } if (snareSpellCasted && System.currentTimeMillis() - snareCastTime >= SPELL_TIMEOUT) { snareSpellCasted = false; } if (bindSpellCasted && System.currentTimeMillis() - bindCastTime >= SPELL_TIMEOUT) { bindSpellCasted = false; } } // Check if the player is under attack and interacting with entity ID 2005 240 - if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) { //log("Bloody demon"); equipTank(); checkAndEatApplePie(); attackIfNotInteracting(targetedPlayerName); } Edited March 25, 20241 yr by TheCongregation
March 25, 20241 yr 6 hours ago, TheCongregation said: Here in context is lines 206 to 246 which are in the onloop I do semi-often get Osbot Error: "problem with finding Prayer Button ULTMATE STRENGTH" but it never really harms or slows down things and so I usually ignore it Hide contents if (targetedPlayerName != null && !myPlayer().isUnderAttack()) { log("attack mode"); if (getSkills().getDynamic(Skill.PRAYER) >= 1) {getPrayer().set(PrayerButton.ULTIMATE_STRENGTH, true);} 210 - sleep(random(200, 300)); Player targetedPlayer = getPlayerByName(targetedPlayerName); // Get the Player object // Check if snare spell can be cast and it hasn't been casted yet if (!snareSpellCasted && canCastSnareSpell()) { castSnareSpell(targetedPlayer); snareSpellCasted = true; snareCastTime = System.currentTimeMillis(); // Record the current time sleep(random(200, 300)); } // Check if bind spell can be cast and it hasn't been casted yet if (!bindSpellCasted && canCastBindSpell()) { castBindSpell(targetedPlayer); bindSpellCasted = true; bindCastTime = System.currentTimeMillis(); // Record the current time sleep(random(200, 300)); } if (snareSpellCasted && System.currentTimeMillis() - snareCastTime >= SPELL_TIMEOUT) { snareSpellCasted = false; } if (bindSpellCasted && System.currentTimeMillis() - bindCastTime >= SPELL_TIMEOUT) { bindSpellCasted = false; } } // Check if the player is under attack and interacting with entity ID 2005 240 - if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) { //log("Bloody demon"); equipTank(); checkAndEatApplePie(); attackIfNotInteracting(targetedPlayerName); } Can't do much with this as the actual interaction code isn't in these parts, I'm just assuming there are missing asome null checks before interacting with the targetedplayer or something, make sure to always null check an entity before interacting with it, same for items or whatever
March 25, 20241 yr Author 3 hours ago, Khaleesi said: Can't do much with this as the actual interaction code isn't in these parts, I'm just assuming there are missing asome null checks before interacting with the targetedplayer or something, make sure to always null check an entity before interacting with it, same for items or whatever its curious init... maybe unconciously I edited the script before tracking the lines, if I did I don't remember doing that and i'll post if it hits again and will attempt some more null checks.
March 25, 20241 yr 5 hours ago, TheCongregation said: its curious init... maybe unconciously I edited the script before tracking the lines, if I did I don't remember doing that and i'll post if it hits again and will attempt some more null checks. Ya or try to debug where the exact issue happend
March 26, 20241 yr Author 20 hours ago, Khaleesi said: Ya or try to debug where the exact issue happend debugging another term for littering logs ?
March 26, 20241 yr 2 hours ago, TheCongregation said: debugging another term for littering logs ? Getting rid of worms and nasty flies ;D
March 26, 20241 yr Author 2 minutes ago, Khaleesi said: Getting rid of worms and nasty flies ;D I suppose if you litter logs then the flies will jump out and the worms will be found under them
March 26, 20241 yr 3 minutes ago, TheCongregation said: I suppose if you litter logs then the flies will jump out and the worms will be found under them Ya good option, bring some fire and burn them!
Create an account or sign in to comment