BotWith - An Automation Bot
RSCEmulation Updates - Printable Version

+- BotWith - An Automation Bot (http://botwith.me)
+-- Forum: Bot news (http://botwith.me/forumdisplay.php?fid=1)
+--- Forum: Announcements (http://botwith.me/forumdisplay.php?fid=2)
+--- Thread: RSCEmulation Updates (/showthread.php?tid=43)



RSCEmulation Updates - Mark - 05-11-2020

Hello all,

Some RSCE updates.

getClient().getPrayers() will return true or false if the prayers are on
getClient().getFriendCount() Friend list
getClient().getFriends()[] list of all friends.


PkListener
attacking(Actor actor) this is when you right click a player so you can do

Code:
if (isFriend(actor.getUsername())) {
getClient().setNormal();
return true;
}


What'll set the player to unattackable or

Code:
 if (attackable(actor)) {
getClient().setAttack();
return true;
}

set the player to 1 click



Code:
public boolean attackable(Actor actor) {
int combDiff = Math.abs(getClient().getLocal().getCombat() - actor.getCombat());
int myWildLvl = wildy(getClient().getLocal());
int victimWildLvl = wildy(actor);
boolean friend = isFriend(actor.getUsername());
if (friend)
return false;
if (combDiff > myWildLvl || combDiff > victimWildLvl) {
return false;
} else {
return true;
}
}

private boolean isFriend(String name) {
for (int i = 0; i < getClient().getFriendCount(); i++) {
if (getClient().getFriends()[i] != null && getClient().getFriends()[i].equalsIgnoreCase(name))
return true;
}
return false;
}


minimap(Actor actor)
This will warn if there is an enemy player coming towards you.

As normal update the bot.