Anyone?
|
I just basically need a piece of a code before this, possibly a if statement saying if this player is in the region of a square away to use the statement above.Code:if (c.getX() != c2.getX() && c.getY() != c2.getY() && !c.usingOtherRangeWeapons && !c.getCombat().usingHally() && !c.usingBow && !c.usingMagic) { c.faceUpdate(i+32768); //face the player c.getPA().stopDiagonal(c2.getX(), c2.getY());//move to a correct spot return; }
use withinDistance
I figured it out. =]Code:Client p = (Client) PlayerHandler.players[i]; // c.sendMessage("Made it here1."); if (p.WithinDistance(c.absX, c.absY, p.absX, p.absY, 1) && c.getX() != p.getX() && c.getY() != p.getY() && !c.usingOtherRangeWeapons && !c.getCombat().usingHally() && !c.usingBow && !c.usingMagic) { c.faceUpdate(i+32768); //face the player c.getPA().stopDiagonal(p.getX(), p.getY());//move to a correct spot return; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |