need help with leechbot muddy

11/05/2011 12:33 matty609#1
hello everyone.
i hope that someone can help me.
since yesterday i 'm trying to configure leechbot but doesn't work..the problem is that he enter on tp when leader make it..but i have configured on char configs mwconfigenterunsafetp = false.. he enter anyway and he die cuz monster..
i don't understand what i have to do..
i wanna that my leech enter only when leader say: tp is safe
pls help me
have nice day
11/05/2011 13:17 PeterNeu#2
hey,

i dont know the solution for the problem, but a possible workaround.

Open NTBaal.ntj in the folder "Muddy's D2NT\scripts\NTBot\bots\"

and search for this:

Code:
		if(NTConfig_PublicMode)
		{
			if(_monsterCount > 1 && MWConfig_Announcements.BaalThrone)
				Say(MWConfig_Announcements.BaalThrone.replace(/%d/gi, _monsterCount));
			
			NTM_MoveTo(me.areaid, 15116, 5068);
			
			_monsterCount = MW_CountMonstersInThrone(20);
			
			if(_monsterCount > 1)
			{
				if(_monsterCount < 3 && MWConfig_Announcements.BaalTpCold)
					Say(MWConfig_Announcements.BaalTpCold.replace(/%d/gi, _monsterCount));
				else if(_monsterCount < 6 && MWConfig_Announcements.BaalTpWarm)
					Say(MWConfig_Announcements.BaalTpWarm.replace(/%d/gi, _monsterCount));
				else if(MWConfig_Announcements.BaalTpHot)
					Say(MWConfig_Announcements.BaalTpHot.replace(/%d/gi, _monsterCount));
			}
			else if(MWConfig_Announcements.BaalTpNone)
				Say(MWConfig_Announcements.BaalTpNone);
			
			NTM_MakeTP();
			
			NTA_ClearPosition(25, true, 2);
		}
and replace it with this

Code:
		if(NTConfig_PublicMode)
		{
			if(_monsterCount > 1 && MWConfig_Announcements.BaalThrone)
				Say(MWConfig_Announcements.BaalThrone.replace(/%d/gi, _monsterCount));
			
			NTM_MoveTo(me.areaid, 15116, 5068);
			
			_monsterCount = MW_CountMonstersInThrone(20);
			
			if(_monsterCount > 1)
			{
				if(_monsterCount < 3 && MWConfig_Announcements.BaalTpCold)
					Say(MWConfig_Announcements.BaalTpCold.replace(/%d/gi, _monsterCount));
				else if(_monsterCount < 6 && MWConfig_Announcements.BaalTpWarm)
					Say(MWConfig_Announcements.BaalTpWarm.replace(/%d/gi, _monsterCount));
				else if(MWConfig_Announcements.BaalTpHot)
					Say(MWConfig_Announcements.BaalTpHot.replace(/%d/gi, _monsterCount));
			}
			else if(MWConfig_Announcements.BaalTpNone)
				Say(MWConfig_Announcements.BaalTpNone);
			
			NTA_ClearPosition(25, true, 2);
		}
the only change is the deletion of this

Code:
			NTM_MakeTP();
line. So it shouldnt open an unsafe tp at all.

Please let me know if it worked.
11/05/2011 14:41 Muddy Waters#3
Apparently, there is a slight mistake in the NT_GameMsgEvents() function which causes your leecher to take just any message by his leader as permission to enter the TP.

If you fix this error, it should work just fine. Fortunately, fixing this is quite easy, just replace the function by the one below:
Code:
function NT_GameMsgEvents(msg, type)
{
	var _msg = msg.toLowerCase();
	
	if(type == 0 && _msg.indexOf(NTConfig_Leader.toLowerCase()) > -1 && MWConfig_Announcements.BaalTpSafe && _msg.indexOf(MWConfig_Announcements.BaalTpSafe.toLowerCase()) > -1)
		_AllowedToEnterTP = true;
}
Kind Regards
Muddy
11/15/2011 13:57 Chaoxalive#4
one more question, i want the leechbot to join the tp when leader sais a specific sentence... where to put that in for the leechbot?

PHP Code:
function NT_GameMsgEvents(msgtype)
{
    var 
_msg msg.toLowerCase();
    
    if(
type == && _msg.indexOf(NTConfig_Leader.toLowerCase()) > -&& MWConfig_Announcements.BaalTpSafe && _msg.indexOf(MWConfig_Announcements.BaalTpSafe.toLowerCase()))
        
_AllowedToEnterTP true;

in here? with ""??

nvm i guess its global settings? we run it on different pcs so :D