Lotamina Posted May 6, 2017 Posted May 6, 2017 I am trying to make a sapphire ring script and I cant find out how do I use the gold bar on the furnace. Please help ;3
Chris Posted May 6, 2017 Posted May 6, 2017 getInventory.getItem("Gold bar").interact("Use"); RS2Object obj = getObjects().closest("Furnace"); if obj != null obj.interact("Use");
Lotamina Posted May 6, 2017 Author Posted May 6, 2017 (edited) getInventory comes up as an error when i do that 3; nvm Edited May 6, 2017 by Lotamina found fix
strange_kid Posted May 6, 2017 Posted May 6, 2017 (edited) 1 hour ago, Lotamina said: getInventory comes up as an error when i do that 3; nvm make sure to use: if (inventory.contains("Gold bar") { } for either your State or for the condition for the code above, to prevent a nullPointerException Edited May 6, 2017 by strange_kid
Alek Posted May 6, 2017 Posted May 6, 2017 4 hours ago, Chris said: getInventory.getItem("Gold bar").interact("Use"); RS2Object obj = getObjects().closest("Furnace"); if obj != null obj.interact("Use"); The power of InteractionEvent 2