B1llymayz 0 Posted November 20, 2018 I have been trying many things but this is issue has seemed to stump me. I am trying to create a hunter bot. I cannot seem to figure out how code this because I am unsure of what makes an object null in Runescape. I would like to do something like if(bird snare has not been placed) { then lay the bird snare on the ground } I know how to do the bird snare actions and all that but I do not know how to tell if it has not been placed
DeadmanVlei 1 Posted November 20, 2018 GameObjects gm = getGameObjects().closest("Bird snare"); if (gm!=null) { dostuff(); }
B1llymayz 0 Author Posted November 21, 2018 Wow, I am pretty mad at myself right now. I could of swore I tried that. It works thank you very much!
Pseudo 179 Posted November 21, 2018 14 hours ago, B1llymayz said: Wow, I am pretty mad at myself right now. I could of swore I tried that. It works thank you very much! You may also want to consider checking the 'setup' tile for any existing snares, else you may end up trying to place a snare on an invalid tile! Best of luck.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.