Code:
/**
* This file was modified by [Only registered and activated users can see links. Click Here To Register...]
* Check the programming section for updates and further scripts
* Last Update: 19:14 01.04.2011
*/
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
MWC_Initialize();
var _chest, _portal;
if(!NTTM_CheckAct(me.act, true))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTTM_CheckAct, 20, me.act, true);
return;
}
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTTM_TownMove, 28, "waypoint");
return;
}
if(!NTM_TakeWaypoint(101))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTM_TakeWaypoint, 34, 101);
return;
}
NTP_DoPrecast(true);
if(!NTM_MoveToStair(me.areaid, 102))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveToStair, 42, me.areaid, 102);
return;
}
if(!NTM_TakeStair(102))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTM_TakeStair, 48, 102);
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTTMGR_CheckSafe, 54, NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
return;
}
if(!NTM_MoveTo(me.areaid, 17564, 8069))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 60, me.areaid, 17564, 8069);
return;
}
NTC_Delay(200);
if(me.classid != NTC_CHAR_CLASS_PALADIN && me.classid != NTC_CHAR_CLASS_BARBARIAN)
NTM_MoveTo(me.areaid, 17573, 8071);
if(!NTA_KillMonster(242))
{
NTC_SendMsgToScript("MWBotGame.ntj", NTA_KillMonster, 71, 242);
return;
}
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
NTM_MoveTo(me.areaid, 17590, 8070);
NTM_WalkTo(17590, 8069);
if(MWConfig_OpenMephistoChest)
{
if(NTM_MoveTo(me.areaid, 17520, 8063))
NTA_ClearPosition(30, true);
_chest = NTC_FindUnit(NTC_UNIT_OBJECT, GetLocaleString(3260), 1);
if(_chest)
{
do
{
if(_chest.x == 17513 && _chest.y == 8063)
{
if(NTC_OpenChest(_chest))
NTSI_PickItems();
break;
}
} while(_chest.GetNext());
}
}
if(MWConfig_MephistoClearArea)
{
// Left room
if(NTM_MoveTo(me.areaid, 17607, 8126))
NTA_ClearPosition(30, true);
if(NTM_MoveTo(me.areaid, 17569, 8125))
NTA_ClearPosition(25, true);
}
if(MWConfig_OpenMephistoChest)
{
[COLOR="Red"]NTM_MoveTo(me.areaid, 17570, 8118)[/COLOR]
_chest = NTC_FindUnit(NTC_UNIT_OBJECT, GetLocaleString(3247), 1);
if(_chest && NTC_OpenChest(_chest))
NTSI_PickItems();
}
if(MWConfig_MephistoClearArea)
{
// Center
if(NTM_MoveTo(me.areaid, 17630, 8069))
NTA_ClearPosition(40, true);
// Right room
if(NTM_MoveTo(me.areaid, 17607, 8015))
NTA_ClearPosition(30, true);
if(NTM_MoveTo(me.areaid, 17569, 8010))
NTA_ClearPosition(25, true);
}
if(MWConfig_OpenMephistoChest)
{
[COLOR="Red"]NTM_MoveTo(me.areaid, 17570, 8018)[/COLOR]
_chest = NTC_FindUnit(NTC_UNIT_OBJECT, GetLocaleString(3248), 1);
if(_chest && NTC_OpenChest(_chest))
NTSI_PickItems();
}
NTSI_PickItems(true);
NTM_MoveTo(me.areaid, 17590, 8069);
_portal = NTC_FindUnit(NTC_UNIT_OBJECT, 342, 1);
if(_portal)
NTM_UsePortal("Portal", 103, "dummy", _portal);
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
}