Skip to content

질문/답변

xp봇 cowXP 설정좀 도와주실분 계신가요..

조회 수 369 추천 수 0

카우설정을 제가 수정하려 했는데 실패해서 질문답변게시판에 올립니다...

 

버전은 봉구님 2.3H 버전이고요..

 

제가 이용하고 있는 프리섭은 타운포탈 스크롤 한장을 큐빙하면 포탈이 생성되는데요...

 

스크립트를 보니 위트의족을 구하러 가서 큐빙까지는 알겠는데 설정법을 어떻게 고쳐줘야 하는지를 모르겠네요 ㅠㅠ

 

아래는 갖고있는 스크립트입니다...

 

어느부분을 어떻게 고쳐줘야 할까요?

 

//////////////////////////////////////////////////////////////////////
//
// Xizeta's CowsXP script
// Moo moo Farm runs bot script.
//
// The script will use any char.
//
// It is suggested to keep a Tome of Identification in
// inventory to make it work better.
//
// Updated on 2006/03/22
//
// Original authors : Xizeta, YAMB team
// Collaboration : Ven0m, Muellsammler, Darien, Killkeeper, Damoon, HellNucleus,
//                 DaBeerMan, Gill_105, Syadasti, Smoke and others :)
//
// Legal stuff :
// 1. D2jsp is NOT free, to use it you MUST pay 25$ to njaguar ( see details at www.d2jsp.org ) and d2jsp software
//    must ONLY be used with a legit and paid for d2jsp.key which can only be obtained by paying.
// 2. You may NOT redistribute this or any files which resides on the site www.d2jsp.org in any way what so ever
//    including but not limited to making it available for download/upload to anyone without the expressed consent
//    ( in writing or otherwise ) of the authors of the files. All headers and text documents must remain and contents stay intact.
//    The usage of scripts, part of scripts and/or files are permitted as long as they are used for scripts
//    which is being hosted at www.d2jsp.org with credit of the authors which made the parts of the scripts or files used.
// 3. MODIFICATIONS for redistribution can only be done by submitting to the core scripters team for approval. If you don't
//    want to submit the modifications you may not redistribute any files from the d2jsp core or scripts
// 4. You may not modify or change the existing code other than for your own personal use.
// 5. Any copies of this software must always be compatible with the current d2jsp-common libs
// 6. The sale of this software is strictly forbidden
// 7. Only a person which has paid for ( or otherwise proven that key was paid for) the d2jsp key
//    to njaguar ( mr Paul Taulborg) may use the scripts and/or files from www.d2jsp.org
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
// or FITNESS FOR A PARTICULAR PURPOSE.
//
//////////////////////////////////////////////////////////////////////

 

 

 

 


//////////////////////////////////////////////////////////////////////
// ***** NO EDITION BELOW THIS POINT *****
// MESSING WITH THE CODE BELOW WILL MAKE THE SCRIPT
// WORK DIFFERENTLY, WITH BAD RESULTS !!
//////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////
// Script public variables
//////////////////////////////////////////////////////////////////////

// General variables
var WXP_KillRakanishu = true;
var WXP_PortalClearMsg = "Portal clear"; // Display the public message
var WXP_CowPortalMsg = "Portal is now up"; // Message when portal is up
var WXP_OpenOnly = false;   // Set to true to open the portal only and quit
var WXP_WaitForPortal=false;   // Set to true to wait until the portal is open by someone else
var WXP_KillKing = false;   // Do we want to kill the king or not
var WXP_PortalDelay = 1000;   // Delay to wait before entering the portal in Cairn Stones


//////////////////////////////////////////////////////////////////////
// Script private variables
//////////////////////////////////////////////////////////////////////

var _WXP_UseLoader = false;
var _WXP_CanKillKing = false;

// Classes
var commPather = false;


//////////////////////////////////////////////////////////////////////
// CowsXP functions
//////////////////////////////////////////////////////////////////////

function WXP_PickItem(item) {

 for (var x=0; x < 3; x+=1) {

  if (item.mode==3 || item.mode==5) {

   while (me.mode == 7 || me.mode == 8 || (me.mode >= 10 && me.mode <= 16) || me.mode == 18) {

    DC_DoDel(20);
    _totaltime+=20;
    if (_totaltime >= 1000) { break; }
   }

   if (me.mode == 7 || me.mode == 8 || (me.mode >= 10 && me.mode <= 16) || me.mode == 18) { continue; }

   DC_DoClick(0,0,item);

   if (item.mode===0) { return true; }
  }
 }

 DC_DoDel(200);
 if (item.mode===0) { return true; }

 return false;
}

