XP 봇 상점에러 수정하기
분류
봇관련
조회 수
3,742
추천 수
8
% 싱글에서만 테스트 했습니다.
1. XP봇은 scripts\lib\common 폴더에서 d2jsp-town.d2l 파일을 엽니다.
얌봇은 YAMB\common 폴더에서 YAM-TownLib.d2l 파일을 엽니다.
2. 다음 함수를 찾습니다.
3. 아래 처럼 해당 위치에 추가시작 , 추가끝 부분을 넣어 줍니다.
4. 저장 합니다.
function DT_MenuCancel(npc,type) {
// Check the arguments
if (!npc) {
DC_DPrint("DT_MenuCancel() : No NPC object is entered");
return true;
}
else if (arguments.length<2) {
DC_DPrint("DT_MenuCancel() : No enough arguments is entered");
return true;
}
// If there is no flags set to true, all is cancelled already
var _uiflagstatus = _DT_CheckUI();
print("UIFLAGSTATUS = "+_uiflagstatus);
if(!_uiflagstatus) {
DC_DPrint("DT_MenuCancel() : Already cancelled!");
return false;
}
// Init the timer
var _timer = DC_Timeout * 1000;
// Loop while you are not interacted
do {
// For each 0.5 second, retry the cancel
if ((_timer % 500) === 0) {
if (_timer <= 6000) {
DC_DPrint("DT_MenuCancel() : Now retrying to cancel");
npc.cancel(type);
}
}
_timer -= 25;
delay(25);
_uiflagstatus = _DT_CheckUI();
// 추가시작 --------------------------------------------------------------------------------------------
if(_uiflagstatus) { print("UIFLAGSTATUS = "+_uiflagstatus); me.cancel(1); delay(500);}
_uiflagstatus = _DT_CheckUI();
if(_uiflagstatus) { print("UIFLAGSTATUS = "+_uiflagstatus); me.cancel(0); delay(500);}
// 추가끝 --------------------------------------------------------------------------------------------
}while(_uiflagstatus && _timer > 0);
// Check if the cancel is correctly done
if (!_uiflagstatus) {
DC_DPrint("DT_MenuCancel() : Menus cancel done!");
return false;
}
else {
DC_DPrint("DT_MenuCancel() : Unable to cancel the menus!");
return true;
}
}