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");
- var _tombs;
- var _unit;
- 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(46))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
- return;
- }
- NTP_DoPrecast(true);
- _tombs = GetRoom();
- if(!_tombs)
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "GetRoom()");
- return;
- }
- if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_TILE, _tombs.correcttomb-28))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
- return;
- }
- _unit = NTC_FindUnit(NTC_UNIT_TILE, _tombs.correcttomb - 28, 5);
- if(!_unit)
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTC_FindUnit()");
- return;
- }
- if(!NTM_TakeStair(_unit.subareaid))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
- return;
- }
- if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -2, 2))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToPresetUnit()");
- return;
- }
- /*if(NTConfig_ClearPosition)
- NTA_ClearPosition(20, true);*/
- if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
- return;
- }
- NTC_FindUnit(NTC_UNIT_OBJECT, 100, 10);
- if(!NTM_TakeUnit(NTC_UNIT_OBJECT, 100))
- {
- NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeUnit()");
- return;
- }
- KillDuriel();
- NTSI_PickItems();
- NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
- }
- function KillDuriel()
- {
- var _target = NTC_FindUnit(NTC_UNIT_MONSTER, 211, 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++)
- {
- NTC_CastSkill(NTConfig_AttackSkill[1], _NTA_SkillHand[1], _target);
- while(me.GetSkillStatus(NTConfig_AttackSkill[1]) == 8)
- {
- if(GetDistance(me, _target) <= 10)
- NTM_MoveTo(me.areaid, 22638, (me.y < _target.y) ? 15722 : 15693);
- if(NTConfig_AttackSkill[2] > -1 && me.GetSkillStatus(NTConfig_AttackSkill[2]) != 8)
- NTC_CastSkill(NTConfig_AttackSkill[2], _NTA_SkillHand[2], _target);
- else
- Delay(NTC_DELAY_FRAME);
- }
- if(GetDistance(me, _target) <= 10)
- NTM_MoveTo(me.areaid, 22638, (me.y < _target.y) ? 15722 : 15693);
- 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