May 2, 20178 yr Would be better if you posted what you have tried, what doesn't work, and let us help you that way. Edited May 2, 20178 yr by Explv
May 2, 20178 yr Author 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
May 2, 20178 yr Author 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()?
May 2, 20178 yr 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, 20178 yr by Saiyan
May 2, 20178 yr Author 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?
May 2, 20178 yr 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"));
May 2, 20178 yr Author 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
May 2, 20178 yr getInventory().contains("Jug of water") && getInventory().getItem("Jug of water).isNote()
May 2, 20178 yr 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
Create an account or sign in to comment