October 12, 20223 yr My firemaking scripts sporadically walks into the problem where it's having null selected somehow. i tried resolving this with the following, but this doesn't seem to resolve the issue. Does anyone know how to prevent this? if (logAmount >= 1) { api.inventory.interact("Use", Main.Logs); if (!api.getInventory().isItemSelected()) { api.getInventory().deselectItem(); } api.inventory.interact("Use", "Tinderbox"); } Would this prevent it maybe? api.inventory.interact("Use", Main.Logs); if (api.getInventory().getSelectedItemName() == null) { api.getInventory().deselectItem(); } api.inventory.interact("Use", "Tinderbox");
October 12, 20223 yr It's in fact just a jagex thing ^^ It happends if you select an item and it disappears, due to burning in your case Just null check the selected item name Edited October 12, 20223 yr by Khaleesi
October 12, 20223 yr This may happen when the bot selects the log that is already queued to be burned, and then it disappears. Eg. selecting too quickly.
Create an account or sign in to comment