Wouldnt it be easier for a 'Packet' to only contain one String which senders and receivers can parse accordingly? That way, the protocal can know even less about the data being sent and theres no need to define multiple 'Packets'
Set artifact build output directory to osbot\scripts folder, set artifact to build on project build, map ctrl+s to be a build project hotkey, boom 1 second rebuilds.
But either way, interesting stuff, good job.
new ConditionalSleep(MethodProvider.random(10000, 10000)) {
@Override
public boolean condition() throws InterruptedException {
return CurrentWorld == HoptoWorldfinal;
}
}.sleep();
that will never work since you never update the values. do this instead
new ConditionalSleep(MethodProvider.random(10000, 10000)) {
@Override
public boolean condition() throws InterruptedException {
return script.getWorlds().getCurrentWorld() == HoptoWorldfinal;
}
}.sleep();
Not sure exactly how that works, but this might
Player p = getPlayers().singleFilter(p -> p != null && p.getName().replace(" ", "").equals("namewithoutspaces"))
Just realized what youre trying to do
Player Name = getPlayers().closest("Example Name");
Name = Name.replace(' ', '_');
Name is a Player instance. Youre trying to call a String function
Player player = getPlayers().closest("Example Name");
String name = player.getName().replace(' ', '_');
also forget what I said above, single quotes work fine
Ive used this at hill giants, moss giants, lesser demons, and tzhaar successfully. @omgpros @Lol_marcus I know you two have used this a ton, which locations seemed to work the best?
Last thing, you should only sleep if the interact was successful
if (FISH.interact("Bait")) {
new ConditionalSleep(Script.random(10000, 15000)) {
public boolean condition()
throws InterruptedException {
return !myPlayer().isAnimating();
}
}.sleep();
}
new ConditionalSleep(Script.random(10000, 15000)) {
public boolean condition()
throws InterruptedException {
return !myPlayer().isAnimating(); <-- take the exclamation point away
}
}.sleep();
And you should be good!
What I put is perfectly fine for someone who is beginning to learn how to do different tasks in the same script. Its the 'state' style. Whats so bad about it for a beginner?
Interesting, it should walk/run towards them if they arent visible. Maybe its the area you are defining? That area tells the script where to look for safespots AND monsters, so if thy arent in the area it wont attack them. Maybe try without it for now. And make sure the npcs are spelled exactly in the gui, may also be an issue.