MoveTo()Failed

12/21/2011 19:08 reini320#1
Hallo,

Seit ich den EtalBot via SVN geupdated hab, bekomm ich immer diesen fehler

[Only registered and activated users can see links. Click Here To Register...]

Also Nihlathak macht er seit dem Update besser tot, wegen einer anderen Position (hab kein chicken) ...
Aber sobald er zu Pindleskin kommt, passt ihm irgenteine Position nicht und ich bekomm die Fehlermeldung.
Passiert bei Soso und hammerdin.

Allerdings nicht bei jeden Run, trifft ab und zu auf.


Jemand eine Lösung dafür ?

Hier noch die Pindleskin.ntj

PHP Code:
// Multipurpose Pindle script - derived from NTPindleskin and NTNihlathak

var _NTNihlathak_Locations = new Array(84);

_NTNihlathak_Locations[0] = [125195203125225227]; // Top Left
_NTNihlathak_Locations[1] = [127045019126925022]; // Top Right
_NTNihlathak_Locations[2] = [127055391127235413]; // Bottom Right
_NTNihlathak_Locations[3] = [128895206128985228]; // Bottom Left
_NTNihlathak_Locations[4] = [125195203125225196]; // Top Left
_NTNihlathak_Locations[5] = [127045019126925413]; // Top Right
_NTNihlathak_Locations[6] = [127055391127275022]; // Bottom Right
_NTNihlathak_Locations[7] = [128895206128985192]; // Bottom Left

function NTMain()
{
    Include(
"libs/common/NTCommon.ntl");
    
NTC_IncludeLibs();
    
NTC_IncludeConfig("NTBot/char_configs");

    
NT_LoadConfig();
    
NTSI_LoadNIPFiles("NTBot/item_configs");

    
NTA_Initialize();
    
    if(!
NTConfig_DanceForPindle) {
        
NTConfig_DancingSorc false;
    }

    if(!
NTTM_CheckAct())
    {
        
NTC_SendMsgToScript("NTBotGame.ntj""NTTM_CheckAct()");
        return;
    }

    
NTTMGR_TownManager();

    if(
NTConfig_UseTemplePortal)
    {
        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(
NTConfig_KillPindleskin)
        {
            if(!
NTM_MoveTo(me.areaid1006113234))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveTo()");
                return;
            }

            if(!
NTA_KillMonster(GetLocaleString(22497)))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTA_KillMonster()");
                return;
            }

            if(
NTConfig_ClearPosition)
                
NTA_ClearPosition();

            
NTSI_PickItems();
        }
        
        if(
NTConfig_KillNihlathak)
        {
            var 
_location;

            for(var 
i++)
            {
                if(!
NTM_MoveToStair(me.areaid122+i))
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveToStair()");
                    return;
                }

                if(!
NTM_TakeStair(122+i))
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeStair()");
                    return;
                }
                
                if(
me.areaid == 124)
                    break;
                
                switch(
NTConfig_ClearHalls)
                {
                case 
0:
                    break;
                case 
1:
                    
NTConfig_SkipRegularMonsters false;
                    
NTP_DoPrecast(true);
                    if(!
NTA_ClearLevel())
                    {
                        
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                        return;
                    }
                    break;
                case 
2:
                    
NTConfig_SkipRegularMonsters true;
                    
NTP_DoPrecast(true);
                    if(!
NTA_ClearLevel())
                    {
                        
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                        return;
                    }
                    break;
                }
                
                if(
NTConfig_OpenHallsSuperChests)
                    
OpenSpecialChestsInArea();
                    
                if(
NTConfig_OpenChestsInArea && NTU_DontOpenAreas())
                    
OpenChestsInArea();
            }

            
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(
NTConfig_CheckVipers && NTC_FindUnit(NTC_UNIT_MONSTERGetLocaleString(2956)))
            {
                
NTC_SendLogToOOG(NTC_LOG_COMMONCOLOR_1 "Tomb Vipers found.");
                
NTC_SendMsgToScript("NTBotGame.ntj""SCRIPT_END");
                return;
            }
            
            if(
NTTMGR_CheckSafe(NTConfig_CheckSelfSafeNTConfig_CheckMercSafe)){
                
NTTMGR_VisitTown();
            }

            if(!
NTA_KillMonster(526))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTA_KillMonster()");
                return;
            }

            if(
NTConfig_ClearPosition)
                
