Kurast-/Arcane Sanctuary Skripte

03/03/2014 11:25 °!°#1
Hallo zusammen!

Ich habe mir in diesen zwei Skripten einen Chest-Bot für U-Kurast, Kurast Bazar und O-Kurast + das Arcane Sanctuarium zusammengestellt.

Meine Frage zum Problem:
Wenn der Chest-Bot am Ende des laufenden Skriptes angekommen ist, bleibt er einfach an der letzten Truhe/Waffenständer stehen und geht nicht auf das nächste Skript über.
"Running MW....ntj" ist immer noch grün aktiviert, das heisst, der Bot ist auch noch im laufenden Skript, doch steht aber an seiner geöffneten Truhe und wechselt nicht in's nächste Skript über.

Was ist an dem Skript abzuändern, dass er alleine ein TP öffnet, wodurch er dann in die Stadt geht das laufende Skript abschliesst.

Vielen Dank für Eure Lösungen!

PS: Bisher hab ich die Zeitdauer der Skripte so kurz eingestellt, dass der Bot nicht bis ans Ende kommt, sondern zum nächsten Skript switcht... sonst steht er wieder rum und tut garnichts, bis ihn die Monster töten.

Kurast-Skript:
PHP Code:
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(79))
   {
      
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
      return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
   
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

   if(
_unit)
   {
      for(
_unit.length n++)
      {
         if(
_unit[n].id == 580)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }
         }
         else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }   
               
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }         
         }
         
      }
   }
   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(80))
   {
      
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
      return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
   
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

   if(
_unit)
   {
      for(
_unit.length n++)
      {
         if(
_unit[n].id == 580)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }
         }
         else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }   
               
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }         
         }
         
      }
   }
   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(81))
   {
      
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
      return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
   
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

   if(
_unit)
   {
      for(
_unit.length n++)
      {
         if(
_unit[n].id == 580)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }
         }
         else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }   
               
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }         
         }
         
      }   
NTTMGR_TownManager();

   }
    
NTC_SendMsgToScript("MWBotGame.ntj""SCRIPT_END");
   } 
Arcane-Skript
PHP Code:
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(74))
   {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
                return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
        
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

        if(
_unit)
        {
                for(
0_unit.lengthn++)
                {
                        if(
_unit[n].id == 580)
                        {
                                
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
                                
                                
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
                                if(
_chest)
                                        {
                                                do
                                                {
                                                        if(
NTC_OpenChest(_chest))
                                                        
NTSI_PickItems();
                                                }while(
_chest.GetNext());
                                        }
                        }
                        else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
                        {
                                
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
                                
                                
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
                                if(
_chest)
                                        {
                                                do
                                                {
                                                        if(
NTC_OpenChest(_chest))
                                                        
NTSI_PickItems();
                                                }while(
_chest.GetNext());
                                        }   
                                        
                                
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
                                if(
_chest)
                                        {
                                                do
                                                {
                                                        if(
NTC_OpenChest(_chest))
                                                        
NTSI_PickItems();
                                                }while(
_chest.GetNext());
                                        }               
                        }
                        
                }
        }
   
   
NTC_SendMsgToScript("NTBotGame.ntj""SCRIPT_END");

Habs hinbekommen. Am Ende hab ich jeweils ein paar Zeilen angefügt:

Das fertige Kurast-Chestbotting-Skript:
PHP Code:
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(79))
   {
      
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
      return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
   
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

   if(
_unit)
   {
      for(
_unit.length n++)
      {
         if(
_unit[n].id == 580)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }
         }
         else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }   
               
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }         
         }
         
      }
   }
   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(80))
   {
      
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
      return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
   
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

   if(
_unit)
   {
      for(
_unit.length n++)
      {
         if(
_unit[n].id == 580)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }
         }
         else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }   
               
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }         
         }
         
      }
   }
   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(81))
   {
      
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
      return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
   
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

   if(
_unit)
   {
      for(
_unit.length n++)
      {
         if(
_unit[n].id == 580)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }
         }
         else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
         {
            
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
           
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext());
               }   
               
            
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
            if(
_chest)
               {
                  do
                  {
                     if(
NTC_OpenChest(_chest))
                     
NTSI_PickItems();
                  }while(
_chest.GetNext()); break;
               }         
         }
         
        }   
NTTMGR_TownManager();

   }
    
NTC_SendMsgToScript("MWBotGame.ntj""SCRIPT_END");
   } 
Das fertige Arcane-Sanctuary-Chestbot-Skript:
PHP Code:
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(74))
   {
                
NTC_SendMsgToScript("NTBotGame.ntj""NTM_TakeWaypoint()");
                return;
   }

   
NTP_DoPrecast(true);

   
Delay(500);
   
        
_unit GetPresetUnits(me.areaidNTC_UNIT_OBJECT);

        if(
_unit)
        {
                for(
0_unit.lengthn++)
                {
                        if(
_unit[n].id == 580)
                        {
                                
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
                                
                                
_chest NTC_FindUnit(NTC_UNIT_OBJECT"chest");
                                if(
_chest)
                                        {
                                                do
                                                {
                                                        if(
NTC_OpenChest(_chest))
                                                        
NTSI_PickItems();
                                                }while(
_chest.GetNext());
                                        }
                        }
                        else if(
_unit[n].id == 104 || _unit[n].id == 105 || _unit[n].id == 106 || _unit[n].id == 107)
                        {
                                
NTM_MoveTo(me.areaid_unit[n].roomx*5+_unit[n].x_unit[n].roomy*5+_unit[n].y);
                                
                                
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3247));
                                if(
_chest)
                                        {
                                                do
                                                {
                                                        if(
NTC_OpenChest(_chest))
                                                        
NTSI_PickItems();
                                                }while(
_chest.GetNext());
                                        }   
                                        
                                
_chest NTC_FindUnit(NTC_UNIT_OBJECTGetLocaleString(3248));
                                if(
_chest)
                                        {
                                                do
                                                {
                                                        if(
NTC_OpenChest(_chest))
                                                        
NTSI_PickItems();
                                                }while(
_chest.GetNext()); break;
                                        }               
                        }
                        
                }    
NTTMGR_TownManager();
        }
        
NTC_SendMsgToScript("MWBotGame.ntj""SCRIPT_END");

   } 
Viel Spass beim ausprobieren!
05/18/2014 18:53 NerDxx™#2
Läuft
09/28/2021 03:45 °!°#3
Servus (mal wieder),

ist es möglich dieses Skript an den Kolbot anzupassen (im *.js - Format)
Leider ist es mir nicht gelungen.

Falls jemand das kann, bitte stell die *.js _ file hier rein, damit der Run für Kolbot funktioniert

Ganz großes Dankeschön im Voraus!