Aller au contenu


Photo

D2Nt 3.1 - La Trap Assa Est-Elle Réglable ?


  • Veuillez vous connecter pour répondre
14 réponses à ce sujet

#1 Anderlaxe

Anderlaxe

    Newbie lvl 3

  • Membres
  • 21 messages

Posté 11 April 2010 - 12:17

Bonjour à tous,
ça fait déjà 2 bons mois que j'ai repris D2 et la lassitude vient de nouveau écourter mon expérience de jeu, ainsi j'aimerai pouvoir créer un bot afin de me faire gagner du temps sous tout les plans :unsure:

J'ai en premier lieu télécharger Awesome, peu concluant j'ai vite abandonné, puis vient D2Nt accompagné de tout les commentaires positifs d'utilisateurs lambda, ma question est : Est-il possible d'y config une Assa Trap ?

Voici Heldegarde en images :

Image IPB

Image IPB

Image IPB
Sous BO

J'aimerai svp avoir des conseils pour utiliser un assassin D2NT ^^ car pour le moment D2nt ne propose que 3 classes de personnages.

Merci d'avance, et en vous souhaitant une agréable journée
Anderlaxe

#2 faramir

faramir

    Player Killer

  • Bannis
  • 3355 messages
  • Location :Nice

Posté 11 April 2010 - 12:24

Salut

J'ai un amis qui bot avec un barbare corp a corp en cs run !!

Mais il a modifier le bot donc oui c'est possible si tu t'y connait suffisament ^^

Sinon peut être que la prochaine version d'ad2bs le fera sa reste a voire ;)

Wait and see

#3 Euclide_

Euclide_

    YOOOOOOOOOOO

  • Admin Gms
  • 8923 messages
  • Location :France
  • Trade : Mediator

Posté 11 April 2010 - 13:01

Oui tu peu essayer de faire en sorte que ta trap assa puisse botter, mais il vas te falloir faire pas mal de lecture de script d2nt pour comprendre comment ça fonctionne ;).

Si tu est vraiment motivé pour en 1 petite semaine tu devrais être capable d'avoir une assa qui bot correctement.
  • faramir aime ceci

#4 Anderlaxe

Anderlaxe

    Newbie lvl 3

  • Membres
  • 21 messages

Posté 11 April 2010 - 14:12

Bon, j'ai commencé à fourré mon nez dedans, alors ...

Premièrement, j'ai simuler la config d'un pala en mettant mes skills :

	//------------------------------------------------------------------------------
	// Attack configuration
	//------------------------------------------------------------------------------
	NTConfig_AttackSkill[0] = 0;	// First skill. Set to 0 if you won't
	NTConfig_AttackSkill[1] = 271;	// Primary skill to boss.
	NTConfig_AttackSkill[2] = 0;	// Primary aura to boss. Set to 0 if you won't
	NTConfig_AttackSkill[3] = 271;	// Primary skill to others.
	NTConfig_AttackSkill[4] = 0;	// Primary aura to others. Set to 0 if you won't
	NTConfig_AttackSkill[5] = 271;	// Secondary skill in case monster is immune to primary skill. Set to 0 if you won't
	NTConfig_AttackSkill[6] = 0;	// Secondary aura. Set to 0 if you won't
	NTConfig_ClearPosition = true;	// Set to true if you want to clear area after killing boss.

	// Check self safe in field (NOT in town). Set to 0 if you won't
	// 0x01 : Potion, 0x02 : Poison, 0x04 : Amplify Damage, 0x08 : Weaken, 0x10 : Iron Maiden, 0x20 : Decrepify, 0x40 : Lower Resist
	NTConfig_CheckSelfSafe = 0x04|0x40;
	// Check merc's safe in field (NOT in town). Set to 0 if you won't
	// 0x01 : Death, 0x02 : Poison, 0x04 : Amplify Damage, 0x08 : Weaken, 0x10 : Iron Maiden, 0x20 : Decrepify, 0x40 : Lower Resist
	NTConfig_CheckMercSafe = 0x01|0x04|0x10|0x40;

	//NTConfig_UseRedemptionHP = 80;	// Use Redemption if under this percent of life. Set to 0 if you won't
	//NTConfig_UseRedemptionMP = 60;	// Use Redemption if under this percent of mana. Set to 0 if you won't
}

271 Lightning Sentry

J'ai aussi config pour qu'elle fasse les boss simples, je verrai comment elle se dépatouille, seulement voilà après je demarre le manager, configure tout tout bien ;) mais il y a un problème au lancement de partie (voir screen joint)

	Include("libs/common/NTCommon.ntl");
	NTC_IncludeLibs();
	NTC_IncludeConfig("NTBot/char_configs");

[b]	NT_LoadConfig();[/b] Wtf ?
	NTSI_LoadNIPFiles("NTBot/item_configs");





Autre petite question :

Peux-t'on lui faire use CTA ? (le miens est perfect en l'occurrence et j'en suis pas peu fier)

Fichier(s) joint(s)



#5 Euclide_

Euclide_

    YOOOOOOOOOOO

  • Admin Gms
  • 8923 messages
  • Location :France
  • Trade : Mediator

Posté 11 April 2010 - 14:27

Base toi plutôt sur une sorcière.

Ensuite : crée NTConfig_Assassin_TonPerso

Pour les attaques tu peux t'inspirer de cela

//----------------------------------------------------------------------------------------------------------\\
   // "Assassin Attack Configuration"                                \\
   //----------------------------------------------------------------------------------------------------------\\
   // A list of skill ID's can be found in scripts\libs\config\Skill_IDs !!!                          \\
   //----------------------------------------------------------------------------------------------------------\\
   // |Traps|:      271:Lightning Sentry, 276:Death Sentry, 256:Shock Field, 258:Quickness          \\
   //--------------------------------------------------------------------------------------------------------- \\
   // |Shadows Disciplines|:   273:Mind Blast, 253:Psychic Hammer, 278:Venom                     \\
   //--------------------------------------------------------------------------------------------------------- \\
   // |Martial Arts|:      275:Dragon Flight, 270:Dragon Tail, 274:Blades of Ice                  \\
   //----------------------------------------------------------------------------------------------------------\\

   
   NTConfig_AttackSkill[0] = 0;      // Cast your first spell once. Set to 0 if you won't
   NTConfig_AttackSkill[1] = 271;      // The primary skill used to attack the boss.
   NTConfig_AttackSkill[2] = 271;      // Cast your primary spell to others.
   NTConfig_AttackSkill[3] = 256;      // Cast your primary untimed spell if primary spell is timed spell. Set to 0 if you won't
   NTConfig_AttackSkill[4] = 0;      // Secondary untimed skill if boss is immune to primary untimed skill!
   NTConfig_AttackSkill[5] = 0;      // Cast your secondary untimed spell if secondary spell is timed spell. Set to 0 if you won't
   
   NTConfig_ClearPosition = true;      // Set this to "True" if you want the bot to clear the area after killing the boss
   NTConfig_CheckSafe = true;      // Set to true to check for curses, merc and potion (go to town if needed)
   
   NTConfig_CastShadowMaster = true;   // Set to "true" if bot uses "Shadow Master".
   NTConfig_CastShadowWarrior = false;   // Set to "true" if bot uses "Shadow Warrior".
   NTConfig_CastBrustOfSpeed = true;   // Set to "true" if bot uses "Brust Of Speed" Cannot be used simultaneously with fade.
   NTConfig_CastFade = false;      // Set to "true" if bot uses "Fade" cannot be used simultaneously with burst of speed".
   NTConfig_CastBladeShield = true;   // Set to "true" if bot uses "Blade Shield".
   NTConfig_CastCloakOfShadows = true;   // Set to "true" if bot uses "Cloak Of Shadows".
}


Il te faut aussi probablement modifier les fichiers Precasts.ntl et Attack.ntl
  • faramir aime ceci

#6 Anderlaxe

Anderlaxe

    Newbie lvl 3

  • Membres
  • 21 messages

Posté 11 April 2010 - 15:03

il y a toujours un point noir dans l'installation concernant le loading, actuellement j'ai ça :

	NT_LoadConfig("char_configs/NTConfig_Paladin_Heldegarde.ntl");
	NTSI_LoadNIPFiles("NTBot/item_configs");

Marche pas ;)

#7 Euclide_

Euclide_

    YOOOOOOOOOOO

  • Admin Gms
  • 8923 messages
  • Location :France
  • Trade : Mediator

Posté 11 April 2010 - 15:05

Paladin -> Assassin
  • faramir aime ceci

#8 Anderlaxe

Anderlaxe

    Newbie lvl 3

  • Membres
  • 21 messages

Posté 11 April 2010 - 15:11

Ok ok, cela avance c'est pas mal, désormais mon Assa se met à marcher, se boost de façon très propre.

Maintenant, il enclanche des séquences correspondants à chaque boss du jeu, jusque là pas de problème il y va (à pied), mais une fois devant les Mobs il manifeste une erreur :

NTA_Eldritsh.ntl NTA - Kill monster() Failed

J'en déduis que c'est une fonction à trouvé et garnire selon mon build, si vous savez directement comment régler le soucis je suis preneur, sinon je poursuit dans ma recherche, merci.

#9 Euclide_

Euclide_

    YOOOOOOOOOOO

  • Admin Gms
  • 8923 messages
  • Location :France
  • Trade : Mediator

Posté 11 April 2010 - 15:18

Oui, ptet tout en bas de NT_Attack mais je suis pas du tout sur.

#10 Anderlaxe

Anderlaxe

    Newbie lvl 3

  • Membres
  • 21 messages

Posté 11 April 2010 - 15:23

Ok je suis aller dans la sequence Mephisto.ntl et j'ai config l'attaque, mon Assa pose bien des pièges sur le sol, mais à ce moment je deconnecte subitement.

if(!NTA_KillMonster(271))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster(271)");
		return;
	}

Botter, c'est pas simple ;)

EDIT :

Avec ce code :

if(!NTA_KillMonster())
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster(271)");
		return;
	}

Il me renvois : Mephisto.ntl NTA Killmonster(271) Failed

#11 Anderlaxe

Anderlaxe

    Newbie lvl 3

  • Membres
  • 21 messages

Posté 11 April 2010 - 18:31

J'ai trouvés quelques NTAttack.ntl sur le web :

const NTA_DAMAGE_NONE = 0;
const NTA_DAMAGE_PHYSICAL = 1;
const NTA_DAMAGE_MAGIC = 2;
const NTA_DAMAGE_FIRE = 3;
const NTA_DAMAGE_LIGHTNING = 4;
const NTA_DAMAGE_COLD = 5;
const NTA_DAMAGE_POISON = 6;

