Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function NT_Duriel()
- {
- var _tombs, _correcttomb;
- var _tileid;
- print("ÿc3Starting Duriel Script");
- if (me.area != 46)
- {
- if (!NTTM_CheckAct())
- throw new Error();
- NTTMGR_TownManager();
- print("ÿc8Going to Canyon of the Magi");
- if (!NTTM_TownMove("waypoint"))
- throw new Error();
- if (!NTM_UsePortal("Waypoint", 46))
- {
- print("ÿc8Seems we do not have the waypoint, Lets go get it! Traveling to Canyon of the Magi");
- NTM_TravelTO(46);
- print("ÿc8Interacting with Waypoint as we don't have it.");
- NTM_GotoWaypoint(46, true, 10000);
- }
- }
- print("ÿc5Precasting");
- NTP_DoPrecast();
- print("ÿc8Going to Tal Rasha's Chamber");
- gotoCorrectTomb();
- if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 152, 152, -4, -4))
- {
- print("ÿc8Clearing any mobs");
- NTA_ClearPosition(30);
- NTSI_PickItems();
- }
- if (!NTM_MoveToObject(NTC_UNIT_OBJECT, 152, 152, -8, -8))
- throw new Error();
- NTC_Delay(500);
- while (!NTM_TakeStairs(100)) {
- NTC_Delay(500);
- }
- if (me.classid === 1) {
- if (!KillDuriel()) {
- throw new Error("KillDuriel failed.");
- }
- } else if (!NTA_KillBoss(getLocaleString(3054))) {
- throw new Error("KillBoss failed.");
- }
- NTSI_PickItems();
- return true;
- }
- function KillDuriel() {
- var i,
- _target = NTC_GetUnit(NTC_UNIT_MONSTER, 211);
- if (!_target) {
- return false;
- }
- for(var i = 0 ; i < 300 ; i++) {
- if (!me.getState(121)) {
- NTC_DoCast(NTConfig_AttackSkill[1], _NTA_SkillHand[1], _target);
- } else if (NTConfig_AttackSkill[3] > -1) {
- NTC_DoCast(NTConfig_AttackSkill[3], _NTA_SkillHand[3], _target);
- } else {
- NTC_Delay(300);
- }
- if (getDistance(me, _target) <= 10) {
- NTM_MoveTo(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);
- }
- function gotoCorrectTomb()
- {
- var _tombs = getRoom();
- var _correcttomb = _tombs.correcttomb;
- if (!_correcttomb)
- return false;
- var _tileid = _correcttomb - 66 + 38;
- if (!NTM_MoveToObject(NTC_UNIT_TILE, _tileid))
- return false;
- if (!NTM_TakeStairs(_tileid, _tileid))
- return false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement