Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Diablo 2
You last visited: Today at 01:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Cow lvl Bluebird?

Discussion on Cow lvl Bluebird? within the Diablo 2 forum part of the Other Online Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2010
Posts: 634
Received Thanks: 37
Cow lvl Bluebird?

Bräuchte mal eben shcnell hilfe wie stellt ich ein das der in Cow lvl farmt in dem "Bots" ordner gibs kein Cow config
xXSaint*NoarXx is offline  
Old 04/25/2010, 02:26   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 150
Received Thanks: 9
Sicher?

Charconfig:
Code:
NTConfig_Script.push("NTKuhlevel.ntj"); NTConfig_KillRakanishu = true; NTConfig_ClearTristram = false; NTConfig_MooMooFarm = true;
NTKuhlevel.ntj:

Code:
const _NTR_STRING_COW_KING = GetLocaleString(2850);
const _NTR_COW_KING_RANGE  = 125;
const _NTR_STRING_PORTAL = GetLocaleString(3226);

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

	NT_LoadConfig();
	NTSI_LoadNIPFiles("NTBot/item_configs");

	NTA_Initialize();



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

	NTTMGR_TownManager();

	if(!NTTM_TownMove("waypoint"))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
		return;
	}

	if(!NTM_TakeWaypoint(4))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
		return;
	}

	NTP_DoPrecast(true);

	if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_MONSTER, 737, 10, 10))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
		return;
	}

	if(NTConfig_KillRakanishu)
	{
		if(!NTTMGR_CheckSafe(0x00, NTConfig_CheckMercSafe&0x01))
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
			return;
		}

		if(NTA_KillMonster(GetLocaleString(2872)))
		{
			if(NTConfig_ClearPosition)
				NTA_ClearPosition();

			NTSI_PickItems();
		}
	}

	if(!NTM_UsePortal("Portal", 38))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTM_UsePortal()");
		return;
	}

	if(NTConfig_ClearTristram)
	{

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

	if(NTConfig_MooMooFarm)
	{
		

		var _wirtbody, _cube, _leg, _portal, _stash, _items, i, _npc, prearea;

		NTM_MoveTo(me.areaid, 25047, 5178);
		if(NTA_ClearPosition(10))
		{
			NTSI_PickItems();
		}
		
		_wirtbody = NTC_GetUnit(NTC_UNIT_OBJECT, 268);		

		if(!_wirtbody)
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "Wirt's body not found.");
			return;
		}

		if(NTM_MoveTo(_wirtbody.areaid, _wirtbody.x+3, _wirtbody.y))
		{
			if(NTC_OpenChest(_wirtbody))
			{
				NTC_PingDelay(500);
				for (i = 0; i < 10; i++)
				{
					_leg = NTC_GetUnit(NTC_UNIT_ITEM, 88);
					if (_leg)
						break;
				}
				if(!NTT_CheckSpace(_leg.xsize, _leg.ysize))
				{
					_prearea = me.areaid;
					if(NTTM_CheckAct())
					{
						NTTMGR_TownManager(true);
						NTTM_TownMove("portalspot")
						NTM_UsePortal("BluePortal", _prearea)
					}
				}
				for (i = 0; i < 20; i++)
				{
					if ((i % 5) == 0)
					{
						if (_leg.mode == 3 || _leg.mode == 5)
						{
							if (NTC_ClearCursor())
								NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _leg);
						}
					}

					NTC_PingDelay(100);

					if (_leg.mode != 3 && _leg.mode != 5)
					{
						
						NTC_PingDelay(200);
						break;
					}
				}
			}
		}

		if(!_leg)
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "No leg found.");
			return;
		}

		NTM_MakeTP();

		NTM_UsePortal("BluePortal");

		if(me.classid == NTC_CHAR_CLASS_PALADIN)
		{
			NTC_PutSkill(115, NTC_HAND_RIGHT);
		}

		NTTMGR_TownManager();

		NTTM_TownMove("akara");

		for(var i = 0 ; i < 10 ; i++)
		{
			_npc = NTC_GetUnit(NTC_UNIT_NPC, NTC_NPC_ID_AKARA);
			if(_npc)
				break;
		}

		if(_npc)
		{
			if(NTT_DoInteract(_npc))
			{
				if(NTT_DoTrade(_npc))
				{
					NTT_FillTome(_npc, 1);
					NTT_FillTome(_npc, 0);
					NTT_FillKey(_npc);
					NTTMGR_IDItems(_npc);
					NTT_SecondTomeTP(_npc, "tbk", 1);
					_portal = NTR_GetTP();
				}
			}
			NTT_MenuCancel();
		}

		NTTM_TownMove("stash");
		for(var i = 0 ; i < 10 ; i++)
		{
			_stash = NTC_GetUnit(NTC_UNIT_OBJECT, NTC_UNIT_STASH);
			if(_stash)
				break;
		}

		if(NTT_DoInteract(_stash))
		{
			_items = me.GetItems(NTC_UNIT_CUBE);
			_cube = _items[0];
			if(!_cube)
			{
				NTC_SendMsgToScript("NTBotGame.ntj", "No cube found.");
				return;
			}
			if(NTCU_CheckCubeInventoryInt() > 0)
			{
				NTCU_OpenCubeInt(_cube)
				if(NTCU_ClearCubeInt() < 1)
				{
					NTC_SendMsgToScript("NTBotGame.ntj", "Cube cannot be emptied.");
					return;
				}
				NTCU_CloseCubeInt();
			}
			NTCU_OpenCubeInt(_cube);
			NTCU_ItemToCubeInt(_leg, 0, 0)
			NTCU_ItemToCubeInt(_portal, 1, 0)         
			Transmute();
			NTCU_CloseCubeInt();
			NTT_DoInteract(_stash);

			NTT_ManageStash();
			NTT_MenuCancel();
		}
		
		NTC_PingDelay(500);
		if(!NTR_TakeCowPortal(12))
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "Failed to take Cow Portal.");
			return;
		}
		NTP_DoPrecast();
		NTR_ClearRooms(150, NTC_UNIT_MONSTER, 773, _NTR_COW_KING_RANGE);
	}

	NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}


// Internal functions

function NTT_SecondTomeTP(npc, type, amount)
{
	var _items;
	var _counter = 0;

	if(arguments.length < 1)
		return false;

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

	if(arguments.length < 0)
		amount = 1;

	if(amount == 0)
		return false;

	if(type)
		_items = npc.GetItems("tbk");

	if(_items)
	{
		if(_items.length > 0)
		{
			for(var i = 0 ; i < amount ; i++)
			{
				if(NTT_ShopItem(_items[0], npc, 2))
					_counter++;
			}
		}
	}

	return (_counter > 0);
}

function NTCU_ItemToCubeInt(item, destx, desty)
{
	var x, y;
	var _itemx, _itemy;

	if(item.itemloc == 3)
		return true;

	_itemx = item.x;
	_itemy = item.y;

	if(!NTC_ItemToCursor(item))
		return false;

	if(item.itemloc == 0)
	{
		for(y = 0 ; y < item.ysize ; y++)
		{
			for(x = 0 ; x < item.xsize ; x++)
				_NTCU_Inventory[_itemy+y][_itemx+x] = 0;
		}
	}

	for(x = 0 ; x < 80 ; x++)
	{
		if((x % 40) == 0)
			me.ClickItem(0, destx, desty, 3);

		NTC_Delay(100);

		if(!me.itemoncursor)
			break;
	}

	if(x >= 80)
		return false;

	NTC_PingDelay(200);

	return true;
}

function NTR_GetTP()
{
	var _portals = me.GetItems("tbk");

	if (_portals)
	{
		for (var i = 0; i < _portals.length; i++)
		{
			if (_portals[i].mode == 0 && (_portals[i].itemloc != 0 || NTConfig_Columns[_portals[i].y][_portals[i].x] > 0))
			{
				return _portals[i];
			}
		}
	}
	return false;
}

function NTC_GetUnit(unittype, classid)
{
	var _unit;

	for(var i = 0 ; i < 2 ; i++)
	{
		if(arguments.length < 2)
			_unit = GetUnit(unittype);
		else
			_unit = GetUnit(unittype, classid);

		if(_unit)
			return _unit;

		if(i < 1)
			NTC_PingDelay(200);
	}

	return false;
}

function NTR_TakeCowPortal(range)
{
	var _portal = NTC_GetUnit(NTC_UNIT_OBJECT, _NTR_STRING_PORTAL);

	if (_portal)
	{
		var _isClick;
		var _preAreaId = me.areaid;

		do
		{
			if (GetDistance(me, _portal) < range && _portal.mode == 2)
			{
				for (var i = 0; i < 40; i++)
				{
					if ((i % 10) == 0)
					{
						if(NTM_GetCloserInt(_portal))
							_isClick = NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _portal);
					}
					if (_isClick)
					{
						NTC_Delay(100);
						break;
					}
				}
				NTC_PingDelay(500);

				if (me.areaid != _preAreaId)
				{
					NTC_PingDelay(200);
					return true;
				}
			}
		} while (_portal.GetNext());
	}
	return false;
}

function NTT_MenuCancel()
{
	var i;

	for(i = 0 ; i < 4 ; i++)
	{
		if(GetUIState(0x0C) || GetUIState(0x0D) || GetUIState(0x14) || GetUIState(0x19) || GetUIState(0x1A) || GetUIState(0x24))
		{
			me.Cancel(0);
			NTC_Delay(500);
		}
		else
			break;
	}

	for(i = 0 ; i < 4 ; i++)
	{
		if(GetUIState(0x08) || GetUIState(0x17))
		{
			me.Cancel(1);
			NTC_PingDelay(500);
		}
		else
			break;
	}
}

function NTR_ClearRooms(range, type, id, distance)
{
	var i;
	var _unit;
	var _preRoom;
	var _addRooms    = new Array();
	var _removeRooms = new Array();

	if (distance)
	{
		_unit = GetPresetUnits(me.areaid, type, id);
		if (!_unit || _unit.length < 1)
			return false;
	}

	_preRoom = GetRoom();
	if (_preRoom)
	{
		do
		{
			if (distance)
			{
				if (GetDistance(_preRoom.x * 5, _preRoom.y * 5, _unit[0].roomx * 5, _unit[0].roomy * 5) < distance)
					continue;
			}
			_addRooms.push([_preRoom.x * 5, _preRoom.y * 5]);
		} while (_preRoom.GetNext());
	}

	if (_addRooms.length < 1)
		return false;

	_preRoom = [me.x, me.y];

	while (_addRooms.length > 0)
	{
		_addRooms.sort(function (a, b) { return (GetDistance(_preRoom[0], _preRoom[1], a[0], a[1]) - GetDistance(_preRoom[0], _preRoom[1], b[0], b[1])); });

		_removeRooms.push([_addRooms[0][0], _addRooms[0][1]]);

		for (i = 1; i < _addRooms.length; i++)
		{
			if (GetDistance(_preRoom[0], _preRoom[1], _addRooms[i][0], _addRooms[i][1]) <= GetDistance(_preRoom[0], _preRoom[1], _addRooms[0][0], _addRooms[0][1]))
			{
				_removeRooms.push([_addRooms[i][0], _addRooms[i][1]]);
			}
			else
				break;
		}

		if (_removeRooms.length > 1)
		{
			_removeRooms.sort(function (a, b) { return (b[0] - a[0]); });
			if (_removeRooms[0][0] <= _preRoom[0])
			{
				_removeRooms.sort(function (a, b) { return (b[1] - a[1]); });
				if (_removeRooms[0][1] <= _preRoom[1])
				{
					_removeRooms.sort(function (a, b) { return (a[0] - b[0]); });
					if (_removeRooms[0][0] >= _preRoom[0])
						_removeRooms.sort(function (a, b) { return (a[1] - b[1]); });
				}
			}
		}

		if (!range || GetDistance(me.x, me.y, _removeRooms[0][0], _removeRooms[0][1]) < range)
		{
			if (NTR_MoveTo(me.areaid, _removeRooms[0][0], _removeRooms[0][1], 3, true))
				_preRoom = _removeRooms[0];
		}

		for (i = 0; i < _addRooms.length; i++)
		{
			if (_addRooms[i][0] == _removeRooms[0][0] && _addRooms[i][1] == _removeRooms[0][1])
			{
				_addRooms.splice(i, 1);
				break;
			}
		}
		_removeRooms.length = 0;
	}
	return true;
}

function NTC_WaitCastDone()
{
	var _mode;

	for(var i = 0 ; i < 25 ; i++)
	{
		_mode = me.mode;

		if(!(_mode == 7 || _mode == 8 || (_mode >= 10 && _mode <= 16) || _mode == 18))
			return true;

		NTC_Delay(NTC_DELAY_FRAME);
	}

	return false;
}

function NTR_MoveTo(areaId, x, y, retry, isClearPath)
{
	if (!NTC_WaitCastDone())
		return false;

	if (x == me.x && y == me.y)
		return true;

	if (arguments.length < 4) 
		retry       = 3;
	if (arguments.length < 5) 
		isClearPath = false;

	var i, j;
	var _path;
	var _checkPath;
	var _preX, _preY;

	_path = GetPath(areaId, me.x, me.y, x, y, true);
	if (!_path)
		return false;

	for (i = 0; i < _path.length; i++)
	{
		if (NTR_CheckCowKing() || NTR_CheckSafe(_path[i][0], _path[i][1], 15))
		{
			for (j = 0; j < retry; j++)
			{
				if (NTM_TeleportTo(_path[i][0], _path[i][1]))
					break;
			}

			if (j >= retry)
				return false;
		}

		if (isClearPath && !NTR_CheckCowKing())
		{
			_preX = me.x;
			_preY = me.y;

			if(NTR_ClearPosition(30))
				NTSI_PickItems();

			if (me.x != _preX || me.y != _preY)
			{
				if ((i + 1) < _path.length)
				{
					_checkPath = GetPath(me.areaid, me.x, me.y, _path[i + 1][0], _path[i + 1][1], true);
					if (_checkPath)
					{
						if (_checkPath.length > 1)
						{
							if (!NTM_MoveTo(me.areaid, _preX, _preY))
								return false;
						}
					}
				}
			}
		}
	}
	return true;
}


function NTR_CheckCowKing()
{
	var _cowKing = GetUnit(NTC_UNIT_MONSTER, _NTR_STRING_COW_KING);
	return (_cowKing && GetDistance(me, _cowKing) < _NTR_COW_KING_RANGE);
}


function NTR_CheckSafe(x, y, range)
{
	var i;
	var _target = GetUnit(NTC_UNIT_MONSTER);

	if (_target)
	{
		do
		{
			if (GetDistance(x, y, _target.x, _target.y) < range && NTA_IsValidTarget(_target, false))
			{
				for (i = 0; i < 6; i++)
				{
					if (NTConfig_AttackSkill[i] && NTA_GetResistance(_target, _NTA_SkillDamage[i]) < 100)
						return false;
				}
			}
		} while (_target.GetNext());
	}

	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)
		return monster.IsAttackable();

	return true;
}

function NTC_DoCast(skillid, usehand, x, y)
{
	var _hand;
	var _shift;

	if(arguments.length < 1)
		return false;

	if(arguments.length == 1)
	{
		_hand = NTC_CLICK_RDOWN;
		_shift = NTC_SHIFT_NONE;
		usehand = NTC_HAND_RIGHT;
	}
	else
	{
		if(usehand == NTC_HAND_RIGHT)
		{
			_hand = NTC_CLICK_RDOWN;
			_shift = NTC_SHIFT_NONE;
		}
		else if(usehand == NTC_HAND_LEFT)
		{
			_hand = NTC_CLICK_LDOWN;
			_shift = NTC_SHIFT_NONE;
		}
		else
		{
			_hand = NTC_CLICK_LDOWN;
			_shift = NTC_SHIFT_HOLD;
			usehand = NTC_HAND_LEFT;
		}
	}

	if(NTC_PutSkill(skillid, usehand))
	{
		var i, n;
		var _downhold;
		var _mode;

		if(!NTC_ClearCursor())
			return false;

		for(i = 0 ; i < 2 ; i++)
		{
			for(n = 0 ; n < 15 ; n++)
			{
				_downhold = n > 0 ? _hand+1 : _hand;

				switch(arguments.length)
				{
				case 1:
				case 2:
					ClickMap(_downhold, _shift, me.x, me.y);
					break;

				case 3:
					if(!ClickMap(_downhold, _shift, x))
					{
						if(n > 0)
						{
							ClickMap(_hand+2, _shift, me.x, me.y);
							NTC_Delay(NTC_DELAY_FRAME);
						}

						return false;
					}
					break;

				case 4:
					ClickMap(_downhold, _shift, x, y);
					break;
				}

				NTC_Delay(NTC_DELAY_FRAME);

				_mode = me.mode;

				if(_mode == 7 || _mode == 8 || (_mode >= 10 && _mode <= 16) || _mode == 18)
				{
					NTC_Delay(NTC_DELAY_FRAME);
					break;
				}
			}

			switch(arguments.length)
			{
			case 1:
			case 2:
				ClickMap(_hand+2, _shift, me.x, me.y);
				break;

			case 3:
				ClickMap(_hand+2, _shift, x);
				break;

			case 4:
				ClickMap(_hand+2, _shift, x, y);
				break;
			}

			if(n < 15)
				return NTC_WaitCastDone();

			NTC_Delay(NTC_DELAY_FRAME);
		}
	}

	return false;
}

function NTR_ClearPosition(range, spectype)
{
	if(NTConfig_AttackSkill[1] < 1)
		return false;

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

	var _killnum = 0;
	var _target  = GetUnit(NTC_UNIT_MONSTER);

	if(_target)
	{
		var _orgx = me.x;
		var _orgy = me.y;

		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(NTR_CheckCowKing())
					return false;

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

		if(me.classid == NTC_CHAR_CLASS_PALADIN && NTConfig_CastRedemption)
		{
			if(_killnum > 2 && (parseInt(me.hp*100/me.hpmax) <= 80 || parseInt(me.mp*100/me.mpmax) <= 80))
			{
				NTC_PutSkill(124, NTC_HAND_RIGHT);
				NTC_PingDelay(1100);
			}
		}

		if(NTConfig_CheckSafe && _killnum > 0)
			NTTMGR_CheckSafe(1);
	}

	if(!me.GetState(32) || !me.GetState(51))
	{
		if(NTP_BOSwitch())
		{
			NTC_DoCast(155, NTC_HAND_RIGHT); // Battle Command
			NTC_DoCast(149, NTC_HAND_RIGHT); // Battle Orders
			NTC_DoCast(138, NTC_HAND_RIGHT); // Shout

			NTC_SwapWeapons();
		}
	}
	if(!me.GetState(101) && me.classid == NTC_CHAR_CLASS_PALADIN && NTConfig_CastHolyShield)
		NTC_DoCast(117, NTC_HAND_RIGHT);

	return true;
}
ColtCabana is offline  
Thanks
1 User
Old 04/25/2010, 02:33   #3
 
elite*gold: 0
Join Date: Apr 2010
Posts: 634
Received Thanks: 37
Quote:
Originally Posted by ColtCabana View Post
Sicher?

Charconfig:
Code:
NTConfig_Script.push("NTKuhlevel.ntj"); NTConfig_KillRakanishu = true; NTConfig_ClearTristram = false; NTConfig_MooMooFarm = true;
NTKuhlevel.ntj:

Code:
const _NTR_STRING_COW_KING = GetLocaleString(2850);
const _NTR_COW_KING_RANGE  = 125;
const _NTR_STRING_PORTAL = GetLocaleString(3226);

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

	NT_LoadConfig();
	NTSI_LoadNIPFiles("NTBot/item_configs");

	NTA_Initialize();



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

	NTTMGR_TownManager();

	if(!NTTM_TownMove("waypoint"))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
		return;
	}

	if(!NTM_TakeWaypoint(4))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
		return;
	}

	NTP_DoPrecast(true);

	if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_MONSTER, 737, 10, 10))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
		return;
	}

	if(NTConfig_KillRakanishu)
	{
		if(!NTTMGR_CheckSafe(0x00, NTConfig_CheckMercSafe&0x01))
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
			return;
		}

		if(NTA_KillMonster(GetLocaleString(2872)))
		{
			if(NTConfig_ClearPosition)
				NTA_ClearPosition();

			NTSI_PickItems();
		}
	}

	if(!NTM_UsePortal("Portal", 38))
	{
		NTC_SendMsgToScript("NTBotGame.ntj", "NTM_UsePortal()");
		return;
	}

	if(NTConfig_ClearTristram)
	{

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

	if(NTConfig_MooMooFarm)
	{
		

		var _wirtbody, _cube, _leg, _portal, _stash, _items, i, _npc, prearea;

		NTM_MoveTo(me.areaid, 25047, 5178);
		if(NTA_ClearPosition(10))
		{
			NTSI_PickItems();
		}
		
		_wirtbody = NTC_GetUnit(NTC_UNIT_OBJECT, 268);		

		if(!_wirtbody)
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "Wirt's body not found.");
			return;
		}

		if(NTM_MoveTo(_wirtbody.areaid, _wirtbody.x+3, _wirtbody.y))
		{
			if(NTC_OpenChest(_wirtbody))
			{
				NTC_PingDelay(500);
				for (i = 0; i < 10; i++)
				{
					_leg = NTC_GetUnit(NTC_UNIT_ITEM, 88);
					if (_leg)
						break;
				}
				if(!NTT_CheckSpace(_leg.xsize, _leg.ysize))
				{
					_prearea = me.areaid;
					if(NTTM_CheckAct())
					{
						NTTMGR_TownManager(true);
						NTTM_TownMove("portalspot")
						NTM_UsePortal("BluePortal", _prearea)
					}
				}
				for (i = 0; i < 20; i++)
				{
					if ((i % 5) == 0)
					{
						if (_leg.mode == 3 || _leg.mode == 5)
						{
							if (NTC_ClearCursor())
								NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _leg);
						}
					}

					NTC_PingDelay(100);

					if (_leg.mode != 3 && _leg.mode != 5)
					{
						
						NTC_PingDelay(200);
						break;
					}
				}
			}
		}

		if(!_leg)
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "No leg found.");
			return;
		}

		NTM_MakeTP();

		NTM_UsePortal("BluePortal");

		if(me.classid == NTC_CHAR_CLASS_PALADIN)
		{
			NTC_PutSkill(115, NTC_HAND_RIGHT);
		}

		NTTMGR_TownManager();

		NTTM_TownMove("akara");

		for(var i = 0 ; i < 10 ; i++)
		{
			_npc = NTC_GetUnit(NTC_UNIT_NPC, NTC_NPC_ID_AKARA);
			if(_npc)
				break;
		}

		if(_npc)
		{
			if(NTT_DoInteract(_npc))
			{
				if(NTT_DoTrade(_npc))
				{
					NTT_FillTome(_npc, 1);
					NTT_FillTome(_npc, 0);
					NTT_FillKey(_npc);
					NTTMGR_IDItems(_npc);
					NTT_SecondTomeTP(_npc, "tbk", 1);
					_portal = NTR_GetTP();
				}
			}
			NTT_MenuCancel();
		}

		NTTM_TownMove("stash");
		for(var i = 0 ; i < 10 ; i++)
		{
			_stash = NTC_GetUnit(NTC_UNIT_OBJECT, NTC_UNIT_STASH);
			if(_stash)
				break;
		}

		if(NTT_DoInteract(_stash))
		{
			_items = me.GetItems(NTC_UNIT_CUBE);
			_cube = _items[0];
			if(!_cube)
			{
				NTC_SendMsgToScript("NTBotGame.ntj", "No cube found.");
				return;
			}
			if(NTCU_CheckCubeInventoryInt() > 0)
			{
				NTCU_OpenCubeInt(_cube)
				if(NTCU_ClearCubeInt() < 1)
				{
					NTC_SendMsgToScript("NTBotGame.ntj", "Cube cannot be emptied.");
					return;
				}
				NTCU_CloseCubeInt();
			}
			NTCU_OpenCubeInt(_cube);
			NTCU_ItemToCubeInt(_leg, 0, 0)
			NTCU_ItemToCubeInt(_portal, 1, 0)         
			Transmute();
			NTCU_CloseCubeInt();
			NTT_DoInteract(_stash);

			NTT_ManageStash();
			NTT_MenuCancel();
		}
		
		NTC_PingDelay(500);
		if(!NTR_TakeCowPortal(12))
		{
			NTC_SendMsgToScript("NTBotGame.ntj", "Failed to take Cow Portal.");
			return;
		}
		NTP_DoPrecast();
		NTR_ClearRooms(150, NTC_UNIT_MONSTER, 773, _NTR_COW_KING_RANGE);
	}

	NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}