NTA_ClearPosition();

            
NTSI_PickItems();
            
            switch(
NTConfig_ClearHallsOfVaught)
            {
            case 
0:
                break;
            case 
1:
                
NTConfig_SkipRegularMonsters false;
                
NTP_DoPrecast(true);
                if(!
NTA_ClearLevel())
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                    return;
                }
                break;
            case 
2:
                
NTConfig_SkipRegularMonsters true;
                
NTP_DoPrecast(true);
                if(!
NTA_ClearLevel())
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                    return;
                }
                break;
            }
            
            if(
NTConfig_OpenChestsInArea && NTU_DontOpenAreas())
                
OpenChestsInArea();

            if(
NTConfig_OpenEvilUrnNihl)
            {
                if(!
NTM_MoveToPresetUnit(me.areaidNTC_UNIT_OBJECT466))
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveToPresetUnit()");
                    return;
                }
                
                var 
_EvilUrn NTC_FindUnit(NTC_UNIT_OBJECT466);
                
                if(
_EvilUrn)
                {
                    if(
NTM_MoveTo(_EvilUrn.areaid_EvilUrn.x+1_EvilUrn.y))
                    {
                        if(
NTC_OpenChest(_EvilUrn))
                            
NTC_Delay(1000);
                        
NTA_ClearPosition(20true)
                        
NTC_Delay(500);
                        
NTA_ClearPosition(20true)
                        
NTSI_PickItems();
                    }
                }
            }
        }
    }
    else
    {
        if(!
NTTM_TownMove("waypoint"))
        {
            
NTC_SendMsgToScript("NTBotGame.ntj""NTTM_TownMove()");
            return;
        }

        if(!
NTM_TakeWaypoint(123))
        {
            
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
            return;
        }
        
        if(
NTConfig_KillNihlathak)
        {
            var 
_location;

            switch(
NTConfig_ClearHalls)
            {
            case 
0:
                break;
            case 
1:
                
NTConfig_SkipRegularMonsters false;
                
NTP_DoPrecast(true);
                if(!
NTA_ClearLevel())
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                    return;
                }
                break;
            case 
2:
                
NTConfig_SkipRegularMonsters true;
                
NTP_DoPrecast(true);
                if(!
NTA_ClearLevel())
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                    return;
                }
                break;
            }
            
NTP_DoPrecast(true);    
            if(
NTConfig_OpenHallsSuperChests)
                
OpenSpecialChestsInArea();
                
            if(
NTConfig_OpenChestsInArea && NTU_DontOpenAreas())
                
OpenChestsInArea();
            
            if(!
NTM_MoveToStair(me.areaid124))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveToStair()");
                return;
            }

            if(!
NTM_TakeStair(124))
            {
                
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_CheckSelfSafeNTConfig_CheckMercSafe)){
                
NTTMGR_VisitTown();
            }

            if(
NTConfig_CheckVipers && NTC_FindUnit(NTC_UNIT_MONSTERGetLocaleString(2956)))
            {
                
NTC_SendLogToOOG(NTC_LOG_COMMONCOLOR_1 "Tomb Vipers found.");
                
NTC_SendMsgToScript("NTBotGame.ntj""SCRIPT_END");
                return;
            }

            if(!
NTA_KillMonster(526))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTA_KillMonster()");
                return;
            }

            if(
NTConfig_ClearPosition)
                
NTA_ClearPosition();

            
NTSI_PickItems();
            
            switch(
NTConfig_ClearHallsOfVaught)
            {
            case 
0:
                break;
            case 
1:
                
NTConfig_SkipRegularMonsters false;
                
NTP_DoPrecast(true);
                if(!
NTA_ClearLevel())
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                    return;
                }
                break;
            case 
