Created
December 26, 2011 02:12
-
-
Save qsun/1520399 to your computer and use it in GitHub Desktop.
Raise skeles before fighting with pindleskin. Use this function to replace original one in NTPindleskin.ntj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_CheckAct(5)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()"); | |
return; | |
} | |
if(!NTTM_TownMove("portal")) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()"); | |
return; | |
} | |
if(!NTM_UsePortal("Portal", 121)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_UsePortal()"); | |
return; | |
} | |
NTP_DoPrecast(true); | |
if (me.classid == NTC_CHAR_CLASS_NECROMANCER) { | |
// summon some skele | |
NTM_MoveTo(me.areaid, 10083, 13263); | |
for (var i = 0; i < NTConfig_Skele; i++) { | |
SkeleDead(); | |
} | |
} | |
if(!NTM_MoveTo(me.areaid, 10061, 13234)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()"); | |
return; | |
} | |
if ((me.classid == NTC_CHAR_CLASS_NECROMANCER) && (NTC_GetSkillLevel(54) < 1)) { | |
/* | |
use this trick to gather NEC army | |
*/ | |
do { | |
NTM_MakeTP(109); /* back to Harrogath */ | |
Delay(500); | |
debug('town!'); | |
} while(!NTC_InTown(me)); | |
/* wait for HP, threshold: 60 second */ | |
var internal_count = 0; | |
do { | |
Delay(1000); | |
if (parseInt(me.hp*100/me.hpmax) >= NTConfig_LifeThresh) { | |
break; | |
} | |
internal_count++; | |
} while(internal_count < 60); | |
/* back to battle */ | |
do { | |
NTM_UsePortal("BluePortal", 121, me.name); | |
debug('back'); | |
Delay(500); | |
} while(NTC_InTown(me)); | |
} | |
if(NTA_KillMonster(GetLocaleString(22497))) | |
{ | |
if(NTConfig_ClearPosition) | |
NTA_ClearPosition(); | |
Delay(1000); | |
NTSI_PickItems(); | |
Delay(1000); | |
NTSI_PickItems(); | |
} | |
else if(!NTConfig_NihlathakExtension) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()"); | |
return; | |
} | |
if(NTConfig_NihlathakExtension) | |
{ | |
var _location; | |
for(var i = 0 ; i < 3 ; i++) | |
{ | |
if(!NTM_MoveToStair(me.areaid, 122+i)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()"); | |
return; | |
} | |
if(!NTM_TakeStair(122+i)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()"); | |
return; | |
} | |
} | |
NTP_DoPrecast(false); | |
_location = NT_FindNihlathakInt(); | |
if(_location == -1) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NT_FindNihlathakInt()"); | |
return; | |
} | |
if(!NTM_MoveTo(me.areaid, _NTNihlathak_Locations[_location][2], _NTNihlathak_Locations[_location][3])) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()"); | |
return; | |
} | |
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()"); | |
return; | |
} | |
if(!NTA_KillMonster(526)) | |
{ | |
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()"); | |
return; | |
} | |
if(NTConfig_ClearPosition) | |
NTA_ClearPosition(); | |
NTSI_PickItems(); | |
} | |
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment