icu requested this a day or 2 ago and the easy fix was NTTMGR_VisitTown();
I decided to play around with it a bit and came up with this and decided I would post it here so the pub runners around here would have it before the next etalBot update and also to help drum up some more channel runners for op gotv
before I forget thanks to icu for helping me test this
this also will help the bug of missed items after killing baal, going to town and then going back to worldstone for items
first you need to add these lines to your character configs in with the other baal configs
Code:
NTConfig_TownBeforeBaal = true;//check inventory and go to town if any items before going to worldstone to kill baal. must have NTConfig_FreeSpace configured correctly NTConfig_FreeSpaceBeforeBaal = 6;//# of free columns you want if less than that it bot will town
Code:
function NTT_CheckInventoryBeforeBaal()
{
var x, y;
var _items;
_itemlist = new Array();
_ignorestring = _NTT_IgnoredItems.join();
if(!NTC_StashGoldFull() && NTC_MyGoldCarry() > NTConfig_MinGoldToStash)
return true;
_invspace = new Array(4);
_invspace[0] = new Array(10);
_invspace[1] = new Array(10);
_invspace[2] = new Array(10);
_invspace[3] = new Array(10);
for(y = 0 ; y < 4 ; y++)
{
for(x = 0 ; x < 10 ; x++)
_invspace[y][x] = 0;
}
_items = me.GetItems();
if(!_items)
return false;
for(var i = 0 ; i < _items.length ; i++)
{
if(_items[i].mode == 0 && _items[i].itemloc == 0)
{
if(NTConfig_Columns[_items[i].y][_items[i].x] > 0)
_itemlist.push(_items[i].code);
for(y = 0 ; y < _items[i].ysize ; y++)
{
for(x = 0 ; x < _items[i].xsize ; x++)
_invspace[y+_items[i].y][x+_items[i].x] = 1;
}
}
}
_freecolss = new Array(10);
for(x = 0 ; x < 10 ; x++)
_freecolss[x] = 0;
for(x = 0 ; x < 10 ; x++)
{
for(y = 0 ; y < 4 ; y++)
{
if(_invspace[y][x] == 1)
{
_freecolss[x] = 1;
break;
}
}
}
_numfreecolss = 0;
for(x = 0 ; x < 10 ; x++)
{
if(_freecolss[x] == 0)
_numfreecolss++;
}
if(NTConfig_FreeSpaceBeforeBaal > _numfreecolss)
{
for(x = 0 ; x < _itemlist.length ; x++)
{
if(_ignorestring.indexOf(_itemlist[x]) != -1)
_itemlist.splice(x, 1);
}
if(_itemlist.length > 0)
return true;
}
return false;
}
now going into your bots/NTBaal.ntj and add the red part
Code:
if(NTConfig_KillBaal)
{
var _portal;
if(NTConfig_PublicMode)
Say(Baal_KillBaalMessage);
[COLOR="red"][B]if(NTConfig_TownBeforeBaal && NTT_CheckInventoryBeforeBaal())
NTTMGR_VisitTown();
[/B][/COLOR]
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTM_MoveTo(me.areaid, 15092, 5010);
you can use this for chaos script by adding the line in before killing diablo also
I only lightly tested this, but seems to work perfect
enjoy!!!






