GaetanoH Posted May 2, 2017 Share Posted May 2, 2017 (edited) close ty Edited May 2, 2017 by GaetanoH Quote Link to comment Share on other sites More sharing options...
Explv Posted May 2, 2017 Share Posted May 2, 2017 (edited) Would be better if you posted what you have tried, what doesn't work, and let us help you that way. Edited May 2, 2017 by Explv 1 Quote Link to comment Share on other sites More sharing options...
GaetanoH Posted May 2, 2017 Author Share Posted May 2, 2017 1 minute ago, Explv said: Would be better if you just posted what you have tried, what doesn't work, and let us help you that way. Wasn't going to let you spoon-feed me thought Quote Link to comment Share on other sites More sharing options...
GaetanoH Posted May 2, 2017 Author Share Posted May 2, 2017 5 minutes ago, Explv said: Would be better if you posted what you have tried, what doesn't work, and let us help you that way. However in the getState it now throws a NullPointer, can I fix this using an else method in my getState()? Quote Link to comment Share on other sites More sharing options...
Saiyan Posted May 2, 2017 Share Posted May 2, 2017 (edited) However in the getState it now throws a NullPointer, can I fix this using an else method in my getState()? if(varrockEast.contains(myPlayer()) && getInventory().getItem("Jug of water").isNote()){ return State.TRADE; } maybe its tht? Edited May 2, 2017 by Saiyan 1 Quote Link to comment Share on other sites More sharing options...
GaetanoH Posted May 2, 2017 Author Share Posted May 2, 2017 Just now, Saiyan said: if(varrockEast.contains(myPlayer()) && getInventory().getItem("Jug of water").isNote()){ return State.TRADE; } maybe its tht? I know why it gives the NullPointer, but how else can I check if I got noted jugs instead of using the plain ID? Quote Link to comment Share on other sites More sharing options...
Saiyan Posted May 2, 2017 Share Posted May 2, 2017 Just now, GaetanoH said: I know why it gives the NullPointer, but how else can I check if I got noted jugs instead of using the plain ID? umm instead of trying to get the note item just check if u have the item to begin with and it's in note form i.e getInventory().contains(item -> item.isNote() && item.getName().equals("XYZ")); 4 Quote Link to comment Share on other sites More sharing options...
GaetanoH Posted May 2, 2017 Author Share Posted May 2, 2017 14 minutes ago, Saiyan said: umm instead of trying to get the note item just check if u have the item to begin with and it's in note form i.e getInventory().contains(item -> item.isNote() && item.getName().equals("XYZ")); It works! Tyvm Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted May 2, 2017 Share Posted May 2, 2017 getInventory().contains("Jug of water") && getInventory().getItem("Jug of water).isNote() Quote Link to comment Share on other sites More sharing options...
Eagle Scripts Posted May 2, 2017 Share Posted May 2, 2017 19 minutes ago, Saiyan said: umm instead of trying to get the note item just check if u have the item to begin with and it's in note form i.e getInventory().contains(item -> item.isNote() && item.getName().equals("XYZ")); Saiyan for Scripter III Quote Link to comment Share on other sites More sharing options...