카운테스 myattack.killboss() 제발 도와주세요ㅠㅠ
카운테스 구경도못하고
타워5층 진입하고나서 바로
카운테스. myattack.killboss() 오류뜨고 포탈열고 마을로가버리네요ㅠㅠ
인터넷 여기저기 검색해보고 따라해봐도 어떻게해야될지 모르겠습니다.ㅠㅠ
제발 도와주세요ㅠ
제 이니설정된것 적어볼께요
도와주시면 복받으실껍니다 ㅠㅠ
SorceressAttackPattern: function ()
{
var _maxIndex = -1;
var _maxSkill = 0;
var _avgSkillLevel = [
Math.round((me.GetSkill(59, false) + me.GetSkill(39, false) + me.GetSkill(45, false) + me.GetSkill(55, false)) / 4),
Math.round((me.GetSkill(53, false) + me.GetSkill(38, false) + me.GetSkill(48, false) + me.GetSkill(49, false)) / 4),
Math.round((me.GetSkill(47, false) + me.GetSkill(36, false) + me.GetSkill(56, false) + me.GetSkill(64, false)) / 4),
Math.round((me.GetSkill(47, false) + me.GetSkill(36, false) + me.GetSkill(56, false)) / 3),
(me.GetSkill(47, false) < 10 && me.GetSkill(53, false) < 10 && me.GetSkill(59, false) < 10 && me.GetSkill(64, false) > 19) ?
777 : 0];
for (var i = 0; i < _avgSkillLevel.length; i++)
{
if (_avgSkillLevel[i] > _maxSkill)
{
_maxIndex = i;
_maxSkill = _avgSkillLevel[i];
}
}
switch (_maxIndex)
{
case 0: // Blizzard
MyConfig.AttackSkill[1] = [59, 25, 1, -1];
MyConfig.AttackSkill[2] = [55, 25, 1, -1];
MyConfig.AttackSkill[3] = [59, 25, 1, -1];
MyConfig.AttackSkill[4] = [55, 25, 1, -1];
break;
case 1: // Chain Lightning
MyConfig.AttackSkill[1] = [49, 25, 1, -1];
MyConfig.AttackSkill[3] = [53, 25, 1, -1];
break;
case 2: // Fire Ball + Frozen Orb
MyConfig.AttackSkill[1] = [56, 15, 1, -1];
MyConfig.AttackSkill[2] = [47, 15, 1, -1];
MyConfig.AttackSkill[3] = [64, 10, 1, -1];
MyConfig.AttackSkill[4] = [47, 15, 1, -1];
MyConfig.AttackSkill[5] = [64, 10, 1, -1];
MyConfig.AttackSkill[6] = [47, 15, 1, -1];
MyConfig.AttackSkill[7] = [64, 10, 1, -1];
MyConfig.AttackSkill[8] = [47, 10, 1, -1];
break;
case 3: // Fire Ball + Meteor
MyConfig.AttackSkill[1] = [56, 25, 1, -1];
MyConfig.AttackSkill[2] = [47, 25, 1, -1];
MyConfig.AttackSkill[3] = [56, 25, 1, -1];
MyConfig.AttackSkill[4] = [47, 25, 1, -1];
break;
case 4: // Frozen Orb
MyConfig.AttackSkill[1] = [64, 15, 1, -1];
MyConfig.AttackSkill[2] = [55, 15, 1, -1];
MyConfig.AttackSkill[3] = [64, 15, 1, -1];
MyConfig.AttackSkill[4] = [55, 15, 1, -1];
break;
}
return (MyConfig.AttackSkill[1][0] > -1 && MyConfig.AttackSkill[3][0] > -1);
},
SorceressCast: function (target, isBoss, index, maxAttacks, conviction, position, player)
{
var _iAttack = 0;
var _iRetry = 0;
var _attacks = isBoss ? 8 : (MyConfig.AttackSkill[index][0] == 64) ? 2 : (MyConfig.AttackSkill[index][0] == 47 || MyConfig.AttackSkill
[index][0] == 53) ? 3 : 4;
var _option1 = {
target: target,
boss: isBoss,
index: index,
position: position,
flying: !isBoss && MyUnit.IsFlying(target),
vulture: !isBoss && MyUnit.IsVulture(target),
defense: MyConfig.UseMerc[1] && MyConfig.AttackSkill[index][1] > MyConfig.MercDefense[1] && MyConfig.MercDefense[0][me.diff] &&
(MyConfig.MercDefense[3] || MyConfig.MercDefense[4].indexOf(target.classid) != -1 || MyConfig.MercDefense[4].indexOf(target.name) != -1) &&
me.GetMerc(),
escape: MyConfig.AttackSkill[index][1] >= 60,
paladin: null };
var _option2 = {
target: target,
boss: false,
index: index + 1,
position: position,
flying: _option1.flying,
vulture: _option1.vulture,
defense: MyConfig.UseMerc[1] && MyConfig.AttackSkill[index + 1][1] > MyConfig.MercDefense[1] && MyConfig.MercDefense[0]
[me.diff] && (MyConfig.MercDefense[3] || MyConfig.MercDefense[4].indexOf(target.classid) != -1 || MyConfig.MercDefense[4].indexOf(target.name)
!= -1) && me.GetMerc(),
escape: false,
paladin: null };
var _targetHp = target.hp;
var _skill = MyConfig.AttackSkill[index][0];
var _static = MyConfig.SorceressStaticUse[isBoss ? 0 : 1];
while (MyUnit.CheckLife(target))
{
if (MyUnit.CheckCowKing() || (_iAttack > maxAttacks && maxAttacks > 0) || (player && !MyUnit.CheckDistance(player.player,
player.distance)) || ((_iAttack % 5) == 0 && !this.CheckWeapon()))
return _Finish(0, index, _skill, isBoss ? 0 : 1, _static);
if (maxAttacks != -1)
{
if (MyConfig.AttackSkill[index][0] != 42)
{
if (!this.Collision(_option1))
return _Finish(0, index, _skill, isBoss ? 0 : 1, _static);
}
}
else
this.CheckHostileXy(target, MyConfig.AttackSkill[index][1]);
if ((_iAttack % 3) == 0)
MyPrecast.CheckPrecast(1);
if (!this.CheckConviction(2, target, index, conviction, _iAttack > 2))
return _Finish(0, index, _skill, isBoss ? 0 : 1, _static);
if (_iAttack == 0 && index > 0)
{
_ChainLightning(target, index, isBoss ? 0 : 1);
this.SorceressStaticField(target, MyConfig.AttackSkill[index][2] - 1, MyConfig.SorceressStaticKeep[isBoss ? 0 : 1],
MyConfig.SorceressStaticSkip[isBoss ? 0 : 1], MyConfig.SorceressStaticUse[isBoss ? 0 : 1]);
}
if (!MyUnit.CheckLife(target))
return _Finish(1, index, _skill, isBoss ? 0 : 1, _static);
if (!this.ChangeSkillMana(1, index))
return _Finish(-1, index, _skill, isBoss ? 0 : 1, _static);
if (MyConfig.AttackSkill[index][0] != 42)
{
this.SwapWeapons(MyConfig.AttackSkill[index][2] - 1);
MyMove.CastSkill(MyConfig.AttackSkill[index][0], this.skillHand[index], target);
}
else
this.SorceressStaticField(target, MyConfig.AttackSkill[index][2] - 1, MyConfig.SorceressStaticKeep[isBoss ? 0 : 1],
MyConfig.SorceressStaticSkip[isBoss ? 0 : 1], MyConfig.SorceressStaticSkill, (index > 0) ? 65535 : 1);
if (index == 0)
return (MyUnit.CheckLife(target) ? 0 : 1);
if (MyConfig.AttackSkill[index + 1][0] > -1 && this.CheckResistance(target, this.skillDamage[index + 1]))
{
if (MyConfig.AttackSkill[index + 1][0] != 42)
{
while (me.GetSkillStatus(MyConfig.AttackSkill[index][0]) == 8 || (MyConfig.SorceressStaticSkill > 0 &&
MyConfig.AttackSkill[index][0] == 42 && Math.round(target.hp * 100 / target.hpmax) <= MyConfig.SorceressStaticSkill))
{
if (!MyUnit.CheckLife(target))
return _Finish(1, index, _skill, isBoss ? 0 : 1, _static);
if (!this.Collision(_option2))
break;
if (me.GetSkillStatus(MyConfig.AttackSkill[index + 1][0]) != 8 && this.ChangeSkillMonster(target, index + 1) &&
this.ChangeSkillMana(2, index + 1))
{
this.SwapWeapons(MyConfig.AttackSkill[index + 1][2] - 1);
MyMove.CastSkill(MyConfig.AttackSkill[index + 1][0], this.skillHand[index + 1], target);
}
else
Delay(MyMove_DELAY_FRAME);
}
}
else
this.SorceressStaticField(target, MyConfig.AttackSkill[index + 1][2] - 1, MyConfig.SorceressStaticKeep[isBoss ? 0 : 1],
MyConfig.SorceressStaticSkip[isBoss ? 0 : 1], MyConfig.SorceressStaticSkill, 65535, MyConfig.AttackSkill[index][0]);
}
while (me.GetSkillStatus(MyConfig.AttackSkill[index][0]) == 8)
{
if (!MyUnit.CheckLife(target))
return _Finish(1, index, _skill, isBoss ? 0 : 1, _static);
Delay(MyMove_DELAY_FRAME);
}
if ((++_iAttack % _attacks) == 0 && maxAttacks > 0)
{
if (target.hp == 0 || target.hp < _targetHp)
_targetHp = target.hp;
else if (_iRetry++ < (isBoss ? 2 : 1))
{
if (!MyMove.MoveTo({ to: target }))
return _Finish(0, index, _skill, isBoss ? 0 : 1, _static);
}
else
return _Finish(0, index, _skill, isBoss ? 0 : 1, _static);
}
}
return _Finish(1, index, _skill, isBoss ? 0 : 1, _static);
function _ChainLightning(target, indexSkill, indexStatic)
{
if (MyConfig.SorceressChainLightning[0] && MyConfig.AttackSkill[indexSkill][0] == 53)
{
var _result = -1;
if (MyConfig.SorceressChainLightning[1][0].indexOf(target.classid) != -1 || MyConfig.SorceressChainLightning[1][0].indexOf
(target.name) != -1)
_result = MyConfig.SorceressChainLightning[1][1];
else if (MyConfig.SorceressChainLightning[2][0] < 100 && target.GetStat(41) >= MyConfig.SorceressChainLightning[2][0])
_result = MyConfig.SorceressChainLightning[2][1];
else if (MyConfig.SorceressChainLightning[3][0] > 0 && MyUnit.CountMonster(me, MyConfig.SorceressChainLightning[3][0],
MyConfig.SorceressChainLightning[3][1] + 1) <= MyConfig.SorceressChainLightning[3][1])
_result = MyConfig.SorceressChainLightning[3][2];
if (_result != -1)
{
MyConfig.AttackSkill[indexSkill][0] = 49;
MyConfig.SorceressStaticUse[indexStatic] = _result;
}
}
}
function _Finish(result, indexSkill, skill, indexStatic, static)
{
MyConfig.AttackSkill[indexSkill][0] = skill;
MyConfig.SorceressStaticUse[indexStatic] = static;
return result;
}
},
SorceressStaticField: function (target, swapWeapon, keepList, skipList, castStatic, attackCount, checkSkill)
{
var _iAttack, _targetHp, _staticLevel, _staticRange, _staticPos, _staticX, _staticY;
switch (arguments.length)
{
case 5:
attackCount = 65535;
case 6:
checkSkill = -1;
break;
}
_staticLevel = this.GetSkillLevel(42);
if (!_staticLevel || castStatic > 99 || !this.CheckResistance(target, MyAttack_DAMAGE_LIGHTNING))
return false;
if (keepList.length > 0)
{
if (keepList.indexOf(target.classid) == -1 && keepList.indexOf(target.name) == -1)
return false;
}
else if (skipList.length > 0 && (skipList.indexOf(target.classid) != -1 || skipList.indexOf(target.name) != -1))
return false;
_staticRange = Math.round((5 + _staticLevel - 1) * 2 / 3);
_iAttack = 0;
_targetHp = target.hp;
while (attackCount-- && (checkSkill == -1 || me.GetSkillStatus(checkSkill) == 8) && MyUnit.CheckLife(target) && Math.round(target.hp *
100 / target.hpmax) > castStatic)
{
if (GetDistance(me, target) > _staticRange || !CheckCollision(me, target, 6))
{
_staticPos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, _staticRange, 6);
_staticPos ? MyMove.MoveTo({ areaid: target.areaid, x: _staticPos[0], y: _staticPos[1] }) : MyMove.MoveTo({ to: target });
}
_staticX = (target.x < me.x) ? (me.x - 1) : (target.x > me.x) ? (me.x + 1) : me.x;
_staticY = (target.y < me.y) ? (me.y - 1) : (target.y > me.y) ? (me.y + 1) : me.y;
if (!CheckCollision(target.areaid, _staticX, _staticY, 1))
{
_staticX = me.x;
_staticY = me.y;
}
this.SwapWeapons(swapWeapon);
MyMove.CastSkill(42, MyMove_HAND_RIGHT, _staticX, _staticY);
if ((++_iAttack % 4) == 0)
{
if (target.hp == 0 || target.hp < _targetHp)
_targetHp = target.hp;
else
return false;
}
}
return true;
},
SwapWeapons: function (tab)
{
if (arguments.length > 0 && me.weaponstab == tab)
return true;
MyCommon.DelayPing(MyConfig.SwapWeaponsDelay);
if (!MyUnit.WaitIdleMode())
return false;
return me.SwapWeapons();
},
TownHostile: function (name, isMakePortal)
{
if (isMakePortal)
{
if (!MyMove.CheckAct())
MyCommon.ExitRoom("ÿc1" + MyCommon.GetNTConfigName(0) + " : MyMove.CheckAct() " + LANGUAGE1_6_ + " (" + MyUnit.GetAreaName() +
")");
}
else if (!MyMove.UsePortal({ owner: me.charname }))
MyCommon.ExitRoom("ÿc1" + MyCommon.GetNTConfigName(0) + " : MyMove.UsePortal() " + LANGUAGE1_6_ + " (" + MyUnit.GetAreaName() +
")");
Say(MyConfig.CheckHostile[4].replace(/%H/, name));
if (MyConfig.ExitHalt[0] > 0)
MyLog.SendMsgToScript("NTToolsThread.ntj", "ScriptMessage_ExitHalt/0/0");
while (MyUnit.GetPlayer(name))
Delay(1000);
if (MyConfig.ExitHalt[0] > 0)
MyLog.SendMsgToScript("NTToolsThread.ntj", "ScriptMessage_ExitHalt/0/" + MyConfig.ExitHalt[0]);
if (!MyMove.UsePortal({ owner: me.charname, telekinesis: true }))
MyCommon.ExitRoom("ÿc1" + MyCommon.GetNTConfigName(0) + " : MyMove.UsePortal() " + LANGUAGE1_6_ + " (" + MyUnit.GetAreaName() +
")");
if (MyConfig.PublicMode)
MyMove.OpenTownPortal();
},
Whirlwind: function (target, isBoss, index, maxAttacks, min, max, xyPathCount, position, player, sentryIndex)
{
var _targetHp, _nMonsters, _sentryClassId, _sentryCount;
var _iAttack = 0;
var _attacks = isBoss ? 8 : 2;
var _isSwitch = false;
var _isAssassin = me.classid == MyTown_CHAR_ASSASSIN;
var _option = {
target: target,
boss: isBoss,
index: index,
position: position,
flying: !isBoss && MyUnit.IsFlying(target),
vulture: !isBoss && MyUnit.IsVulture(target),
defense: null,
escape: false,
paladin: null };
var _swapWeapon = (MyConfig.BarbarianWhirlwind[1] == 0 || this.CheckResistance(target, MyAttack_DAMAGE_PHYSICAL)) ?
(MyConfig.AttackSkill[index][2] - 1) : (MyConfig.BarbarianWhirlwind[1] - 1);
var _whirlwind = { x: 0, y: 0 };
if (sentryIndex)
_sentryClassId = { 261: 411, 262: 410, 271: 412, 272: 415, 276: 416 }[MyConfig.AttackSkill[sentryIndex][0]];
_nMonsters = min + Math.round(MyUnit.CountMonster(target, max) / 3);
_nMonsters = (_nMonsters > max) ? max : _nMonsters;
_targetHp = target.hp;
while (MyUnit.CheckLife(target))
{
if (MyUnit.CheckCowKing() || (_iAttack > maxAttacks && maxAttacks > 0) || (player && !MyUnit.CheckDistance(player.player,
player.distance)) || (_isAssassin && target.GetState(53)) || !this.Collision(_option))
break;
if (!this.GetWhirlwindXy(_whirlwind, target, _nMonsters, xyPathCount))
{
if (this.GetSkillLevel(54) > 0 || this.GetSkillLevel(132) < 1)
{
if (!MyMove.MoveTo({ to: target }))
break;
}
else if (!MyMove.LeapTo(target.areaid, target.x, target.y))
break;
if (!this.GetWhirlwindXy(_whirlwind, target, _nMonsters, xyPathCount))
break;
}
if (!_isSwitch)
{
MyUnit.SwitchRunWalk(0);
_isSwitch = true;
}
if ((_iAttack % 3) == 0)
MyPrecast.CheckPrecast(1);
if (!MyUnit.CheckLife(target) || (_isAssassin && target.GetState(53)))
break;
_DrinkPotion(_iAttack == 0);
this.SwapWeapons(_swapWeapon);
this.CastWhirlwind(_whirlwind.x, _whirlwind.y);
if (_sentryClassId)
{
_sentryCount = MyUnit.IsClass(_sentryClassId, true);
if (MyConfig.AttackSkill[sentryIndex][0] == 271 && MyConfig.AssassinLightningSentry < 5)
_sentryCount += MyUnit.IsClass(416, true);
if (_sentryCount < 5)
break;
}
if ((++_iAttack % _attacks) == 0 && maxAttacks > 0)
{
if (target.hp == 0 || target.hp < _targetHp)
_targetHp = target.hp;
else if (MyTown.CheckRepair(0))
{
if (!MyTown.TownManager({ simple: true }))
break;
}
else
break;
}
}
MyUnit.SwitchRunWalk(1);
return !MyUnit.CheckLife(target);
function _DrinkPotion(reset)
{
if (reset)
{
MyUnit.GetMaxHpMp(me, 0);
MyUnit.GetMaxHpMp(me, 1);
}
if ((MyConfig.DrinkPotion[1] > 0 && Math.round(me.hp * 100 / MyUnit.maxHpChar) < MyConfig.DrinkPotion[1]) ||
(MyConfig.DrinkPotion[3] > 0 && Math.round(me.mp * 100 / MyUnit.maxMpChar) < MyConfig.DrinkPotion[3]))
{
if (!MyAttack.DrinkPotion(2, this.drinkPotion))
{
if (MyConfig.DrinkPotion[0] > 0 && Math.round(me.hp * 100 / MyUnit.maxHpChar) < MyConfig.DrinkPotion[0])
MyAttack.DrinkPotion(0, this.drinkPotion);
if (MyConfig.DrinkPotion[2] > 0 && Math.round(me.mp * 100 / MyUnit.maxMpChar) < MyConfig.DrinkPotion[2])
MyAttack.DrinkPotion(1, this.drinkPotion);
}
}
else
{
if (MyConfig.DrinkPotion[0] > 0 && Math.round(me.hp * 100 / MyUnit.maxHpChar) < MyConfig.DrinkPotion[0])
MyAttack.DrinkPotion(0, this.drinkPotion);
if (MyConfig.DrinkPotion[2] > 0 && Math.round(me.mp * 100 / MyUnit.maxMpChar) < MyConfig.DrinkPotion[2])
MyAttack.DrinkPotion(1, this.drinkPotion);
}
}
}
};