function WXP_GetLeg() {

 // Do precasts before going into the portal
 XP_Precasts();

 // Use the WP to go to the Stony Field
 DM_UsePortal("Waypoint",0x04);

 // Do precasts after going into the portal
 XP_Precasts();

 // Move from WP to Cairn Stones
 _retval = commPather.GotoNPC(737,4,20,false,false);
 if (!_retval) { DC_ThrowException("CowsXP","Unable to path to Cairn Stones"); }

 // If we want to kill Rakanishu, do it now
 if (WXP_KillRakanishu) {

  XP_KillBoss( "Rakanishu", 20, 0x01, false, _WXP_UseLoader );
 }

 // Take portal to Tristram
 delay(WXP_PortalDelay);
 DM_UsePortal("Portal", 38);

 // Go besides Wirt's body
 commPather.GotoDest(25048,5181);

 // Kill monsters around to be safe
 XP_ClearPosition(20);

 // Tele beside Wirt's body if I'm too far
 if (Math.abs(25048 - me.x) > 5 || Math.abs(5181 - me.y) > 5) { commPather.GotoDest(25048,5181); }

 // get the body of Wirt
 var _wirtbody;
 for (var x=0; x < 5; x+=1) {

  _wirtbody=getUnit(2,268);
    if (_wirtbody) { break; }
    delay(50);
   }

 // Throw a exception if no body is found
 if (typeof _wirtbody == "undefined") { DC_ThrowException("CowsXP", "Could not find Wirt's body."); }

 // Interact with Wirt
 for (x=0; x < 3 && _wirtbody.mode != 2; x+=1) {

  DC_DoClick(0,0,_wirtbody);
  delay(500);
 }

 // Get the leg dropped by Wirt's body
 var _leg;
 for (x=0; x < 5; x+=1) {

  _leg=getUnit(4,"leg");
    if (_leg) { break; }
      delay(50);
   }

   if (typeof _leg == "undefined") { DC_ThrowException("CowsXP", "Could not find Wirt's leg."); }

 // Pick the leg
 if (!WXP_PickItem(_leg)) { DC_ThrowException("CowsXP", "Cannot pick Wirt's leg"); }

 // Check for items
 DSN_PickItems();
}

function WXP_OpenPortal() {

 // Make 100% sure we have items because we crash if we don't, choose the right tome

 // Get the extra tome in inventory
 var _xtratome = getUnit(4,"tbk");
 while (_xtratome) {

  if (_xtratome.mode === 0) {

   if (_xtratome.itemloc === 0) {

    var _ignoreitem = (DT_Columns[_xtratome.y][_xtratome.x]===0);
    if (_ignoreitem) {

     if (_xtratome.getNext("tbk")) { continue; }
     else { _xtratome=false; }
    }
   }
  }

  // If the tome is on the ground, pick it
  else if (_xtratome.mode == 3) {

   WXP_PickItem(_xtratome);
   _xtratome = getUnit(4,"tbk");
   continue;
  }
  else {
   if (_xtratome.getNext("tbk")) { continue; }
   else { _xtratome=false; }
  }

  break;
 }

 // if no tome is found, return
 if (!_xtratome) { return "no tome."; }

 // get the leg in inventory
 var _leg=getUnit(4,"leg");
 if (_leg) {

  if (_leg.mode !== 0) {

   if (_leg.mode == 3) {

    WXP_PickItem(_leg);
    _leg=getUnit(4,"leg");
    if (_leg.mode !== 0) { _leg=false; }
   }
   else { _leg=false; }
  }
 }

 // If no leg is found, return
 if (!_leg) { return "No leg found!"; }

 // Get the stash object
 var _mychest = getUnit(2,"bank");
 if (!_mychest) { return "No stash found!"; }

 // Check if we got the cube
 var _mycube = getUnit(4, "box");
 if (!_mycube) { return "No cube. CowsXP requires a cube to run !"; }

 // Clear the cube of any items
 DT_DoInteract(_mychest);
 DCU_CheckInventory();
 DCU_ClearCube();

 // Put leg and tome in cube
 DCU_ReEnterStash();
 DCU_MoveItemToCube(_leg, 0, 0);
 DCU_MoveItemToCube(_xtratome, 1, 0);

 // Transmute
 DT_DoInteract(_mycube);
 DCU_UseCube();
 DT_MenuCancel(_mycube,0);
 for (var x=1000; !getUIFlag(0x19) && x > 0; x-=25) { delay(25); } // Wait for stash UI to apear
 DT_MenuCancel(_mychest,0);

 // Return the success of the portal opening
 return "sucess";
}

function WXP_ClearArea() {

 // If we see The Cow King very close, abort
 var _cowking = getUnit(1,"The Cow King");
 if (_cowking) {

  if ( DA_GetRange( _cowking ) < 20 ) {

   DC_ThrowException("CowsXP", "The Cow King is already too close");
  }
 }

 // Warn fellow ppl
 if (XP_RunMode > 0) { say ("Come in only when I tell you that the portal is safe!"); }

 // Call the function
 XP_KillMonsters();

 // For public games, make a tp and call followers/leechers in
 if (XP_RunMode > 1) {

  DM_MakeTP();
  say(XP_TPLeechMessage);
 }

 // Start exploring the area
 _retval = commPather.ExploreLevel(false,XP_KillMonsters,XP_KillMonsters,false);
 if (!_retval) { DC_ThrowException("CowsXP","Unable to explore the area"); }
}

function WXP_Prepare() {

 // Add leg into ignored items list for cow run duration
 DT_IgnoredItems.push("leg");

 // Check if we need to buy a TP book
 var _needtptome=true;
 var _ignoreitem;
 var _xtratome=getUnit(4,"tbk");
 if (_xtratome) { do {

  if (_xtratome.mode === 0) {

   if (_xtratome.itemloc === 0) {

    _ignoreitem = (DT_Columns[_xtratome.y][_xtratome.x]===0);
    if (!_ignoreitem) {

     _needtptome=false;
     break;
    }
   }
   else {
    _needtptome=false;
    break;
   }

  }
  else if (_xtratome.mode == 3) {

   if (WXP_PickItem(_xtratome)) {

    _needtptome=false;
    break;
   }
  }

 } while(_xtratome.getNext("tbk")); }

 // Check if we need a leg
 var _needleg=true;
 var _leg=getUnit(4,"leg");
 if (_leg) {

  if (_leg.mode === 0) { _needleg=false; }
  else if (_leg.mode == 3) {

   if (WXP_PickItem(_leg)) { _needleg=false; }
  }
 }

 // Go grab Wirt's leg if needed and make sure we are in Act 1
 if (_needleg) {

  // Go to the waypoint area
  if (XP_UseOverheads) { me.overhead("Walking to WayPoint"); }
  commPather.GotoWaypoint(me.area,8,false,false);
  WXP_GetLeg();
  if (DM_MakeTP(me.area,1) === false) {

   DC_ThrowException("CowsXP","Unable to go to town!");
  }

 }
 else if (me.act != 1) {

  // Go to the waypoint area
  if (XP_UseOverheads) { me.overhead("Walking to WayPoint"); }
  commPather.GotoWaypoint(me.area,8,false,false);
  DM_UsePortal("Waypoint",0x01);
 }

 // If we need a TP book, go to Akara, buy a tp tome and do healer stuff too
 if (_needtptome) {

  if (XP_UseOverheads) { me.overhead("Walking to Akara"); }
  commPather.GotoNPC(148,1,8,false,false);
  var npc = DC_getNPC(148);
  if (!npc || !DT_DoInteract(npc)) { DC_ThrowException("CowsXP", "Unable to interact with Akara !"); }
  DT_DoTrade(npc);

  if (_XP_GetNumUnId > 0) { XP_CheckItems(npc); }

  var _tptome = DT_GetTome(1);
  if (!_tptome) { DT_BuyScrolls(npc,1,1); }
  else if (_tptome.getStat(70) < 7) { DT_FillTome(npc,1); }

  var _tbk = DT_GetTome(1,npc.name);
  if (_tbk) { DT_BuyItem(_tbk,npc,2); }

  if (XP_UseBeltManager && DT_CheckBelt()) { DT_FillBelt(npc); }

  DT_MenuCancel(npc,1);
 }

 // Go to stash
 if (XP_UseOverheads) { me.overhead("Walking to Stash"); }
 commPather.GotoObject(2,267,267,me.area,3,false,false);

 // Open portal to Cow Level
 var result = WXP_OpenPortal();

 // There was an error opening portal, abort run
 if (result != "sucess") {

  // Drop any extra tbk
  _xtratome = getUnit(4,"tbk", 0);
  if (_xtratome) { do {

   if (_xtratome.itemloc === 0) {

    _ignoreitem = (DT_Columns[_xtratome.y][_xtratome.x]===0);
    if (!_ignoreitem) { DT_DropItem(_xtratome); }
   }

  } while(_xtratome && _xtratome.getNext("tbk", 0)); }

  DC_ThrowException("CowsXP", "Error Opening Cow Portal : " + result);
 }

 // Remove leg from ignored items list
 DT_IgnoredItems.pop();
}