var _NTA_SkillHand = new Array(6);
var _NTA_SkillDamage = new Array(6);
var _NTA_SkillDelay = new Array(6);

function NTA_Initialize()
{
	for(var i = 0 ; i < 6 ; i++)
	{
		if(NTConfig_AttackSkill[i] > 0)
		{
			_NTA_SkillHand[i] = GetBaseStat("skills.txt", NTConfig_AttackSkill[i], 166) ? 2 : NTC_HAND_RIGHT;
			_NTA_SkillDamage[i] = NTA_GetDamageType(NTConfig_AttackSkill[i]);
			_NTA_SkillDelay[i] = NTC_GetCastDelay(NTConfig_AttackSkill[i]);
		}
	}
}

function NTA_KillBoss(classid)
{
	var _target;

	if(NTConfig_AttackSkill[1] < 1)
		return false;

	_target = NTC_FindMonster(classid);

	if(_target)
	{
		if(NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(_target, _NTA_SkillDamage[0]) < 100)
			NTC_DoCast(NTConfig_AttackSkill[0], _NTA_SkillHand[0], _target);

		return NTA_Attack(_target, true, 100);
	}

	return false;
}

function NTA_ClearPosition(range, spectype)
{
	var _orgx, _orgy;
	var _target;
	var _killnum = 0;

	if(NTConfig_AttackSkill[2] < 1)
		return false;

	if(arguments.length < 1)
		range = 20;

	if(arguments.length < 2)
		spectype = 0;

	_orgx = me.x;
	_orgy = me.y;

	for(var i = 0 ; i < 2 ; i++)
	{
		_target = NTC_GetUnit(NTC_UNIT_MONSTER);

		if(_target)
		{
			do
			{
				if(NTA_IsValidTarget(_target) && (spectype == 0 || (_target.spectype & spectype)) && GetDistance(_orgx, _orgy, _target.x, _target.y) < range)
				{
					if(_killnum == 0)
					{
						if(NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(_target, _NTA_SkillDamage[0]) < 100 && CheckCollision(me, _target, 3))
							NTC_DoCast(NTConfig_AttackSkill[0], _NTA_SkillHand[0], _target);
					}

					if(NTA_Attack(_target, false, 20))
						_killnum++;
				}
			} while(_target.GetNext());
		}
	}

	if(me.classid == NTC_CHAR_CLASS_PALADIN)
	{
		if(NTConfig_CastRedemption && _killnum > 1 && NTC_PutSkill(124, NTC_HAND_RIGHT))
			NTC_PingDelay(1000);
	}

	return (_killnum > 0);
}

function NTA_ClearRooms()
{
	var _room;
	var _rooms;

	_room = GetRoom();

	if(!_room)
		return false;

	_rooms = new Array();

	do
	{
		_rooms.push([parseInt(_room.x*5 + _room.xsize*5/2), parseInt(_room.y*5 + _room.ysize*5/2)]);
	} while(_room.GetNext());

	while(_rooms.length > 0)
	{
		_rooms.sort(NTA_SortRoomInt);
		_room = _rooms.shift();

		NTM_MoveTo(me.areaid, _room[0], _room[1], 0, true);

		NTP_DoPrecastCTA(true);
	}

	return true;
}

function NTA_IsValidTarget(monster, simple)
{
	if(!monster || monster.type != NTC_UNIT_MONSTER)
		return false;

	if(monster.hp <= 0 || monster.mode == 0 || monster.mode == 12)
		return false;

	if(((monster.classid >= 110 && monster.classid <= 113) || monster.classid == 608) && monster.mode == 8) // ignore flying scavengers
		return false;

	if(monster.classid == 68 && monster.mode == 14) // ignore burrowing maggots
		return false;

	if((monster.classid == 258 || monster.classid == 261) && monster.mode == 14) // ignore submerged WaterWatchers
		return false;

	if(monster.GetState(53) || monster.GetState(96)) // Conversion, Revive
		return false;

	if(arguments.length < 2)
		simple = false;

	if(!simple)
	{
		var _name;
		var _parent;

		// dummy
		_name = GetBaseStat("monstats.txt", monster.classid, 5);
		if(!_name || _name.toLowerCase() == "dummy")
			return false;

		// killable
		if(!GetBaseStat("monstats.txt", monster.classid, 89))
			return false;

		// neverCount
		if(GetBaseStat("monstats.txt", monster.classid, 93))
			return false;

		_parent = monster.GetParent();

		if(_parent && _parent.type == NTC_UNIT_PLAYER && !GetPlayerFlag(_parent.gid, me.gid, 8))
			return false;
	}

	return true;
}

function NTA_GetDamageType(skillid)
{
	var _etype;

	if(skillid == 74) // Corpse Explosion
		return NTA_DAMAGE_PHYSICAL;

	if(skillid == 112) // Blessed Hammer
		return NTA_DAMAGE_NONE;

	_etype = GetBaseStat("skills.txt", skillid, 233);

	switch(_etype)
	{
	case "cold": return NTA_DAMAGE_COLD;
	case "fire": return NTA_DAMAGE_FIRE;
	case "ltng": return NTA_DAMAGE_LIGHTNING;
	case "mag": return NTA_DAMAGE_MAGIC;
	case "pois": return NTA_DAMAGE_POISON;
	case "stun": return NTA_DAMAGE_NONE;
	default:
		if(GetBaseStat("skills.txt", skillid, 178) || GetBaseStat("skills.txt", skillid, 182)) // aura or passive
			return NTA_DAMAGE_NONE;
	}

	return NTA_DAMAGE_PHYSICAL;
}

function NTA_GetResistance(enemy, type)
{
	if(!enemy)
		return false;

	if(arguments.length == 2)
	{
		switch(type)
		{
		case NTA_DAMAGE_PHYSICAL:
			return enemy.GetStat(36);

		case NTA_DAMAGE_MAGIC:
			return enemy.GetStat(37);

		case NTA_DAMAGE_FIRE:
			return enemy.GetStat(39);

		case NTA_DAMAGE_LIGHTNING:
			return enemy.GetStat(41);

		case NTA_DAMAGE_COLD:
			return enemy.GetStat(43);

		case NTA_DAMAGE_POISON:
			return enemy.GetStat(45);
		}
	}

	return 0;
}

function NTA_Attack(target, boss, maxattacks)
{
	switch(me.classid)
	{
	case NTC_CHAR_CLASS_AMAZON:
		return NTA_AmazonAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_SORCERESS:
		return NTA_SorceressAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_NECROMANCER:
		return NTA_NecromancerAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_PALADIN:
		return NTA_PaladinAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_BARBARIAN:
		return NTA_BarbarianAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_DRUID:
		return NTA_DruidAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_ASSASSIN:
		return NTA_AssassinAttackInt(target, boss, maxattacks);
	}

	return false;
}

// Internal function
function NTA_AmazonAttackInt(target, boss, maxattacks)
{
	return false;
}

function NTA_SorceressAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 48: // Nova
		_range1 = 10;
		break;
	default:
		_range1 = 20;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 48: // Nova
		_range2 = 10;
		break;
	default:
		_range2 = 20;
		break;
	}

	if(NTConfig_CastStatic < 100)
	{
		var _staticlevel = NTC_CheckSkill(42);

		if(_staticlevel > 0 && NTA_GetResistance(target, NTA_DAMAGE_LIGHTNING) < 100)
		{
			var _cast = 0;
			var _staticrange = Math.floor((5+_staticlevel-1)*2/3);

			while(_cast++ < 10 && NTA_IsValidTarget(target, true) && parseInt(target.hp*100/target.hpmax) > NTConfig_CastStatic && (boss || CheckCollision(me, target, 2)))
			{
				NTA_MoveCloseInt(target, _staticrange);

				if(!NTC_DoCast(42, NTC_HAND_RIGHT, target))
				{
					if(!boss)
						break;
				}
			}
		}
	}

	_prehp = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
				NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			else if(me.areaid != 131)
				return false;
		}

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range1) && !boss)
					return false;
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range2) && !boss)
					return false;
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1)
					NTA_MoveCloseInt(target, _range1);

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 4) == 0 && target.hp >= _prehp)
			{
				if(target.classid == 526)
					return false;
			}

			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_NecromancerAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 67:  // Teeth
	case 84:  // Bone Spear
	case 93:  // Bone Spirit
		_range1 = 10;
		break;
	default:
		_range1 = 20;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 67:  // Teeth
	case 84:  // Bone Spear
	case 93:  // Bone Spirit
		_range2 = 10;
		break;
	default:
		_range2 = 20;
		break;
	}

	_prehp = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
				NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			else if(me.areaid != 131)
				return false;
		}

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range1) && !boss)
					return false;
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range2) && !boss)
					return false;
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1)
					NTA_MoveCloseInt(target, _range1);

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 4) == 0 && target.hp >= _prehp)
			{
				if(target.classid == 526)
					return false;
			}

			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_PaladinAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp1, _prehp2;
	var _nohit = true;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 101: // Holy Bolt
	case 121: // Fist of the Heavens
		_range1 = 20;
		break;
	default:
		_range1 = 2;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 101: // Holy Bolt
	case 121: // Fist of the Heavens
		_range2 = 20;
		break;
	default:
		_range2 = 2;
		break;
	}

	_prehp1 = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 101 || NTConfig_AttackSkill[_primaryindex] == 121)
					NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			}
			else if(me.areaid != 131)
				return false;
		}

		_prehp2 = target.hp;

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 112)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range1) && !boss)
						return false;
				}

				if(NTConfig_PutAura > 0)
					NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[4] == 112)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range2) && !boss)
						return false;
				}

				if(NTConfig_PutAura > 0)
					NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1 && _nohit)
				{
					if(NTConfig_AttackSkill[_primaryindex] == 112)
						NTM_MoveTo(target.areaid, target.x+1, target.y, 0);
					else
						NTA_MoveCloseInt(target, _range1);

					if(NTConfig_PutAura > 0)
						NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
				}

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}

		_nohit = (target.hp >= _prehp2);

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_BarbarianAttackInt(target, boss, maxattacks)
{
	return false;
}