// Internal functions

function NTT_SecondTomeTP(npc, type, amount)
{
	var _items;
	var _counter = 0;

	if(arguments.length < 1)
		return false;

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

	if(arguments.length < 0)
		amount = 1;

	if(amount == 0)
		return false;

	if(type)
		_items = npc.GetItems("tbk");

	if(_items)
	{
		if(_items.length > 0)
		{
			for(var i = 0 ; i < amount ; i++)
			{
				if(NTT_ShopItem(_items[0], npc, 2))
					_counter++;
			}
		}
	}

	return (_counter > 0);
}

function NTCU_ItemToCubeInt(item, destx, desty)
{
	var x, y;
	var _itemx, _itemy;

	if(item.itemloc == 3)
		return true;

	_itemx = item.x;
	_itemy = item.y;

	if(!NTC_ItemToCursor(item))
		return false;

	if(item.itemloc == 0)
	{
		for(y = 0 ; y < item.ysize ; y++)
		{
			for(x = 0 ; x < item.xsize ; x++)
				_NTCU_Inventory[_itemy+y][_itemx+x] = 0;
		}
	}

	for(x = 0 ; x < 80 ; x++)
	{
		if((x % 40) == 0)
			me.ClickItem(0, destx, desty, 3);

		NTC_Delay(100);

		if(!me.itemoncursor)
			break;
	}

	if(x >= 80)
		return false;

	NTC_PingDelay(200);

	return true;
}

function NTR_GetTP()
{
	var _portals = me.GetItems("tbk");

	if (_portals)
	{
		for (var i = 0; i < _portals.length; i++)
		{
			if (_portals[i].mode == 0 && (_portals[i].itemloc != 0 || NTConfig_Columns[_portals[i].y][_portals[i].x] > 0))
			{
				return _portals[i];
			}
		}
	}
	return false;
}

function NTC_GetUnit(unittype, classid)
{
	var _unit;

	for(var i = 0 ; i < 2 ; i++)
	{
		if(arguments.length < 2)
			_unit = GetUnit(unittype);
		else
			_unit = GetUnit(unittype, classid);

		if(_unit)
			return _unit;

		if(i < 1)
			NTC_PingDelay(200);
	}

	return false;
}

function NTR_TakeCowPortal(range)
{
	var _portal = NTC_GetUnit(NTC_UNIT_OBJECT, _NTR_STRING_PORTAL);

	if (_portal)
	{
		var _isClick;
		var _preAreaId = me.areaid;

		do
		{
			if (GetDistance(me, _portal) < range && _portal.mode == 2)
			{
				for (var i = 0; i < 40; i++)
				{
					if ((i % 10) == 0)
					{
						if(NTM_GetCloserInt(_portal))
							_isClick = NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _portal);
					}
					if (_isClick)
					{
						NTC_Delay(100);
						break;
					}
				}
				NTC_PingDelay(500);

				if (me.areaid != _preAreaId)
				{
					NTC_PingDelay(200);
					return true;
				}
			}
		} while (_portal.GetNext());
	}
	return false;
}

function NTT_MenuCancel()
{
	var i;

	for(i = 0 ; i < 4 ; i++)
	{
		if(GetUIState(0x0C) || GetUIState(0x0D) || GetUIState(0x14) || GetUIState(0x19) || GetUIState(0x1A) || GetUIState(0x24))
		{
			me.Cancel(0);
			NTC_Delay(500);
		}
		else
			break;
	}

	for(i = 0 ; i < 4 ; i++)
	{
		if(GetUIState(0x08) || GetUIState(0x17))
		{
			me.Cancel(1);
			NTC_PingDelay(500);
		}
		else
			break;
	}
}

function NTR_ClearRooms(range, type, id, distance)
{
	var i;
	var _unit;
	var _preRoom;
	var _addRooms    = new Array();
	var _removeRooms = new Array();

	if (distance)
	{
		_unit = GetPresetUnits(me.areaid, type, id);
		if (!_unit || _unit.length < 1)
			return false;
	}

	_preRoom = GetRoom();
	if (_preRoom)
	{
		do
		{
			if (distance)
			{
				if (GetDistance(_preRoom.x * 5, _preRoom.y * 5, _unit[0].roomx * 5, _unit[0].roomy * 5) < distance)
					continue;
			}
			_addRooms.push([_preRoom.x * 5, _preRoom.y * 5]);
		} while (_preRoom.GetNext());
	}

	if (_addRooms.length < 1)
		return false;

	_preRoom = [me.x, me.y];

	while (_addRooms.length > 0)
	{
		_addRooms.sort(function (a, b) { return (GetDistance(_preRoom[0], _preRoom[1], a[0], a[1]) - GetDistance(_preRoom[0], _preRoom[1], b[0], b[1])); });

		_removeRooms.push([_addRooms[0][0], _addRooms[0][1]]);

		for (i = 1; i < _addRooms.length; i++)
		{
			if (GetDistance(_preRoom[0], _preRoom[1], _addRooms[i][0], _addRooms[i][1]) <= GetDistance(_preRoom[0], _preRoom[1], _addRooms[0][0], _addRooms[0][1]))
			{
				_removeRooms.push([_addRooms[i][0], _addRooms[i][1]]);
			}
			else
				break;
		}

		if (_removeRooms.length > 1)
		{
			_removeRooms.sort(function (a, b) { return (b[0] - a[0]); });
			if (_removeRooms[0][0] <= _preRoom[0])
			{
				_removeRooms.sort(function (a, b) { return (b[1] - a[1]); });
				if (_removeRooms[0][1] <= _preRoom[1])
				{
					_removeRooms.sort(function (a, b) { return (a[0] - b[0]); });
					if (_removeRooms[0][0] >= _preRoom[0])
						_removeRooms.sort(function (a, b) { return (a[1] - b[1]); });
				}
			}
		}

		if (!range || GetDistance(me.x, me.y, _removeRooms[0][0], _removeRooms[0][1]) < range)
		{
			if (NTR_MoveTo(me.areaid, _removeRooms[0][0], _removeRooms[0][1], 3, true))
				_preRoom = _removeRooms[0];
		}

		for (i = 0; i < _addRooms.length; i++)
		{
			if (_addRooms[i][0] == _removeRooms[0][0] && _addRooms[i][1] == _removeRooms[0][1])
			{
				_addRooms.splice(i, 1);
				break;
			}
		}
		_removeRooms.length = 0;
	}
	return true;
}

function NTC_WaitCastDone()
{
	var _mode;

	for(var i = 0 ; i < 25 ; i++)
	{
		_mode = me.mode;

		if(!(_mode == 7 || _mode == 8 || (_mode >= 10 && _mode <= 16) || _mode == 18))
			return true;

		NTC_Delay(NTC_DELAY_FRAME);
	}

	return false;
}

function NTR_MoveTo(areaId, x, y, retry, isClearPath)
{
	if (!NTC_WaitCastDone())
		return false;

	if (x == me.x && y == me.y)
		return true;

	if (arguments.length < 4) 
		retry       = 3;
	if (arguments.length < 5) 
		isClearPath = false;

	var i, j;
	var _path;
	var _checkPath;
	var _preX, _preY;

	_path = GetPath(areaId, me.x, me.y, x, y, true);
	if (!_path)
		return false;

	for (i = 0; i < _path.length; i++)
	{
		if (NTR_CheckCowKing() || NTR_CheckSafe(_path[i][0], _path[i][1], 15))
		{
			for (j = 0; j < retry; j++)
			{
				if (NTM_TeleportTo(_path[i][0], _path[i][1]))
					break;
			}

			if (j >= retry)
				return false;
		}

		if (isClearPath && !NTR_CheckCowKing())
		{
			_preX = me.x;
			_preY = me.y;

			if(NTR_ClearPosition(30))
				NTSI_PickItems();

			if (me.x != _preX || me.y != _preY)
			{
				if ((i + 1) < _path.length)
				{
					_checkPath = GetPath(me.areaid, me.x, me.y, _path[i + 1][0], _path[i + 1][1], true);
					if (_checkPath)
					{
						if (_checkPath.length > 1)
						{
							if (!NTM_MoveTo(me.areaid, _preX, _preY))
								return false;
						}
					}
				}
			}
		}
	}
	return true;
}


function NTR_CheckCowKing()
{
	var _cowKing = GetUnit(NTC_UNIT_MONSTER, _NTR_STRING_COW_KING);
	return (_cowKing && GetDistance(me, _cowKing) < _NTR_COW_KING_RANGE);
}


function NTR_CheckSafe(x, y, range)
{
	var i;
	var _target = GetUnit(NTC_UNIT_MONSTER);

	if (_target)
	{
		do
		{
			if (GetDistance(x, y, _target.x, _target.y) < range && NTA_IsValidTarget(_target, false))
			{
				for (i = 0; i < 6; i++)
				{
					if (NTConfig_AttackSkill[i] && NTA_GetResistance(_target, _NTA_SkillDamage[i]) < 100)
						return false;
				}
			}
		} while (_target.GetNext());
	}

	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)
		return monster.IsAttackable();

	return true;
}

function NTC_DoCast(skillid, usehand, x, y)
{
	var _hand;
	var _shift;

	if(arguments.length < 1)
		return false;

	if(arguments.length == 1)
	{
		_hand = NTC_CLICK_RDOWN;
		_shift = NTC_SHIFT_NONE;
		usehand = NTC_HAND_RIGHT;
	}
	else
	{
		if(usehand == NTC_HAND_RIGHT)
		{
			_hand = NTC_CLICK_RDOWN;
			_shift = NTC_SHIFT_NONE;
		}
		else if(usehand == NTC_HAND_LEFT)
		{
			_hand = NTC_CLICK_LDOWN;
			_shift = NTC_SHIFT_NONE;
		}
		else
		{
			_hand = NTC_CLICK_LDOWN;
			_shift = NTC_SHIFT_HOLD;
			usehand = NTC_HAND_LEFT;
		}
	}

	if(NTC_PutSkill(skillid, usehand))
	{
		var i, n;
		var _downhold;
		var _mode;

		if(!NTC_ClearCursor())
			return false;

		for(i = 0 ; i < 2 ; i++)
		{
			for(n = 0 ; n < 15 ; n++)
			{
				_downhold = n > 0 ? _hand+1 : _hand;

				switch(arguments.length)
				{
				case 1:
				case 2:
					ClickMap(_downhold, _shift, me.x, me.y);
					break;

				case 3:
					if(!ClickMap(_downhold, _shift, x))
					{
						if(n > 0)
						{
							ClickMap(_hand+2, _shift, me.x, me.y);
							NTC_Delay(NTC_DELAY_FRAME);
						}

						return false;
					}
					break;

				case 4:
					ClickMap(_downhold, _shift, x, y);
					break;
				}

				NTC_Delay(NTC_DELAY_FRAME);

				_mode = me.mode;

				if(_mode == 7 || _mode == 8 || (_mode >= 10 && _mode <= 16) || _mode == 18)
				{
					NTC_Delay(NTC_DELAY_FRAME);
					break;
				}
			}

			switch(arguments.length)
			{
			case 1:
			case 2:
				ClickMap(_hand+2, _shift, me.x, me.y);
				break;

			case 3:
				ClickMap(_hand+2, _shift, x);
				break;

			case 4:
				ClickMap(_hand+2, _shift, x, y);
				break;
			}

			if(n < 15)
				return NTC_WaitCastDone();

			NTC_Delay(NTC_DELAY_FRAME);
		}
	}

	return false;
}

function NTR_ClearPosition(range, spectype)
{
	if(NTConfig_AttackSkill[1] < 1)
		return false;

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

	var _killnum = 0;
	var _target  = GetUnit(NTC_UNIT_MONSTER);

	if(_target)
	{
		var _orgx = me.x;
		var _orgy = me.y;

		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(NTR_CheckCowKing())
					return false;

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

		if(me.classid == NTC_CHAR_CLASS_PALADIN && NTConfig_CastRedemption)
		{
			if(_killnum > 2 && (parseInt(me.hp*100/me.hpmax) <= 80 || parseInt(me.mp*100/me.mpmax) <= 80))
			{
				NTC_PutSkill(124, NTC_HAND_RIGHT);
				NTC_PingDelay(1100);
			}
		}

		if(NTConfig_CheckSafe && _killnum > 0)
			NTTMGR_CheckSafe(1);
	}

	if(!me.GetState(32) || !me.GetState(51))
	{
		if(NTP_BOSwitch())
		{
			NTC_DoCast(155, NTC_HAND_RIGHT); // Battle Command
			NTC_DoCast(149, NTC_HAND_RIGHT); // Battle Orders
			NTC_DoCast(138, NTC_HAND_RIGHT); // Shout

			NTC_SwapWeapons();
		}
	}
	if(!me.GetState(101) && me.classid == NTC_CHAR_CLASS_PALADIN && NTConfig_CastHolyShield)
		NTC_DoCast(117, NTC_HAND_RIGHT);

	return true;
}
danke^^
xXSaint*NoarXx is offline  
Reply


Similar Threads Similar Threads
Bluebird Englisch
05/07/2010 - Diablo 2 - 6 Replies
hat das wer auf englisch wie man den bot einstellt?
Big Problem zu Bluebird!!...
04/24/2010 - Diablo 2 - 21 Replies
Hi Leute Da ich aufgrund des MH auch banned wurde, hatte ich mit dem CDKey Changer meinen original CD-Key geändert. Wenn ich mich manuell einlogge über die game.exe dann kann ich mich normal einloggen. Jetzt wollte ich den bot starten und hab auch die game.exe ausgewählt auf die er zugreiffen soll.. Nun kommt aber, dass der Key banned wurde... Sprich er greifft auf den alten key zu??
S>2nd rb tro war tro 130-125-130 on bluebird server
03/20/2008 - Conquer Online 2 Trading - 1 Replies
selling the tro listed in the titl also a 2nd rb wat arch arch 110-130-22 no gear comes with them pm me for an offer will sell cheap most skills either fixed or close
big bluebird in lab 3?
08/16/2006 - Conquer Online 2 - 5 Replies
i tried to seach for big bluebird which is physical attack monster in lab 3... i typen "big bluebird" but it doesnt work. so i decided to post a new thread to ask for that file. i kno i saw it like a week or couple days ago... thx ahead
Bluebird
06/06/2006 - Conquer Online 2 - 18 Replies
I searched the site and tried all the monster.dat files that had this altered on them and none of them seemed to work anymore. So I was wondering if anyone would be able to make one that made the BlueBirds in Lab3 easy to hit. Like so that someone could hit them before they attack you because as it is now they must attack before you can attack. Thank you to anyone who could manage this.



All times are GMT +2. The time now is 01:37.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.