//////////////////////////////////////////////////////////////////////
// CowsXP libs loading
//////////////////////////////////////////////////////////////////////

// Main function
function CowsXP() {

 // Initialize the script
 DC_LoadInclude("XP/Libs/XP_Load.d2l");
 XP_LoadLibs();
 XP_StartScript( "CowsXP", "WXP", WXP_Variables, false, false );

 // Start the event handler if we want automatic BO check and refresh
 if (XP_AutoBOCheck) { registerEvent( EVENT_PLAYERSTATE, XP_EventPlayerState ); }

 // If you don't use LoaderXP, invite the followers
 if (!_WXP_UseLoader && XP_RunMode == 2) {

  // determine the gamename/password format depending on the join cmd
  _gameinfo = " " + me.gamename;
  _gamepass = (!me.gamepassword) ? "" : me.gamepassword;
  if (XP_JoinMessage == "=JOIN") {

   _gameinfo = (_gamepass === "") ? _gameinfo : _gameinfo + " " + _gamepass;
  }
  else {
   _gameinfo = (_gamepass === "") ? _gameinfo : _gameinfo + "/" + _gamepass;
  }

  // Send the join message to the followers if we set Teambot mode
  say("/f m " + XP_JoinMessage + _gameinfo);
 }

 // Load the PartyUp file for public games
 if (XP_RunMode > 0) {

  // Load the PartyXP script for invites if it isn't loaded yet
  if ( !DC_FindScript(XP_PartyPath) ) {

   load(XP_PartyPath);
  }
  DT_DrinkAll=true;
 }

 // Tell followers to wait in town
 if (XP_RunMode == 2) { say( XP_WaitTownMessage ); }

 // Do town stuff
 XP_TownManager();

 // If we want to open the portal only and the quest is done, throw a exception
 if (WXP_OpenOnly && (me.getQuest(4,10) || !me.getQuest(40,0))) {

  DC_ThrowException("CowsXP", "WXP_OpenOnly is set to true but the quest is completed or Baal is not killed in that difficulty");
 }

 // If the quest is done or Baal is not killed
 if (me.getQuest(4, 10) || !me.getQuest(40,0)) {

  DC_Print("I can't open the Cow Portal, so I can kill the Cow King!");
  _WXP_CanKillKing = true;
  if (!WXP_WaitForPortal) { DC_ThrowException("CowsXP", "I can't open the Cow portal anymore !!"); }
 }

 // Prepare for the Cows by getting the items and opening the portal
 WXP_Prepare();

 // For public games
 if (XP_RunMode) { say(WXP_CowPortalMsg); }

 // If the bot want to do more than opening the portal, do the rest
 if (!WXP_OpenOnly) {

  // Check if we are in the right place
  if (XP_UseOverheads) { me.overhead("Walking to Stash"); }
  commPather.GotoObject(2,267,267,me.area,3,false,false);

  // Load King watch if we don't want him dead
  if (!WXP_KillKing) { load("tools/KingWatchXP.d2j"); }

  // Set the array of skills for area cleaning
  if (me.classid == 1) { XP_SetMonsterSkills(); }

  // Do precasts before going into the portal
  XP_Precasts();

  // Take the portal to cow level
  DM_UsePortal("Portal", 39);

  // Do precasts after going into the portal
  XP_Precasts();

  // Clear the cow level
  try { WXP_ClearArea(); }
  catch (e if e instanceof DC_ExceptionClass) {

   if (e.name != "King Found")  { throw e; }
   else {
    DC_Print("Cow King Found!  Ending CowsXP module!");
    DC_LogToautod2jsp("Cow King Found!  Ending CowsXP module!");
   }
  }

  // Increase the kills counter then leave the game
  // For WXP,a kill is equal to a completed run so with a small note, it is fine as is.
  DL_AddKill();

  // Stop KingWatchXP if it is running
  if (!WXP_KillKing) {

   if (DC_StopScript("KingWatchXP.d2j")) {

    DC_Print("KingWatchXP stopped");
   }
  }
 }

 if (XP_RunMode > 0) {

  var _partyscript = DC_FindScript(WXP_PartyPath);
  if (_partyscript) {

   _partyscript.stop();
   DC_Print("PartyXP script Stopped!");
  }
 }

 // Quit the game
 XP_CloseScript();
}

