Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.64 KB | None | 0 0
  1. /**
  2. * Simon Says script!
  3. * List of in game commands can be found below
  4. * All in game commands are case sensitave!
  5. *
  6. * RUSH COMMANDS!
  7. * Rush 1, Rush 2, Rush 3, Rush 4, Rush 5, = Select these for rushing individual acts
  8. * Rush All, for the entire script,
  9. * Fast Rush = for the basics only, no quests or additional objectives ran < great for hardcore players! >
  10. *
  11. * WAYPOINT COMMANDS!
  12. * Get Wps = will give you all the way points you are missing in that difficulty, minus halls of pain
  13. * Give Wps 1, Give Wps 2, Give Wps 3, Give Wps 4, Give Wps 5, will give other people the waypoints in an individual act
  14. * Give Wps All = gives every waypoint in the game except halls of pain
  15. *
  16. * BOSS COMMANDS!
  17. * By typing these commands below, you can do individual tasks, without having to run the entire act.
  18. * Do Cain, Do Raven, Do Smith, Do Andariel, Do Radament, Do Cube, Do Summoner, Do Duriel
  19. * Do Tome, Do Travincal, Do Mephisto, Do Izual, Do Forge, Do Diablo, Do Shenk, Do Anya, Do Ancients, Do Baal.
  20. *
  21. * MISC COMMANDS
  22. * Follow Me = will make the bot follow whoever sent the message
  23. * Clear Area = will clear the surrounding area wherever the bot is
  24. */
  25. var Scolor = 0 ;
  26. var UseLifewatch = !SimonStopLifeWatch;
  27. function NT_SimonSays()
  28. {
  29. print("ÿc3Starting SimonSays script");
  30. print("ÿc9Supported commands can be found in the top section of SimonSays.dbl")
  31. print("ÿc9You can also Do each event by saying Do eventname for example Do Cube, or Do Andariel")
  32. print("ÿc9Auto Teleport keys: keypad (/ * -) Previous Lvl, Point of Intrest, Next Level. quick town: 'e'" );
  33. var cbShowOptions=new CheckBox(650,5,"View Options",false)
  34. cbShowOptions.checked = false;
  35. var cbEnableSnaging = new CheckBox(650,30,"Enable Snaging",SimonEnableSnagging)
  36. cbEnableSnaging.visible = cbShowOptions.checked
  37. var cbAutoReveal = new CheckBox(650,45,"Auto Reveal",SimonAutoReveal)
  38. var cbSimonEnableCommands = new CheckBox(650,60,"EnableCommands",SimonEnableCommands)
  39. var cbSimonStopLifeWatch = new CheckBox(650,75,"LifeWatch/Chicken Enabled",!SimonStopLifeWatch)
  40. var cbShowLoc = new CheckBox (650,90,"Loction Hook",false)
  41. cbShowLoc.visible=cbShowOptions.checked
  42. cbSimonStopLifeWatch.visible=cbShowOptions.checked
  43. var levelInfoHook1 = new Text("", 795, 450, 2, 6, 1);
  44. var levelInfoHook2 = new Text("", 795, 465, 2, 6, 1);
  45. var levelInfoHook3 = new Text("", 795, 480, 2, 6, 1);
  46. //var commandsHook = new Text("Rush Me, Get Wps, Rush 1-5", 400, 400, 2, 6, 2,testFunc);
  47. //commandsHook.visible=false;
  48. cbSimonEnableCommands.visible=cbShowOptions.checked;
  49. cbAutoReveal.visible=cbShowOptions.checked
  50. load("tools/SimonsHelper.dbj");
  51. addEventListener("chatmsg", SimonMsg);
  52.  
  53.  
  54. // if (NTC_InTown())
  55. // NTTMGR_TownManager();
  56. var Hook = new Text(currentAction, 400, 550, 2, 6, 2,testFunc);
  57. // var hook = new Box(...); hook.click = function (b, x, y) { /* b is the button, x/y is the location */ };
  58. var ShowOptions = cbShowOptions.checked
  59. var currentArea = 0;
  60. while(me.ingame){ ///////////////////Main Loop
  61. if(cbShowLoc.checked)
  62. LoctionHook.text ="Area: "+me.area +" X: "+me.x+" Y: "+me.y;
  63.  
  64. Hook.text = currentAction;
  65. if (cbEnableSnaging.checked){
  66. FastSnag=true;
  67. NTSI_FastSnag();
  68. NTSI_PickItems(); // adding for utility snag
  69. }
  70. SimonEnableCommands =cbSimonEnableCommands.checked;
  71. if (ShowOptions != cbShowOptions.checked){
  72. ShowOptions = cbShowOptions.checked
  73. cbEnableSnaging.visible = cbShowOptions.checked
  74. cbAutoReveal.visible = cbShowOptions.checked
  75. cbSimonEnableCommands.visible=cbShowOptions.checked;
  76. cbSimonStopLifeWatch.visible=cbShowOptions.checked;
  77. //commandsHook.visible=(cbSimonEnableCommands.checked && cbSimonEnableCommands.visible)
  78. }
  79. if (UseLifewatch != cbSimonStopLifeWatch.checked){
  80. UseLifewatch = cbSimonStopLifeWatch.checked;
  81. setLifeWatch(UseLifewatch);
  82. }
  83. if (me.area != currentArea){
  84. updatelevelInfoHook(levelInfoHook1,levelInfoHook2,levelInfoHook3);
  85. if (cbAutoReveal.checked){
  86. var exits = getArea().exits;
  87. for (var j = 0 ; j < exits.length ; j++){
  88. if(exits[j].tileid == 0)
  89. RevealArea(exits[j].target)
  90. }
  91. RevealArea(me.area)
  92. }
  93. currentArea=me.area;
  94. }
  95. delay (100);
  96. }
  97. }
  98. function testFunc(){
  99. print ("test func")
  100. }
  101. function setLifeWatch(runLifewatch){
  102. if (runLifewatch){ //load lifewatch if it isnt loaded
  103. var a =getScript();
  104. do{
  105. if (a.name == "tools\\nttoolsthread.dbj"){
  106. return;
  107. }
  108. }while(a.getNext());
  109. load("tools/NTToolsThread.dbj");
  110. }else{ //stop lifewatch
  111. var a =getScript();
  112. do{
  113. sendCopyData(null, "OOG", 0,a.name);
  114. if (a.name == "tools\\nttoolsthread.dbj"){
  115. a.stop();
  116. print("seting chicken");
  117. me.chickenhp = 0;
  118. me.chickenmp = 0;
  119. break;
  120. }
  121. }while(a.getNext());
  122. }
  123. }
  124. function updatelevelInfoHook(Hook1,hook2,hook3){
  125. var nextLvl,previousLvl, poi;
  126. poi = getPOI();
  127. nextLvl = getNextArea(me.area);
  128. previousLvl= NTAR_PreviousAreas[me.area];
  129. Hook1.text = "Previous: "+NTAR_Areas[previousLvl];
  130. hook2.text = " POI "+poi;
  131. hook3.text= " next: "+NTAR_Areas[nextLvl];
  132. }
  133. function scriptKeyHandler(key){
  134. print(key);
  135. if (key == SimonNextLevel){ //+
  136. currentAction ="Moving to next lvl";
  137. SetObjective("SimonNextLevel");
  138. }
  139. if (key == SimonPrevousLevel){
  140. currentAction ="Moving to Previous lvl";
  141. SetObjective("SimonPrevousLevel");
  142. }
  143. if (key == SimonEscToTown) { // escape to town
  144. StopObjective();
  145. currentAction ="Escaping to town";
  146. NTTM_CheckAct();
  147. currentAction ="";
  148. }
  149. if (key == SimonPOI){
  150. currentAction ="Going to POI";
  151. SetObjective("SimonPOI");
  152. }
  153. if (key == 27){
  154. currentAction ="";
  155. StopObjective();
  156. }
  157. if (key == 8){
  158. currentAction ="clearing "+ NTAR_Areas[me.area];
  159. SetObjective("ClearArea");
  160. //NTA_ClearRooms(customClearAreaAttack);
  161. }
  162. if (key == 187){
  163. var str = "";
  164. for (var j = 0 ; j <30 ;j++){
  165. if (getUIFlag (j)){
  166. str=str +" "+j;
  167. }
  168. }
  169. print (str);
  170. }
  171. return true;
  172. }
  173. function followLeader(){
  174. var who = Leader; //assinged in simon helper
  175. if(findLead( who)){
  176. while (findLead( who)){
  177. if (findLead(who) && me.area != findLead(who)){
  178. NTM_TravelTO(findLead(who))
  179. }
  180. moveToLead(who);
  181. NTA_ClearPosition(30);
  182. NTSI_PickItems();
  183. if (!findLead(who)){
  184. currentAction ="";
  185. }
  186. }
  187. }
  188. return true;
  189. }
  190. function findLead(leader)
  191. {
  192. var _lead= getUnit(0, leader)
  193. if(_lead)
  194. return _lead.area;
  195. // leader not found look in party
  196. var area =0;
  197. var a = getParty();
  198. if(!a)
  199. return false;
  200. do {
  201. if (a.name==leader){
  202. area=a.area;
  203. }
  204. } while(a.getNext());
  205. if (area==0) {
  206. //sendCopyData(null, "OOG", 0,"Quit:Quit()" );
  207. return false;
  208. }
  209. return area;
  210. }
  211. function moveToLead(leader){
  212. var _lead= getUnit(0, leader)
  213. if(_lead){
  214. //print("moving to:"+_lead.x);
  215. if (getDistance(_lead.x,_lead.y,me.x,me.y) >5)
  216. NTM_MoveTo(_lead.x,_lead.y);
  217. return true;
  218. }
  219. var area=0;
  220. var leadx =0;
  221. var leady =0;
  222. var a = getParty();
  223. do {
  224. if (a.name==leader){
  225. area=a.area;
  226. leadx=a.x
  227. leady=a.y
  228. }
  229. }
  230. while(a.getNext());
  231. if (area==0) {
  232. return false;
  233. }
  234. if (leadx!=0){
  235. NTM_MoveTo(leadx,leady);
  236. }
  237. return true;
  238. }
  239. function customClearAreaAttack(){
  240. if (currentAction != "clearing "+ NTAR_Areas[me.area])
  241. return false;
  242. NTA_ClearPosition(40);
  243. if (currentAction != "clearing "+ NTAR_Areas[me.area])
  244. return false;
  245. NTSI_PickItems();
  246. return true;
  247. }
  248. function StopObjective(){
  249. var a =getScript();
  250. do{
  251. if (a.name == "tools\\simonshelper.dbj"){
  252. a.stop();
  253. return true;
  254. }
  255. }while(a.getNext());
  256. return true;
  257. }
  258. function SetObjective(objective){
  259. StopObjective();
  260. sendCopyData(null, "OOG", 0,"loading script ");
  261. load("tools/SimonsHelper.dbj");
  262. sendCopyData(null, "OOG", 0,"loading script return");
  263. delay(500);
  264. var a =getScript();
  265. do{
  266. if (a.name == "tools\\simonshelper.dbj"){
  267. sendCopyData(null, "OOG", 0,"sending msg");
  268. a.send(objective);
  269. sendCopyData(null, "OOG", 0,"sending msg return");
  270. //sendCopyData(null, me.windowtitle, 0,objective );
  271. }
  272. }while(a.getNext());
  273. }
  274. function getNextArea(area){
  275. if (NTAR_NextArea[area])
  276. return NTAR_NextArea[area];
  277. for (var i = 0; i < NTAR_PreviousAreas.length; i++){
  278. if (NTAR_PreviousAreas[i] == area)
  279. return i;
  280. }
  281. return area;
  282. }
  283. function gotoPOI(){
  284. if (me.area ==4){ //going to tris seqence
  285. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 17, 17))
  286. return false;
  287. delay(1500)
  288. if(!NTM_UsePortal("Portal", 38))
  289. return false;
  290. }
  291. if (me.area ==37)
  292. return NTM_MoveTo(22545, 9544);
  293. if (me.area ==102)
  294. return NTM_MoveTo(17543, 8068);
  295. if (me.area ==108)
  296. return NTM_MoveTo(7792, 5292);
  297. if (me.area ==110)
  298. return NTM_MoveTo(3906, 5112);
  299. if (me.area ==132)
  300. return NTM_MoveTo(15137, 5906);
  301. var exits = getArea().exits;
  302. for (var j = 0 ; j < exits.length ; j++){
  303. if(exits[j].target != getNextArea(me.area) && exits[j].target != NTAR_PreviousAreas[me.area] )
  304. return NTM_TravelTO(exits[j].target);
  305. }
  306. //unique id's
  307. var poiID = [ 397,30,108,"act 2->" ,355,397,354,357,356,152,"act 3 >",406,405,407,256,376,"act 5 >",460,"Waypoints->",119, 145, 156, 157, 237, 238, 288, 323, 324, 398, 402, 429, 494, 496, 511, 539, 429,580,149];
  308. var unit = getPresetUnits(me.area);
  309. if(unit){
  310. for (var p =0 ; p < poiID.length; p++){
  311. for (var j = 0; j < unit.length; j++){
  312. //if (unit[j].id in poiID){ // no clue why that dosent work
  313. if (unit[j].id == poiID[p]){
  314. return NTM_MoveTo(unit[j].roomx*5+unit[j].x,unit[j].roomy*5+unit[j].y);
  315. }
  316. }
  317. }
  318. }
  319. return false;
  320. }
  321. function getPOI(){
  322. var poi = "Nothing"
  323. for (var i =0; i<122; i++){
  324. if(NTM_AreaWPArray[i] == me.area)
  325. poi = "Waypoint";
  326. }
  327. if (me.area == 4)
  328. poi = "Trist";
  329. if (me.area == 14 || me.area ==59 || me.area ==60 || me.area ==64 || me.area ==61 || me.area ==84 || me.area ==93)
  330. poi = "Chest";
  331. if (me.area == 5)
  332. poi = "Inifuss Tree";
  333. if (me.area == 25)
  334. poi = "Countess Chest";
  335. if (me.area == 28)
  336. poi = "Malus";
  337. if (me.area == 37)
  338. poi = "Andy";
  339. if (me.area == 49)
  340. poi = "Scroll Chest";
  341. if (me.area == 74)
  342. poi = "Sommoner";
  343. if (me.area == 69)
  344. poi = "Orifice";
  345. if (me.area == 102)
  346. poi = "Meph";
  347. if (me.area == 105)
  348. poi = "Izzy";
  349. if (me.area == 107)
  350. poi = "Fordge";
  351. if (me.area == 108)
  352. poi = "Star";
  353. if (me.area == 110)
  354. poi = "Shenk";
  355. if (me.area == 114)
  356. poi = "Anaya";
  357. if (me.area == 120)
  358. poi = "Ancients";
  359. if (me.area == 132)
  360. poi = "Baal";
  361. var exits = getArea().exits;
  362. for (var j = 0 ; j < exits.length ; j++){
  363. if(exits[j].target != getNextArea(me.area) && exits[j].target != NTAR_PreviousAreas[me.area] )
  364. return NTAR_Areas[exits[j].target];
  365. }
  366. return poi;
  367. }
  368. function SimonMsg(who,msg){
  369. if (SimonEnableCommands){
  370. print(who +" said "+msg);
  371. if (msg == "Get Wps"){
  372. currentAction="Getting Waypoints";
  373. SetObjective("GetWps");
  374. //getwaypoints(); currentAction="";
  375. }
  376. if(msg =="Rush All"){
  377. currentAction="Rushing "+who;
  378. SetObjective("RushAll");
  379. }
  380. if(msg =="Fast Rush"){
  381. currentAction="Rushing "+who;
  382. SetObjective("FastRush");
  383. }
  384.  
  385. if(msg =="Rush 1"){
  386. currentAction = "Rush 1 " +who;
  387. SetObjective("Rush1");
  388. }
  389. if(msg =="Rush 2"){
  390. currentAction = "Rush 2 " +who;
  391. SetObjective("Rush2");
  392. }
  393. if(msg =="Rush 3"){
  394. currentAction = "Rush 3 " +who;
  395. SetObjective("Rush3");
  396. }
  397. if(msg =="Rush 4"){
  398. currentAction = "Rush 4 " +who;
  399. SetObjective("Rush4");
  400. }
  401. if(msg =="Rush 5"){
  402. currentAction = "Rush 5 " +who;
  403. SetObjective("Rush5");
  404. }
  405. if (msg == "Clear Area"){
  406. currentAction ="clearing "+ NTAR_Areas[me.area];
  407. SetObjective("ClearArea");
  408. }
  409. if (msg == "Follow Me"){
  410. currentAction = "Following "+who;
  411. SetObjective("FollowLead:"+who);
  412. }
  413. <<<<<<< .mine
  414. if (msg == "Find ES"){
  415. currentAction = "Searching ES";
  416. SetObjective("FindES");
  417. }
  418. =======
  419. if(msg =="Do Cain"){
  420. currentAction = "Cain " +who;
  421. SetObjective("DoCain");
  422. }
  423. if(msg =="Do Raven"){
  424. currentAction = "Raven " +who;
  425. SetObjective("DoRaven");
  426. }
  427. if(msg =="Do Smith"){
  428. currentAction = "Smith " +who;
  429. SetObjective("DoSmith");
  430. }
  431. if(msg =="Do Andariel"){
  432. currentAction = "Andariel " +who;
  433. SetObjective("DoAndariel");
  434. }
  435. if(msg =="Do Radament"){
  436. currentAction = "Radament " +who;
  437. SetObjective("DoRadament");
  438. }
  439. if(msg =="Do Cube"){
  440. currentAction = "Cube " +who;
  441. SetObjective("DoCube");
  442. }
  443. if(msg =="Do Summoner"){
  444. currentAction = "Summoner " +who;
  445. SetObjective("DoSummoner");
  446. }
  447. if(msg =="Do Duriel"){
  448. currentAction = "Duriel " +who;
  449. SetObjective("DoDuriel");
  450. }
  451. if(msg =="Do Tome"){
  452. currentAction = "Tome " +who;
  453. SetObjective("DoTome");
  454. }
  455. if(msg =="Do Travincal"){
  456. currentAction = "Travincal " +who;
  457. SetObjective("DoTravincal");
  458. }
  459. if(msg =="Do Mephisto"){
  460. currentAction = "Mephisto " +who;
  461. SetObjective("DoMephisto");
  462. }
  463. if(msg =="Do Izual"){
  464. currentAction = "Izual " +who;
  465. SetObjective("DoIzual");
  466. }
  467. if(msg =="Do Forge"){
  468. currentAction = "Forge " +who;
  469. SetObjective("DoForge");
  470. }
  471. if(msg =="Do Diablo"){
  472. currentAction = "Diablo " +who;
  473. SetObjective("DoDiablo");
  474. }
  475. if(msg =="Do Shenk"){
  476. currentAction = "Shenk " +who;
  477. SetObjective("DoShenk");
  478. }
  479. if(msg =="Do Anya"){
  480. currentAction = "Anya " +who;
  481. SetObjective("DoAnya");
  482. }
  483. if(msg =="Do Ancients"){
  484. currentAction = "Ancients " +who;
  485. SetObjective("DoAncients");
  486. }
  487. if(msg =="Do Baal"){
  488. currentAction = "Baal " +who;
  489. SetObjective("DoBaal");
  490. }
  491. if (msg == "Give Wps 1") {
  492. currentAction = "Getting Act 1 Waypoints" +who;
  493. SetObjective("GiveWps1");
  494. }
  495. if (msg == "Give Wps 2") {
  496. currentAction = "Getting Act 2 Waypoints";
  497. SetObjective("GiveWps2");
  498. }
  499. if (msg == "Give Wps 3") {
  500. currentAction = "Getting Act 3 Waypoints";
  501. SetObjective("GiveWps3");
  502. }
  503. if (msg == "Give Wps 4") {
  504. currentAction = "Getting Act 4 Waypoints";
  505. SetObjective("GiveWps4");
  506. }
  507. if (msg == "Give Wps 5") {
  508. currentAction = "Getting Act 5 Waypoints";
  509. SetObjective("GiveWps5");
  510. }
  511. if (msg == "Give Wps All") {
  512. currentAction = "Getting All Waypoints";
  513. SetObjective("GiveWpsAll");
  514. }
  515. }
  516. >>>>>>> .r316
  517. }// if accepting commands
  518. function getwaypoints(){
  519. print("getting Waypoints");
  520. for (var i =0; i<122; i++){
  521. print(i);
  522. if(NTM_AreaWPArray[i] && !NTM_CheckWPInt(NTM_AreaWPArray[i])){
  523. NTM_TravelTO(i);
  524. NTM_GotoWaypoint(i,true,10000);
  525. }
  526. }
  527. for (var i =125; i<132; i++){
  528. if(NTM_AreaWPArray[i] && !NTM_CheckWPInt(NTM_AreaWPArray[i])){
  529. NTM_TravelTO(i);
  530. NTM_GotoWaypoint(i,true,10000);
  531. }
  532. }
  533. }
  534. function waitForSomeone(){
  535. NTM_MakeTP();
  536. var peeps = 0
  537. do{
  538. var _target = NTC_GetUnit(0);
  539. peeps = 0;
  540. if(_target)
  541. {
  542. do
  543. {
  544. peeps=peeps+1;
  545. } while(_target.getNext());
  546. NTA_ClearPosition(25);
  547. }
  548. NTC_Delay(500);
  549. }while (peeps < 2)
  550. }
  551. function Rush1() {
  552. if (NTConfig_DoCain) {
  553. DoCain();
  554. }
  555. if (NTConfig_DoRaven) {
  556. DoRaven();
  557. }
  558. if (NTConfig_DoSmith) {
  559. DoSmith();
  560. }
  561. DoAndariel();
  562. NTM_UsePortal("BluePortal", 1, me.charname);
  563. return true;
  564. }
  565. function Rush2() {
  566. NTTMGR_TownManager();
  567. say("Please Standby at the Act 2 Portal Area");
  568. if (NTConfig_DoRadament) {
  569. DoRadament();
  570. }
  571. if (me.diff == 0) {
  572. DoCube();
  573. }
  574. DoStaff();
  575. DoSummoner();
  576. DoDuriel();
  577. NTM_TravelTO(40); // have to pop new tp, as there will be no old one in duriels crib
  578. return true;
  579. }
  580. function Rush3() {
  581. NTTMGR_TownManager();
  582. say("Please Standby at the Act 3 Portal Area");
  583. if (NTConfig_DoTome) {
  584. DoTome();
  585. }
  586. DoTravincal();
  587. DoMephisto();
  588. NTM_UsePortal("BluePortal", 75, me.charname);
  589. return true;
  590. }
  591. function Rush4() {
  592. NTTMGR_TownManager();
  593. say("Please Standby at the Act 4 Portal Area");
  594. if (NTConfig_DoIzual) {
  595. DoIzual();
  596. }
  597. if (NTConfig_DoForge) {
  598. DoForge();
  599. }
  600. DoDiablo();
  601. NTM_UsePortal("BluePortal", 103, me.charname);
  602. return true;
  603. }
  604. function Rush5() {
  605. NTTMGR_TownManager();
  606. say("Please Standby at the Act 5 Portal Area");
  607. if (NTConfig_DoShenk) {
  608. DoShenk();
  609. }
  610. if (NTConfig_DoAnya) {
  611. DoAnya();
  612. }
  613. if (NTConfig_DoAncients) {
  614. DoAncients();
  615. }
  616. if (NTConfig_DoBaal) {
  617. DoBaal();
  618. }
  619. NTM_TravelTO(109); // same as duriel, you will have no old tp in baals throne room!
  620. return true;
  621. }
  622. function FastRush() {
  623. say("Pleae stand by Act 1 TP area.")
  624. DoAndariel();
  625. say("Please Standby at the Act 2 TP Area");
  626. if (me.diff == 0) {
  627. DoCube();
  628. }
  629. DoStaff();
  630. DoSummoner();
  631. DoDuriel();
  632. say("Please Standby at the Act 3 TP Area");
  633. DoTravincal();
  634. DoMephisto();
  635. say("Please Standby at the Act 4 TP Area");
  636. DoDiablo();
  637. return true;
  638. }
  639. function GiveWps1() {
  640. NTTMGR_TownManager();
  641. Act1Wps()
  642. }
  643. function GiveWps2() {
  644. NTTMGR_TownManager();
  645. Act2Wps()
  646. }
  647. function GiveWps3() {
  648. NTTMGR_TownManager();
  649. Act3Wps()
  650. }
  651. function GiveWps4() {
  652. NTTMGR_TownManager();
  653. Act4Wps()
  654. }
  655. function GiveWps5(){
  656. NTTMGR_TownManager();
  657. Act5Wps()
  658. }
  659. function Act1Wps(){
  660. var Act1WpID = [3, 4, 5, 6, 27, 29, 32, 35]
  661. for(var i = 0; i < Act1WpID.length; i++) {
  662. NTM_TravelTO(Act1WpID[i]);
  663. say("up");
  664. waitForSomeone();
  665. NTM_UsePortal("BluePortal", 1, me.charname);
  666. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  667. NTC_PutSkill(115, NTC_HAND_RIGHT);
  668. }
  669. }
  670. return true;
  671. }
  672. function Act2Wps(){
  673. var Act2WpID = [48, 57, 42, 43, 44, 52, 74, 46]
  674. for(var i = 0; i < Act2WpID.length; i++) {
  675. NTM_TravelTO(Act2WpID[i]);
  676. say("up");
  677. waitForSomeone();
  678. NTM_UsePortal("BluePortal", 40, me.charname);
  679. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  680. NTC_PutSkill(115, NTC_HAND_RIGHT);
  681. }
  682. }
  683. return true;
  684. }
  685. function Act3Wps(){
  686. var Act3WpID = [76, 77, 78, 79, 80, 81, 83, 101]
  687. for(var i = 0; i < Act3WpID.length; i++) {
  688. NTM_TravelTO(Act3WpID[i]);
  689. say("up");
  690. waitForSomeone();
  691. NTM_UsePortal("BluePortal", 75, me.charname);
  692. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  693. NTC_PutSkill(115, NTC_HAND_RIGHT);
  694. }
  695. }
  696. return true;
  697. }
  698. function Act4Wps(){
  699. var Act4WpID = [106, 107]
  700. for(var i = 0; i < Act4WpID.length; i++) {
  701. NTM_TravelTO(Act4WpID[i]);
  702. say("up");
  703. waitForSomeone();
  704. NTM_UsePortal("BluePortal", 103, me.charname);
  705. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  706. NTC_PutSkill(115, NTC_HAND_RIGHT);
  707. }
  708. }
  709. return true;
  710. }
  711. function Act5Wps(){
  712. var Act5WpID = [111, 112, 113, 115, 117, 118, 129]
  713. for(var i = 0; i < Act5WpID.length; i++) {
  714. NTM_TravelTO(Act5WpID[i]);
  715. say("up");
  716. waitForSomeone();
  717. NTM_UsePortal("BluePortal", 109, me.charname);
  718. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  719. NTC_PutSkill(115, NTC_HAND_RIGHT);
  720. }
  721. }
  722. return true;
  723. }
  724. function DoCain() {
  725. say("Getting Cain")
  726. NTM_TravelTO(5);
  727. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 30, 30, 0, 0))
  728. NTA_ClearPosition(40);
  729. say("Scroll Up")
  730. say("Go talk to Akara once you have the scroll")
  731. waitForSomeone();
  732. NTM_UsePortal("BluePortal", 1, me.charname);
  733. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  734. NTC_PutSkill(115, NTC_HAND_RIGHT);
  735. }
  736. NTM_TravelTO(4);
  737. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 17, 17, 5, 5))
  738. NTA_ClearPosition(40);
  739. say("Stones Up")
  740. say("Once you have the portal to tristram open, take my tp to cold plains so we can continue")
  741. waitForSomeone();
  742. NTM_UsePortal("BluePortal", 1, me.charname);
  743. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  744. NTC_PutSkill(115, NTC_HAND_RIGHT);
  745. }
  746. NTM_TravelTO(3);
  747. NTA_ClearPosition(20);
  748. waitForSomeone();
  749. NTM_UsePortal("BluePortal", 1, me.charname);
  750. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  751. NTC_PutSkill(115, NTC_HAND_RIGHT);
  752. }
  753. NTM_TravelTO(38);
  754. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 26, 26, 0, 0))
  755. NTA_ClearPosition(40);
  756. say("Come in and get Cain")
  757. say("Once he is rescued, go back to town")
  758. waitForSomeone();
  759. NTM_UsePortal("BluePortal", 1, me.charname);
  760. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  761. NTC_PutSkill(115, NTC_HAND_RIGHT);
  762. }
  763. return true;
  764. }
  765. function DoRaven() {
  766. NTM_TravelTO(17);
  767. NTP_DoPrecast();
  768. if (!NTM_MoveToObject(NTC_UNIT_TILE, 7, 8, 0, 15)) return false;
  769. say("Blood Raven is up, if you die STAY DEAD")
  770. waitForSomeone();
  771. NTA_KillBoss(getLocaleString(3111));
  772. NTA_ClearPosition(40);
  773. NTM_UsePortal("BluePortal", 1, me.charname);
  774. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  775. NTC_PutSkill(115, NTC_HAND_RIGHT);
  776. }
  777. return true;
  778. }
  779. function DoSmith() {
  780. NTM_TravelTO(28);
  781. NTP_DoPrecast();
  782. var _unit = getPresetUnits(me.area, NTC_UNIT_MONSTER, 754);
  783. NTM_MoveToObject(NTC_UNIT_MONSTER, _unit[0].id, _unit[0].id, 0, 0);
  784. var ox=me.x; var oy=me.y;
  785. NTM_MoveTo(me.x-7,me.y-10);
  786. var tpox=me.x; var tpoy=me.y;
  787. NTA_ClearPosition();
  788. NTM_MoveTo(tpox,tpoy);
  789. waitForSomeone();
  790. say("Smith is up. if you die STAY DEAD")
  791. if (!NTA_KillBoss(getLocaleString(2889)))
  792. NTA_ClearPosition(40);
  793. NTM_UsePortal("BluePortal", 1, me.charname);
  794. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  795. NTC_PutSkill(115, NTC_HAND_RIGHT);
  796. }
  797. return true;
  798. }
  799. function DoAndariel () {
  800. NTM_TravelTO(37);
  801. NTM_MoveTo(22589,9581);
  802. NTA_ClearPosition(20);
  803. NTM_MoveTo(22589,9581);
  804. say("Andariel up, Stay at the TP, Remember if you die STAY DEAD!");
  805. waitForSomeone();
  806. NTM_MoveTo(22589,9581);
  807. NTM_MoveTo(22563,9559);
  808. if(!NTA_KillBoss( getLocaleString(3021)))
  809. say("Andariel is Dead, Go Speak to Warriv and 'Go East'");
  810. NTM_MoveTo(22589,9581);
  811. NTM_UsePortal("BluePortal", 1, me.charname);
  812. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  813. NTC_PutSkill(115, NTC_HAND_RIGHT);
  814. }
  815. return true;
  816. }
  817. function DoRadament() {
  818. NTM_TravelTO(49);
  819. say("Get ready to enter my portal as soon as it opens, if you die STAY DEAD")
  820. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 355, 355, 0, 0))
  821. var ox=me.x; var oy=me.y;
  822. NTM_MoveTo(me.x-7,me.y-20);
  823. var tpox=me.x; var tpoy=me.y;
  824. NTM_MoveTo(tpox,tpoy);
  825. waitForSomeone();
  826. say("get in here ASAP!")
  827. if (!NTA_KillBoss(getLocaleString(2879))) //Radament
  828. NTA_ClearPosition(40);
  829. NTM_UsePortal("BluePortal", 40, me.charname);
  830. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  831. NTC_PutSkill(115, NTC_HAND_RIGHT);
  832. }
  833. return true;
  834. }
  835. function DoCube() {
  836. NTM_TravelTO(60);
  837. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 354, 354, 0, 0))
  838. return false;
  839. NTA_ClearPosition(40);
  840. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 354, 354, 0, 0))
  841. return false;
  842. say("Horadric Cube Up, Please Enter and open the chest and collect your Cube!")
  843. say("Once collected go back to town.")
  844. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 354, 354, 0, 0))
  845. return false;
  846. NTM_UsePortal("BluePortal", 40, me.charname);
  847. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  848. NTC_PutSkill(115, NTC_HAND_RIGHT);
  849. }
  850. return true;
  851. }
  852. function DoStaff() {
  853. NTM_TravelTO(64);
  854. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 356, 365, 0, 0))
  855. return false;
  856. NTA_ClearPosition(50);
  857. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 356, 365, 0, 0))
  858. return false;
  859. say("Staff of Kings Up, Please Enter and open the chest and collect your Staff");
  860. say("Once collected go back to town.")
  861. waitForSomeone();
  862. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 356, 365, 0, 0))
  863. return false;
  864. NTM_UsePortal("BluePortal", 40, me.charname);
  865. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  866. NTC_PutSkill(115, NTC_HAND_RIGHT);
  867. }
  868. NTM_TravelTO(61);
  869. NTM_MoveTo(15042,14045);
  870. NTA_ClearPosition(50);
  871. if (!NTA_KillBoss(getLocaleString(2881))) //Fangskin
  872. NTA_ClearPosition(50);
  873. NTM_MoveTo(15042,14045);
  874. NTA_ClearPosition(50);
  875. NTM_MoveTo(15042,14045);
  876. say("Amulet of the Viper Up, Please Enter and break the Tainted Sun Altar and collect your Amulet.");
  877. say("Once collected go back to town.")
  878. waitForSomeone();
  879. NTM_MoveTo(15042,14045);
  880. say("Transmute the Staff and Amulet and then Speak to Drognan and Deckard Cain");
  881. say("When done talking to Drognan and Cain, take my tp to the dry hills and I will continue to Arcane")
  882. NTM_UsePortal("BluePortal", 40, me.charname);
  883. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  884. NTC_PutSkill(115, NTC_HAND_RIGHT);
  885. }
  886. NTM_TravelTO(42);
  887. NTA_ClearPosition(40);
  888. say("just a reminder, don't come to dry hills until AFTER you have talked to Drog and Cain, or you will bug out Arcane")
  889. waitForSomeone();
  890. NTM_UsePortal("BluePortal", 40, me.charname);
  891. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  892. NTC_PutSkill(115, NTC_HAND_RIGHT);
  893. }
  894. return true;
  895. }
  896. function DoSummoner() {
  897. NTM_TravelTO(74);
  898. var tomb = NTC_GetPresetUnits(NTC_UNIT_OBJECT);
  899. if(!tomb){
  900. return false;
  901. }
  902. for(var i = 0 ; i < tomb.length ; i++)
  903. {
  904. if(tomb[i].id ==357){
  905. var path=getPath(me.area, me.x, me.y,tomb[i].roomx*5+tomb[i].x, tomb[i].roomy*5+tomb[i].y,true)
  906. }
  907. }
  908. NTM_MoveTo(path[path.length-3][0],path[path.length-3][1])
  909. say("Waiting by Summoner");
  910. waitForSomeone();
  911. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 357, 357, 0, 0))
  912. return false;
  913. if(!NTA_KillBoss(getLocaleString(927))) //the summoner
  914. return false;
  915. NTA_ClearPosition();
  916. return true;
  917. }
  918. function DoDuriel() {
  919. NTM_TravelTO(46);
  920. gotoCorrectTomb();
  921. if(!NTM_MoveToObject(NTC_UNIT_OBJECT, 152, 152, -8, -8))
  922. return false;
  923. waitForSomeone();
  924. while(!NTM_TakeStairs(100))
  925. NTC_Delay(500);
  926. if(!NTA_KillBoss(getLocaleString(3054)))
  927. return false;
  928. return true;
  929. }
  930. function gotoCorrectTomb(){
  931. var _tombs = getRoom();
  932. var _correcttomb = _tombs.correcttomb;
  933. if(!_correcttomb)
  934. return false;
  935. var _tileid = _correcttomb - 66 + 38;
  936. if(!NTM_MoveToObject(NTC_UNIT_TILE, _tileid))
  937. return false;
  938. if(!NTM_TakeStairs(_tileid, _tileid))
  939. return false;
  940. return true;
  941. }
  942. function DoTome() {
  943. NTM_TravelTO(94);
  944. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 193, 193, 0, 0))
  945. return false;
  946. NTA_ClearPosition(40);
  947. say("Lam Esen's Tome is up")
  948. say("Talk to Cain once you grab it")
  949. waitForSomeone();
  950. NTM_UsePortal("BluePortal", 75, me.charname);
  951. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  952. NTC_PutSkill(115, NTC_HAND_RIGHT);
  953. }
  954. return true;
  955. }
  956. function DoTravincal() {
  957. NTM_TravelTO(83);
  958. NTM_GotoLevel(100,false);
  959. var ox=me.x; var oy=me.y;
  960. NTM_MoveTo(me.x-7,me.y-40);
  961. var tpox=me.x; var tpoy=me.y;
  962. NTA_ClearPosition();
  963. NTM_MoveTo(tpox,tpoy);
  964. say("Council Up, Stay at the TP, Remember if you die STAY DEAD!");
  965. waitForSomeone();
  966. NTM_MoveTo(ox-6,oy+16);
  967. if (!NTA_KillBoss(getLocaleString(2860))) return false; //Toorc Icefist
  968. if (!NTA_KillBoss(getLocaleString(2862))) return false; //Geleb Flamefinger
  969. if (!NTA_KillBoss(getLocaleString(2863))) return false; //Ismail Vilehand
  970. NTA_ClearPosition(25);
  971. NTM_MoveTo(ox-18,oy+28);
  972. NTA_ClearPosition(25);
  973. NTM_MoveTo(ox-27,oy+16);
  974. NTA_ClearPosition(25);
  975. NTM_MoveTo(ox-27,oy-5);
  976. NTA_ClearPosition(25);
  977. NTM_MoveTo(ox-17,oy+9);
  978. NTA_ClearPosition(30);
  979. NTM_MoveTo(ox-18,oy+28);
  980. NTA_ClearPosition(45);
  981. NTM_GotoLevel(100,false);
  982. NTA_ClearPosition(25);
  983. NTM_MoveTo(tpox,tpoy);
  984. say("Speak to Deckard Cain and get ready for Mephisto.");
  985. NTM_UsePortal("BluePortal", 75, me.charname);
  986. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  987. NTC_PutSkill(115, NTC_HAND_RIGHT);
  988. }
  989. return true;
  990. }
  991. function DoMephisto() {
  992. NTM_TravelTO(102);
  993. NTM_MoveTo(17576,8070);
  994. say("Mephisto Up, Stay at the TP, Remember if you die STAY DEAD!");
  995. waitForSomeone();
  996. NTM_MoveTo(17589, 8071);
  997. if(!NTA_KillBoss(getLocaleString(3062) ))//mephisto
  998. NTA_ClearPosition(25);
  999. return false;
  1000. say("Mephisto is Dead, Go through the Red Portal.");
  1001. NTM_MoveTo(17590,8070)
  1002. NTM_UsePortal("BluePortal", 75, me.charname);
  1003. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  1004. NTC_PutSkill(115, NTC_HAND_RIGHT);
  1005. }
  1006. return true;
  1007. }
  1008. function DoIzual() {
  1009. NTM_TravelTO(105);
  1010. print("Going to Izual, get ready to enter tp as soon as it opens please");
  1011. print("if you die, STAY DEAD")
  1012. var poiID = [256];
  1013. var unit = getPresetUnits(me.area);
  1014. gotoPOI();
  1015. var ox=me.x; var oy=me.y;
  1016. NTM_MoveTo(me.x-7,me.y-30);
  1017. var tpox=me.x; var tpoy=me.y;
  1018. NTA_ClearPosition();
  1019. NTM_MoveTo(tpox,tpoy);
  1020. say("Izual is up, come in quick!")
  1021. waitForSomeone();
  1022. NTA_KillBoss(256)
  1023. return false;
  1024. NTA_ClearPosition(45);
  1025. NTSI_PickItems();
  1026. NTM_UsePortal("BluePortal", 103, me.charname);
  1027. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  1028. NTC_PutSkill(115, NTC_HAND_RIGHT);
  1029. }
  1030. return true;
  1031. }
  1032. function DoForge() {
  1033. NTM_TravelTO(107);
  1034. NTP_DoPrecast();
  1035. var _unit = getPresetUnits(me.area, NTC_UNIT_MONSTER, 775);
  1036. NTM_MoveToObject(NTC_UNIT_MONSTER, _unit[0].id, _unit[0].id, 3, 3);
  1037. waitForSomeone();
  1038. say("Forge up, if you die STAY DEAD")
  1039. if (!NTA_KillBoss(getLocaleString(1067)))
  1040. return false;
  1041. NTA_ClearPosition(45);
  1042. NTM_UsePortal("BluePortal", 103, me.charname);
  1043. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  1044. NTC_PutSkill(115, NTC_HAND_RIGHT);
  1045. }
  1046. return true;
  1047. }
  1048. function DoDiablo() {
  1049. NTM_TravelTO(107);
  1050. NTP_DoPrecast();
  1051. say("Going to Chaos Sanctuary, be ready to enter my portal when it opens");
  1052. if (!NTM_MoveTo(7797, 5600)) return false;
  1053. if (!NTM_TeleportTo(7797, 5560)) return false;
  1054. if (!NTM_MoveTo(7771, 5318)) return false;
  1055. NT_ClearCs();
  1056. NT_MurderDiablo();
  1057. NTM_UsePortal("BluePortal", 103, me.charname);
  1058. if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  1059. NTC_PutSkill(115, NTC_HAND_RIGHT);
  1060. }
  1061. return true;
  1062. }
  1063. function OpenSeal(sealID) {
  1064. var _unit = NTC_GetUnit(NTC_UNIT_OBJECT, sealID);
  1065. _unit.interact();
  1066. _unit.interact();
  1067. }
  1068. function NT_ClearCs() {
  1069. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 395, 395)) return false;
  1070. OpenSeal(395)
  1071. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 396, 396)) return false;
  1072. OpenSeal(396)
  1073. if (me.y > 5265 && me.y <= 5275) NTM_MoveTo(7677, 5287);
  1074. else NTM_MoveTo(7675, 5321)
  1075. for (var n = 0; n < 20; n++) {
  1076. delay(250);
  1077. if (NTC_FindMonster(getLocaleString(2851))) //vizier
  1078. break;
  1079. }
  1080. if (NTA_KillBoss(getLocaleString(2851), 20)) {
  1081. NTSI_PickItems();
  1082. }
  1083. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 394, 394)) return false;
  1084. OpenSeal(394)
  1085. if (me.x > 7810 && me.x <= 7825) NTM_MoveTo(7777, 5160);
  1086. else NTM_MoveTo(7777, 5200);
  1087. for (var n = 0; n < 20; n++) {
  1088. delay(250);
  1089. if (NTC_FindMonster(getLocaleString(2852))) //lord de seis
  1090. break;
  1091. }
  1092. if (NTA_KillBoss(getLocaleString(2852), 30)) {
  1093. NTSI_PickItems();
  1094. }
  1095. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 393, 393)) return false;
  1096. OpenSeal(393)
  1097. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 392, 392)) return false;
  1098. OpenSeal(392)
  1099. for (var n = 0; n < 20; n++) {
  1100. delay(250);
  1101. if (NTC_FindMonster(getLocaleString(2853))) //"Infector of Souls"
  1102. break;
  1103. }
  1104. if (NTA_KillBoss(getLocaleString(2853), 50)) //"Infector of Souls"
  1105. {
  1106. NTSI_PickItems();
  1107. if (NTC_PutSkill(124, NTC_HAND_RIGHT)) NTC_Delay(1600);
  1108. print("?c5Precasting");
  1109. NTP_DoPrecast();
  1110. }
  1111. NTSI_PickItems();
  1112. return true;
  1113. }
  1114. function NT_MurderDiablo() {
  1115. if (!NTM_MoveTo(7800, 5294)) return false;
  1116. waitForSomeone();
  1117. if (NTC_PutSkill(113, NTC_HAND_RIGHT));
  1118. for (var n = 0; n < 30; n++) {
  1119. NTC_DoCast(112, 2);
  1120. NTC_DoCast(112, 2);
  1121. NTC_DoCast(112, 2);
  1122. NTC_DoCast(112, 2);
  1123. NTC_DoCast(112, 2);
  1124. if (NTC_FindMonster(243)) {
  1125. print("?c1Killing Diablo");
  1126. if (NTA_KillBoss(243, 1000)) {
  1127. say("Diablo is dead, talk to Tyreal and head to act 5")
  1128. NTSI_PickItems();
  1129. return true;
  1130. }
  1131. }
  1132. NTC_Delay(500);
  1133. }
  1134. print("ÿc;Diablo not found, Ending Script");
  1135. return false;
  1136. }
  1137. function DoShenk() {
  1138. NTM_TravelTO(111);
  1139. NTM_MoveTo(3850, 5122);
  1140. NTA_ClearPosition(10);
  1141. NTM_MoveTo(3873, 5127);
  1142. NTA_ClearPosition(10);
  1143. NTM_MoveTo(3857, 5144);
  1144. NTA_ClearPosition(10);
  1145. NTM_MoveTo(3865, 5141);
  1146. NTA_ClearPosition();
  1147. NTM_MoveTo(3865, 5141);
  1148. say("Shenk is up")
  1149. waitForSomeone();
  1150. if (NTA_KillBoss(getLocaleString(22435)))
  1151. NTA_ClearPosition(25);
  1152. NTM_MoveTo(3865, 5141);
  1153. NTM_UsePortal("BluePortal", 109, me.charname);
  1154. return true;
  1155. }
  1156. function DoAnya() {
  1157. NTM_TravelTO(114);
  1158. if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 460, 460, -8, -8))
  1159. NTA_ClearPosition();
  1160. say("Anya up")
  1161. say("Talk to anya, then go back to town and talk to malah, get the potion, and come back and free Anya")
  1162. waitForSomeone();
  1163. if (!NTA_KillBoss(getLocaleString(22504))) //Frozenstien
  1164. NTSI_PickItems();
  1165. NTM_UsePortal("BluePortal", 109, me.charname);
  1166. return true;
  1167. }
  1168. function DoAncients() {
  1169. NTM_TravelTO(118);
  1170. NTM_GotoLevel(120,false)
  1171. say("Ancients up, come in and go through the stairs")
  1172. waitForSomeone();
  1173. NTM_TravelTO(120);
  1174. NTP_DoPrecast();
  1175. say("if you die STAY DEAD!")
  1176.  
  1177. NTM_OpenAlter()
  1178.  
  1179.  
  1180. NTM_MoveTo(10062,12620)
  1181. NTM_OpenAlter()
  1182.  
  1183. delay(1000)
  1184. NTA_ClearRooms()
  1185. return true;
  1186. }
  1187. function NTM_OpenAlter(){
  1188. var myDoor = getUnit(2);
  1189. if(myDoor){
  1190. do{
  1191. if(myDoor.name == "ancientsaltar" ){
  1192. if(getDistance(me,myDoor)>10)
  1193. NTM_MoveTo(myDoor.x,myDoor.y)
  1194. while(myDoor.mode == 0){
  1195. clickMap( 0, 0, myDoor );
  1196. NTC_Delay(rnd(10,20));
  1197. clickMap( 2, 0, myDoor );
  1198. NTC_Delay(200);
  1199. //myDoor.interact();
  1200. }
  1201. }
  1202. }while(myDoor.getNext());
  1203. me.cancel()
  1204. }
  1205. <<<<<<< .mine
  1206. }
  1207.  
  1208. function FindES() {
  1209. var _es = FindShrine();
  1210.  
  1211. if(!_es)
  1212. {
  1213. NTM_MakeTP();
  1214. NTM_UsePortal("BluePortal", 1, me.name);
  1215. say("Couldn't find an ES :(");
  1216. return false;
  1217. }
  1218.  
  1219. NTM_MoveTo(_es.x, _es.y);
  1220. NTM_MakeTP();
  1221. NTM_UsePortal("BluePortal", 1, me.name);
  1222.  
  1223. say("ES found");
  1224. return true;
  1225. }
  1226.  
  1227. function FindShrine() {
  1228. var _Shrine = [ 2, 81, 83/*, 85, 86, 93, 96, 97, 109, 116, 120, 123, 124, 133, 134,
  1229. 135, 136, 150, 151, 172, 173, 184, 190, 191, 197, 199, 200, 201, 226, 231,
  1230. 232, 260, 275, 276, 277, 278, 279, 282, 299, 300, 303, 325, 361, 414, 415,
  1231. 421, 422, 423, 427, 428, 464, 465, 472, 479, 483, 484, 488, 491, 492, 495,
  1232. 497, 499, 503, 509, 512, 520, 521, 522 */];
  1233. var _levels = [2, 3, 4, 10, 5, 6, 7];
  1234. for(var i = 0; i < _levels.length; i++)
  1235. {
  1236. NTM_TravelTO(_levels[i], true);
  1237.  
  1238. var _unit = NTC_GetPresetUnits(NTC_UNIT_OBJECT, 0, _levels[i]);
  1239. for(var j = 0; j < _unit.length; j++)
  1240. {
  1241. for(var k = 0; k < _Shrine.length; k++)
  1242. {
  1243. if(_unit[j].id == _Shrine[k])
  1244. {
  1245. NTM_MoveTo(_unit[j].roomx*5+_unit[j].x+5, _unit[j].roomy*5+_unit[j].y+5, 0, false)
  1246.  
  1247. if(CheckShrines())
  1248. return CheckShrines();
  1249. }
  1250. }
  1251. }
  1252. }
  1253. return false;
  1254. }
  1255.  
  1256. function CheckShrines() {
  1257. var _unit = NTC_GetUnit(NTC_UNIT_OBJECT);
  1258. if(_unit)
  1259. {
  1260. do
  1261. {
  1262. if(!CheckIfShrine(_unit))
  1263. continue;
  1264. return _unit;
  1265. }while(_unit.getNext());
  1266. }
  1267. return false;
  1268. }
  1269.  
  1270. function CheckIfShrine(shrine) {
  1271. if(shrine.objtype != 15)
  1272. return false;
  1273. if(shrine.mode)
  1274. return false;
  1275. return true;
  1276. =======
  1277. }
  1278. function DoBaal() {
  1279. var i;
  1280. var _wave;
  1281. var _starttick;
  1282. say("Going to baal");
  1283. if (!NTTM_CheckAct()) {
  1284. return false;
  1285. }
  1286. NTTMGR_TownManager();
  1287. NTM_TravelTO(129);
  1288. NTP_DoPrecast();
  1289. NTM_TravelTO(131);
  1290. if (!NTM_MoveTo(15112, 5068))
  1291. NTA_ClearPosition(20, 0x04);
  1292. NTA_ClearPosition();
  1293. NTSI_PickItems();
  1294. NTM_MoveTo(15116, 5068);
  1295. if (NTA_ClearPosition()) NTSI_PickItems();
  1296. NTM_MoveTo(15116, 5068);
  1297. NT_ClearThroneInt();
  1298. if (NTConfig_PublicMode) {
  1299. NTM_MoveTo(15112, 5004, 0, true);
  1300. NTM_MakeTP();
  1301. say("safe");
  1302. }
  1303. while (1) {
  1304. if (me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN) NTM_MoveTo(15092, 5028);
  1305. else NTM_MoveTo(15092, 5040);
  1306. if (me.getState(2)) NTC_PutSkill(109, NTC_HAND_RIGHT);
  1307. for (i = 0; i < 6; i++) {
  1308. _wave = NT_ThroneCheckInt();
  1309. if (_wave > 0) break;
  1310. NTC_Delay(500);
  1311. }
  1312. _starttick = getTickCount();
  1313. while (_wave == 0) {
  1314. if (!NT_ThronePreAttackInt()) NTC_Delay(250);
  1315. if (getTickCount() - _starttick > 15000) {
  1316. NT_ClearThroneInt();
  1317. _starttick = getTickCount();
  1318. }
  1319. _wave = NT_ThroneCheckInt();
  1320. }
  1321. NTA_ClearPosition(40, 0x04);
  1322. NTA_ClearPosition(40);
  1323. NTSI_PickItems();
  1324. NTT_CleanPotions();
  1325. if (_wave == 1) NTP_DoPrecast();
  1326. else if (_wave == 3) NT_CheckHydraInt();
  1327. else if (_wave == 5) break;
  1328. }
  1329. if (NTConfig_KillBaal) {
  1330. var _portal;
  1331. say("Time for Baal, if you die in baals throne room, STAY DEAD");
  1332. NTM_MoveTo(15092, 5010);
  1333. NTP_DoPrecast();
  1334. while (NTC_FindMonster(getLocaleString(3061))) //543
  1335. NTC_Delay(250);
  1336. _portal = NTC_GetUnit(NTC_UNIT_OBJECT, 563);
  1337. if (!_portal) return false;
  1338. if (!NTM_UsePortal("Portal", 132, null, _portal)) return false;
  1339. NTM_MoveTo(15138, 5916);
  1340. if (!NTA_KillBoss(getLocaleString(3061))) return false;
  1341. NTSI_PickItems();
  1342. }
  1343. return true;
  1344. }
  1345. function NT_ClearThroneInt() {
  1346. var _attackpos = [15112, 5068, 15075, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];
  1347. for (var i = 0; i < _attackpos.length; i += 2) {
  1348. NTM_MoveTo(_attackpos[i], _attackpos[i + 1]);
  1349. NTA_ClearPosition(25, 0x04);
  1350. NTA_ClearPosition(25);
  1351. NTSI_PickItems();
  1352. }
  1353. NTT_CleanPotions();
  1354. }
  1355. function NT_ThroneCheckInt() {
  1356. var _monster;
  1357. if (!NTC_FindMonster(getLocaleString(3061))) return 5;
  1358. _monster = NTC_GetUnit(NTC_UNIT_MONSTER);
  1359. if (_monster) {
  1360. do {
  1361. if (NTA_IsValidTarget(_monster)) {
  1362. if (_monster.classid == 23 || _monster.classid == 62) return 1;
  1363. if (_monster.classid == 105 || _monster.classid == 381) return 2;
  1364. if (_monster.classid == 557) return 3;
  1365. if (_monster.classid == 558) return 4;
  1366. if (_monster.classid == 571) return 5;
  1367. }
  1368. } while (_monster.getNext());
  1369. }
  1370. return 0;
  1371. }
  1372. function NT_ThronePreAttackInt() {
  1373. if (me.classid == NTC_CHAR_CLASS_SORCERESS) {
  1374. if (NTConfig_AttackOthers == 56 || NTConfig_AttackOthers == 59) return NTC_DoCast(NTConfig_AttackOthers, 2, 15092, 5028);
  1375. } else if (me.classid == NTC_CHAR_CLASS_PALADIN) {
  1376. if (NTConfig_AttackOthers == 112) {
  1377. if (NTConfig_PutAura > 0) NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
  1378. return NTC_DoCast(NTConfig_AttackOthers, 2);
  1379. }
  1380. }
  1381. return false;
  1382. }
  1383. function NT_CheckHydraInt() {
  1384. var _hydra1, _hydra2, _hydra3;
  1385. _hydra1 = NTC_GetUnit(NTC_UNIT_MONSTER, 351);
  1386. _hydra2 = NTC_GetUnit(NTC_UNIT_MONSTER, 352);
  1387. _hydra3 = NTC_GetUnit(NTC_UNIT_MONSTER, 353);
  1388. if ((_hydra1 && _hydra1.getStat(172) != 2 && _hydra1.getState(105)) || (_hydra2 && _hydra2.getStat(172) != 2 && _hydra2.getState(105)) || (_hydra3 && _hydra3.getStat(172) != 2 && _hydra3.getState(105))) {
  1389. NTM_MoveTo(15112, 5004);
  1390. if (me.getState(2)) NTC_PutSkill(109, NTC_HAND_RIGHT);
  1391. NTC_Delay(3000);
  1392. }
  1393. >>>>>>> .r316
  1394. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement