Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Point;
- import java.util.Map;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSTile;
- @ScriptManifest(name = "CrispysMordred", authors = { "CrispyToast" }, category = "Combat", description = " Start script upstairs in mordreds castle. <b>Please note: This script does not handle banking and food.</b> I highly suggest using this on combat levels 80 and higher. " )
- public class CrispysMordred extends Script{
- public int Mordred = 247; //doesnt matter what we name it:poh
- public boolean onStart(final Map<String, String> args) {
- return true;
- }
- public void onFinish() {
- }
- public void attack(RSNPC npc){
- RSTile npcloc = npc.getLocation();
- RSTile npccord = (new RSTile(npcloc.getX(), npcloc.getY()));
- if(getMyPlayer().getAnimation()==11968){
- wait(random(1000,2000));
- }
- if(distanceTo(npccord)>3){
- walkTileMM(npccord);
- }
- if(distanceTo(npccord)<3){
- Point p = npc.getScreenLocation();
- moveMouse(p,2,2);
- if(getMyPlayer().getAnimation()==-1){
- clickMouse(true);
- }
- }
- }
- public int loop() {
- if (getMyPlayer().isInCombat()) {
- return 500;
- }
- RSNPC mordred = getNearestNPCByID(Mordred);
- attack(mordred);
- return 10;
- }
- }
Add Comment
Please, Sign In to add comment