This may work (wrote in 10 minutes):
import java.awt.Color;
import java.awt.Graphics2D;
import javax.swing.JOptionPane;
import org.osbot.rs07.api.model.Character;
import org.osbot.rs07.api.model.Player;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
@ScriptManifest(author = "LiveRare", info = "", logo = "", name = "Beast of Burden (attack)", version = 0)
public class MasterSlaveAttack extends Script {
private String status;
private String mastersName;
Player me = null;
Character<?> myInteractor = null;
Player master = null;
Character<?> masterInteractor = null;
@Override
public void onStart() throws InterruptedException {
mastersName = JOptionPane.showInputDialog("Who's your daddy?");
}
@Override
public int onLoop() throws InterruptedException {
if (master != null && master.exists()) {
assert(master.getName().equalsIgnoreCase(mastersName));
me = myPlayer();
myInteractor = me.getInteracting();
masterInteractor = master.getInteracting();
if (isMasterInteractingWithAnyone()) {
if (isInteractingWithMastersTarget()) {
status = "Waiting.";
} else {
status = "Attacking.";
if (masterInteractor.interact("Attack")) {
sleep(random(500, 1000));
}
}
} else if (isInteractingWithMaster()) {
status = "Waiting (following).";
} else if (master != null && master.exists()) {
status = "Following.";
if (map.distance(master) >= 7) {
status = "Walking to master.";
if (getLocalWalker().walk(master)) {
sleep(random(250, 500));
}
} else {
status = "Following master.";
if (master.interact("Follow")) {
sleep(random(500, 1000));
}
}
}
} else if (mastersName != null && !mastersName.isEmpty()) {
status = "Finding master...";
master = getPlayers().closest(mastersName);
if (master != null) {
log("Found masa!");
} else {
log("Master went and fucked off");
stop(true);
}
} else {
log("...Are you even trying?");
stop(false);
}
return random(250, 500);
}
@Override
public void onPaint(Graphics2D g) {
g.setColor(Color.BLACK);
g.drawString(status, 26, 26);
g.setColor(Color.YELLOW);
g.drawString(status, 25, 25);
}
public boolean isMasterInteractingWithAnyone() {
return masterInteractor != null && masterInteractor.exists() && !masterInteractor.equals(me);
}
public boolean isInteractingWithMastersTarget() {
return myInteractor != null && myInteractor.exists() && masterInteractor != null && masterInteractor.exists()
&& myInteractor.equals(masterInteractor);
}
public boolean isInteractingWithMaster() {
return myInteractor != null && myInteractor.exists() && master != null && master.exists()
&& myInteractor.equals(master);
}
}
Run this script on the 'slaves'. The slave cannot overcome obstacles like the Clan Wars portal/Wilderness ditch, so do it yourself. If you're the master account -- DON'T INTERACT WITH SLAVES. Special attack's not supported. As master, attack players/NPCs. For other players, merely follow them and your minions will attack (this is literally that primitive).
Give it a go and tell me if you get the desired outcome. I'll re-read it later tonight and I may stumble upon fuck-ups that I've missed.
Download the compiled class file and place it in your OSBot/Scripts folder. You can ask someone do decompile and to check it; the file contains only code shown in this post.