// In MacroMain.gfx ActionScript...
function [COLOR=#ff0000]SetFaceBookVisible(bVisible)
[/COLOR] {
this.mcFaceBookMark._visible = bVisible;
this.taFacebookInfo._visible = bVisible;
this.btnConnect._visible = bVisible;
}
//And below is its full script
class MacroMain extends Common.Base.MUComponent{ var m_iBtnDelay = 2000; var m_iTapType = 0; var m_iCharType = 0; var m_iItemListMax = 12; var m_iHuntAreaMax = 8; var m_iHuntAreaValue = 0; var m_iGetAreaMax = 8; var m_iGetAreaValue = 0; var m_bLimits = false; var m_iTempHuntAreaMax = 0; function MacroMain() { super(); } function onLoadUI() { var _loc5_ = 0; var _loc4_ = 0; this.mcMacroMain = this.m_mcMovie.mcMacroMain; this.tfTitle = this.mcMacroMain.tfTitle; this.btnDrag = this.mcMacroMain.btnDrag; this.btnClose = this.mcMacroMain.btnClose; this.btnTapHunt = this.mcMacroMain.btnTapHunt; this.btnTapGet = this.mcMacroMain.btnTapGet; this.btnTapEtc = this.mcMacroMain.btnTapEtc; this.btnInit = this.mcMacroMain.btnInit; this.btnSave = this.mcMacroMain.btnSave; this.mcSkillSlot = this.m_mcMovie.mcSkillSlot; this.aSkillSlot = new Array(Common.Global.MUDefines.MACRO_MAIN_SELECT_SKILL_SLOT); var _loc3_ = 0; while(_loc3_ < Common.Global.MUDefines.MACRO_MAIN_SELECT_SKILL_SLOT) { this.aSkillSlot[_loc3_] = this.mcSkillSlot["mcSkill_" + String(_loc3_)].isSlot; this.aSkillSlot[_loc3_].SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SELECT,_loc3_); _loc5_ = this.mcSkillSlot._x + this.mcSkillSlot["mcSkill_" + String(_loc3_)]._x + this.aSkillSlot[_loc3_]._x; _loc4_ = this.mcSkillSlot._y + this.mcSkillSlot["mcSkill_" + String(_loc3_)]._y + this.aSkillSlot[_loc3_]._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SELECT,_loc3_,_loc5_,_loc4_,this.aSkillSlot[_loc3_]._width,this.aSkillSlot[_loc3_]._height); this.mcSkillSlot["mcSkill_" + String(_loc3_)]._visible = false; _loc3_ = _loc3_ + 1; } this.mcSkillSlot._visible = false; this.mcTapHunt = this.mcMacroMain.mcTapHunt; this.tfHuntArea = this.mcTapHunt.tfHuntArea; this.abtnHuntArea = new Array(Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX); _loc3_ = 0; while(_loc3_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.abtnHuntArea[_loc3_] = this.mcTapHunt.mcHuntArea["btnArea" + String(_loc3_ + 1)]; _loc3_ = _loc3_ + 1; } this.amcHuntArea = new Array(Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX); _loc3_ = 0; while(_loc3_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.amcHuntArea[_loc3_] = this.mcTapHunt.mcHuntArea["mcArea" + String(_loc3_ + 1)]; _loc3_ = _loc3_ + 1; } this.cbNormalAttack = this.mcTapHunt.cbNormalAttack; this.cbCloseRangeSkill = this.mcTapHunt.cbCloseRangeSkill; this.cbLongRangeCounter = this.mcTapHunt.cbLongRangeCounter; this.cbReturnPoint = this.mcTapHunt.cbReturnPoint; this.tiReturn_delayInput = this.mcTapHunt.tiReturn_delayInput; this.tiReturn_delayInput.__set__restrict("0-9"); this.tfReturn_timeUnit = this.mcTapHunt.tfReturn_timeUnit; this.cbAutoPotion = this.mcTapHunt.cbAutoPotion; this.btnAutoPotionMenu = this.mcTapHunt.btnAutoPotionMenu; this.tfBasicSkill = this.mcTapHunt.tfBasicSkill; this.isSlotBasicSkill = this.mcTapHunt.mcBasicSkill.isSlot; this.isSlotBasicSkill.SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SKILL,0); _loc5_ = this.mcMacroMain._x + this.mcTapHunt._x + this.mcTapHunt.mcBasicSkill._x + this.isSlotBasicSkill._x; _loc4_ = this.mcMacroMain._y + this.mcTapHunt._y + this.mcTapHunt.mcBasicSkill._y + this.isSlotBasicSkill._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SKILL,0,_loc5_,_loc4_,this.isSlotBasicSkill._width,this.isSlotBasicSkill._height); this.tfSkill1 = this.mcTapHunt.tfSkill1; this.isSlotSkill1 = this.mcTapHunt.mcSkill1.isSlot; this.isSlotSkill1.SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SKILL,1); _loc5_ = this.mcMacroMain._x + this.mcTapHunt._x + this.mcTapHunt.mcSkill1._x + this.isSlotSkill1._x; _loc4_ = this.mcMacroMain._y + this.mcTapHunt._y + this.mcTapHunt.mcSkill1._y + this.isSlotSkill1._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SKILL,1,_loc5_,_loc4_,this.isSlotSkill1._width,this.isSlotSkill1._height); this.cbSkill1_delay = this.mcTapHunt.cbSkill1_delay; this.tiSkill1_delayInput = this.mcTapHunt.tiSkill1_delayInput; this.tiSkill1_delayInput.__set__restrict("0-9"); this.tfSkill1_timeUnit = this.mcTapHunt.tfSkill1_timeUnit; this.cbSkill1_condition = this.mcTapHunt.cbSkill1_condition; this.btnSkill1_conditionMenu = this.mcTapHunt.btnSkill1_conditionMenu; this.cbBuff = this.mcTapHunt.cbBuff; this.isSlotBuff1 = this.mcTapHunt.mcBuff1.isSlot; this.isSlotBuff1.SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_BUFF,0); _loc5_ = this.mcMacroMain._x + this.mcTapHunt._x + this.mcTapHunt.mcBuff1._x + this.isSlotBuff1._x; _loc4_ = this.mcMacroMain._y + this.mcTapHunt._y + this.mcTapHunt.mcBuff1._y + this.isSlotBuff1._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_BUFF,0,_loc5_,_loc4_,this.isSlotBuff1._width,this.isSlotBuff1._height); this.isSlotBuff2 = this.mcTapHunt.mcBuff2.isSlot; this.isSlotBuff2.SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_BUFF,1); _loc5_ = this.mcMacroMain._x + this.mcTapHunt._x + this.mcTapHunt.mcBuff2._x + this.isSlotBuff2._x; _loc4_ = this.mcMacroMain._y + this.mcTapHunt._y + this.mcTapHunt.mcBuff2._y + this.isSlotBuff2._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_BUFF,1,_loc5_,_loc4_,this.isSlotBuff2._width,this.isSlotBuff2._height); this.isSlotBuff3 = this.mcTapHunt.mcBuff3.isSlot; this.isSlotBuff3.SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_BUFF,2); _loc5_ = this.mcMacroMain._x + this.mcTapHunt._x + this.mcTapHunt.mcBuff3._x + this.isSlotBuff3._x; _loc4_ = this.mcMacroMain._y + this.mcTapHunt._y + this.mcTapHunt.mcBuff3._y + this.isSlotBuff3._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_BUFF,2,_loc5_,_loc4_,this.isSlotBuff3._width,this.isSlotBuff3._height); this.cbSupportParty = this.mcTapHunt.cbSupportParty; this.btnSupportPartyMenu = this.mcTapHunt.btnSupportPartyMenu; this.cbAutoHeal = this.mcTapHunt.cbAutoHeal; this.cbDrainLife = this.mcTapHunt.cbDrainLife; this.mcSubSkill = this.mcTapHunt.mcSubSkill; this.cbCombo = this.mcSubSkill.cbCombo; this.tfSkill2 = this.mcSubSkill.tfSkill2; this.isSlotkill2 = this.mcSubSkill.mcSkill2.isSlot; this.isSlotkill2.SetTypeIndex(Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SKILL,2); _loc5_ = this.mcMacroMain._x + this.mcTapHunt._x + this.mcSubSkill._x + this.mcSubSkill.mcSkill2._x + this.isSlotkill2._x; _loc4_ = this.mcMacroMain._y + this.mcTapHunt._y + this.mcSubSkill._y + this.mcSubSkill.mcSkill2._y + this.isSlotkill2._y; flash.external.ExternalInterface.call("isSlot",Common.Global.MUDefines.MACRO_MAIN_SLOT_TYPE_SKILL,2,_loc5_,_loc4_,this.isSlotkill2._width,this.isSlotkill2._height); this.cbSkill2_delay = this.mcSubSkill.cbSkill2_delay; this.tiSkill2_delayInput = this.mcSubSkill.tiSkill2_delayInput; this.tiSkill2_delayInput.__set__restrict("0-9"); this.tfSkill2_timeUnit = this.mcSubSkill.tfSkill2_timeUnit; this.cbSkill2_condition = this.mcSubSkill.cbSkill2_condition; this.btnSkill2_conditionMenu = this.mcSubSkill.btnSkill2_conditionMenu; this.mcDarkSpirit = this.mcTapHunt.mcDarkSpirit; this.cbUseDarkSpirit = this.mcDarkSpirit.cbUseDarkSpirit; this.rbAutoAttack = this.mcDarkSpirit.rbAutoAttack; this.rbNoneAttack = this.mcDarkSpirit.rbNoneAttack; this.rbWithAttack = this.mcDarkSpirit.rbWithAttack; this.mcTapItem = this.mcMacroMain.mcTapItem; this.tfGetArea = this.mcTapItem.tfGetArea; this.abtnGetArea = new Array(Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX); _loc3_ = 0; while(_loc3_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.abtnGetArea[_loc3_] = this.mcTapItem.mcGetArea["btnArea" + String(_loc3_ + 1)]; _loc3_ = _loc3_ + 1; } this.amcGetArea = new Array(Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX); _loc3_ = 0; while(_loc3_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.amcGetArea[_loc3_] = this.mcTapItem.mcGetArea["mcArea" + String(_loc3_ + 1)]; _loc3_ = _loc3_ + 1; } this.cbItemRepair = this.mcTapItem.cbItemRepair; this.cbGetAllItem = this.mcTapItem.cbGetAllItem; this.cbSelectiveGetItem = this.mcTapItem.cbSelectiveGetItem; this.cbJewelItem = this.mcTapItem.cbJewelItem; this.cbSetItem = this.mcTapItem.cbSetItem; this.cbZen = this.mcTapItem.cbZen; this.cbExcellentItem = this.mcTapItem.cbExcellentItem; this.cbEtcGetItem = this.mcTapItem.cbEtcGetItem; this.tiItemName = this.mcTapItem.tiItemName; this.btnRegItem = this.mcTapItem.btnRegItem; this.btnUnRegItem = this.mcTapItem.btnUnRegItem; this.tfRegItemList = this.mcTapItem.tfRegItemList; this.slRegList = this.mcTapItem.mcRegList.slRegList; this.mcTapEtc = this.mcMacroMain.mcTapEtc; this.cbAcceptParty_friend = this.mcTapEtc.cbAcceptParty_friend; this.cbAcceptParty_guild = this.mcTapEtc.cbAcceptParty_guild; this.cbUseEliteManaPotion = this.mcTapEtc.cbUseEliteManaPotion; this.mcFaceBookMark = this.mcTapEtc.mcFaceBookMark; this.taFacebookInfo = this.mcTapEtc.taFacebookInfo; this.btnConnect = this.mcTapEtc.btnConnect; this.mcAreaLimitsCaution = this.mcMacroMain.mcAreaLimitsCaution; this.mcAreaLimitsCaution._visible = false; this.mcTabLimitsCaution = this.mcMacroMain.mcTabLimitsCaution; this.mcTabLimitsCaution._visible = false; super.onLoadUI(); this.SetBtnDrag(this.btnDrag); this.SetBtnClose(this.btnClose); this.ShowTap(0,0); this.SetFaceBookVisible(false); } function onUnloadUI() { super.onUnloadUI(); } function onAddEvent() { this.btnTapHunt.addEventListener("click",this,"onClickButton"); this.btnTapGet.addEventListener("click",this,"onClickButton"); this.btnTapEtc.addEventListener("click",this,"onClickButton"); this.btnInit.addEventListener("click",this,"onClickButton"); this.btnSave.addEventListener("click",this,"onClickButton"); var _loc2_ = 0; while(_loc2_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.abtnHuntArea[_loc2_].addEventListener("click",this,"onClickbtnArea"); this.abtnHuntArea[_loc2_].addEventListener("rollOver",this,"onOverAndOutbtnArea"); this.abtnHuntArea[_loc2_].addEventListener("rollOut",this,"onOverAndOutbtnArea"); _loc2_ = _loc2_ + 1; } this.btnAutoPotionMenu.addEventListener("click",this,"onClickButton"); this.btnSkill1_conditionMenu.addEventListener("click",this,"onClickButton"); this.btnSupportPartyMenu.addEventListener("click",this,"onClickButton"); this.btnSkill2_conditionMenu.addEventListener("click",this,"onClickButton"); this.cbCombo.addEventListener("select",this,"onChangeCheckBox"); this.cbSkill1_delay.addEventListener("select",this,"onChangeCheckBox"); this.cbSkill1_condition.addEventListener("select",this,"onChangeCheckBox"); this.cbSkill2_delay.addEventListener("select",this,"onChangeCheckBox"); this.cbSkill2_condition.addEventListener("select",this,"onChangeCheckBox"); _loc2_ = 0; while(_loc2_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.abtnGetArea[_loc2_].addEventListener("click",this,"onClickbtnArea"); _loc2_ = _loc2_ + 1; } this.btnRegItem.addEventListener("click",this,"onClickButton"); this.btnUnRegItem.addEventListener("click",this,"onClickButton"); this.cbGetAllItem.addEventListener("select",this,"onChangeCheckBox"); this.cbSelectiveGetItem.addEventListener("select",this,"onChangeCheckBox"); this.btnConnect.addEventListener("click",this,"onClickButton"); } function onClickButton(event) { Selection.setFocus(null); switch(event.target._name) { case "btnTapHunt": this.ShowTap(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT,this.m_iCharType); break; case "btnTapGet": this.ShowTap(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM,this.m_iCharType); break; case "btnTapEtc": this.ShowTap(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ETC,this.m_iCharType); break; case "btnInit": flash.external.ExternalInterface.call(String(event.target._name)); this.btnInit.SetIntervalDisable(this.m_iBtnDelay); break; case "btnSave": this.tiItemName.__set__text(""); this.btnSave.SetIntervalDisable(this.m_iBtnDelay); this.GetMacroOption(); break; case "btnAutoPotionMenu": flash.external.ExternalInterface.call("btnMenu",0); break; case "btnSupportPartyMenu": flash.external.ExternalInterface.call("btnMenu",1); break; case "btnSkill1_conditionMenu": flash.external.ExternalInterface.call("btnMenu",2); break; case "btnSkill2_conditionMenu": flash.external.ExternalInterface.call("btnMenu",3); break; case "btnRegItem": if(this.tiItemName.__get__text() != "") { if(this.m_iItemListMax <= this.slRegList.__get__dataProvider().length) { this.tiItemName.__set__text(""); flash.external.ExternalInterface.call("onClickbtnRegItemMaxOver",""); return undefined; } var _loc2_ = 0; while(_loc2_ < this.slRegList.__get__dataProvider().length) { if(this.slRegList.__get__dataProvider()[_loc2_] != undefined) { if(this.slRegList.__get__dataProvider()[_loc2_] == this.tiItemName.__get__text()) { this.tiItemName.__set__text(""); flash.external.ExternalInterface.call("onClickbtnRegItemSameWord",""); return undefined; } } _loc2_ = _loc2_ + 1; } this.slRegList.__get__dataProvider().push(this.tiItemName.__get__text()); this.slRegList.invalidate(); this.tiItemName.__set__text(""); } else { flash.external.ExternalInterface.call("onClickbtnRegItemEmptyWord",""); } break; case "btnUnRegItem": if(this.slRegList.__get__dataProvider().length == 0) { flash.external.ExternalInterface.call("onClickbtnUnRegItemEmptyList",""); return undefined; } if(this.slRegList.__get__selectedIndex() == -1 || this.slRegList.__get__dataProvider()[this.slRegList.__get__selectedIndex()] == undefined) { flash.external.ExternalInterface.call("onClickbtnUnRegItemNoneSelect",""); return undefined; } this.slRegList.__get__dataProvider().splice(this.slRegList.__get__selectedIndex(),1); this.slRegList.invalidate(); break; case "btnConnect": flash.external.ExternalInterface.call(String(event.target._name)); } } function onClickbtnArea(event) { var _loc2_ = event.target; switch(this.m_iTapType) { case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT: if(Number(_loc2_.__get__label()) > this.m_iHuntAreaMax) { return undefined; } break; case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM: if(Number(_loc2_.__get__label()) > this.m_iGetAreaMax) { return undefined; } break; } this.SetAreaState(this.m_iTapType,Number(_loc2_.__get__label())); } function onOverAndOutbtnArea(event) { switch(event.type) { case "rollOver": var _loc2_ = event.target; if(this.CheckAreaBtnLimits(Number(_loc2_.__get__label())) == true) { this.mcAreaLimitsCaution._visible = true; } break; case "rollOut": this.mcAreaLimitsCaution._visible = false; } } function onChangeCheckBox(event) { switch(event.target._name) { case "cbCombo": if(this.cbCombo.__get__selected() == true) { this.cbSkill1_delay.__set__selected(false); this.cbSkill2_delay.__set__selected(false); this.cbSkill1_condition.__set__selected(false); this.cbSkill2_condition.__set__selected(false); } flash.external.ExternalInterface.call("onSelectedcbCombo",this.cbCombo.__get__selected()); break; case "cbSkill1_delay": if(this.cbSkill1_delay.__get__selected() == true) { if(this.cbCombo._visible == true && this.cbCombo.__get__selected() == true) { this.cbSkill1_delay.__set__selected(false); flash.external.ExternalInterface.call("onCheckComboSkillDelay1",""); break; } this.cbSkill1_condition.__set__selected(false); } break; case "cbSkill2_delay": if(this.cbSkill2_delay.__get__selected() == true) { if(this.cbCombo._visible == true && this.cbCombo.__get__selected() == true) { this.cbSkill2_delay.__set__selected(false); flash.external.ExternalInterface.call("onCheckComboSkillDelay2",""); break; } this.cbSkill2_condition.__set__selected(false); } break; case "cbSkill1_condition": if(this.cbSkill1_condition.__get__selected() == true) { if(this.cbCombo._visible == true && this.cbCombo.__get__selected() == true) { this.cbSkill1_condition.__set__selected(false); flash.external.ExternalInterface.call("onCheckComboSkillCondition1",""); break; } this.cbSkill1_delay.__set__selected(false); } break; case "cbSkill2_condition": if(this.cbSkill2_condition.__get__selected() == true) { if(this.cbCombo._visible == true && this.cbCombo.__get__selected() == true) { this.cbSkill2_condition.__set__selected(false); flash.external.ExternalInterface.call("onCheckComboSkillCondition2",""); break; } this.cbSkill2_delay.__set__selected(false); } break; case "cbGetAllItem": if(this.cbGetAllItem.__get__selected() == true) { this.cbSelectiveGetItem.__set__selected(false); this.cbJewelItem.__set__disabled(true); this.cbSetItem.__set__disabled(true); this.cbZen.__set__disabled(true); this.cbExcellentItem.__set__disabled(true); this.cbEtcGetItem.__set__disabled(true); } break; case "cbSelectiveGetItem": if(this.cbSelectiveGetItem.__get__selected() == true) { this.cbGetAllItem.__set__selected(false); this.cbJewelItem.__set__disabled(false); this.cbSetItem.__set__disabled(false); this.cbZen.__set__disabled(false); this.cbExcellentItem.__set__disabled(false); this.cbEtcGetItem.__set__disabled(false); } else { this.cbJewelItem.__set__disabled(true); this.cbSetItem.__set__disabled(true); this.cbZen.__set__disabled(true); this.cbExcellentItem.__set__disabled(true); this.cbEtcGetItem.__set__disabled(true); } } } function SetTabButtonVisible(iTapIndex, bVisible) { if(bVisible == undefined) { return undefined; } switch(iTapIndex) { case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT: this.btnTapHunt._visible = bVisible; break; case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM: this.btnTapGet._visible = bVisible; break; case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ETC: this.btnTapEtc._visible = bVisible; } } function SetMacroMainInfo(strTitle, strTapHunt, strTapGet, strTapEtc, strInitBtn, strSaveBtn, strHuntArea, strNormalAttack, strCloseRangeSkill, strLongRangeCounter, strReturnPoint, strAutoPotion, strSupportParty, strAutoHeal, strDrainLife, strBasicSkill, strSkill1, strSkill2, strDelay, strTimeUnit, strCondition, strCombo, strUseDarkSpirit, strAutoAttack, strNoneAttack, strWithAttack, strBuff, strGetArea, strItemRepair, strGetAllItem, strSelectiveGetItem, strJewelItem, strSetItem, strZen, strExcellentItem, strEtcGetItem, strRegItem, strUnRegItem, strRegItemList, strAcceptParty_friend, strAcceptParty_guild, strUseEliteManaPotion, strFacebookInfo, strConnect) { this.tfTitle.__set__text(strTitle); this.btnTapHunt.__set__label(strTapHunt); this.btnTapGet.__set__label(strTapGet); this.btnTapEtc.__set__label(strTapEtc); this.btnInit.__set__label(strInitBtn); this.btnSave.__set__label(strSaveBtn); this.tfHuntArea.__set__text(strHuntArea); this.cbNormalAttack.__set__label(strNormalAttack); this.cbCloseRangeSkill.__set__label(strCloseRangeSkill); this.cbLongRangeCounter.__set__label(strLongRangeCounter); this.cbReturnPoint.__set__label(strReturnPoint); this.tfReturn_timeUnit.__set__text(strTimeUnit); this.cbAutoPotion.__set__label(strAutoPotion); this.cbSupportParty.__set__label(strSupportParty); this.cbAutoHeal.__set__label(strAutoHeal); this.cbDrainLife.__set__label(strDrainLife); this.tfBasicSkill.__set__text(strBasicSkill); this.tfSkill1.__set__text(strSkill1); this.cbSkill1_delay.__set__label(strDelay); this.tfSkill1_timeUnit.__set__text(strTimeUnit); this.cbSkill1_condition.__set__label(strCondition); this.tfSkill2.__set__text(strSkill2); this.cbSkill2_delay.__set__label(strDelay); this.tfSkill2_timeUnit.__set__text(strTimeUnit); this.cbSkill2_condition.__set__label(strCondition); this.cbCombo.__set__label(strCombo); this.cbUseDarkSpirit.__set__label(strUseDarkSpirit); this.rbAutoAttack.__set__label(strAutoAttack); this.rbNoneAttack.__set__label(strNoneAttack); this.rbWithAttack.__set__label(strWithAttack); this.cbBuff.__set__label(strBuff); this.tfGetArea.__set__text(strGetArea); this.cbItemRepair.__set__label(strItemRepair); this.cbGetAllItem.__set__label(strGetAllItem); this.cbSelectiveGetItem.__set__label(strSelectiveGetItem); this.cbJewelItem.__set__label(strJewelItem); this.cbSetItem.__set__label(strSetItem); this.cbZen.__set__label(strZen); this.cbExcellentItem.__set__label(strExcellentItem); this.cbEtcGetItem.__set__label(strEtcGetItem); this.btnRegItem.__set__label(strRegItem); this.btnUnRegItem.__set__label(strUnRegItem); this.tfRegItemList.__set__text(strRegItemList); this.cbAcceptParty_friend.__set__label(strAcceptParty_friend); this.cbAcceptParty_guild.__set__label(strAcceptParty_guild); this.cbUseEliteManaPotion.__set__label(strUseEliteManaPotion); this.taFacebookInfo.__set__text(strFacebookInfo); this.btnConnect.__set__label(strConnect); } function SetMacroOption(aOption, aItemList) { if(aOption.length == 0 || aOption.length > Common.Global.MUDefines.MACRO_MAIN_ARRAY_MAX) { return undefined; } this.m_iHuntAreaMax = Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_HUNT_MAX]); this.SetAreaState(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT,Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_HUNT_RANGE])); this.m_iGetAreaMax = Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_ITEM_MAX]); this.SetAreaState(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM,Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_ITEM_RANGE])); this.cbAutoPotion.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_POTION])); this.cbLongRangeCounter.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_LONG_RANGE_COUNTER])); this.cbCloseRangeSkill.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_APPROACH_ATTACK_SKILL])); this.cbReturnPoint.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_RETURN_START_POS])); this.cbSkill1_delay.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_DELAY_SKILL1])); this.cbSkill1_condition.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_COND_SKILL1])); this.cbSkill2_delay.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_DELAY_SKILL2])); this.cbSkill2_condition.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_COND_SKILL2])); this.cbCombo.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_SKILL_COMBO])); this.cbBuff.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_SUSTAIN_BUFF])); this.cbUseDarkSpirit.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_DARK_SPIRIT])); this.cbSupportParty.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_SUPPORT_PARTY])); this.cbAutoHeal.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_AUTO_HEAL])); this.cbDrainLife.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_DRAIN_LIFE])); this.cbNormalAttack.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_BASIC_ATTACK])); this.cbItemRepair.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_REPAIR_ITEM])); this.cbGetAllItem.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_COLLECT_ALL])); this.cbSelectiveGetItem.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_COLLECT_SELECTED])); this.cbJewelItem.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_COLLECT_STONE])); this.cbSetItem.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_COLLECT_SET])); this.cbZen.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_COLLECT_ZEN])); this.cbExcellentItem.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_Collect_Excellent])); this.cbEtcGetItem.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_COLLECT_LISTED])); this.cbAcceptParty_friend.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_ACCEPTPARTY_FRIEND])); this.cbAcceptParty_guild.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_ACCEPTPARTY_GUILD])); this.cbUseEliteManaPotion.__set__selected(Boolean(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_USE_ELITE_MANA_POTION])); switch(Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_DARKSPIRIT_TYPE])) { case 0: this.rbNoneAttack.__set__selected(true); break; case 1: this.rbAutoAttack.__set__selected(true); break; case 2: this.rbWithAttack.__set__selected(true); } this.tiReturn_delayInput.__set__text(String(Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_RETURN_INTERVAL]))); this.tiSkill1_delayInput.__set__text(String(Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_DELAY_TIME_SKILL1]))); this.tiSkill2_delayInput.__set__text(String(Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_DELAY_TIME_SKILL2]))); if(aItemList != undefined) { this.SetItemList(aItemList); } else { this.ClearItemList(); } this.m_iTempHuntAreaMax = Number(aOption[Common.Global.MUDefines.MACRO_MAIN_ARRAY_HUNT_MAX]); } function GetMacroOption() { var _loc2_ = 0; if(this.rbNoneAttack.__get__selected() == true) { _loc2_ = 0; } else if(this.rbAutoAttack.__get__selected() == true) { _loc2_ = 1; } else if(this.rbWithAttack.__get__selected() == true) { _loc2_ = 2; } if(this.tiReturn_delayInput.__get__text() == "") { this.tiReturn_delayInput.__set__text("0"); } if(this.tiSkill1_delayInput.__get__text() == "") { this.tiSkill1_delayInput.__set__text("0"); } if(this.tiSkill2_delayInput.__get__text() == "") { this.tiSkill2_delayInput.__set__text("0"); } var _loc3_ = parseInt(this.tiReturn_delayInput.__get__text(),10); var _loc4_ = parseInt(this.tiSkill1_delayInput.__get__text(),10); var _loc6_ = parseInt(this.tiSkill2_delayInput.__get__text(),10); var _loc7_ = Array(this.m_iHuntAreaValue,this.m_iHuntAreaMax,this.m_iGetAreaValue,this.m_iGetAreaMax,this.cbAutoPotion.__get__selected(),this.cbLongRangeCounter.__get__selected(),this.cbCloseRangeSkill.__get__selected(),this.cbReturnPoint.__get__selected(),this.cbSkill1_delay.__get__selected(),this.cbSkill1_condition.__get__selected(),this.cbSkill2_delay.__get__selected(),this.cbSkill2_condition.__get__selected(),this.cbCombo.__get__selected(),this.cbBuff.__get__selected(),this.cbUseDarkSpirit.__get__selected(),this.cbSupportParty.__get__selected(),this.cbAutoHeal.__get__selected(),this.cbDrainLife.__get__selected(),this.cbNormalAttack.__get__selected(),this.cbItemRepair.__get__selected(),this.cbGetAllItem.__get__selected(),this.cbSelectiveGetItem.__get__selected(),this.cbJewelItem.__get__selected(),this.cbSetItem.__get__selected(),this.cbZen.__get__selected(),this.cbExcellentItem.__get__selected(),this.cbEtcGetItem.__get__selected(),this.cbAcceptParty_friend.__get__selected(),this.cbAcceptParty_guild.__get__selected(),this.cbUseEliteManaPotion.__get__selected(),_loc2_,_loc3_,_loc4_,_loc6_); var _loc5_ = this.slRegList.__get__dataProvider().requestItemRange(0,this.slRegList.__get__dataProvider().length); flash.external.ExternalInterface.call("SaveMacroOption",_loc7_,_loc5_); } function ClearItemList() { this.slRegList.__get__dataProvider().cleanUp(); this.slRegList.__set__dataProvider(new gfx.data.DataProvider()); } function SetItemList(aItemList) { this.ClearItemList(); if(aItemList.length != 0) { var _loc2_ = 0; while(_loc2_ < aItemList.length) { this.slRegList.__get__dataProvider().push(aItemList[_loc2_]); _loc2_ = _loc2_ + 1; } this.slRegList.invalidate(); } } function OpenSelectSkillSlot(iSkillCount) { if(iSkillCount == 0) { return undefined; } var _loc2_ = 0; while(_loc2_ < Common.Global.MUDefines.MACRO_MAIN_SELECT_SKILL_SLOT) { if(_loc2_ < iSkillCount) { this.mcSkillSlot["mcSkill_" + String(_loc2_)]._visible = true; } else { this.mcSkillSlot["mcSkill_" + String(_loc2_)]._visible = false; } _loc2_ = _loc2_ + 1; } this.mcSkillSlot._visible = true; } function HideSelectSkillSlot() { if(this.mcSkillSlot._visible == false) { return undefined; } this.mcSkillSlot._visible = false; var _loc2_ = 0; while(_loc2_ < Common.Global.MUDefines.MACRO_MAIN_SELECT_SKILL_SLOT) { this.mcSkillSlot["mcSkill_" + String(_loc2_)]._visible = false; _loc2_ = _loc2_ + 1; } } function HideAllWindows() { this.mcMacroMain._visible = false; this.mcTapHunt._visible = false; this.mcTapItem._visible = false; this.mcTapEtc._visible = false; this.SetCharacterTypeOption(-1); this.HideSelectSkillSlot(); } function ShowTap(_iTapType, _iCharType) { this.HideAllWindows(); this.m_iTapType = _iTapType; this.m_iCharType = _iCharType; switch(_iTapType) { case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT: this.mcTapHunt._visible = true; this.mcTapItem._visible = false; this.mcTapEtc._visible = false; this.btnTapHunt.__set__selected(true); this.btnTapHunt.__set__disabled(true); this.btnTapGet.__set__selected(false); this.btnTapGet.__set__disabled(false); this.btnTapEtc.__set__selected(false); this.btnTapEtc.__set__disabled(false); this.SetCharacterTypeOption(_iCharType); break; case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM: this.mcTapHunt._visible = false; this.mcTapItem._visible = true; this.mcTapEtc._visible = false; this.btnTapHunt.__set__selected(false); this.btnTapHunt.__set__disabled(false); this.btnTapGet.__set__selected(true); this.btnTapGet.__set__disabled(true); this.btnTapEtc.__set__selected(false); this.btnTapEtc.__set__disabled(false); break; case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ETC: this.mcTapHunt._visible = false; this.mcTapItem._visible = false; this.mcTapEtc._visible = true; this.btnTapHunt.__set__selected(false); this.btnTapHunt.__set__disabled(false); this.btnTapGet.__set__selected(false); this.btnTapGet.__set__disabled(false); this.btnTapEtc.__set__selected(true); this.btnTapEtc.__set__disabled(true); } this.mcMacroMain._visible = true; this.mcTabLimitsCaution._visible = this.CheckTabBtnLimits(); flash.external.ExternalInterface.call("btnTap",this.m_iTapType); } function SetCharacterTypeOption(_iCharType) { switch(_iCharType) { case Common.Global.MUDefines.BASE_CLASS_TYPE_WIZARD: this.cbSupportParty._visible = true; this.btnSupportPartyMenu._visible = true; this.cbAutoHeal._visible = false; this.cbDrainLife._visible = false; this.cbCombo._visible = false; this.mcSubSkill._visible = true; this.mcDarkSpirit._visible = false; break; case Common.Global.MUDefines.BASE_CLASS_TYPE_KNIGHT: this.cbSupportParty._visible = false; this.btnSupportPartyMenu._visible = false; this.cbAutoHeal._visible = false; this.cbDrainLife._visible = false; this.cbCombo._visible = true; this.mcSubSkill._visible = true; this.mcDarkSpirit._visible = false; break; case Common.Global.MUDefines.BASE_CLASS_TYPE_ELF: this.cbSupportParty._visible = true; this.btnSupportPartyMenu._visible = true; this.cbAutoHeal._visible = true; this.cbDrainLife._visible = false; this.cbCombo._visible = false; this.mcSubSkill._visible = true; this.mcDarkSpirit._visible = false; break; case Common.Global.MUDefines.BASE_CLASS_TYPE_DARK_LORD: this.cbSupportParty._visible = false; this.btnSupportPartyMenu._visible = false; this.cbAutoHeal._visible = false; this.cbDrainLife._visible = false; this.cbCombo._visible = false; this.mcSubSkill._visible = false; this.mcDarkSpirit._visible = true; break; case Common.Global.MUDefines.BASE_CLASS_TYPE_SUMMONER: this.cbSupportParty._visible = false; this.btnSupportPartyMenu._visible = false; this.cbAutoHeal._visible = false; this.cbDrainLife._visible = true; this.cbCombo._visible = false; this.mcSubSkill._visible = true; this.mcDarkSpirit._visible = false; break; default: this.cbSupportParty._visible = false; this.btnSupportPartyMenu._visible = false; this.cbAutoHeal._visible = false; this.cbDrainLife._visible = false; this.cbCombo._visible = false; this.mcSubSkill._visible = true; this.mcDarkSpirit._visible = false; } } function SetAreaState(iTapType, iValue) { if(iValue < 0) { return undefined; } switch(iTapType) { case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT: this.m_iHuntAreaValue = iValue; var _loc2_ = 0; while(_loc2_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.amcHuntArea[_loc2_]._visible = true; this.abtnHuntArea[_loc2_]._visible = true; if(_loc2_ < this.m_iHuntAreaValue) { this.abtnHuntArea[_loc2_].selected = false; this.amcHuntArea[_loc2_].gotoAndStop(2); } else { this.abtnHuntArea[_loc2_].selected = true; this.amcHuntArea[_loc2_].gotoAndStop(1); } _loc2_ = _loc2_ + 1; } break; case Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM: this.m_iGetAreaValue = iValue; _loc2_ = 0; while(_loc2_ < Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX) { this.amcGetArea[_loc2_]._visible = true; this.abtnGetArea[_loc2_]._visible = true; if(_loc2_ < this.m_iGetAreaValue) { this.abtnGetArea[_loc2_].selected = false; this.amcGetArea[_loc2_].gotoAndStop(2); } else { this.abtnGetArea[_loc2_].selected = true; this.amcGetArea[_loc2_].gotoAndStop(1); } _loc2_ = _loc2_ + 1; } } } function SetItemListMax(iMax) { this.m_iItemListMax = iMax; } function SetcbCombo(bSelect) { this.cbCombo.__set__selected(bSelect); } function SetInputLength(_iType, _iLength) { if((var _loc0_ = _iType) === Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM) { this.tiItemName.__set__maxChars(_iLength); } } function RollBackWord(_iType) { if((var _loc0_ = _iType) === Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM) { this.tiItemName.TextRollBack(); } } function InitLimitsWords(strTabWords, strAreaBtnWords) { this.mcTabLimitsCaution.taCaution.text = strTabWords; this.mcAreaLimitsCaution.taCaution.text = strAreaBtnWords; } function SetLimits(bLimits) { if(this.m_bLimits == bLimits) { return undefined; } this.m_bLimits = bLimits; if(bLimits == false) { this.m_iHuntAreaMax = Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX; this.SetAreaState(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT,this.m_iHuntAreaValue); this.m_iGetAreaMax = Common.Global.MUDefines.MACRO_MAIN_AREA_BTN_COUNT_MAX; this.SetAreaState(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM,this.m_iGetAreaValue); } else { this.m_iHuntAreaMax = this.m_iTempHuntAreaMax; this.SetAreaState(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT,this.m_iHuntAreaValue <= this.m_iHuntAreaMax?this.m_iHuntAreaValue:this.m_iHuntAreaMax); this.m_iGetAreaMax = 0; this.SetAreaState(Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM,0); this.cbItemRepair.__set__selected(false); this.cbGetAllItem.__set__selected(false); this.cbSelectiveGetItem.__set__selected(false); this.cbJewelItem.__set__selected(false); this.cbSetItem.__set__selected(false); this.cbZen.__set__selected(false); this.cbExcellentItem.__set__selected(false); this.cbEtcGetItem.__set__selected(false); } this.cbItemRepair.__set__disabled(bLimits); this.cbGetAllItem.__set__disabled(bLimits); this.cbSelectiveGetItem.__set__disabled(bLimits); this.cbJewelItem.__set__disabled(bLimits); this.cbSetItem.__set__disabled(bLimits); this.cbZen.__set__disabled(bLimits); this.cbExcellentItem.__set__disabled(bLimits); this.cbEtcGetItem.__set__disabled(bLimits); this.tiItemName.__set__disabled(bLimits); this.slRegList.__set__disabled(bLimits); this.btnRegItem.__set__disabled(bLimits); this.btnUnRegItem.__set__disabled(bLimits); } function CheckTabBtnLimits() { if(this.m_bLimits == false) { return false; } if(this.m_iTapType == Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_ITEM) { return true; } } function CheckAreaBtnLimits(iBtnNumber) { if(this.m_bLimits == false) { return false; } if(this.m_iTapType == Common.Global.MUDefines.MACRO_MAIN_TAP_TYPE_HUNT && iBtnNumber > this.m_iHuntAreaMax) { return true; } } function SetFaceBookVisible(bVisible) { this.mcFaceBookMark._visible = bVisible; this.taFacebookInfo._visible = bVisible; this.btnConnect._visible = bVisible; }}