Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function NTMain()
- {
- Include("libs/common/NTCommon.ntl");
- NTC_IncludeLibs();
- NTC_IncludeConfig("NTBot/char_configs");
- NT_LoadConfig();
- NTSI_LoadNIPFiles("NTBot/item_configs");
- NTA_Initialize();
- if(!NTTM_CheckAct())
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
- return;
- }
- NTTMGR_TownManager();
- if(!NTTM_TownMove("waypoint"))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
- return;
- }
- if(!NTM_TakeWaypoint(35))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
- return;
- }
- NTP_DoPrecast(true);
- for(var i = 0 ; i < 2 ; i++)
- {
- if(!NTM_MoveToStair(me.areaid, 36+i))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
- return;
- }
- if(!NTM_TakeStair(36+i))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
- return;
- }
- }
- NTP_DoPrecast(true);
- NTM_MoveTo(me.areaid, 22560, 9536);
- KillAndy();
- NTC_PingDelay(2000);
- NTSI_PickItems();
- NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
- }
- function KillAndy()
- {
- var _target = NTC_FindUnit(NTC_UNIT_MONSTER, 156, 5);
- if(!_target)
- return false;
- Print("ÿc4Name ÿc0" + _target.name + " ÿc4Fire resist ÿc0" + _target.GetStat(39) + " ÿc4Cold resist ÿc0" + _target.GetStat(41) + " ÿc4Lightning resist ÿc0" + _target.GetStat(43) + " ÿc4Poison resist ÿc0" + _target.GetStat(45));
- for(var i = 0 ; i < 300 ; i++)
- {
- if(NTA_Attack(_target, (i % 30) == 0) < 2)
- break;
- if(GetDistance(me, _target) <= 10)
- NTM_MoveTo(me.areaid, (me.x > 22548) ? 22535 : 22560, 9536);
- if(_target.hp <= 0 || _target.mode == 0 || _target.mode == 12)
- return true;
- }
- return (_target.hp <= 0 || _target.mode == 0 || _target.mode == 12);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement