Explv Posted May 2, 2017 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
GaetanoH Posted May 2, 2017 Author 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
GaetanoH Posted May 2, 2017 Author 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()?
Saiyan Posted May 2, 2017 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
GaetanoH Posted May 2, 2017 Author 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?
Saiyan Posted May 2, 2017 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
GaetanoH Posted May 2, 2017 Author 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
Ayylmao420 Posted May 2, 2017 Posted May 2, 2017 getInventory().contains("Jug of water") && getInventory().getItem("Jug of water).isNote()
Eagle Scripts Posted May 2, 2017 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