function NTA_DruidAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp1, _prehp2;
	var _nohit = true;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 240: // Twister
	case 245: // Tornado
		_range1 = 20;
		break;
	default:
		_range1 = 2;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 240: // Twister
	case 245: // Tornado
		_range2 = 20;
		break;
	default:
		_range2 = 2;
		break;
	}

	_prehp1 = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 240 || NTConfig_AttackSkill[_primaryindex] == 245)
					NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			}
			else if(me.areaid != 131)
				return false;
		}	

		_prehp2 = target.hp;

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 245)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range1) && !boss)
						return false;
				}
			}
					
			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[4] == 240)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range2) && !boss)
						return false;
				}
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1 && _nohit)
				{
					if(NTConfig_AttackSkill[_primaryindex] == 245)
						NTM_MoveTo(target.areaid, target.x+1, target.y, 0);
					else
						NTA_MoveCloseInt(target, _range1);
				}

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}

		_nohit = (target.hp >= _prehp2);

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_AssassinAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 256: // Shock Field
	case 271: // Lightning Sentry
		_range1 = 10;
		break;
	default:
		_range1 = 20;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 256: // Shock Field
	case 271: // Lightning Sentry
		_range2 = 10;
		break;
	default:
		_range2 = 20;
		break;
	}

	_prehp = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
				NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			else if(me.areaid != 131)
				return false;
		}

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range1) && !boss)
					return false;
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range2) && !boss)
					return false;
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1)
					NTA_MoveCloseInt(target, _range1);

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 4) == 0 && target.hp >= _prehp)
			{
				if(target.classid == 526)
					return false;
			}

			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_DoCastInt(index, target)
{
	var _untimedindex = index < 4 ? 3 : 5;

	if(!NTC_DoCast(NTConfig_AttackSkill[index], _NTA_SkillHand[index], target))
		return false;

	if(_NTA_SkillDelay[index] > 0)
	{
		if(NTConfig_AttackSkill[_untimedindex] > 0)
		{
			var _starttick = GetTickCount();

			while(NTA_IsValidTarget(target, true))
			{
				NTC_DoCast(NTConfig_AttackSkill[_untimedindex], _NTA_SkillHand[_untimedindex], target);

				if(GetTickCount()-_starttick >= _NTA_SkillDelay[index])
					break;
			}
		}
		else
			NTC_Delay(_NTA_SkillDelay[index]);
	}

	return true;
}

function NTA_MoveCloseInt(target, maxrange)
{
	var _dist = GetDistance(me, target);

	if(_dist > maxrange)
	{
		var _destx, _desty;

		_destx = me.x + Math.round((_dist-maxrange)*(target.x-me.x) / _dist);
		_desty = me.y + Math.round((_dist-maxrange)*(target.y-me.y) / _dist);

		return NTM_MoveTo(me.areaid, _destx, _desty, 0);
	}

	return true;
}

function NTA_SortRoomInt(a, <img src='http://img.gmstemple.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt=';)' />
{
	if(GetDistance(me.x, me.y, a[0], a[1]) < GetDistance(me.x, me.y, b[0], b[1]))
		return -1;

	return 1;
}

+

const NTA_DAMAGE_NONE = 0;
const NTA_DAMAGE_PHYSICAL = 1;
const NTA_DAMAGE_MAGIC = 2;
const NTA_DAMAGE_FIRE = 3;
const NTA_DAMAGE_LIGHTNING = 4;
const NTA_DAMAGE_COLD = 5;
const NTA_DAMAGE_POISON = 6;

var _NTA_SkillHand = new Array(6);
var _NTA_SkillDamage = new Array(6);
var _NTA_SkillDelay = new Array(6);

function NTA_Initialize()
{
	for(var i = 0 ; i < 6 ; i++)
	{
		if(NTConfig_AttackSkill[i] > 0)
		{
			_NTA_SkillHand[i] = GetBaseStat("skills.txt", NTConfig_AttackSkill[i], 166) ? 2 : NTC_HAND_RIGHT;
			_NTA_SkillDamage[i] = NTA_GetDamageType(NTConfig_AttackSkill[i]);
			_NTA_SkillDelay[i] = NTC_GetCastDelay(NTConfig_AttackSkill[i]);
		}
	}
}

function NTA_KillBoss(classid)
{
	var _target;

	if(NTConfig_AttackSkill[1] < 1)
		return false;

	_target = NTC_FindMonster(classid);

	if(_target)
	{
		if(NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(_target, _NTA_SkillDamage[0]) < 100)
			NTC_DoCast(NTConfig_AttackSkill[0], _NTA_SkillHand[0], _target);
		return NTA_Attack(_target, true, 100);
	}

	return false;
}

function NTA_ClearPosition(range, spectype)
{
	var _orgx, _orgy;
	var _target;
	var _killnum = 0;

	if(NTConfig_AttackSkill[2] < 1)
		return false;

	if(arguments.length < 1)
		range = 20;

	if(arguments.length < 2)
		spectype = 0;

	_orgx = me.x;
	_orgy = me.y;

	for(var i = 0 ; i < 2 ; i++)
	{
		_target = NTC_GetUnit(NTC_UNIT_MONSTER);

		if(_target)
		{
			do
			{
				if(NTA_IsValidTarget(_target) && (spectype == 0 || (_target.spectype & spectype)) && GetDistance(_orgx, _orgy, _target.x, _target.y) < range)
				{
					if(_killnum == 0)
					{
						if(NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(_target, _NTA_SkillDamage[0]) < 100 && CheckCollision(me, _target, 3))
							NTC_DoCast(NTConfig_AttackSkill[0], _NTA_SkillHand[0], _target);
					}

					if(NTA_Attack(_target, false, 20))
						_killnum++;
				}
			} while(_target.GetNext());
		}
	}

	if(me.classid == NTC_CHAR_CLASS_PALADIN)
	{
		if(NTConfig_UseRedemption && _killnum > 1 && NTC_PutSkill(124, NTC_HAND_RIGHT))
			NTC_PingDelay(1000);
	}

	return (_killnum > 0);
}

function NTA_ClearRooms()
{
	var _room;
	var _rooms;

	_room = GetRoom();

	if(!_room)
		return false;

	_rooms = new Array();

	do
	{
		_rooms.push([parseInt(_room.x*5 + _room.xsize*5/2), parseInt(_room.y*5 + _room.ysize*5/2)]);
	} while(_room.GetNext());

	while(_rooms.length > 0)
	{
		_rooms.sort(NTA_SortRoomInt);
		_room = _rooms.shift();

		NTM_MoveTo(me.areaid, _room[0], _room[1], 0, true);

		NTP_DoPrecastCTA(false);
	}

	return true;
}

function NTA_IsValidTarget(monster, simple)
{
	if(!monster || monster.type != NTC_UNIT_MONSTER)
		return false;

	if(monster.hp <= 0 || monster.mode == 0 || monster.mode == 12)
		return false;

	if(((monster.classid >= 110 && monster.classid <= 113) || monster.classid == 608) && monster.mode == 8) // ignore flying scavengers
		return false;

	if(monster.classid == 68 && monster.mode == 14) // ignore burrowing maggots
		return false;

	if((monster.classid == 258 || monster.classid == 261) && monster.mode == 14) // ignore submerged WaterWatchers
		return false;

	if(monster.GetState(53) || monster.GetState(96)) // Conversion, Revive
		return false;

	if(arguments.length < 2)
		simple = false;

	if(!simple)
	{
		var _name;
		var _parent;

		// dummy
		_name = GetBaseStat("monstats.txt", monster.classid, 5);
		if(!_name || _name.toLowerCase() == "dummy")
			return false;

		// killable
		if(!GetBaseStat("monstats.txt", monster.classid, 89))
			return false;

		// neverCount
		if(GetBaseStat("monstats.txt", monster.classid, 93))
			return false;

		_parent = monster.GetParent();

		if(_parent && _parent.type == NTC_UNIT_PLAYER && !GetPlayerFlag(_parent.gid, me.gid, 8))
			return false;
	}

	return true;
}

function NTA_GetDamageType(skillid)
{
	var _etype;

	if(skillid == 74) // Corpse Explosion
		return NTA_DAMAGE_PHYSICAL;

	if(skillid == 112) // Blessed Hammer
		return NTA_DAMAGE_NONE;

	if(skillid == 245) // Tornado
		return NTA_DAMAGE_NONE;

	_etype = GetBaseStat("skills.txt", skillid, 233);

	switch(_etype)
	{
	case "cold": return NTA_DAMAGE_COLD;
	case "fire": return NTA_DAMAGE_FIRE;
	case "ltng": return NTA_DAMAGE_LIGHTNING;
	case "mag": return NTA_DAMAGE_MAGIC;
	case "pois": return NTA_DAMAGE_POISON;
	case "stun": return NTA_DAMAGE_NONE;
	default:
		if(GetBaseStat("skills.txt", skillid, 178) || GetBaseStat("skills.txt", skillid, 182)) // aura or passive
			return NTA_DAMAGE_NONE;
	}

	return NTA_DAMAGE_PHYSICAL;
}

function NTA_GetResistance(enemy, type)
{
	if(!enemy)
		return false;

	if(arguments.length == 2)
	{
		switch(type)
		{
		case NTA_DAMAGE_PHYSICAL:
			return enemy.GetStat(36);

		case NTA_DAMAGE_MAGIC:
			return enemy.GetStat(37);

		case NTA_DAMAGE_FIRE:
			return enemy.GetStat(39);

		case NTA_DAMAGE_LIGHTNING:
			return enemy.GetStat(41);

		case NTA_DAMAGE_COLD:
			return enemy.GetStat(43);

		case NTA_DAMAGE_POISON:
			return enemy.GetStat(45);
		}
	}

	return 0;
}

function NTA_Attack(target, boss, maxattacks)
{
	switch(me.classid)
	{
	case NTC_CHAR_CLASS_AMAZON:
		return NTA_AmazonAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_SORCERESS:
		return NTA_SorceressAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_NECROMANCER:
		return NTA_NecromancerAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_PALADIN:
		return NTA_PaladinAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_BARBARIAN:
		return NTA_BarbarianAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_DRUID:
		return NTA_DruidAttackInt(target, boss, maxattacks);

	case NTC_CHAR_CLASS_ASSASSIN:
		return NTA_AssassinAttackInt(target, boss, maxattacks);
	}

	return false;
}

// Internal function
function NTA_AmazonAttackInt(target, boss, maxattacks)
{
	return false;
}

