Hi everyone, I'm very new to scripting and have been messing around by splicing together open source code.
I want to enter a friend's house but once it has done this once, I want to enter using the House Advertisement object, ID:29091 and 'Visit-Last', or go back to entering the host name manually if this message appears "You haven't visited anyone this session." Anyone got any tips?
public void enter_house() {
RS2Object portal = (RS2Object)this.getObjects().closest(this.OUTSIDE_HOUSE, new String[]{"Portal"});
if (this.OUTSIDE_HOUSE.contains(this.myPlayer().getPosition();
portal.interact(new String[]{"Friend's house"});
(new ConditionalSleep(random(2000, 7500)) {
public boolean condition() {
return main.this.getDialogues().inDialogue();
}
}).sleep();
if (this.getDialogues().inDialogue()) {
this.getKeyboard().typeString(this.host_name, true);
sleep((long)random(2050, 1850));
}