이 블로그 검색

태그

2021년 9월 24일 금요일

d2bs 열쇠구입픽스

상자 까기 설정 true해놨을경우

인벤설정과 상관없이 키를 2셋트 들고다니는일이 발생하는데

깃허브 뒤적거리던중  발견

town.js 에 해당부분 아래껄로 교체하면 2개중에 하나 버림

제대로된건진 모르겠으나 제대로 작동하니까 알아서 판단



buyKeys: function () {


var n = me.findItems(543, 0, 3);    //TSENG: more then 1 set keys

    if (n && n.length > 1) n[0].drop(); //TSENG: drop one


if (!this.wantKeys()) {

return true;

}


// Fuck Hratli

if (me.act === 3) {

this.goToTown(Pather.accessToAct(4) ? 4 : 2);

}


var key,

npc = this.initNPC("Key", "buyKeys");


if (!npc) {

return false;

}


key = npc.getItem("key");


if (!key) {

return false;

}


try {

key.buy(true);

} catch (e) {

print(e.message);


return false;

}


    n = me.findItems(543, 0, 3);  //TSENG: more then 1 set keys

    if (n && n.length > 1) n[0].drop(); //TSENG: drop one


return true;

},

댓글 없음:

댓글 쓰기