function NTA_SorceressAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 48: // Nova
		_range1 = 10;
		break;
	default:
		_range1 = 20;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 48: // Nova
		_range2 = 10;
		break;
	default:
		_range2 = 20;
		break;
	}

	if(NTConfig_CastStatic < 100)
	{
		var _staticlevel = NTC_CheckSkill(42);

		if(_staticlevel > 0 && NTA_GetResistance(target, NTA_DAMAGE_LIGHTNING) < 100)
		{
			var _cast = 0;
			var _staticrange = Math.floor((5+_staticlevel-1)*2/3);

			while(_cast++ < 10 && NTA_IsValidTarget(target, true) && parseInt(target.hp*100/target.hpmax) > NTConfig_CastStatic && (boss || CheckCollision(me, target, 2)))
			{
				NTA_MoveCloseInt(target, _staticrange);

				if(!NTC_DoCast(42, NTC_HAND_RIGHT, target))
				{
					if(!boss)
						break;
				}
			}
		}
	}

	_prehp = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
				NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			else if(me.areaid != 131)
				return false;
		}

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range1) && !boss)
					return false;
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range2) && !boss)
					return false;
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1)
					NTA_MoveCloseInt(target, _range1);

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 4) == 0 && target.hp >= _prehp)
			{
				if(target.classid == 526)
					return false;
			}

			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_NecromancerAttackInt(target, boss, maxattacks)
{
	return false;
}

function NTA_PaladinAttackInt(target, boss, maxattacks)
{
	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp1, _prehp2;
	var _nohit = true;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	case 101: // Holy Bolt
	case 121: // Fist of the Heavens
		_range1 = 20;
		break;
	default:
		_range1 = 2;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	case 101: // Holy Bolt
	case 121: // Fist of the Heavens
		_range2 = 20;
		break;
	default:
		_range2 = 2;
		break;
	}

	_prehp1 = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 101 || NTConfig_AttackSkill[_primaryindex] == 121)
					NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			}
			else if(me.areaid != 131)
				return false;
		}

		_prehp2 = target.hp;

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 112)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range1) && !boss)
						return false;
				}

				if(NTConfig_PutAura > 0)
					NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[4] == 112)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range2) && !boss)
						return false;
				}

				if(NTConfig_PutAura > 0)
					NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1 && _nohit)
				{
					if(NTConfig_AttackSkill[_primaryindex] == 112)
						NTM_MoveTo(target.areaid, target.x+1, target.y, 0);
					else
						NTA_MoveCloseInt(target, _range1);

					if(NTConfig_PutAura > 0)
						NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
				}

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}

		_nohit = (target.hp >= _prehp2);

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_BarbarianAttackInt(target, boss, maxattacks)
{
	return false;
}

function NTA_DruidAttackInt(target, boss, maxattacks)
{

	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp1, _prehp2;
	var _nohit = true;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	default:
		_range1 = 2;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	default:
		_range2 = 2;
		break;
	}

	_prehp1 = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
				NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			
			else if(me.areaid != 131)
				return false;
		}

		_prehp2 = target.hp;

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[_primaryindex] == 245)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range1) && !boss)
						return false;
				}

			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1 && _nohit)
			{
				if(NTConfig_AttackSkill[4] == 245)
				{
					if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
						return false;
				}
				else
				{
					if(!NTA_MoveCloseInt(target, _range2) && !boss)
						return false;
				}
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1 && _nohit)
				{
					if(NTConfig_AttackSkill[_primaryindex] == 245)
						NTM_MoveTo(target.areaid, target.x+1, target.y, 0);
					else
						NTA_MoveCloseInt(target, _range1);
				}

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(boss)
		{
			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp1)
					_prehp1 = target.hp;
				else
					return false;
			}
		}

		_nohit = (target.hp >= _prehp2);

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_AssassinAttackInt(target, boss, maxattacks)
{

	var _primaryindex;
	var _maxattacks = 0;
	var _range1, _range2;
	var _prehp;

	_primaryindex = boss ? 1 : 2;

	switch(NTConfig_AttackSkill[_primaryindex])
	{
	default:
		_range1 = 20;
		break;
	}

	switch(NTConfig_AttackSkill[4])
	{
	default:
		_range2 = 20;
		break;
	}

	_prehp = target.hp;

	while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
	{
		if(!CheckCollision(me, target, 3))
		{
			if(boss)
				NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
			else if(me.areaid != 131)
				return false;
		}

		if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range1) && !boss)
					return false;
			}

			NTA_DoCastInt(_primaryindex, target);
		}
		else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
		{
			if((_maxattacks % 2) == 1)
			{
				if(!NTA_MoveCloseInt(target, _range2) && !boss)
					return false;
			}

			NTA_DoCastInt(4, target);
		}
		else
		{
			if(boss)
			{
				if((_maxattacks % 2) == 1)
					NTA_MoveCloseInt(target, _range1);

				NTA_DoCastInt(_primaryindex, target);
			}
			else
				return false;
		}

		if(NTConfig_AttackSkill[1]=271)
		NTC_PingDelay(200)

		if(boss)
		{
			if((_maxattacks % 4) == 0 && target.hp >= _prehp)
			{
				if(target.classid == 526)
					return false;
			}

			if((_maxattacks % 8) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}
		else
		{
			if((_maxattacks % 4) == 0)
			{
				if(target.hp < _prehp)
					_prehp = target.hp;
				else
					return false;
			}
		}

		if(NTConfig_CheckSafe)
		{
			if(!NTTMGR_CheckSafe(1))
				return false;
		}
	}

	return true;
}

