핵 스크립트 매크로돌릴떄 .. 내용 ㅈ나김
- 아프티카
- 1211
- 5
function 메인()
{
var text="";
text += '<form name="main">'
text += '<style>'
text += '.button {border-style:none; border-color:#039DEA; background-color:#B5DFF5; font:10px tahoma; color:#130594;}'
text += '.text {color:#DC143C; background-color:#FFFFFF; border-style:none; text-align:center; overflow:xhidden;}'
text += '.menu {background-color:#66CCFF; border-color:#039DEA; border-width:1; border-style:double; width:50px; height:34px; position:absolute; left:-1px; z-index:1; cursor:hand;}'
text += '.top_button {cursor:hand; font-weight:bold; color=white; background-color:#66CCFF; border-color:#039DEA; border-style:none;}'
text += '.sub_menu {background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:475px; height:30px; position:absolute; z-index:1;}'
text += '</style>'
text += '<body text="#130594" style="overflow-x:hidden">'
//메뉴1
text += '<div id="menu_1" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>기원</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_1_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '기원<input type=text size=1 name=input_value onChange=숫자확인(this) maxlength=1 class=text> '
text += '최소체력<input type=text size=7 maxlength=7 name=input_value onChange=숫자확인(this) class=text> '
text += '최대체력<input type=text size=7 maxlength=7 name=input_value onChange=숫자확인(this) class=text> '
text += '마력<input type=text size=7 maxlength=7 name=input_value onChange=숫자확인(this) class=text>이상 '
text += '</td></tr></table>'
text += '</div>'
//메뉴2
text += '<div id="menu_2" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>공증</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_2_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '공증<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) class=text> '
text += '마력<input type=text size=7 maxlength=7 name=input_value onChange=숫자확인(this) class=text>이하 '
text += '세주<input type=text size=1 maxlength=1 name=input_value onChange=문자확인(this) class=text>∼'
text += '<input type=text size=1 maxlength=1 name=input_value onChange=문자확인(this) class=text> '
text += '</td></tr></table>'
text += '</div>'
//메뉴3
text += '<div id="menu_3" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>보무</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_3_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '보호<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) class=text> '
text += '무장<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) class=text> '
text += '체크딜레이<input type=text size=5 maxlength=5 name=input_value onChange=숫자확인(this) class=text> '
text += '</td></tr></table>'
text += '</div>'
//메뉴4
text += '<div id="menu_4" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>공격</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_4_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '방식<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) onClick=alert(alert_1) class=text> '
text += '공격키<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) class=text> '
text += '공격횟수<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) class=text> '
text += '저주<input type=text size=1 maxlength=1 name=input_value onChange=숫자확인(this) class=text> '
text += '마력<input type=text size=6 maxlength=6 name=input_value onChange=숫자확인(this) class=text>이상 '
text += '딜레이<input type=text size=4 maxlength=4 name=input_value onChange=숫자확인(this) class=text> '
text += '</td></tr></table>'
text += '</div>'
//메뉴5
text += '<div id="menu_5" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>이동</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_5_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '딜레이<input type="text" size="4" maxlength="4" name="input_value" onChange="숫자확인(this)" class="text"> '
text += '이동리스트<input type="file" size="28" name="move_list_file" class="text"> '
text += '</td></tr></table>'
text += '</div>'
//메뉴6
text += '<div id="menu_6" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>자경</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_6_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '<input type=text size=4 maxlength=4 name=input_value onChange=숫자확인(this) class=text>억이상 '
text += '자경리스트<input type="file" size="28" name="exp_list_file" class="text">'
text += '</td></tr></table>'
text += '</div>'
//메뉴7
text += '<div id="menu_7" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>인식</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_7_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '몹리스트<textarea rows="1" cols="54" name="input_value" onChange="리스트확인(this)" class="text"></textarea> '
text += '</td></tr></table>'
text += '</div>'
//메뉴8
text += '<div id="menu_8" onclick="메뉴클릭(this)" class="menu">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle"><b>그외</b><td></tr></table>'
text += '</div>'
text += '<div id="menu_8_sub" style="filter:alpha(opacity=0); display:none;" class="sub_menu">'
text += '<table width="100%" height="100%"><tr><td> '
text += '마법돌리기<input type="button" value="▼" name="sub_1_bt" onfocus="blur()" onClick="서브클릭(this)" class=button> '
text += '딜레이마법<input type="button" value="▼" name="sub_2_bt" onfocus="blur()" onClick="서브클릭(this)" class=button> '
text += '사자후<input type="button" value="▼" name="sub_3_bt" onfocus="blur()" onClick="서브클릭(this)" class=button> '
text += '각종옵션<input type="button" value="▼" name="sub_4_bt" onfocus="blur()" onClick="서브클릭(this)" class=button> '
text += '</td></tr></table>'
text += '</div>'
////////메뉴8서브메뉴1
text += '<div id="sub_1" style="display:none; background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:271px; height:50px; left:119px; top:293px; position:absolute; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td valign="top">'
text += '사용<input type="checkbox" name="check_value"><br>'
text += '키<input type="text" size="1" maxlength="1" name="input_value" onChange="숫자확인(this)" class="text"> '
text += '<input type="text" size="1" maxlength="1" name="input_value" onChange="숫자확인(this)" class="text"> '
text += '<input type="text" size="1" maxlength="1" name="input_value" onChange="숫자확인(this)" class="text"> '
text += '마력<input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text">이상 '
text += '딜레이<input type="text" size="3" maxlength="3" name="input_value" onChange="숫자확인(this)" class="text">초'
text += '</td></tr></table>'
text += '</div>'
////////메뉴8서브메뉴2
text += '<div id="sub_2" style="display:none; background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:151px; height:100px; left:196px; top:293px; position:absolute; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td valign="top">'
text += '사용<input type="checkbox" name="check_value"><br>'
text += '키 사용마력 딜레이(초<br>'
text += '<input type="text" size="1" maxlength="1" name="input_value" onChange="문자확인(this)" class="text"> <input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text"> <input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text"><br>'
text += '<input type="text" size="1" maxlength="1" name="input_value" onChange="문자확인(this)" class="text"> <input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text"> <input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text"><br>'
text += '<input type="text" size="1" maxlength="1" name="input_value" onChange="문자확인(this)" class="text"> <input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text"> <input type="text" size="7" maxlength="7" name="input_value" onChange="숫자확인(this)" class="text"><br>'
text += '</td></tr></table>'
text += '</div>'
////////메뉴8서브메뉴3
text += '<div id="sub_3" style="display:none; background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:170px; height:100px; left:249px; top:293px; position:absolute; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td valign="top">'
text += '사용<input type="checkbox" name="check_value"> 키<input type="text" size="1" maxlength="1" name="input_value" onChange="문자확인(this)" class="text"> 딜레이<input type="text" size="3" maxlength="3" name="input_value" onChange="숫자확인(this)" class="text">초<br>'
text += '<textarea rows="5" cols="20" name="input_value" onChange="리스트확인(this)" class="text"></textarea>'
text += '</td></tr></table>'
text += '</div>'
////////메뉴8서브메뉴4
text += '<div id="sub_4" style="display:none; background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:199px; height:100px; left:314px; top:293px; position:absolute; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td valign="top">'
text += '빽이동<input type="checkbox" name="check_value"> 줍기<input type="checkbox" name="check_value"><br>랜덤이동<input type="checkbox" name="check_value"> 딜레이<input type="text" size="3" maxlength="3" name="input_value" onChange="숫자확인(this)" class="text">초<br>'
text += '화면전환<input type="checkbox" name="check_value"> 딜레이<input type="text" size="3" maxlength="3" name="input_value" onChange="숫자확인(this)" class="text">초'
text += '</td></tr></table>'
text += '</div>'
////////상위메뉴
text += '<div style="background-color:#66CCFF; border-color:#039DEA; border-width:1; border-style:double; width:155px; height:30px; position:absolute; left:0px; top:-1px; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td align="left" valign="middle"> '
text += '<input type="button" name="top_button" value="시작" onfocus="blur()" onClick="시작()" class="top_button">'
text += '<input type="button" name="top_button" value="중지" onfocus="blur()" onClick="중지()" class="top_button">'
text += '<input type="button" name="top_button" value="저장" onfocus="blur()" onClick="저장()" class="top_button">'
text += '<input type="button" name="top_button" value="읽기" onfocus="blur()" onClick="읽기()" class="top_button">'
text += '</td></tr></table></div>'
//상위메뉴2
text += '<div style="background-color:#66CCFF; border-color:#039DEA; border-width:1; border-style:double; width:200px; height:30px; position:absolute; left:156px; top:-1px; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td align="left" valign="middle">'
text += '<input type="button" value="바람숨기기" onfocus="blur()" onClick="udm.SetVisibility(0)" class="top_button">'
text += '<input type="button" value="바람보이기" onfocus="blur()" onClick="udm.SetVisibility(1)" class="top_button">'
text += '</td></tr></table></div>'
//상위메뉴3
text += '<div style="background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:150px; height:30px; position:absolute; left:363px; top:-1px; z-index:1;">'
text += '<table width="100%" height="100%"><td align="center" valign="middle"><input type="text" size="9" name="get_exp" class="text" style="background-color:#B5DFF5;"> <input type="text" size="5" name="boot_time" class="text" style="background-color:#B5DFF5;">'
text += '<input type="button" value="▼" name="topsub_1_bt" onfocus="blur()" onClick="서브클릭(this)" class=button>'
text += '</td></tr></table>'
text += '</div>'
//캐릭정보
text += '<div id="topsub_1" style="display:none; background-color:#B5DFF5; border-color:#039DEA; border-width:1; border-style:double; width:150px; height:30px; position:absolute; left:363px; top:30px; z-index:1;">'
text += '<table width="100%" height="100%"><tr><td align="center" valign="middle">'
text += '<input type="text" readOnly size="19" name="get_map" class="text" style="background-color:#B5DFF5; text-align:left;"><br>'
text += '<input type="text" readOnly size="19" name="get_xy" class="text" style="background-color:#B5DFF5; text-align:left;"><br>'
text += '<input type="text" readOnly size="19" name="get_hp" class="text" style="background-color:#B5DFF5; text-align:left;"><br>'
text += '<input type="text" readOnly size="19" name="get_mp" class="text" style="background-color:#B5DFF5; text-align:left;">'
text += '</td></tr></table>'
text += '</div>'
///메뉴못누르게.
text += '<div id="menu_cover" style="display:none; filter:alpha(opacity=0); background-color:#FFFFFF; width:49px; height:286px; position:absolute; left:0px; top:30px; z-index:2;"></div>'
text += '</body>'
text += '</form>'
document.write(text);
레이어정리();
main.input_value[19].value = ";로 구분 엔터X(타게팅마법만 적용)";
}
var macro_start=0;
var count_interval=new Array();
var count_interval2=0;
function 시작()
{
if( macro_start==0 )
{
main.top_button[0].style.color = "#CC3333";
menu_cover.style.display = "block";
//각종변수 초기화.
macro_start = 1;
count_interval2 = 0;
check_use_turn = 0;
magic_delay_time = 0;
boot_time = 0;
//이동
safe_zone = 0;
move_count = 0;
move_back = 0;
move_exp = 0;
save_move_list = 0;
move_portal = 0;
list_delay = 0;
if( temp_move_delay ) main.input_value[17].value = parseInt(temp_move_delay);
//////////////////
if(menu_1_sub.style.display == "block") count_interval[count_interval2++] = setInterval("기원사용()", 100);
if(menu_2_sub.style.display == "block") count_interval[count_interval2++] = setInterval("공증사용()", 500);
if(menu_3_sub.style.display == "block") count_interval[count_interval2++] = setInterval("보무사용()", parseInt(main.input_value[10].value));
if(menu_4_sub.style.display == "block")
{
if(main.input_value[11].value==1) count_interval[count_interval2++] = setInterval("첨사용()", parseInt(main.input_value[16].value));
else if(main.input_value[11].value==2) count_interval[count_interval2++] = setInterval("타게팅사용()", parseInt(main.input_value[16].value));
}
if(menu_5_sub.style.display == "block")
{
move_time = udm.GetTickCount();
move_portal_map = udm.GetMapName;
setTimeout("이동리스트()", 1);
count_interval[count_interval2++] = setInterval("이동체크()", 100);
}
if(menu_7_sub.style.display == "block")
{
mob_list = main.input_value[19].value.split(";");
}
//부가기능들
if( main.check_value[0].checked == true && main.input_value[20].value ) count_interval[count_interval2++] = setInterval("돌리기사용()", parseInt(main.input_value[24].value)*1000);
if( main.check_value[1].checked == true && main.input_value[25].value )
{
magic_delay_count = 0;
for(var i=25; i<=31; i+=3)
{
if( main.input_value[i].value ) magic_delay_count++;
}
count_interval[count_interval2++] = setInterval("딜레이사용()", 1000);
}
if( main.check_value[2].checked == true ) count_interval[count_interval2++] = setInterval("사자후사용()", parseInt(main.input_value[35].value)*1000);
if( main.check_value[6].checked == true ) count_interval[count_interval2++] = setInterval("화면전환사용()", parseInt(main.input_value[38].value)*1000);
for(var i=0; i<main.check_value.length; i++) main.check_value[i].disabled = true;
count_interval[count_interval2++] = setInterval("경험치체크()", 60000);
count_interval[count_interval2++] = setInterval("캐릭터체크()", 3000);
}
}
function 중지()
{
if( macro_start == 1)
{
main.top_button[0].style.color = "#FFFFFF";
menu_cover.style.display = "none";
macro_start = 0;
for(var i=0; i<=count_interval.length; i++) clearInterval(count_interval[i]);
for(var i=0; i<main.check_value.length; i++) main.check_value[i].disabled = false;
}
}
//////////////////////////////////////////////함수시작
var safe_zone=0; //마법쓸수있는지
var seju_count=0; //세주사용카운트
var check_use_turn=0; //마법돌리고있는지.
var target_count=0; //타게팅마법 카운트
var heal_max=0; //기원용
function 기원사용()
{
if( safe_zone == 0 && udm.GetMP() > parseInt(main.input_value[3].value) )
{
if( udm.GetHP() < parseInt(main.input_value[1].value) || heal_max==1 )
{
if( udm.GetHP() < parseInt(main.input_value[2].value) )
{
heal_max=1;
var temp=main.input_value[0].value;
temp=temp.charCodeAt(0);
udm.KeyPress(27);
udm.KeyPress(9);
udm.KeyPress(36);
udm.KeyPress(9);
udm.KeyPress(temp);
udm.KeyPress(27);
}
else heal_max=0;
}
}
}
function 공증사용()
{
//세주사용체크.
if( udm.GetMP() < 30 && main.input_value[6].value && main.input_value[7].value)
{
var seju_n_key = main.input_value[6].value;
var seju_max = main.input_value[7].value;
udm.KeyPress(85);
udm.KeyPress(seju_n_key.charCodeAt(0)-32+seju_count);
seju_count++;
if(seju_n_key.charCodeAt(0)-32+seju_count > seju_max.charCodeAt(0)-32) seju_count=0;
}
if(udm.GetMP() < parseInt(main.input_value[5].value) && safe_zone == 0)
{
var temp=main.input_value[4].value;
temp=temp.charCodeAt(0);
udm.KeyPress(temp);
}
}
function 보무사용()
{
if( udm.GetMP() > 90 && safe_zone == 0 && check_use_turn == 0 )
{
var a=0;
var b=0;
for(var i=0; i<10; i++)
{
if( udm.GetMP() < 90 ) break;
var str = udm.GetMagicStatus();
var idx = str.indexOf("────");
var magic;
if(idx < 0)
magic = str;
else
magic = str.substr(0, idx);
if( magic.indexOf("보호") != -1 ) a++;
if( magic.indexOf("무장") != -1 ) b++;
if( a>=1 && b>=1 ) break;
if( a==0 )
{
var temp=main.input_value[8].value;
temp=temp.charCodeAt(0);
udm.Keypress(27);
udm.KeyPress(temp);
udm.KeyPress(36);
udm.KeyPress(13);
udm.Sleep(350);
}
if( b==0 )
{
var temp=main.input_value[9].value;
temp=temp.charCodeAt(0);
udm.Keypress(27);
udm.KeyPress(temp);
udm.KeyPress(36);
udm.KeyPress(13);
udm.Sleep(350);
}
}
}
}
function 첨사용()
{
if( check_use_turn == 0 && heal_max == 0 && safe_zone == 0 )
{
if(udm.GetMP() > parseInt(main.input_value[15].value) )
{
var temp=main.input_value[12].value;
temp=temp.charCodeAt(0);
udm.KeyPress(temp);
}
}
}
function 타게팅사용()
{
if(udm.GetMP() > parseInt(main.input_value[15].value) && check_use_turn==0 && heal_max == 0 && safe_zone == 0 )
{
//타겟을 위로 할지 아래로 할지. 0아니면 2가 나온다.
var num = Math.floor(Math.random()*1*2);
for(var i=0; i<5; i++)
{
if( main.input_value[14].value && target_count==0 )
{
var temp=main.input_value[14].value;
temp=temp.charCodeAt(0);
udm.Keypress(27);
udm.Keypress(temp);
}
else
{
var temp=main.input_value[12].value;
temp=temp.charCodeAt(0);
udm.Keypress(27);
udm.Keypress(temp);
}
if( target_count == 0 ) udm.Keypress(38+num);
var mob_yn=1;
var tab=udm.GetFocusInfo().split('|'); //타겟확인.
if( menu_7_sub.style.display == "block" && tab[3] ) var mob_yn=몹인식(tab[3]);
if(tab[3] != udm.GetCharacterName && mob_yn == 1 && (tab[1]>=udm.GetXLoc()-8 && tab[1]<=udm.GetXLoc()+8) && (tab[2]>=udm.GetYLoc()-7 && tab[2]<=udm.GetYLoc()+7))
{
udm.Keypress(13);
target_count++;
if( main.input_value[14].value == 1 && target_count >= parseInt(main.input_value[13].value)+1) target_count=0;
else if( !main.input_value[14].value && target_count >= parseInt(main.input_value[13].value) ) target_count=0;
break;
}
else
{
udm.Keypress(27);
target_count=0;
}
}
}
}
function 돌리기사용()
{
if( safe_zone == 0 && udm.GetMP() > parseInt(main.input_value[23].value) )
{
check_use_turn = 1;
for(;;)
{
if( udm.GetMP() < parseInt(main.input_value[23].value) || safe_zone == 1 || macro_start == 0) break;
for(var i=20; i<23; i++)
{
if(main.input_value[i].value)
{
var mob_yn=1;
var temp=main.input_value[i].value;
temp=temp.charCodeAt(0);
udm.KeyPress(27);
udm.KeyPress(temp);
udm.Keypress(38);
var tab=udm.GetFocusInfo().split('|');
if( tab[3] == udm.GetCharacterName() ) break;
if( menu_7_sub.style.display == "block" && tab[3] ) var mob_yn=몹인식(tab[3]);
if( mob_yn == 1 )
{
udm.KeyPress(13);
udm.Sleep(250);
}
}
}
if( tab[3] == udm.GetCharacterName() ) break;
}
udm.KeyPress(27);
check_use_turn = 0;
}
}
var magic_delay_count=0;
var magic_delay_time=0;
function 딜레이사용()
{
if( safe_zone == 0 )
{
magic_delay_time++;
for(i=25; i<(magic_delay_count*3)+25; i+=3)
{
if( magic_delay_time%parseInt(main.input_value[i+2].value) == 0 && udm.GetMP() >= parseInt(main.input_value[i+1].value) )
{
var temp=main.input_value[i].value;
//마법시전부분.
udm.KeyPress(27);
udm.KeyDown(16);
udm.KeyPress(90);
udm.KeyUp(16);
udm.KeyPress( temp.charCodeAt(0)-32 );
}
}
}
}
//이동용함수
var move_list;
var move_list_xy;
var move_count=0;
var move_portal=0;
var move_portal_map;
var move_rand_time;
var move_rand_x;
var move_rand_y;
var move_back=0;
var move_time;
var safe_zone=0;
var list_delay=0;
var move_exp=0;
var temp_move_delay;
function 이동리스트()
{
move_list = udm.GetContentsFile(main.move_list_file.value);
move_list = move_list.split("\n");
}
function 이동리스트_빽()
{
var temp_move_list = new Array();
//일단 임시로 리스트를 넣고.
for(var i=0; i<move_list.length; i++) temp_move_list[i] = move_list[i];
//반대로 빼주면서 리스트를 넣는다.
var j=move_list.length;
for(var i=0; i<move_list.length; i++) move_list[i] = temp_move_list[--j];
move_portal_map = udm.GetMapName;
move_time = udm.GetTickCount();
}
function 이동체크()
{
if( move_portal == 1 && move_portal_map != udm.GetMapName )
{
for(;;)
{
move_list_xy = move_list[move_count].split(",");
move_count++;
if( move_list_xy[0].charAt(0) == "p" || move_list_xy[0].charAt(0) == "P" ) break;
}
move_portal = 2;
move_portal_map = udm.GetMapName;
}
else if( move_portal == 2 && move_portal_map != udm.GetMapName )
{
for(;;)
{
move_list_xy = move_list[move_count].split(",");
if( move_list_xy[0].charAt(0) == "p" || move_list_xy[0].charAt(0) == "P" ) break;
move_count--; //바로포탈.
}
move_portal = 1;
move_portal_map = udm.GetMapName;
}
//나누기전 확인.
if( move_count >= move_list.length )
{
if( move_exp == 1 )
{
이동리스트(); //끝나고 다시 이동리스트 읽힌다.
move_exp = 0;
}
else if( main.check_value[3].checked == true && move_back == 0 )
{
이동리스트_빽();
move_back = 1;
}
else if( move_back == 1)
{
이동리스트();
move_back = 0; //한바퀴 빽 했으니 돌아온다.
}
move_count=0;
}
move_list_xy = move_list[move_count].split(",");
/*
N1마법불가능N0마법사용
F엔피시찾기
D딜레이
S말하기
P포탈
K0그냥키누르기 K1컨트롤누른상태로키 K2쉬프트누른상태로
B비영사천문 Bt1 t에 등록된 비영사천문으로 서쪽
C포탈해제
M이동속도조절
*/
//여유롭게 딜레이 100타고 하기 위해 else if 로.
if( move_list_xy[0].charAt(0) == "b" || move_list_xy[0].charAt(0) == "B") //~비영사천문
{
if( udm.GetTickCount()-move_time >= parseInt(main.input_value[17].value) )
{
var temp=udm.GetMapName;
udm.KeyPress(27);
udm.KeyDown(16);
udm.KeyPress(90);
udm.KeyUp(16);
udm.KeyPress( move_list_xy[0].charCodeAt(1)-32 );
udm.SetClipboardText( move_list_xy[0].charAt(2) ); //동서남북들어가면된다. (1,2,3,4)
udm.KeyDown(17);
udm.KeyPress(86);
udm.KeyUp(17);
udm.KeyPress(13);
move_portal = 0;
move_portal_map = udm.GetMapName;
move_time = udm.GetTickCount(); //비영쓰고 다시 시간체크.
udm.Sleep(400);
if( temp == udm.GetMapName ) move_count++;
}
}
else if( move_list_xy[0].charAt(0) == "c" || move_list_xy[0].charAt(0) == "C" ) //포탈해제
{
move_portal = 0;
move_time = udm.GetTickCount();
move_count++;
}
else if( move_list_xy[0].charAt(0) == "d" || move_list_xy[0].charAt(0) == "D" )
{
if( parseInt(list_delay) == 0 )
{
list_delay = move_list_xy[0].substring(1, move_list_xy[0].length);
move_time = udm.GetTickCount();
}
else if( udm.GetTickCount()-move_time >= parseInt(list_delay) )
{
move_count++; //딜레이치고 바로 수행할 수 있게끔 시간 저장않함
list_delay = 0;
}
}
else if( move_list_xy[0].charAt(0) == "f" || move_list_xy[0].charAt(0) == "F" )
{
if( udm.GetTickCount()-move_time >= parseInt(main.input_value[17].value) )
{
if(move_list[move_count+1]) var temp = move_list_xy[0].substring(1, move_list_xy[0].length-1);
else var temp = move_list_xy[0].substring(1, move_list_xy[0].length);
udm.KeyPress(27);
udm.KeyPress(9);
for(var i=0; i<=5; i++)
{
udm.KeyPress(38);
var tab=udm.GetFocusInfo().split('|');
if( tab[3] == temp )
{
udm.KeyPress(13);
move_count++;
break;
}
}
move_time = udm.GetTickCount();
}
}
else if( move_list_xy[0].charAt(0) == "k" || move_list_xy[0].charAt(0) == "K" )
{
if( udm.GetTickCount()-move_time >= parseInt(main.input_value[17].value) )
{
var temp = move_list_xy[0].substring(2, move_list_xy[0].length); //번호만
if( move_list_xy[0].charAt(1) == "0" || move_list_xy[0].charAt(1) == "0" )
{
udm.KeyPress( parseInt(temp) );
}
else if( move_list_xy[0].charAt(1) == "1" || move_list_xy[0].charAt(1) == "1" ) //컨트롤
{
udm.KeyDown(17);
udm.KeyPress( parseInt(temp) );
udm.KeyUp(17);
}
else if( move_list_xy[0].charAt(1) == "2" || move_list_xy[0].charAt(1) == "2" ) //쉬프트
{
udm.KeyDown(16);
udm.KeyPress( parseInt(temp) );
udm.KeyUp(16);
}
move_time = udm.GetTickCount();
move_count++;
}
}
else if( move_list_xy[0].charAt(0) == "m" || move_list_xy[0].charAt(0) == "M" ) //이동속도조절
{
var temp = move_list_xy[0].substring(1, move_list_xy[0].length);
temp_move_delay = parseInt(main.input_value[17].value);
main.input_value[17].value = parseInt(temp); //이동속도 집어넣는다.
move_time = udm.GetTickCount();
move_count++;
}
else if( move_list_xy[0].charAt(0) == "n" || move_list_xy[0].charAt(0) == "N" )
{
if( udm.GetTickCount()-move_time >= parseInt(main.input_value[17].value) )
{
safe_zone = parseInt( move_list_xy[0].charAt(1) );
move_time = udm.GetTickCount();
move_count++;
}
}
else if( move_list_xy[0].charAt(0) == "p" || move_list_xy[0].charAt(0) == "P" )
{
if( udm.GetTickCount()-move_time >= parseInt(main.input_value[17].value) )
{
if( move_back == 0 ) //[0]에서 P만 잘라낸다. X좌표것만.
{
move_list_xy[0] = move_list_xy[0].substring(1, move_list_xy[0].length);
}
else if( move_back == 1 )
{
move_list_xy[0] = move_list_xy[2]; //이상한거 할필요없이 대입만
move_list_xy[1] = move_list_xy[3];
}
move_portal_map = udm.GetMapName;
move_portal=1; //시간해줄필요 없다 바로 이동하는거니까.
}
}
else if( move_list_xy[0].charAt(0) == "s" || move_list_xy[0].charAt(0) == "S" )
{
if( udm.GetTickCount()-move_time >= parseInt(main.input_value[17].value) )
{
var temp = move_list_xy[0].substring(1, move_list_xy[0].length);
var temp2 = udm.GetClipboardText();
udm.SetClipboardText(temp);
udm.KeyPress(222);
udm.KeyDown(17);
udm.KeyPress(86);
udm.KeyUp(17);
udm.KeyPress(13);
udm.SetClipboardText(temp2);
move_time = udm.GetTickCount();
move_count++;
}
}
//이상한움직임방지 & 100초마다 이동체크가 되니까 시간을 체크해서 이동되도록.
if( parseInt(move_list_xy[0])>=0 && parseInt(move_list_xy[0]) <=300 && parseInt(move_list_xy[1])>=0 && parseInt(move_list_xy[1]) <=300 )
{
if( udm.GetHP() > 0 && move_count >= 0 && move_count < move_list.length && (udm.GetTickCount()-move_time) >= parseInt(main.input_value[17].value) )
{
이동( parseInt(move_list_xy[0]), parseInt(move_list_xy[1]) );
move_time = udm.GetTickCount();
}
}
}
function 이동(temp_x, temp_y)
{
if( safe_zone == 0 && main.check_value[4].checked == true)
{
udm.KeyDown(16);
udm.KeyPress(188);
udm.KeyUp(16);
}
var move_rank = Math.floor(Math.random() * 10);
//두번이면 된다.. X아니면 Y니까.
for(var i=0; i<2; i++)
{
if( move_rank%2 == 0 )
{
if( udm.GetXLoc() < temp_x )
{
udm.KeyPress(39);
udm.KeyPress(39);
break;
}
else if( udm.GetXLoc() > temp_x )
{
udm.KeyPress(37);
udm.KeyPress(37);
break;
}
else if( udm.GetXLoc() == temp_x )
{
move_rank = 1;
}
}
else if( move_rank%2 == 1 )
{
if( udm.GetYLoc() < temp_y )
{
udm.KeyPress(40);
udm.KeyPress(40);
break;
}
else if( udm.GetYLoc() > temp_y )
{
udm.KeyPress(38);
udm.KeyPress(38);
break;
}
else if( udm.GetYLoc() == temp_y )
{
move_rank = 0;
}
}
}
if( udm.GetXLoc() == temp_x && udm.GetYLoc() == temp_y )
{
if( move_portal != 1 ) move_count++;
else if( move_portal == 1 && move_portal_map == udm.GetMapName )
{
setTimeout("랜덤이동()", 1);
}
}
//랜덤이동켜져있을때.
if( main.check_value[5].checked == true)
{
if( parseInt(move_rand_x) == udm.GetXLoc() && parseInt(move_rand_y) == udm.GetYLoc() )
{
if( (udm.GetTickCount()-move_rand_time) >= parseInt(main.input_value[37].value)*1000 )
{
랜덤이동();
move_rand_time = udm.GetTickCount();
}
}
else //시간밑 좌표 저장.
{
move_rand_x = udm.GetXLoc();
move_rand_y = udm.GetYLoc();
move_rand_time = udm.GetTickCount();
}
}
}
function 랜덤이동()
{
var move_rank = Math.floor(Math.random() * 10);
var temp_key = Math.floor(Math.random() * 4)+37;
if( udm.GetXLoc() == move_list_xy[0] && move_rank%2 == 0 )
{
for(;;)
{
var temp_key = Math.floor(Math.random() * 4)+37;
if(temp_key == 37 || temp_key == 39) break;
}
}
else if( udm.GetYLoc() == move_list_xy[1] && move_rank%2 == 1 )
{
for(;;)
{
var temp_key = Math.floor(Math.random() * 4)+37;
if(temp_key == 38 || temp_key == 40) break;
}
}
//그외의경우는 아무렇게나.
udm.Keypress(temp_key);
udm.Keypress(temp_key);
}
function 자경리스트()
{
move_list = udm.GetContentsFile(main.exp_list_file.value);
move_list = move_list.split("\n");
move_portal_map = udm.GetMapName;
move_time = udm.GetTickCount();
}
///////////////////////////////
var mob_list;
function 몹인식(name)
{
var mob_in=0;
for(var i=0; i<mob_list.length; i++)
{
if( name && name.indexOf(mob_list[i]) != -1 )
{
mob_in=1;
break;
}
}
return mob_in;
}
function 사자후사용()
{
if( udm.GetMP() > 5000 && safe_zone == 0 )
{
var temp = main.input_value[34].value;
udm.KeyPress(27);
udm.KeyDown(16);
udm.KeyPress(90);
udm.KeyUp(16);
udm.KeyPress( temp.charCodeAt(0)-32 );
udm.SetClipboardText(main.input_value[36].value);
udm.KeyDown(17);
udm.KeyPress(86);
udm.KeyUp(17);
udm.KeyPress(13);
}
}
function 화면전환사용()
{
if( move_exp == 0 )
{
udm.KeyDown(17);
udm.KeyPress(82);
udm.KeyUp(17);
}
}
var exp_save_count=0;
var start_exp=0;
var boot_time=0;
function 경험치체크()
{
if( move_exp == 0 )
{
if( boot_time == 0 )
{
if( udm.GetExperience() >= 0 && udm.GetExperience() <= 2147483647)
{
start_exp = udm.GetExperience();
}
else if( udm.GetExperience() < 0)
{
start_exp = udm.GetExperience()*-1;
start_exp = 2147483647 - start_exp;
start_exp = 2147483647 + start_exp + 2;
}
}
boot_time++;
var temp_check_exp=0;
if( udm.GetExperience() >= 0 && udm.GetExperience() <= 2147483647)
{
temp_check_exp = udm.GetExperience();
}
else if( udm.GetExperience() < 0)
{
//현재경험치를 다시 구한다.
temp_check_exp = udm.GetExperience()*-1;
temp_check_exp = 2147483647 - temp_check_exp;
temp_check_exp = 2147483647 + temp_check_exp + 2; //실제경험치.
}
//시작할때 경험치 빼주면 얻은경험치. 시작경험치는 매크로시작할때 초기화.
main.get_exp.value = Math.round((temp_check_exp-start_exp)/10000000)/10+"억";
main.boot_time.value = boot_time+"분";
if( temp_check_exp-start_exp < 0 )
{
boot_time = 0;
main.get_exp.value = "0억";
main.boot_time.value = "0분";
}
if( menu_6_sub.style.display == "block" && move_exp == 0 && Math.round(main.input_value[18].value) < Math.round(temp_check_exp/10000000)/10 )
{
var temp = udm.GetMapName();
temp = temp.substring(temp.length-2, temp.length);
if( temp != "입구" )
{
자경리스트();
move_exp = 1;
move_count = 0;
move_back = 0;
move_portal = 0;
list_delay = 0;
move_time = udm.GetTickCount();
}
}
}
}
//////////////////////////////////////////////////////////////////////////////////////////////
var alert_1 = "1:첨\n2:타게팅\n첨사용-> 공격횟수,저주 적용X";
slide_ok = 0;
function 메뉴클릭(name)
{
if(name.id == "menu_1") var layer_name = document.getElementById('menu_1_sub');
else if(name.id == "menu_2") var layer_name = document.getElementById('menu_2_sub');
else if(name.id == "menu_3") var layer_name = document.getElementById('menu_3_sub');
else if(name.id == "menu_4") var layer_name = document.getElementById('menu_4_sub');
else if(name.id == "menu_5") var layer_name = document.getElementById('menu_5_sub');
else if(name.id == "menu_6") var layer_name = document.getElementById('menu_6_sub');
else if(name.id == "menu_7") var layer_name = document.getElementById('menu_7_sub');
else if(name.id == "menu_8") var layer_name = document.getElementById('menu_8_sub');
if(layer_name.style.display=="block" && layer_name.style.filter=="alpha(opacity=100)" && slide_ok==0)
{
slide_ok = 1;
if(name.id == "menu_8")
{
sub_1.style.display = "none";
sub_2.style.display = "none";
sub_3.style.display = "none";
sub_4.style.display = "none";
}
for(var j=100; j>=0; j-=10)
{
udm.Sleep(10);
layer_name.style.filter = "alpha(opacity="+j+")";
}
layer_name.style.display = "none";
}
else if(layer_name.style.display=="none" && layer_name.style.filter=="alpha(opacity=0)" && slide_ok==0)
{
slide_ok = 1;
layer_name.style.display = "block";
layer_name.style.left = 38;
for(var j=0; j<=100; j+=10)
{
udm.Sleep(10);
layer_name.style.filter = "alpha(opacity="+j+")";
}
}
slide_ok = 0;
}
var ft=30;
function 레이어정리()
{
var a=1;
menu_1.style.top = ft;
menu_1_sub.style.top = parseInt(menu_1.style.top)+2;
for(var i=2; i<=8; i++)
{
var layer_name1 = document.getElementById("menu_"+(i-1));
var layer_name2 = document.getElementById("menu_"+i);
var layer_name3 = document.getElementById("menu_"+i+"_sub");
layer_name2.style.top = parseInt(layer_name1.style.top)+35;
layer_name3.style.top = parseInt(layer_name2.style.top)+2;
}
}
function 숫자확인(name)
{
var temp = name.value;
for(var i=0; i<temp.length; i++)
{
if(temp.charAt(i)<"0" || temp.charAt(i)>"9")
{
name.value="";
alert("숫자만 쓰세요.");
break;
}
}
}
function 문자확인(name)
{
var temp = name.value;
for(var i=0; i<temp.length; i++)
{
if(temp.charAt(0) < "a" || temp.charAt(0) > "z")
{
name.value="";
alert("소문자 알파벳만 쓰세요.");
break;
}
}
}
function 리스트확인(name)
{
var temp = name.value;
for(var i=0; i<temp.length; i++)
{
if(temp.charAt(i) == ",")
{
name.value="";
alert(",는 사용불가능 합니다.");
break;
}
}
}
function 서브클릭(button)
{
if( button.name == "sub_1_bt" ) var temp=document.getElementById('sub_1');
else if( button.name == "sub_2_bt" ) var temp=document.getElementById('sub_2');
else if( button.name == "sub_3_bt" ) var temp=document.getElementById('sub_3');
else if( button.name == "sub_4_bt" ) var temp=document.getElementById('sub_4');
else if( button.name == "topsub_1_bt" ) var temp=document.getElementById('topsub_1');
if( temp.style.display == "block" ) temp.style.display = "none";
else temp.style.display = "block";
}
function 저장()
{
if( macro_start==0 ) {
var save_data="";
for(var i=0; i<main.input_value.length; i++)
{
save_data += main.input_value[i].value+",";
}
for(var i=main.input_value.length; i<70; i++)
{
save_data += "E"+i+","; //빈공간확보 다음에 변수 더쓰기 위해.
}
for(var i=0; i<main.check_value.length; i++)
{
save_data += main.check_value[i].checked+",";
}
for(var i=main.check_value.length; i<30; i++)
{
save_data += "C"+i+","; //체크상태도 확보 30개.
}
udm.MakeDirectory("save");
var win = prompt("파일명을 입력하세요.[.txt는 제외]", "");
//미리 읽어봐서 데이터가 없다면.
if( win != null )
{
var temp_read=udm.GetContentsFile("save/"+win+".txt")
if( temp_read )
{
var yn = confirm("이미 동일한 파일명이 있습니다!\n덮어씌울까요?");
if( yn == true ) udm.WriteContentsFile("save/"+win+".txt", save_data);
}
else
{
udm.WriteContentsFile("save/"+win+".txt", save_data);
}
}
}
}
function 읽기()
{
if( macro_start==0 )
{
var win = prompt("파일명을 입력하세요.[.txt는 제외]", "");
if( win != null )
{
var read_data=udm.GetContentsFile("save/"+win+".txt")
if( !read_data )
{
alert( win+".txt 파일이 없습니다!" );
}
else
{
read_data = read_data.split(",");
for(var i=0; i<main.input_value.length; i++)
{
main.input_value[i].value = read_data[i];
}
for(var i=0; i<main.check_value.length; i++) //70부터가 체크벨류
{
if(read_data[i+70] == "false") var temp=0;
else var temp=1;
main.check_value[i].checked = temp;
}
}
}
}
}
function 캐릭터체크()
{
if( udm.GetHP() <= 0 ) setTimeout("중지()", 1);
if( topsub_1.style.display == "block" )
{
main.get_map.value = udm.GetMapName();
main.get_xy.value = "X:"+udm.GetXLoc()+" Y:"+udm.GetYLoc();
main.get_hp.value = "체력:"+udm.GetHP();
main.get_mp.value = "마력:"+udm.GetMP();
}
}
//////////////////////////////////////////////////////////////////////////////////////////////
if(udm.Initialize()) 메인();
jscript나
자바쪽인가요??
근데 어떻게 쓰는거죠 ㅋㅋ