i set my bot to only go to town for potions and if my merc dies like this....
// 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 = 0x01;
// 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;
but now he goes to town everytime it drinks a potion just to buy 1 potion.. does anyone know how to set it up to wait till its on its last potion of each position in the belt? plz help[COLOR="Silver"]
---------- Post added at 11:36 PM ---------- Previous post was at 10:59 PM ----------
[/COLOR]you have the position set wrong in the d2nt manager i bet. the position has to be the same as the position of the charicter you are wanting it to run.[COLOR="Silver"]
---------- Post added 07-16-2010 at 12:49 AM ---------- Previous post was 07-15-2010 at 11:36 PM ----------
[/COLOR]
slcoldkill Wrote:Im new to this sort of stuff. Anyways the bot just errors out 4 secs in the game room. what do i need to do?
You most likely have the position setting set wrong in the d2nt manager the position has to be the same as the position of the charicter you want it to run on.[COLOR="Silver"]
---------- Post added at 01:03 AM ---------- Previous post was at 12:49 AM ----------
[/COLOR]
fearpb Wrote:Bump
delete everything in your NTBaal.ntj file and replace it with this....
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
var i;
var _wave;
var _starttick;
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(129))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
NTP_DoPrecast(true);
for(i = 0 ; i < 2 ; i++)
{
if(!NTM_MoveToStair(me.areaid, 130+i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(130+i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
}
if(!NTM_MoveTo(me.areaid, 15112, 5068))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
NTA_ClearPosition(20, true, 2);
if(NTConfig_PublicMode)
{
NTM_MoveTo(me.areaid, 15116, 5068);
NTC_PingDelay(1000);
NTA_ClearPosition(20, true, 2);
NTM_MoveTo(me.areaid, 15116, 5068);
NTM_MakeTP();
Say("");
}
NT_ClearThroneInt();
if(NTConfig_PublicMode)
{
NTM_MoveTo(me.areaid, 15112, 5004, 1, true);
Say("");
}
while(1)
{
if(me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN)
NTM_MoveTo(me.areaid, 15092, 5028);
else
NTM_MoveTo(me.areaid, 15092, 5040);
if(me.GetState(2))
NTC_PutSkill(109, NTC_HAND_RIGHT);
for(i = 0 ; i < 6 ; i++)
{
_wave = NT_ThroneCheckInt();
if(_wave > 0)
break;
NTC_Delay(500);
}
_starttick = GetTickCount();
while(_wave == 0)
{
if(!NT_ThronePreAttackInt())
NTC_Delay(200);
if(GetTickCount()-_starttick > 15000)
{
NT_ClearThroneInt();
_starttick = GetTickCount();
}
_wave = NT_ThroneCheckInt();
}
switch(_wave)
{
case 1:
NTA_ClearPosition(40, true, 1);
NTP_DoPrecast(true);
break;
case 3:
NTA_ClearPosition(40, true, 2);
NT_CheckHydraInt();
break;
case 4:
NTA_ClearPosition(40, true, 2);
break;
case 5:
NTA_ClearPosition(40, true);
break;
default:
NTA_ClearPosition(40, true, 1);
break;
}
if(_wave == 5)
break;
}
if(NTConfig_KillBaal)
{
var _portal;
if(NTConfig_PublicMode)
Say("");
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe|0x01, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTM_MoveTo(me.areaid, 15092, 5010);
NTP_DoPrecast(true);
while(NTC_FindUnit(NTC_UNIT_MONSTER, 543))
NTC_Delay(500);
_portal = NTC_FindUnit(NTC_UNIT_OBJECT, 563, 1);
if(!_portal)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTC_FindUnit()");
return;
}
if(!NTM_UsePortal("Portal", 132, null, _portal))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_UsePortal()");
return;
}
NTM_MoveTo(me.areaid, 15138, 5916);
if(!NTA_KillMonster(544))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
NTSI_PickItems();
}
if(NTConfig_PublicMode)
Say("");
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
// Internal function
function NT_ClearThroneInt()
{
var _attackpos = [15112, 5068, 15075, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];
for(var i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
}
function NT_ThroneCheckInt()
{
var _monster;
if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
return 5;
_monster = NTC_FindUnit(NTC_UNIT_MONSTER);
if(_monster)
{
do
{
if(NTA_IsValidMonster(_monster))
{
if(_monster.classid == 23 || _monster.classid == 62)
return 1;
if(_monster.classid == 105 || _monster.classid == 381)
return 2;
if(_monster.classid == 557)
return 3;
if(_monster.classid == 558)
return 4;
if(_monster.classid == 571)
return 5;
}
} while(_monster.GetNext());
}
return 0;
}
function NT_ThronePreAttackInt()
{
if(me.classid == NTC_CHAR_CLASS_SORCERESS)
{
if(NTConfig_AttackSkill[3] == 59 || NTConfig_AttackSkill[3] == 64)
return NTC_CastSkill(NTConfig_AttackSkill[3], 2, 15092, 5028);
}
else if(me.classid == NTC_CHAR_CLASS_PALADIN)
{
if(NTConfig_AttackSkill[3] == 112)
{
if(NTConfig_AttackSkill[4] > 0)
NTC_PutSkill(NTConfig_AttackSkill[4], NTC_HAND_RIGHT);
return NTC_CastSkill(NTConfig_AttackSkill[3], 2);
}
}
return false;
}
function NT_CheckHydraInt()
{
var _hydra1, _hydra2, _hydra3;
_hydra1 = NTC_FindUnit(NTC_UNIT_MONSTER, 351);
_hydra2 = NTC_FindUnit(NTC_UNIT_MONSTER, 352);
_hydra3 = NTC_FindUnit(NTC_UNIT_MONSTER, 353);
if((_hydra1 && _hydra1.GetStat(172) != 2 && _hydra1.GetState(105))
|| (_hydra2 && _hydra2.GetStat(172) != 2 && _hydra2.GetState(105))
|| (_hydra3 && _hydra3.GetStat(172) != 2 && _hydra3.GetState(105)))
{
NTM_MoveTo(me.areaid, 15112, 5004);
if(me.GetState(2))
NTC_PutSkill(109, NTC_HAND_RIGHT);
NTC_PingDelay(3000);
}
}