// Error handling
function main() {

 // Include the base d2jsp lib
 include("common/d2jsp-common.d2l");
 DC_LoadInclude("XP/Libs/XP_Exceptions.d2l");

 // Check if this script is loaded by LoaderXP
 if (DC_FindScript("LoaderXP.d2j")) { _WXP_UseLoader = true; }

 // Set the maximum game delay before aborting if the script is running standalone
 if (!_WXP_UseLoader) { me.gamelength=300000; }

 // configure the debug and error log paths
 DC_DebugLogPath = "output/XP-DebugLogs/" + me.name + "-WXP-DebugLog.html";
 DC_ErrorLogPath = "output/XP-ErrorLogs/" + me.name + "-XP-ErrorLog.html";

 // Call the main function to check for exceptions
     try { CowsXP(); }

 // Then catch and log any exception throwed by the script before quitting
 catch (WXP_Exception) {

  XP_HandleException( WXP_Exception, "WXP", _WXP_UseLoader );
     }
}

방가워용~ 오랫만입니다!

질문/답변

댓글을 추천하시면 답변으로 채택됩니다.

댓글을 추천하면 글 작성자와 댓글 작성자 둘 다 경험치를 획득합니다.

자세한 내용은 업데이트 공지를 참고해주시기 바랍니다.

번호 분류 제목 글쓴이 날짜 조회
공지   게시판 푸시 알림 / 통합 앱 서비스 36 file 트디개발자 2023.09.20 965.8k
공지   댓글이 도움되었다면 댓글을 추천 해주세요. 28 트디개발자 2021.04.16 86.4k
공지   [주의사항] 원격제어를 받으시면 시디키가 유출됩니다. 131 [버스&인첸방] 2017.04.17 97.7k
공지   정확한 답변을 받으려면 본문에 캡쳐를 첨부해주세요. 45 우녕자 2014.12.16 98.6k
공지   맨땅 초보자 가이드 621 file 뮤리아 2020.10.16 1019.0k
공지   카카오톡 1:1 채팅방 만드는 법 108 트디개발자 2018.05.20 431.4k
856   16자리 씨디키 있는데 못바꾸나요..? 1 카나리오 2015.04.03 163
855   아시아 접속이 안됩니다. 2 삭막한세상 2015.04.03 202
854   봇 설정을 다 했는데 1액트만 사냥하고 계속 나가네요... 1 미스터기본기 2015.04.03 238
853   에러 해결좀 도와 주세요!!!!!!!!!!!!!!! 2 rkrk 2015.04.03 2.0k
852   맵핵어디에있나요? 체소소서 2015.04.03 109
851   봇 질문입니다 한방에서 3-4명의 봇이 사냥하는법을 몰라서 질문드립니다 ihju1111 2015.04.03 258
850   시디키 생성기로 배넷가능한가요? 풍끼니 2015.04.02 192
849   80~99렙까지 찍는데 디바런으로 몇일걸릴까요? 찌니 2015.04.02 166
848   게임시작전에 가입했습니다. 래더1 1 소서님입니다 2015.04.02 171
847   26짤 mpq 변환 적용이안되는데 이름이안바뀜 지옥폭열풍 2015.04.02 210
846   엔티봇 길잡이 어디서 다운받아요??? 1 이영호라고 2015.04.02 183
845   아 오브소서 간단하게 설명해주실분;; 뉴비수앵 2015.04.02 104
844   맵핵 어디있나요 ㅠㅠ 12 뉴비수앵 2015.04.02 162
843   여기가 디아블로 다운받을수있는곳인가요 디아ELDKELDK 2015.04.02 157
842   공유기 쓰신채 디아블로 하시는분 질문좀 드릴게요 호아야 2015.04.02 253
>   xp봇 cowXP 설정좀 도와주실분 계신가요.. qldlsll 2015.04.02 369
840   저두 그래요 . 둘이 2015.04.02 114
839   디아 런방에서요 보스몹만 씰열고 보스만 잡고 헤라 2015.04.02 178
838   보석 안주워오게 해주실분 ㅎㅎ 1 디아돌잉 2015.04.01 224
837   창고지기 이해장애 왔습니다 원초적 질문드립니다 2 악당 2015.04.01 188