This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.



  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RSCEmulation Updates
#1
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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)