Advertisement
lengend

Untitled

Nov 3rd, 2012
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * Follower by lengend
  3. * To initiate the follow sequence make a TP and send command "1".
  4. *
  5. * Commands:
  6. * Main commands:
  7. *   1 - take leader's tp from town / move to leader's town
  8. *   2 - take leader's tp to town
  9. *   3 - town manager
  10. *   c - get corpse
  11. *   p - pick items
  12. *   s - toggle stop
  13. *   <charname> s - toggle stop <charname>
  14. * Attack:
  15. *   a - attack toggle for all
  16. *   <charname> a - attack toggle for <charname>
  17. *   aon - attack on for all
  18. *   <charname> aon - attack on for <charname>
  19. *   aoff - attack off for all
  20. *   <charname> aoff - attack off for <charname>
  21. * Teleport: *** characters without teleport skill will ignore tele command ***
  22. *   tele - toggle teleport for all
  23. *   <charname> tele - toggle teleport for <charname>
  24. *   tele on - teleport on for all
  25. *   <charname> tele on -  teleport on for <charname>
  26. *   tele off - teleport off for all
  27. *   <charname> tele off - teleport off for <charname>
  28. * Skills: *** refer to skills.txt ***
  29. *   all skill <skillid> - change skill for all. refer to skills.txt
  30. *   <charname> skill <skillid> - change skill for <charname>
  31. *   <class> skill <skillid> - change skill for all characters of certain class *** any part of class name will do *** for example: "sorc skill 36", "zon skill 0", "din skill 106"
  32. * Auras: *** refer to skills.txt ***
  33. *   all aura <skillid> - change aura for all paladins
  34. *   <charname> aura <skillid> - change aura for <charname>
  35. * Town:
  36. *   a2-5 - move to appropriate act (after quest) !NOTE: Disable 'no sound' or game will crash!
  37. *   talk <npc name> - talk to a npc in town
  38. * Misc.
  39. *   cow - enter red cow portal
  40. *   wp - all players activate a nearby wp
  41. *   <charname> wp - <charname> activates a nearby wp
  42. *   bo - barbarian precast
  43. *   <charname> tp - make a TP. Needs a TP tome if not using custom libs.
  44. *   move - move in a random direction (use if you're stuck by followers)
  45. *   reload - reload script. Use only in case of emergency, or after editing character config.
  46. *   quit - exit game
  47. */
  48.  
  49. function Follower() {
  50.     var i, j, stop, leader, leaderUnit, charClass, piece, skill, result, unit,
  51.         attack = true,
  52.         openContainers = true,
  53.         classes = ["amazon", "sorceress", "necromancer", "paladin", "barbarian", "druid", "assassin"],
  54.         action = "";
  55.  
  56.     // Get leader's Party Unit
  57.     this.getLeader = function (name) {
  58.         var player = getParty();
  59.  
  60.         if (player) {
  61.             do {
  62.                 if (player.name === name) {
  63.                     return player;
  64.                 }
  65.             } while (player.getNext());
  66.         }
  67.  
  68.         return false;
  69.     };
  70.  
  71.     // Get leader's Unit
  72.     this.getLeaderUnit = function (name) {
  73.         var player = getUnit(0, name);
  74.  
  75.         if (player) {
  76.             do {
  77.                 if (player.mode !== 0 && player.mode !== 17) {
  78.                     return player;
  79.                 }
  80.             } while (player.getNext());
  81.         }
  82.  
  83.         return false;
  84.     };
  85.  
  86.     // Get leader's act from Party Unit
  87.     this.checkLeaderAct = function (unit) {
  88.         if (unit.area <= 39) {
  89.             return 1;
  90.         } else if (unit.area >= 40 && unit.area <= 74) {
  91.             return 2;
  92.         } else if (unit.area >= 75 && unit.area <= 102) {
  93.             return 3;
  94.         } else if (unit.area >= 103 && unit.area <= 108) {
  95.             return 4;
  96.         }
  97.  
  98.         return 5;
  99.     };
  100.  
  101.     // Change areas to where leader is
  102.     this.checkExit = function (unit, area) {
  103.         if (unit.inTown) {
  104.             return false;
  105.         }
  106.  
  107.         var i, target,
  108.             exits = getArea().exits;
  109.  
  110.         for (i = 0; i < exits.length; i += 1) {
  111.             if (exits[i].target === area) {
  112.                 return 1;
  113.             }
  114.         }
  115.  
  116.         if (unit.inTown) {
  117.             target = getUnit(2, "waypoint");
  118.  
  119.             if (target && getDistance(me, target) < 20) {
  120.                 return 3;
  121.             }
  122.         }
  123.  
  124.         target = getUnit(2, "portal");
  125.  
  126.         if (target) {
  127.             do {
  128.                 if (target.objtype === area) {
  129.                     Pather.usePortal(null, null, target);
  130.  
  131.                     return 2;
  132.                 }
  133.             } while (target.getNext());
  134.         }
  135.  
  136.         // Arcane<->Cellar portal
  137.         if ((me.area === 74 && area === 54) || (me.area === 54 && area === 74)) {
  138.             Pather.usePortal(area);
  139.  
  140.             return 4;
  141.         }
  142.  
  143.         // Tal-Rasha's tomb->Duriel's lair
  144.         if (me.area >= 66 && me.area <= 72 && area === 73) {
  145.             Pather.useUnit(2, 100, area);
  146.  
  147.             return 4;
  148.         }
  149.  
  150.         // Throne->Chamber
  151.         if (me.area === 131 && area === 132) {
  152.             target = getUnit(2, 563);
  153.  
  154.             if (target) {
  155.                 Pather.usePortal(null, null, target);
  156.  
  157.                 return 4;
  158.             }
  159.         }
  160.  
  161.         return false;
  162.     };
  163.  
  164.     // Talk to a NPC
  165.     this.talk = function (name) {
  166.         if (!me.inTown) {
  167.             say("I'm not in town!");
  168.  
  169.             return false;
  170.         }
  171.  
  172.         if (typeof name === "string") {
  173.             name = name.toLowerCase();
  174.         } else {
  175.             say("No NPC name given.");
  176.  
  177.             return false;
  178.         }
  179.  
  180.         var npc, names;
  181.  
  182.         switch (me.act) {
  183.         case 1:
  184.             names = ["gheed", "charsi", "akara", "kashya", "cain", "warriv"];
  185.  
  186.             break;
  187.         case 2:
  188.             names = ["fara", "lysander", "greiz", "elzix", "jerhyn", "meshif", "drognan", "atma", "cain"];
  189.  
  190.             break;
  191.         case 3:
  192.             names = ["alkor", "asheara", "ormus", "hratli", "cain"];
  193.  
  194.             break;
  195.         case 4:
  196.             names = ["halbu", "tyrael", "jamella", "cain"];
  197.  
  198.             break;
  199.         case 5:
  200.             names = ["larzuk", "malah", "qual-kehk", "anya", "nihlathak", "cain"];
  201.  
  202.             break;
  203.         }
  204.  
  205.         if (names.indexOf(name) === -1) {
  206.             say("Invalid NPC.");
  207.  
  208.             return false;
  209.         }
  210.  
  211.         if (!Town.move(name === "jerhyn" ? "palace" : name)) {
  212.             Town.move("portalspot");
  213.             say("Failed to move to town spot.");
  214.  
  215.             return false;
  216.         }
  217.  
  218.         npc = getUnit(1);
  219.  
  220.         if (npc) {
  221.             do {
  222.                 if (npc.name.replace(/ /g, "").toLowerCase().indexOf(name) > -1) {
  223.                     npc.openMenu();
  224.                     me.cancel();
  225.                     Town.move("portalspot");
  226.                     say("Done talking.");
  227.  
  228.                     return true;
  229.                 }
  230.             } while (npc.getNext());
  231.         }
  232.  
  233.         say("NPC not found.");
  234.         Town.move("portalspot");
  235.  
  236.         return false;
  237.     };
  238.  
  239.     // Change act after completing last act quest
  240.     this.changeAct = function (act) {
  241.         var npc, preArea, target;
  242.  
  243.         preArea = me.area;
  244.  
  245.         switch (act) {
  246.         case 2:
  247.             if (me.area >= 40) {
  248.                 break;
  249.             }
  250.  
  251.             Town.move("warriv");
  252.  
  253.             npc = getUnit(1, 155);
  254.  
  255.             if (npc) {
  256.                 npc.openMenu();
  257.                 npc.useMenu(0x0D36);
  258.             }
  259.  
  260.             break;
  261.         case 3:
  262.             if (me.area >= 75) {
  263.                 break;
  264.             }
  265.  
  266.             Town.move("palace");
  267.  
  268.             npc = getUnit(1, 201);
  269.  
  270.             if (npc) {
  271.                 npc.openMenu();
  272.                 me.cancel();
  273.             }
  274.  
  275.             Town.move("meshif");
  276.  
  277.             npc = getUnit(1, 210);
  278.  
  279.             if (npc) {
  280.                 npc.openMenu();
  281.                 npc.useMenu(0x0D38);
  282.             }
  283.  
  284.             break;
  285.         case 4:
  286.             if (me.area >= 103) {
  287.                 break;
  288.             }
  289.  
  290.             if (me.inTown) {
  291.                 Town.move("cain");
  292.  
  293.                 npc = getUnit(1, 245);
  294.  
  295.                 if (npc) {
  296.                     npc.openMenu();
  297.                     me.cancel();
  298.                 }
  299.  
  300.                 Town.move("portalspot");
  301.                 Pather.usePortal(102, null);
  302.             }
  303.  
  304.             delay(1500);
  305.  
  306.             target = getUnit(2, 342);
  307.  
  308.             if (target) {
  309.                 Pather.moveTo(target.x - 3, target.y - 1);
  310.             }
  311.  
  312.             Pather.usePortal(null);
  313.  
  314.             break;
  315.         case 5:
  316.             if (me.area >= 109) {
  317.                 break;
  318.             }
  319.  
  320.             Town.move("tyrael");
  321.  
  322.             npc = getUnit(1, "tyrael");
  323.  
  324.             if (npc) {
  325.                 npc.openMenu();
  326.                 me.cancel();
  327.  
  328.                 try {
  329.                     Pather.useUnit(2, 566, 109);
  330.                 } catch (a5e) {
  331.  
  332.                 }
  333.             }
  334.  
  335.             break;
  336.         }
  337.  
  338.         delay(2000);
  339.  
  340.         while (!me.area) {
  341.             delay(500);
  342.         }
  343.  
  344.         if (me.area === preArea) {
  345.             me.cancel();
  346.             Town.move("portalspot");
  347.             say("Act change failed.");
  348.  
  349.             return false;
  350.         }
  351.  
  352.         Town.move("portalspot");
  353.         say("Act change successful.");
  354.  
  355.         if (act === 2) {
  356.             say("Don't forget to talk to Drognan after getting the Viper Amulet!");
  357.         }
  358.  
  359.         return true;
  360.     };
  361.  
  362.     this.pickPotions = function (range) {
  363.         if (me.mode === 17) {
  364.             return false;
  365.         }
  366.  
  367.         Town.clearBelt();
  368.  
  369.         while (!me.idle) {
  370.             delay(40);
  371.         }
  372.  
  373.         var status,
  374.             pickList = [],
  375.             item = getUnit(4);
  376.  
  377.         if (item) {
  378.             do {
  379.                 if ((item.mode === 3 || item.mode === 5) && item.itemType >= 76 && item.itemType <= 78 && getDistance(me, item) <= range) {
  380.                     pickList.push(copyUnit(item));
  381.                 }
  382.             } while (item.getNext());
  383.         }
  384.  
  385.         pickList.sort(Pickit.sortItems);
  386.  
  387.         while (pickList.length > 0) {
  388.             item = pickList.shift();
  389.  
  390.             if (!item || !copyUnit(item).x) {
  391.                 continue;
  392.             }
  393.  
  394.             status = Pickit.checkItem(item).result;
  395.  
  396.             if (!status) {
  397.                 continue;
  398.             }
  399.  
  400.             if (!Pickit.canPick(item)) {
  401.                 continue;
  402.             }
  403.  
  404.             Pickit.pickItem(item, status);
  405.         }
  406.  
  407.         return true;
  408.     };
  409.  
  410.     this.openContainers = function (range) {
  411.         var unit, ox, oy,
  412.             unitList = [],
  413.             containers = ["chest", "loose rock", "hidden stash", "loose boulder", "corpseonstick", "casket", "armorstand", "weaponrack", "barrel", "holeanim",
  414.                             "roguecorpse", "ratnest", "corpse", "goo pile", "largeurn", "urn", "chest3", "jug", "skeleton", "guardcorpse", "sarcophagus",
  415.                             "cocoon", "basket", "stash", "hollow log", "hungskeleton", "pillar", "skullpile", "skull pile", "jar3", "jar2", "jar1", "bonechest", "woodchestl",
  416.                             "woodchestr", "barrel wilderness", "burialchestr", "burialchestl", "explodingchest", "chestl", "chestr", "icecavejar1", "icecavejar2",
  417.                             "icecavejar3", "icecavejar4", "deadperson", "deadperson2", "evilurn", "tomb1l", "tomb3l", "tomb2", "tomb3", "object2", "groundtomb", "groundtombl"
  418.                         ];
  419.  
  420.         ox = me.x;
  421.         oy = me.y;
  422.         unit = getUnit(2);
  423.  
  424.         if (unit) {
  425.             do {
  426.                 if (containers.indexOf(unit.name.toLowerCase()) > -1 && unit.mode === 0 && getDistance(me, unit) <= range) {
  427.                     unitList.push(copyUnit(unit));
  428.                 }
  429.             } while (unit.getNext());
  430.         }
  431.  
  432.         while (unitList.length > 0) {
  433.             unitList.sort(Sort.units);
  434.  
  435.             unit = unitList.shift();
  436.  
  437.             if (unit) {
  438.                 Misc.openChest(unit);
  439.                 Pickit.pickItems();
  440.             }
  441.         }
  442.  
  443.         return true;
  444.     };
  445.  
  446.     this.chatEvent = function (nick, msg) {
  447.         if (msg && nick === Config.Follower.Leader) {
  448.             switch (msg) {
  449.             case "tele":
  450.             case me.name + " tele":
  451.                 if (Pather.teleport) {
  452.                     Pather.teleport = false;
  453.  
  454.                     say("Teleport off.");
  455.                 } else {
  456.                     Pather.teleport = true;
  457.  
  458.                     say("Teleport on.");
  459.                 }
  460.  
  461.                 break;
  462.             case "tele off":
  463.             case me.name + " tele off":
  464.                 Pather.teleport = false;
  465.  
  466.                 say("Teleport off.");
  467.  
  468.                 break;
  469.             case "tele on":
  470.             case me.name + " tele on":
  471.                 Pather.teleport = true;
  472.  
  473.                 say("Teleport on.");
  474.  
  475.                 break;
  476.             case "a":
  477.             case me.name + " a":
  478.                 if (attack) {
  479.                     attack = false;
  480.  
  481.                     say("Attack off.");
  482.                 } else {
  483.                     attack = true;
  484.  
  485.                     say("Attack on.");
  486.                 }
  487.  
  488.                 break;
  489.             case "aoff":
  490.             case me.name + " aoff":
  491.                 attack = false;
  492.  
  493.                 say("Attack off.");
  494.  
  495.                 break;
  496.             case "aon":
  497.             case me.name + " aon":
  498.                 attack = true;
  499.  
  500.                 say("Attack on.");
  501.  
  502.                 break;
  503.             case "quit":
  504.             case me.name + " quit":
  505.                 quit();
  506.  
  507.                 break;
  508.             case "s":
  509.             case me.name + " s":
  510.                 if (stop) {
  511.                     stop = false;
  512.  
  513.                     say("Resuming.");
  514.                 } else {
  515.                     stop = true;
  516.  
  517.                     say("Stopping.");
  518.                 }
  519.  
  520.                 break;
  521.             case "r":
  522.                 if (me.mode === 17) {
  523.                     me.revive();
  524.                 }
  525.  
  526.                 break;
  527.             default:
  528.                 if (me.classid === 3 && msg.indexOf("aura ") > -1) {
  529.                     piece = msg.split(" ")[0];
  530.  
  531.                     if (piece === me.name || piece === "all") {
  532.                         skill = parseInt(msg.split(" ")[2], 10);
  533.  
  534.                         if (me.getSkill(skill, 1)) {
  535.                             say("Active aura is: " + skill);
  536.  
  537.                             Config.AttackSkill[2] = skill;
  538.                             Config.AttackSkill[4] = skill;
  539.  
  540.                             Skill.setSkill(skill, 0);
  541.                             Attack.init();
  542.                         } else {
  543.                             say("I don't have that aura.");
  544.                         }
  545.                     }
  546.  
  547.                     break;
  548.                 }
  549.  
  550.                 if (msg.indexOf("skill ") > -1) {
  551.                     piece = msg.split(" ")[0];
  552.  
  553.                     if (charClass.indexOf(piece) > -1 || piece === me.name || piece === "all") {
  554.                         skill = parseInt(msg.split(" ")[2], 10);
  555.  
  556.                         if (me.getSkill(skill, 1)) {
  557.                             say("Attack skill is: " + skill);
  558.  
  559.                             Config.AttackSkill[1] = skill;
  560.                             Config.AttackSkill[3] = skill;
  561.  
  562.                             Attack.init();
  563.                         } else {
  564.                             say("I don't have that skill.");
  565.                         }
  566.                     }
  567.  
  568.                     break;
  569.                 }
  570.  
  571.                 action = msg;
  572.  
  573.                 break;
  574.             }
  575.         }
  576.     };
  577.  
  578.     addEventListener("chatmsg", this.chatEvent);
  579.  
  580.     // Override config values that use TP
  581.     Config.TownCheck = false;
  582.     Config.TownHP = 0;
  583.     Config.TownMP = 0;
  584.     charClass = classes[me.classid];
  585.  
  586.     for (i = 0; i < 20; i += 1) {
  587.         leader = this.getLeader(Config.Follower.Leader);
  588.  
  589.         if (leader) {
  590.             break;
  591.         }
  592.  
  593.         delay(1000);
  594.     }
  595.  
  596.     if (!leader) {
  597.         say("Leader not found.");
  598.         delay(1000);
  599.         quit();
  600.     } else {
  601.         say("Leader found.");
  602.     }
  603.  
  604.     while (!Misc.inMyParty(Config.Follower.Leader)) {
  605.         delay(500);
  606.     }
  607.  
  608.     say("Partied.");
  609.     Town.move("portalspot");
  610.  
  611.     // Main Loop
  612.     while (Misc.inMyParty(Config.Follower.Leader)) {
  613.         if (me.mode === 17) {
  614.             while (!me.inTown) {
  615.                 me.revive();
  616.                 delay(1000);
  617.             }
  618.            
  619.             Town.move("portalspot");
  620.             say("I'm alive!");
  621.         }
  622.  
  623.         while (stop) {
  624.             delay(500);
  625.         }
  626.  
  627.         if (!me.inTown) {
  628.             if (!leaderUnit || !copyUnit(leaderUnit).x) {
  629.                 leaderUnit = this.getLeaderUnit(Config.Follower.Leader);
  630.  
  631.                 if (leaderUnit) {
  632.                     say("Leader unit found.");
  633.                 }
  634.             }
  635.  
  636.             if (getDistance(me, leaderUnit) <= 50) {
  637.                 if (getDistance(me, leaderUnit) > 4) {
  638.                     Pather.moveToUnit(leaderUnit);
  639.                 }
  640.             }
  641.  
  642.             if (attack) {
  643.                 Attack.clear(20, false, false, false, false);
  644.                 this.pickPotions(20);
  645.             }
  646.  
  647.             if (me.classid === 3 && Config.AttackSkill[2] > 0) {
  648.                 Skill.setSkill(Config.AttackSkill[2], 0);
  649.             }
  650.  
  651.             if (leader.area !== me.area && !me.inTown) {
  652.                 while (leader.area === 0) {
  653.                     delay(100);
  654.                 }
  655.  
  656.                 result = this.checkExit(leader, leader.area);
  657.  
  658.                 switch (result) {
  659.                 case 1:
  660.                     say("Taking exit.");
  661.                     delay(500);
  662.                     Pather.moveToExit(leader.area, true);
  663.  
  664.                     break;
  665.                 case 2:
  666.                     say("Taking portal.");
  667.  
  668.                     break;
  669.                 case 3:
  670.                     say("Taking waypoint.");
  671.                     delay(500);
  672.                     Pather.useWaypoint(leader.area, true);
  673.  
  674.                     break;
  675.                 case 4:
  676.                     say("Special transit.");
  677.  
  678.                     break;
  679.                 }
  680.  
  681.                 while (me.area === 0) {
  682.                     delay(100);
  683.                 }
  684.  
  685.                 leaderUnit = this.getLeaderUnit(Config.Follower.Leader);
  686.             }
  687.         }
  688.  
  689.         switch (action) {
  690.         case "cow":
  691.             if (me.area === 1) {
  692.                 Town.move("portalspot");
  693.  
  694.                 if (!Pather.usePortal(39)) {
  695.                     say("Failed to use cow portal.");
  696.                 }
  697.             }
  698.  
  699.             break;
  700.         case "move":
  701.             Pather.moveTo(me.x + rand(-5, 5), me.y + rand(-5, 5));
  702.  
  703.             break;
  704.         case "wp":
  705.         case me.name + "wp":
  706.             if (me.inTown) {
  707.                 break;
  708.             }
  709.  
  710.             delay(rand(1, 3) * 500);
  711.  
  712.             unit = getUnit(2, "waypoint");
  713.  
  714.             if (unit) {
  715. WPLoop:
  716.                 for (i = 0; i < 3; i += 1) {
  717.                     if (getDistance(me, unit) > 3) {
  718.                         Pather.moveToUnit(unit);
  719.                     }
  720.  
  721.                     unit.interact();
  722.  
  723.                     for (j = 0; j < 100; j += 1) {
  724.                         if (j % 20 === 0) {
  725.                             me.cancel();
  726.                             delay(300);
  727.                             unit.interact();
  728.                         }
  729.  
  730.                         if (getUIFlag(0x14)) {
  731.                             break WPLoop;
  732.                         }
  733.  
  734.                         delay(10);
  735.                     }
  736.                 }
  737.             }
  738.  
  739.             if (getUIFlag(0x14)) {
  740.                 say("Got wp.");
  741.             } else {
  742.                 say("Failed to get wp.");
  743.             }
  744.  
  745.             me.cancel();
  746.  
  747.             break;
  748.         case "c":
  749.             if (!me.inTown) {
  750.                 Town.getCorpse();
  751.             }
  752.  
  753.             break;
  754.         case "p":
  755.             say("Picking items.");
  756.             Pickit.pickItems();
  757.  
  758.             if (openContainers) {
  759.                 this.openContainers(20);
  760.             }
  761.  
  762.             say("Done picking.");
  763.  
  764.             break;
  765.         case "1":
  766.             if (me.inTown && leader.inTown && this.checkLeaderAct(leader) !== me.act) {
  767.                 say("Going to leader's town.");
  768.                 Town.goToTown(this.checkLeaderAct(leader));
  769.                 Town.move("portalspot");
  770.             } else if (me.inTown) {
  771.                 say("Going outside.");
  772.                 Town.goToTown(this.checkLeaderAct(leader));
  773.                 Town.move("portalspot");
  774.                 Pather.usePortal(null, leader.name);
  775.  
  776.                 while (!this.getLeaderUnit(Config.Follower.Leader)) {
  777.                     Attack.clear(10);
  778.                     delay(200);
  779.                 }
  780.             }
  781.  
  782.             break;
  783.         case "2":
  784.             if (!me.inTown) {
  785.                 delay(150);
  786.                 say("Going to town.");
  787.                 Pather.usePortal(null, leader.name);
  788.             }
  789.  
  790.             break;
  791.         case "3":
  792.             if (me.inTown) {
  793.                 say("Running town chores");
  794.                 Town.doChores();
  795.                 Town.move("portalspot");
  796.                 say("Ready");
  797.             }
  798.  
  799.             break;
  800.         case "a2":
  801.         case "a3":
  802.         case "a4":
  803.         case "a5":
  804.             this.changeAct(parseInt(action[1], 10));
  805.  
  806.             break;
  807.         case me.name + " tp":
  808.             unit = me.findItem("tbk", 0, 3);
  809.  
  810.             if (unit && unit.getStat(70)) {
  811.                 unit.interact();
  812.  
  813.                 break;
  814.             }
  815.  
  816.             unit = me.findItem("tsc", 0, 3);
  817.  
  818.             if (unit) {
  819.                 unit.interact();
  820.  
  821.                 break;
  822.             }
  823.  
  824.             say("No TP scrolls or tomes.");
  825.  
  826.             break;
  827.         }
  828.  
  829.         if (action.indexOf("talk") > -1) {
  830.             this.talk(action.split(" ")[1]);
  831.         }
  832.  
  833.         action = "";
  834.  
  835.         delay(100);
  836.     }
  837.  
  838.     return true;
  839. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement