Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NPC d;
- NPC s;
- NPC a;
- Obj door;
- Obj stairs;
- Obj ladder;
- //-----------
- //Public Loop
- //-----------------
- public int loop() {
- switch(status) {
- case 0:
- if(isLoggedIn()) {
- status = 1;
- return random (600, 900);
- } else {
- log("Not logged in.");
- stopAllScripts();
- }
- //-------------
- //Click and talk to the darling duke
- //----------------------
- case 1:
- Tile myLoc2 = getMyPlayer().getLocation();
- Point la = new Point(myLoc2.getX(), myLoc2.getY());
- if(BRIDGE.contains(la)) {
- status = 8;
- break;
- }
- if(getMyPlayer().isMoving()) {
- log ("You're doing something, perhaps come back when your not moving");
- } else {
- d = npcs.getClosest(7, duke);
- if(d != null) {
- d.doAction("Talk-to");
- sleep (2000, 3000);
- log ("Clicked Talk");
- status = 2;
- return 400;
- } else {
- return 500;
- }
- }
- //----------
- //Duke Talking time
- //--------------------
Add Comment
Please, Sign In to add comment