2:
                
NTConfig_SkipRegularMonsters true;
                
NTP_DoPrecast(true);
                if(!
NTA_ClearLevel())
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                    return;
                }
                break;
            }
            
            if(
NTConfig_OpenChestsInArea && NTU_DontOpenAreas())
                
OpenChestsInArea();

            if(
NTConfig_OpenEvilUrnNihl)
            {
                if(!
NTM_MoveToPresetUnit(me.areaidNTC_UNIT_OBJECT466))
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveToPresetUnit()");
                    return;
                }
                
                var 
_EvilUrn NTC_FindUnit(NTC_UNIT_OBJECT466);
                
                if(
_EvilUrn)
                {
                    if(
NTM_MoveTo(_EvilUrn.areaid_EvilUrn.x+1_EvilUrn.y))
                    {
                        if(
NTC_OpenChest(_EvilUrn))
                            
NTC_Delay(1000);
                        
NTA_ClearPosition(20true)
                        
NTC_Delay(500);
                        
NTA_ClearPosition(20true)
                        
NTSI_PickItems();
                    }
                }
            }
        }
        
        if(
NTConfig_KillPindleskin)
        {
            switch(
me.areaid)
            {
            case 
124:
                if(!
NTM_MoveToStair(me.areaid123))
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveToStair()");
                    return;
                }

                if(!
NTM_TakeStair(123))
                {
                    
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeStair()");
                    return;
                }
            case 
123:
                
NTP_DoPrecast(false);
            
                for(var 
i++)
                {
                    if(!
NTM_MoveToStair(me.areaid122-i))
                    {
                        
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveToStair()");
                        return;
                    }

                    if(!
NTM_TakeStair(122-i))
                    {
                        
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeStair()");
                        return;
                    }
                    
                    if(
me.areaid == 121)
                        break;
                        
                    switch(
NTConfig_ClearHalls)
                    {
                    case 
0:
                        break;
                    case 
1:
                        
NTConfig_SkipRegularMonsters false;
                        
NTP_DoPrecast(true);
                        if(!
NTA_ClearLevel())
                        {
                            
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                            return;
                        }
                        break;
                    case 
2:
                        
NTConfig_SkipRegularMonsters true;
                        
NTP_DoPrecast(true);
                        if(!
NTA_ClearLevel())
                        {
                            
NTC_SendMsgToScript("NTBotGame.ntj""NTA_ClearLevel()");
                            return;
                        }
                        break;
                    }
                    
                    if(
NTConfig_OpenHallsSuperChests)
                        
OpenSpecialChestsInArea();
                        
                    if(
NTConfig_OpenChestsInArea && NTU_DontOpenAreas())
                        
OpenChestsInArea();
                }
                break;
            }
        
            if(!
NTM_MoveTo(me.areaid1006113234))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTM_MoveTo()");
                return;
            }

            if(!
NTA_KillMonster(GetLocaleString(22497)))
            {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTA_KillMonster()");
                return;
            }

            if(
NTConfig_ClearPosition)
                
NTA_ClearPosition();

            
NTSI_PickItems();
        }
    }
    
    
NTC_SendMsgToScript("NTBotGame.ntj""SCRIPT_END");
}

// Internal function
function NT_FindNihlathakInt()
{
    var 
ixy;
    var 
_nihlathak;
    var 
_mindist 999999;
    var 
_currdist;
    var 
_location = -1;

    
_nihlathak GetPresetUnits(me.areaidNTC_UNIT_OBJECT462);

    if(!
_nihlathak || _nihlathak.length 1)
        return 
_location;

    
_nihlathak[0].roomx*_nihlathak[0].x;
    
_nihlathak[0].roomy*_nihlathak[0].y;

    for(
i++)
    {
        
_currdist GetDistance(_NTNihlathak_Locations[i][0], _NTNihlathak_Locations[i][1], xy);

        if(
_currdist _mindist)
        {
            
_mindist _currdist;
            
_location i;
        }
    }

    return 
_location;