function NTA_DoCastInt(index, target)
{
	var _untimedindex = index < 4 ? 3 : 5;

	if(!NTC_DoCast(NTConfig_AttackSkill[index], _NTA_SkillHand[index], target))
		return false;

	if(_NTA_SkillDelay[index] > 0)
	{
		if(NTConfig_AttackSkill[_untimedindex] > 0)
		{
			var _starttick = GetTickCount();

			while(NTA_IsValidTarget(target, true))
			{
				NTC_DoCast(NTConfig_AttackSkill[_untimedindex], _NTA_SkillHand[_untimedindex], target);

				if(GetTickCount()-_starttick >= _NTA_SkillDelay[index])
					break;
			}
		}
		else
			NTC_Delay(_NTA_SkillDelay[index]);
	}

	return true;
}

function NTA_MoveCloseInt(target, maxrange)
{
	var _dist = GetDistance(me, target);

	if(_dist > maxrange)
	{
		var _destx, _desty;

		_destx = me.x + Math.round((_dist-maxrange)*(target.x-me.x) / _dist);
		_desty = me.y + Math.round((_dist-maxrange)*(target.y-me.y) / _dist);

		return NTM_MoveTo(me.areaid, _destx, _desty, 0);
	}

	return true;
}

function NTA_SortRoomInt(a, <img src='http://img.gmstemple.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt=':)' />
{
	if(GetDistance(me.x, me.y, a[0], a[1]) < GetDistance(me.x, me.y, b[0], b[1]))
		return -1;

	return 1;
}

Le résultat demeur aussi peu concluant que les précédents.

Faut-il configurer chaque séquences (mephisto.ntl, andy.ntl etc ...) ? Si oui où est-ce qu'il faut intervenir, car j'ai tout essayer concernant les NTA_Killmonster(0)

Et en fait j'ai déconner, il n'y a aucun piège qui se pose :/

#12 Euclide_

Euclide_

    YOOOOOOOOOOO

  • Admin Gms
  • 8923 messages
  • Location :France
  • Trade : Mediator

Posté 11 April 2010 - 18:36

Je ne sais pas trop.

Je n'ai pas de perso autre qu'une sorc sous la main pour voir comment le bot réagit.

#13 darkness-stone

darkness-stone

    Fragger Pro

  • Membres
  • 1215 messages
  • Location :Dans un coin sombre, attendant sagement la mort.
  • Hobbies :Rien foutre, tout critiquer et me plaindre ensuite.

Posté 12 April 2010 - 00:18

Il faut que tu script simplement la séquence de l'assassin.


Nous ne sommes que rêves et souvenirs, Hors de la trame des Songes,Hérauts fétides de la morbidité qui nous ronge,Nous sommes les Prophètes d'un sombre avenir,Quand les Abysses se soulèveront, Viendra alors le sifflement des Serpents,Nul ne mettra en doute notre avènement,Votre foi deviendra votre malédiction.Quand chanteront les Grands Vers, l'Hymne de la Destruction, alors nous serons.Mes guides :FAQ : %5BFaq%5D D2Nt 3.0 Et 3.1Template : Paladin Avenger 1.12 | Sorcière pure Foudre 1.12Tuto bot :Tuto - D2NT 1.7.2 : 1.0x-1.12 | Tuto D2NT 3.0/1: 1.13 | LeechBot pour D2NT 3.0/1 | D2NT - Baalruns plus sûrs | D2NT - Leech no fightExtension D2NT : D2NT - Extension Map Scripts | D2NT - Extension Classes ScriptsTravaux en cours : D2NT 3.0/1 - Pick-list tutoriel ; D2NT 3.0/1 - Traduction d'installation de nouveaux scripts

#14 damda58

damda58

    Irc Florilègeur

  • Membres
  • 285 messages
  • Hobbies :de quoi ça s'agit ?

Posté 09 May 2010 - 23:44

Je bot avec une assa trap voila mon NT_attak et ma sequence si tu veut

espérant t'avoir dépanner ;)

edit: supprimé aucune nouvelles c cool !
Have fun ! Dohmien

Thx ;)Image IPB


#15 ostalakar

ostalakar

    Débutant lvl 3

  • Membres
  • 81 messages

Posté 10 May 2010 - 19:43

NTConfig_AttackSkill[0] = 271; // Anfangsskill (wird nur EIN mal gecastet) 0 = keinen
NTConfig_AttackSkill[1] = 271; // Welcher Skill soll beim Angriff gegen Bosse aktiv sein? 0 = keiner
NTConfig_AttackSkill[2] = 0; // Welche Aura soll beim Angriff gegen Bosse aktiv sein? 0 = keine
NTConfig_AttackSkill[3] = 271; // Welcher Skill soll beim Angriff gegen andere Monster aktiv sein? 0 = keiner
NTConfig_AttackSkill[4] = 0; // Welche Aura soll beim Angriff gegen andere Monster aktiv sein? 0 = keine
NTConfig_AttackSkill[5] = 251; // Zweitskill, falls ein Monster immun gegen den Hauptskill ist 0 = keinen
NTConfig_AttackSkill[6] = 0; // Zweitaura.0 = keine (braucht man eigentlich nicht)
NTConfig_ClearPosition = false; // Auf true setzen, dann cleart der Bot die nahe Umgebung des Bosses.