Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- act1: function () {
- this.den = function () {
- Team.announce("den");
- var cleartry;
- if (!me.getQuest(1, 1)) {
- Util.smurfToExit([1, 2], true, Config.ClearType);
- //Util.startFollow();
- if (Team.myType === Team.type.smurf || Team.myType !== Team.type.smurf) {
- Util.smurfToExit([2, 3], true, Config.ClearType);
- delay(500);
- Team.clickWP();
- Util.smurfToExit([2, 8], true, Config.ClearType);
- Team.inGame();
- for (cleartry = 1;
- cleartry <= 3 && !me.getQuest(1, 1);
- cleartry += 1) {
- Team.announce("clearing - try number " + cleartry);
- Attack.clearLevel();
- delay(100);
- }
- }
- //Util.stopFollow();
- Util.smurfToExit([2, 1], true, Config.ClearType);
- if (!me.inTown) {
- delay(1000);
- Packet.flash(me.gid);
- delay(500);
- Util.smurfToExit([2, 1], false);
- Util.smurfToExit([2, 1], true, Config.ClearType);
- }
- }
- if (me.inTown) {
- Util.talkTo("akara");
- Town.doChores();
- delay(1000);
- }
- return true;
- };
- this.cave = function () {
- Team.announce("cave");
- var chest, i;
- Pather.useWaypoint(3);
- for (i = 120; i && !Team.inArea(); i -= 1) {
- Attack.clear(40);
- delay(500);
- }
- if (!i && me.diff) {
- quit();
- }
- Precast.doPrecast(true);
- //Util.startFollow();
- if (Team.myType === Team.type.smurf || Team.myType !== Team.type.smurf) {
- Util.smurfToExit([9, 13], true, Config.ClearType);
- Attack.clearLevel();
- chest = getPresetUnit(me.area, 2, 397);
- if (chest) {
- Pather.moveToUnit(chest, 0, 0, Config.ClearType);
- Misc.openChest(chest);
- }
- }
- //Util.stopFollow();
- if (me.diff) {
- Town.goToTown();
- return true;
- }
- if (Team.isLevel(SmurfConfig.caveLvl[me.diff])) {
- if (Util.smurfToExit([9, 3], true, Config.ClearType)) {
- Team.clickWP(false);
- Pather.useWaypoint(1);
- } else {
- Town.goToTown();
- }
- return true;
- }
- else if (Util.smurfToExit([9, 3], true, Config.ClearType)) {
- Team.clickWP(false);
- Pather.useWaypoint(1);
- } else {
- Town.goToTown();
- }
- if (me.inTown) {
- Town.doChores();
- }
- delay(40000);
- return false;
- };
- this.bloodRaven = function () {
- Team.announce("BloodRaven");
- var i;
- if (!me.getQuest(2, 1)) {
- Pather.useWaypoint(3);
- for (i = 120; i && !Team.inArea(); i -= 1) {
- Attack.clear(40);
- delay(500);
- }
- if (!i && me.diff) {
- quit();
- }
- Precast.doPrecast(true);
- Pather.moveToExit(17, true, Config.ClearType);
- Team.inGame();
- try {
- Pather.moveToPreset(17, 1, 805);
- Attack.kill(getLocaleString(3111)); // Blood Raven
- } catch (e) {
- print(e);
- Attack.clear(30);
- }
- Pickit.pickItems();
- Town.goToTown();
- }
- Util.talkTo("kashya");
- return true;
- };
- this.cain = function () {
- Team.announce("cain");
- var i, unit,
- stones = [];
- if (!me.getQuest(4, 1)) {
- Util.startFollow();
- if (Team.myType !== Team.type.smurf) {
- Util.travel(0);
- }
- Util.stopFollow();
- //4,3 -> may be true in wierd cases (scroll lost?)
- if (!me.getQuest(4, 4) //redportal already open
- //&& !me.getQuest(4, 3) //'holding scroll'
- && !me.getItem(524) && !me.getItem(525)) {
- Town.goToTown();
- Pather.useWaypoint(5, true); //dark wood
- Precast.doPrecast(true);
- for (i = 0; i < 3 && !me.getItem(524); i += 1) {
- Pather.moveToPreset(me.area, 1, 738, 0, 0,
- Config.ClearType); //tree
- unit = getUnit(2, 30); //tree
- if (unit) {
- Pather.moveToUnit(unit);
- sendPacket(1, 0x13, 4, unit.type, 4, unit.gid);
- delay(me.ping * 2 + 100);
- Util.getQuestItem(524);
- }
- Attack.clear(20); // treehead
- delay(200 + me.ping * 2);
- }
- Team.inGame();
- if (!Pather.usePortal(null, null)) {
- Town.goToTown();
- }
- unit = me.getItem(524); //another scroll...
- if (unit) {
- if (unit.location !== 7
- && Storage.Stash.CanFit(unit)) {
- Storage.Stash.MoveTo(unit);
- delay(me.ping * 2 + 100);
- me.cancel();
- }
- }
- }
- Util.talkTo("akara");
- unit = me.getItem(525); //yay! this is the last scroll
- if (unit) {
- if (unit.location !== 7 && Storage.Stash.CanFit(unit)) {
- Storage.Stash.MoveTo(unit);
- delay(me.ping);
- me.cancel();
- }
- }
- Team.inGame();
- Pather.useWaypoint(4, true); //stoney field
- Precast.doPrecast(true);
- Pather.moveToPreset(me.area, 1, 737, 0, 0,
- Config.ClearType);
- try {
- Attack.clear(15, 0, getLocaleString(2872));// Rakanishu
- } catch (e2) {
- print(e2);
- Attack.clear(20);
- }
- Attack.clear(20);
- if (!me.getQuest(4, 4)) { //redportal already open
- Team.inGame();
- for (i = 17; i <= 21; i += 1) {
- stones.push(getUnit(2, i));
- }
- for (i = 0; i < 5; i += 1) { //brute-forcing...
- for (unit = stones.length - 1; unit >= 0; unit -= 1) {
- Misc.openChest(stones[unit]);
- }
- }
- }
- for (i = 10; i && !Pather.usePortal(38); i -= 1) {
- delay(500 + me.ping * 2);
- }
- if (!i) {
- print("cain failed");
- return false;
- }
- unit = getUnit(2, 26); //sad cain
- Misc.openChest(unit);
- if (!Pather.usePortal(null, null)) {
- Town.goToTown();
- }
- delay(3000);
- }
- Util.talkTo("akara");
- Util.talkTo("cain"); //happy cain
- return true;
- };
- this.trist = function () {
- Team.announce("trist");
- var i,
- xx = [ 25175, 25147, 25149, 25127, 25128, 25150, 25081,
- 25066, 25045, 25061, 25048, 25099, 25109, 25078, 25154],
- yy = [ 5187, 5201, 5172, 5188, 5144, 5123, 5137,
- 5195, 5186, 5099, 5055, 5058, 5095, 5093, 5095];
- if (!me.getQuest(4, 0)) {
- return this.cain();
- }
- Pather.useWaypoint(4);
- Precast.doPrecast(true);
- Pather.moveToPreset(me.area, 1, 737, 0, 0, Config.ClearType, true);
- try {
- Attack.clear(15, 0, getLocaleString(2872)); // Rakanishu
- } catch (e) {
- print(e);
- Attack.clear(20);
- }
- for (i = 0; i < 10 && !Pather.usePortal(38); i += 1) {
- delay(500 + me.ping * 2);
- }
- for (i = 0; i < xx.length; i += 1) {
- Pather.moveTo(xx[i], yy[i], 3, Config.ClearType);
- Attack.clear(20);
- }
- Town.goToTown();
- if (me.inTown) {
- Town.doChores();
- }
- delay(35000);
- return Team.isLevel(SmurfConfig.tristLvl[me.diff]);
- };
- this.andy = function () {
- Team.announce("andy");
- if (me.getQuest(6, 0) && !me.getQuest(7, 0)) {
- Team.changeAct(2);
- return true;
- }
- if (!me.getQuest(6, 1)) {
- if (!me.diff) {
- if ((Team.myType === Team.type.smurfette && me.diff) || (Team.myType !== Team.type.smurf && !me.diff)) {
- try {
- Util.travel(1);
- } catch (e1) {
- Attack.clearLevel();
- Town.goToTown();
- print("travel failed, waiting 3mn : " + e1); //pro!
- delay(180000);
- }
- Pather.useWaypoint(35, true);
- Precast.doPrecast(true);
- Pather.teleport = !!me.diff;
- if (!Pather.teleport
- || !Util.smurfToExit([36, 37], true,0)) {
- Util.smurfToExit([36, 37], true, Config.ClearType);
- }
- }
- } else if ((Team.myType === Team.type.smurfette && me.diff) || (Team.myType !== Team.type.smurf && !me.diff)) {
- try {
- Util.travel(1);
- } catch (e1) {
- Attack.clearLevel();
- Town.goToTown();
- print("travel failed, waiting 3mn : " + e1); //pro!
- delay(180000);
- }
- Pather.useWaypoint(35, true);
- Precast.doPrecast(true);
- Pather.teleport = !!me.diff;
- if (!Pather.teleport
- || !Util.smurfToExit([36, 37], true, Config.ClearType)) {
- Util.smurfToExit([36, 37], true, Config.ClearType);
- }
- } else if (!Team.waitTP(37)) {
- return true;
- }
- Team.inGame();
- Precast.doPrecast(true);
- delay(500);
- if (me.diff !== 2) {
- Pather.teleport = false;
- Pather.makePortal();
- Team.sendMsg(Team.type.smurf | Team.type.bigSmurf, "come");
- Util.startFollow();
- Pather.moveTo(22594, 9641, 3, Config.ClearType);
- Pather.moveTo(22564, 9629, 3, Config.ClearType);
- Pather.moveTo(22533, 9641, 3, Config.ClearType);
- Pather.moveTo(22568, 9582, 3, Config.ClearType);
- Pather.moveTo(22548, 9568, 3, Config.ClearType);
- } else {
- Pather.moveTo(22548, 9568);
- Pather.makePortal();
- Team.sendMsg(Team.type.smurf | Team.type.bigSmurf, "come");
- }
- if (me.area === 37){
- try {
- Attack.kill(156); // Andariel
- } catch (e2) {
- print(e2);
- Attack.clear(35);
- }
- }
- delay(2000); // Wait for minions to die.
- Util.stopFollow();
- Pickit.pickItems();
- if (!Pather.usePortal(null, null)) {
- Town.goToTown();
- }
- }
- delay(3000);
- Team.changeAct(2);
- return true;
- };
- Town.goToTown(1);
- if (!me.getQuest(1, 0)) {
- return this.den();
- }
- if (!Team.isLevel(SmurfConfig.caveLvl[me.diff])) {
- return this.cave();
- }
- if (Msg.action === "broken") {
- this.cave(); // + andy
- }
- if (!me.diff) {
- if (!me.getQuest(2, 0)) {
- return this.bloodRaven();
- }
- if (!me.getQuest(4, 0)) {
- return this.cain();
- }
- }
- if (!Team.isLevel(SmurfConfig.tristLvl[me.diff])) {
- return this.trist();
- }
- return this.andy();
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement