Kleines problem mit neuem config Ordner

05/20/2010 02:18 toya_ger#1
Ich habe ein kleine problem mit dem erstellen eines neuen config Ordners

Also ich wollte für den Shopbot einen eigenen config ordner (nicht mehr NtBot sondern halt NTShop mit Bots,Char/Item usw Ordner)
und zwar funtz alles soweit super nur geht der pause button nicht mehr um ein script zu pausieren!

Code:
		case 19: // pause (PAUSE)
				if(_script)
				{
					if(_script.running)
					{
						_script.Stop();
						pauseTimer = GetTickCount();
						me.maxgametime = 0;
						NTC_Delay(300);
						ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
						SetStatusText("˙c1Stopped ˙c4" + NTConfig_Script[CurScriptIndex]);
						NTC_Delay(2500);
						SetStatusText("˙c1Max game length set to infinite!");
						NT_ScriptMsgEvents("SET_DEFAULT_STATUS");
					}
					else
					{
						Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
						SetStatusText("˙c2Running ˙c4" + NTConfig_Script[CurScriptIndex]);
					}
				}
müsste ja das stück betreffen aus der NTbotgame.ntj

vll weiß ja einer von euch das problem.

D2NT3.1(bb)
05/20/2010 02:40 fuuch#2
break;

wo liegt dein NTShop verzeichnis genau im verhältnis zu den anderen botscripten?
05/20/2010 02:47 toya_ger#3
break;habe ich drin^^

also hier noch mal die ganze NtBot game

Im NtBot Ordner gehts natürlich nur wenn ich über all den path in ntbot geändert habe.

Code:
var CurScriptIndex = 0;
var LastScript = false;

var CloneDiabloString;
var CloneDiabloNotify = false;

function NTMain()
{
	Delay(1000);

	//Print("˙c4[+] NTBot 4.2 [+]");

	Include("libs/common/NTCommon.ntl");
	NTC_IncludeLibs();
	NTC_IncludeConfig("NTShop/char_configs");

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

	if(NTConfig_StartDelay > 0);
		NTC_Delay(NTConfig_StartDelay);

	SetUIState(0x0A, true);

	NTT_GetCorpses();

	if(NTConfig_Script.length > 0)
	{
		NTCU_InitCubing();

		NTT_ClearInventory();
		NTT_ClearBelt();

		Load("NTShop/tools/NTToolsThread.ntj");

		if(NTConfig_CheckCloneDiablo)
		{
		 	CloneDiabloString = GetLocaleString(11005);
			RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
		}

		RegisterEvent(EVENT_KEYDOWN, NT_KeyEvents);
		RegisterEvent(EVENT_SCRIPTMSG, NT_ScriptMsgEvents);

		Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
		SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
		NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);

		while(!LastScript || CloneDiabloNotify)
		{
			NTC_Delay(500);
		}
	}

	ExitGame();
}

function NT_GameMsgEvents(msg, type)
{
	if(type == 4 && msg.indexOf(CloneDiabloString) != -1)
	{
		CloneDiabloNotify = true;

		NTC_SendLogToOOG(NTC_LOG_COMMON, "˙c4" + CloneDiabloString);
		SetStatusText(CloneDiabloString);

		me.maxgametime = 0;

		NTC_StopScript(NTConfig_Script[CurScriptIndex]);
		NTC_Delay(500);

		NTTM_CheckAct();
	}
}

function NT_KeyEvents(keycode)
{
	var _script;

	switch(keycode)
	{
		case 19: // pause (PAUSE)
				if(_script)
				{
					if(_script.running)
					{
						_script.Stop();
						pauseTimer = GetTickCount();
						me.maxgametime = 0;
						NTC_Delay(300);
						ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
						SetStatusText("˙c1Stopped ˙c4" + NTConfig_Script[CurScriptIndex]);
						NTC_Delay(2500);
						SetStatusText("˙c1Max game length set to infinite!");
						NT_ScriptMsgEvents("SET_DEFAULT_STATUS");
					}
					else
					{
						Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
						SetStatusText("˙c2Running ˙c4" + NTConfig_Script[CurScriptIndex]);
					}
				}
				break;
	}
}

function NT_ScriptMsgEvents(msg)
{
	var _area;

	switch(msg)
	{
	case "SCRIPT_END":
		if(++CurScriptIndex < NTConfig_Script.length)
		{
			NTTM_CheckAct();
			Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
			SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
			NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);
		}
		else
			LastScript = true;
		break;
	default:
		Print("˙c1" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed");

		_area = GetArea();

		if(_area)
			NTC_SendLogToOOG(NTC_LOG_COMMON, "˙E00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (" + _area.name + ")");
		else
			NTC_SendLogToOOG(NTC_LOG_COMMON, "˙E00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (unknown area)");

		if(++CurScriptIndex < NTConfig_Script.length)
		{
			NTTM_CheckAct();
			Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
			SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
			NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);
		}
		else
			LastScript = true;
		break;
	}
}
05/20/2010 02:52 fuuch#4
var _script;

ist bei dir null

_script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
ist es bei mir
05/20/2010 03:14 toya_ger#5
also irgenwie lags daran ob es in meiner confi net richtig geklappt hat habe noch mal ne und gebastelte benutzt da gings dann thx

geht doch noch nicht ganz geht nur 1x wenn ich 2x pause machen will gehts nicht

hier noch mal meine Gamentj

Code:
var CurScriptIndex = 0;
var LastScript = false;

var CloneDiabloString;
var CloneDiabloNotify = false;

function NTMain()
{
	Delay(1000);

	//Print("˙c4[+] NTBot 4.2 [+]");

	Include("libs/common/NTCommon.ntl");
	NTC_IncludeLibs();
	NTC_IncludeConfig("NTShop/char_configs");

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

	if(NTConfig_StartDelay > 0);
		NTC_Delay(NTConfig_StartDelay);

	SetUIState(0x0A, true);

	NTT_GetCorpses();

	if(NTConfig_Script.length > 0)
	{
		NTCU_InitCubing();

		NTT_ClearInventory();
		NTT_ClearBelt();

		Load("NTShop/tools/NTToolsThread.ntj");

		if(NTConfig_CheckCloneDiablo)
		{
		 	CloneDiabloString = GetLocaleString(11005);
			RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
		}

		RegisterEvent(EVENT_KEYDOWN, NT_KeyEvents);
		RegisterEvent(EVENT_SCRIPTMSG, NT_ScriptMsgEvents);

		Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
		SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
		NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);

		while(!LastScript || CloneDiabloNotify)
		{
			NTC_Delay(500);
		}
	}

	ExitGame();
}

function NT_GameMsgEvents(msg, type)
{
	if(type == 4 && msg.indexOf(CloneDiabloString) != -1)
	{
		CloneDiabloNotify = true;

		NTC_SendLogToOOG(NTC_LOG_COMMON, "˙c4" + CloneDiabloString);
		SetStatusText(CloneDiabloString);

		me.maxgametime = 0;

		NTC_StopScript(NTConfig_Script[CurScriptIndex]);
		NTC_Delay(500);

		NTTM_CheckAct();
	}
}

function NT_KeyEvents(keycode)
{
	var _script;

	switch(keycode)
	{
	case 19:
		_script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
		if(_script)
		{
			if(_script.running)
			{
				_script.Stop();

				NTC_Delay(300);
				ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);

				SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
			}
			else
			{
				Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
				SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
			}
		}
		break;
	}
}

function NT_ScriptMsgEvents(msg)
{
	var _area;

	switch(msg)
	{
	case "SCRIPT_END":
		if(++CurScriptIndex < NTConfig_Script.length)
		{
			NTTM_CheckAct();
			Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
			SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
			NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);
		}
		else
			LastScript = true;
		break;
	default:
		Print("˙c1" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed");

		_area = GetArea();

		if(_area)
			NTC_SendLogToOOG(NTC_LOG_COMMON, "˙E00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (" + _area.name + ")");
		else
			NTC_SendLogToOOG(NTC_LOG_COMMON, "˙E00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (unknown area)");

		if(++CurScriptIndex < NTConfig_Script.length)
		{
			NTTM_CheckAct();
			Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
			SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
			NTC_LogCurScript(NTConfig_Script[CurScriptIndex]);
		}
		else
			LastScript = true;
		break;
	}
}
05/20/2010 12:04 fuuch#6
Code:
function NT_KeyEvents(keycode)
{
	var _script= NTC_FindScript(NTConfig_Script[CurScriptIndex]);

	switch(keycode)
	{
	case 19:
 
		if(_script)
		{
			if(_script.running)
			{
				_script.Stop();

				NTC_Delay(300);
				ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);

				SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
			}
			else
			{
				Load("NTShop/bots/" + NTConfig_Script[CurScriptIndex]);
				SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
			}
		}
		break;
	}
}