Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Opening Portable crafter

Joined
Apr 6, 2017
Messages
29
I'm new to coding in Runemate. I managed to get a bot setup that will open a bank. I'm trying to figure out how to make it open the portable crafter and then hit the space key. Any ideas? thx in advance. Not familiar with the syntax so some direction where to find some syntax would be greatly appreciated. Thanks
 
Joined
Jun 9, 2015
Messages
3,735
Ask yourself this:
Is that portable an NPC or GameObject? How do I find that NPC/GameObject? If I find it, how do I interact with it?

Also, take a look at the jdocs for help.
 
Joined
Apr 6, 2017
Messages
29
It's a game object. I've seen something about using game object but I have no luck. Here is what I use and nothing happens.

GameObjects.newQuery().names("Portable crafter").results().nearest();
 
Lol got it, had to put click() in there doh
 
I normally program in php lol. This syntax is a new world for me.
 
Joined
Jun 9, 2015
Messages
3,735
It's a game object. I've seen something about using game object but I have no luck. Here is what I use and nothing happens.

GameObjects.newQuery().names("Portable crafter").results().nearest();
 
Lol got it, had to put click() in there doh
 
I normally program in php lol. This syntax is a new world for me.
Don't forget to null check that result!
Code:
GameObject portable = GameObjects.newQuery().names("Portable crafter").results().nearest();

if(portable != null) {
// Interact with it
}
 
Top