ordner tools öffnen neues script erstellen nennen wir es mal invite
var _NTLW_timerLastDrink = new Array(5);
function NTMain()
{
Include("libs/common/NTCommon.ntl");
Include("libs/common/NTCubing.ntl");
NTC_IncludeConfig("NTBot/char_configs");
var _count = 0;
var _LifeMax, _ManaMax;
var _merc;
var _player, _mypartyid;
var _ping = 0;
//Print("ÿc3Loaded ToolsThread script");
NT_LoadConfig();
_LifeMax = me.hpmax;
_ManaMax = me.mpmax;
if(NTConfig_LifeChicken > 0)
me.chickenhp = parseInt((_LifeMax*NTConfig_LifeChicken)/100);
if(NTConfig_ManaChicken > 0)
me.chickenmp = parseInt((_ManaMax*NTConfig_ManaChicken)/100);
for(var i = 0 ; i < 5 ; i++)
_NTLW_timerLastDrink[i] = 0;
while(1)
{
if(!NTC_InTown())
{
if(_LifeMax != me.hpmax)
{
_LifeMax = me.hpmax;
if(NTConfig_LifeChicken > 0)
me.chickenhp = parseInt((_LifeMax*NTConfig_LifeChicken)/100);
}
if(_ManaMax != me.mpmax)
{
_ManaMax = me.mpmax;
if(NTConfig_ManaChicken > 0)
me.chickenmp = parseInt((_ManaMax*NTConfig_ManaChicken)/100);
}
if(parseInt(me.hp*100/_LifeMax) < NTConfig_LifeRejuvThresh || parseInt(me.mp*100/_ManaMax) < NTConfig_ManaRejuvThresh)
NTLW_DrinkPotInt(2);
else
{
if(parseInt(me.hp*100/_LifeMax) < NTConfig_LifeThresh)
NTLW_DrinkPotInt(0);
if(parseInt(me.mp*100/_ManaMax) < NTConfig_ManaThresh)
NTLW_DrinkPotInt(1);
}
_merc = NTC_GetMerc();
if(_merc)
{
if(parseInt(_merc.hp*100/_merc.hpmax) < NTConfig_MercChicken)
{
var _area;
_area = GetArea();
if(_area)
SendCopyData("D2NT Manager", null, 7<<16, "ÿE00000Game is terminated by chicken (" + _area.name + ")");
else
SendCopyData("D2NT Manager", null, 7<<16, "ÿE00000Game is terminated by chicken (unknown area)");
ExitGame();
break;
}
if(parseInt(_merc.hp*100/_merc.hpmax) < NTConfig_MercRejuvThresh)
NTLW_DrinkPotInt(4);
else if(parseInt(_merc.hp*100/_merc.hpmax) < NTConfig_MercLifeThresh)
NTLW_DrinkPotInt(3);
}
}
if(_count++ > 10)
{
if(NTConfig_JoinOnly)
{
_player = GetPlayerUnit();
if(_player)
{
_mypartyid = _player.partyid;
while(_player.GetNext())
{
if(_player.partyid == 65535 || _player.partyid != _mypartyid)
{
if(_player.partyflag == 2)
{
me.ClickParty(_player, 2);
break;
}
}
}
}
}
_count = 0;
}
NTC_Delay(200);
}
}
// Internal function
function NTLW_DrinkPotInt(type)
{
var _pottype;
var _result;
var _tNow = new Date();
if(type == 2 || type == 4)
{
if(_NTLW_timerLastDrink[type] && (_tNow-_NTLW_timerLastDrink[type] < 600))
return false;
}
else
{
if(_NTLW_timerLastDrink[type] && (_tNow-_NTLW_timerLastDrink[type] < 3000))
return false;
}
if(me.mode == 0 || me.mode == 17 || me.mode == 18)
return false;
switch(type)
{
case 0:
case 3:
_pottype = "hp";
break;
case 1:
_pottype = "mp";
break;
default:
_pottype = "rv";
break;
}
for(var i = 0 ; i < 4 ; i++)
{
if(NTConfig_BeltColType[i] == _pottype)
{
if(type < 3)
_result = me.UseBelt(i);
else
_result = me.UseBelt(i, true);
if(_result)
{
_NTLW_timerLastDrink[type] = new Date();
return true;
}
}
}
return false;
}
öffnen wir NTBot/Char_config/NTConfig
fügen wir das hinzu:
var NTConfig_JoinOnly;
die charconfig eures leechchars öffnen
und irgendwo
NTConfig_JoinOnly = true;
einfügen
jetzt NTBotGame.ntj öffnen
und folgendes unter der Zeile NTT_ClearBelt(); einfügen
if(NTConfig_JoinOnly){
Load("NTBot/tools/[B]NAMEVOMERSTELLTENSCRIPT[/B].ntj");
}
else
{
Load("NTBot/tools/NTToolsThread.ntj");
}
--> wenn ihr nun bei den leechchars NTConfig_JoinOnly = true; einstellt dann habt ihr nicht mehr das problem ,dass 2 parties entstehen