Author Topic: Leech Fight New issue out of nowhere  (Read 2344 times)

iKeven

  • Guest
Leech Fight New issue out of nowhere
« on: July 15, 2010, 05:51:45 PM »
Okay, so ive got everything worked out... except now my sorc, thats leech fighting, after baal decides its gonna completely restart the bot, like close down d2 and everything. thats really asking for a temp ban. can someone help?

cooptheking

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #1 on: July 15, 2010, 06:23:05 PM »
Operating system
d2nt version
baal leech fight script (plz post)

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #2 on: July 15, 2010, 06:32:04 PM »
Windows 7 64 Bit
D2NT 3.0

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

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

   NTA_Initialize();

   NTTM_CheckAct();
   
   if(me.areaid != 109)
   {
   NTTM_TownMove("waypoint");

   NTM_TakeWaypoint(109);
   }
       
   NTTMGR_TownManager();

   NTTM_TownMove("waypoint");

   NTM_TakeWaypoint(129);
   
   NTM_MoveTo(me.areaid, me.x+2, me.y+2);

   NTP_DoPrecast(true);

   NTTM_TownMove("waypoint");

   NTM_TakeWaypoint(109);   
   
   NTTM_TownMove("portalspot");

   for(i = 0; i <= 100; i++)
   {
      if(NTC_InMyParty(NTConfig_Leader))
         break;

      Delay(200);
   }   

   while(me.areaid == 109 && NTC_InMyParty(NTConfig_Leader))
   {
      NTM_UsePortal("BluePortal", 131, NTConfig_Leader); // 50
      Delay(1000);
       
   }
   
   //if(refresh || !me.GetState(101))
         NTC_CastSkill(117, NTC_HAND_RIGHT); // Holy Shield
 

   while(NTC_InMyParty(NTConfig_Leader))
   {
   NT_ClearThroneInt();

   while(1)
   {
      if(me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN)
         NTM_MoveTo(me.areaid, 15092, 5028);
      else
         NTM_MoveTo(me.areaid, 15092, 5040);
 

      for(i = 0 ; i < 6 ; i++)
      {
         _wave = NT_ThroneCheckInt();
         if(_wave > 0)
            break;

         NTC_Delay(500);
      }

      _starttick = GetTickCount();

      while(_wave == 0)
      {
         if(!NT_ThronePreAttackInt())
            NTC_Delay(200);

         if(GetTickCount()-_starttick > 15000)
         {
            NT_ClearThroneInt();

            _starttick = GetTickCount();
         }

         _wave = NT_ThroneCheckInt();
      }

      switch(_wave)
      {
      case 1:
         NTA_ClearPosition(40, true, 1);
         NTP_DoPrecast(true);
         break;
      case 3:
         NTA_ClearPosition(40, true, 2);
         break;
      case 4:
         NTA_ClearPosition(40, true, 2);
         break;
      case 5:
         NTA_ClearPosition(40, true);
         break;
      default:
         NTA_ClearPosition(40, true, 1);
         break;
      }

      if(_wave == 5)
         break;
   }

  if(NTConfig_KillBaal)
   {


      var _portal;
   
      NTM_MoveTo(me.areaid, 15092, 5010);


      while(NTC_GetUnit(NTC_UNIT_MONSTER, 543))
         NTC_Delay(500);

      _portal = NTC_GetUnit(NTC_UNIT_OBJECT, 563, 1);

      if(!_portal)
      {
         NTC_SendMsgToScript("NTBotGame.ntj", "NTC_FindUnit()");
         return;
      }

      NTM_UsePortal("Portal", 132, null, _portal);

      NTM_MoveTo(me.areaid, 15138, 5916);


      NTA_KillMonster(544);

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


   }


   NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");

}


// Internal function
function NT_ClearThroneInt()
{
   var _attackpos = [15112, 5068, 15075, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];

   for(var i = 0 ; i < _attackpos.length ; i += 2)
   {
      NTM_MoveTo(me.areaid, _attackpos, _attackpos[i+1]);

      NTA_ClearPosition(25, true, 2);
   }
}

function NT_ThroneCheckInt()
{
   var _monster;

   if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
      return 5;

   _monster = NTC_FindUnit(NTC_UNIT_MONSTER);

   if(_monster)
   {
      do
      {
         if(NTA_IsValidMonster(_monster))
         {
            if(_monster.classid == 23 || _monster.classid == 62)
               return 1;

            if(_monster.classid == 105 || _monster.classid == 381)
               return 2;

            if(_monster.classid == 557)
               return 3;

            if(_monster.classid == 558)
               return 4;

            if(_monster.classid == 571)
               return 5;
         }
      } while(_monster.GetNext());
   }

   return 0;
}

function NT_ThronePreAttackInt()
{
   if(me.classid == NTC_CHAR_CLASS_SORCERESS)
   {
      if(NTConfig_AttackSkill[3] == 47 || NTConfig_AttackSkill[3] == 47)
         return NTC_CastSkill(NTConfig_AttackSkill[3], NTC_HAND_RIGHT, 15092, 5028) 
   }
   else if(me.classid == NTC_CHAR_CLASS_PALADIN)
   {
      if(NTConfig_AttackSkill[3] == 123)
      {
         if(NTConfig_AttackSkill[4] > 123)
            NTC_PutSkill(NTConfig_AttackSkill[4], NTC_HAND_RIGHT);

         return NTC_CastSkill(NTConfig_AttackSkill[3], 2);
      }
   }

   return false;
}

function NTC_GetUnit(unittype, classid)
{
   var _unit;

   for(var i = 0 ; i < 2 ; i++)
   {
      if(arguments.length < 2)
         _unit = GetUnit(unittype);
      else
         _unit = GetUnit(unittype, classid);

      if(_unit)
         return _unit;

      if(i < 1)
         NTC_PingDelay(200);
   }

   return false;
}

cooptheking

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #3 on: July 15, 2010, 06:38:11 PM »
try using this baalleechfight script

Code: [Select]
function NTMain()
{
   
   Include("libs/common/NTCommon.ntl");
   NTC_IncludeLibs();
   NTC_IncludeConfig("NTBot/char_configs");

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

   NTA_Initialize(); // 10

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

   if(me.areaid != 109)
   {
   if(!NTTM_TownMove("waypoint"))
   {
      NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
      return;
   }

   if(!NTM_TakeWaypoint(109))
   {
      NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
      return;
   }
   }
       
   NTTMGR_TownManager();
   
   NTTM_TownMove("portalspot");

   for(i = 0; i <= 100; i++)
   {
      if(NTC_InMyParty(NTConfig_Leader))
         break;

      Delay(200);
   }   

   while(me.areaid == 109 && NTC_InMyParty(NTConfig_Leader))
   {
      NTM_UsePortal("BluePortal", 131, NTConfig_Leader); // 50
      Delay(1000);
       
   }
   
   NTP_DoPrecast(true);

   while(NTC_InMyParty(NTConfig_Leader))
   {


   NT_ClearThroneInt();

   while(1)
   {
      if(me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN)
         NTM_MoveTo(me.areaid, 15092, 5028);
      else
         NTM_MoveTo(me.areaid, 15092, 5040);

      if(me.GetState(2))
         NTC_PutSkill(109, NTC_HAND_RIGHT);

      for(i = 0 ; i < 6 ; i++)
      {
         _wave = NT_ThroneCheckInt();
         if(_wave > 0)
            break;

         NTC_Delay(500);
      }

      _starttick = GetTickCount();

      while(_wave == 0)
      {
         if(!NT_ThronePreAttackInt())
            NTC_Delay(200);

         if(GetTickCount()-_starttick > 15000)
         {
            NT_ClearThroneInt();

            _starttick = GetTickCount();
         }

         _wave = NT_ThroneCheckInt();
      }

      switch(_wave)
      {
      case 1:
         NTA_ClearPosition(40, true, 1);
         NTP_DoPrecast(true);
         break;
      case 3:
         NTA_ClearPosition(40, true, 2);
         break;
NTSI_PickItems();
      case 4:
         NTA_ClearPosition(40, true, 2);
         break;
      case 5:
         NTA_ClearPosition(40, true);
         break;
NTSI_PickItems();
      default:
         NTA_ClearPosition(40, true, 1);
         break;
      }

      if(_wave == 5)
         break;
   }

   if(NTConfig_KillBaal)
   {
      var _portal;

      if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe|0x01, NTConfig_CheckMercSafe))
      {
         NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
         return;
      }

      NTM_MoveTo(me.areaid, 15092, 5010);

      NTP_DoPrecast(true);

      while(NTC_FindUnit(NTC_UNIT_MONSTER, 543))
         NTC_Delay(500);

      _portal = NTC_FindUnit(NTC_UNIT_OBJECT, 563, 1);

      if(!_portal)
      {
         NTC_SendMsgToScript("NTBotGame.ntj", "NTC_FindUnit()");
         return;
      }

      if(!NTM_UsePortal("Portal", 132, null, _portal))
      {
         NTC_SendMsgToScript("NTBotGame.ntj", "NTM_UsePortal()");
         return;
      }

      NTM_MoveTo(me.areaid, 15176, 5939);

      NTM_MoveTo(me.areaid, 15135, 5940);

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

      NTSI_PickItems();
   }


   }


   NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");

}


// Internal function
function NT_ClearThroneInt()
{
   var _attackpos = [15112, 5068, 15075, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];

   for(var i = 0 ; i < _attackpos.length ; i += 2)
   {
      NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);

      NTA_ClearPosition(25, true, 2);
   }
}

function NT_ThroneCheckInt()
{
   var _monster;

   if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
      return 5;

   _monster = NTC_FindUnit(NTC_UNIT_MONSTER);

   if(_monster)
   {
      do
      {
         if(NTA_IsValidMonster(_monster))
         {
            if(_monster.classid == 23 || _monster.classid == 62)
               return 1;

            if(_monster.classid == 105 || _monster.classid == 381)
               return 2;

            if(_monster.classid == 557)
               return 3;

            if(_monster.classid == 558)
               return 4;

            if(_monster.classid == 571)
               return 5;
         }
      } while(_monster.GetNext());
   }

   return 0;
}

function NT_ThronePreAttackInt()
{
   if(me.classid == NTC_CHAR_CLASS_SORCERESS)
   {
      if(NTConfig_AttackSkill[3] == 56 || NTConfig_AttackSkill[3] == 59)
         return NTC_CastSkill(NTConfig_AttackSkill[3], 2, 15092, 5028);
   }
   else if(me.classid == NTC_CHAR_CLASS_PALADIN)
   {
      if(NTConfig_AttackSkill[3] == 112)
      {
         if(NTConfig_AttackSkill[4] > 0)
            NTC_PutSkill(NTConfig_AttackSkill[4], NTC_HAND_RIGHT);

         return NTC_CastSkill(NTConfig_AttackSkill[3], 2);
      }
   }

   return false;
}

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #4 on: July 15, 2010, 07:52:55 PM »
Alright i tried the script, that one gives the lovely find unit failed error, and it still restarted after every game. I did find out what the problem is, but not how to fix it. Last night i got temp banned so i added another cd key to sorc, so that she would have 2 and lessen my chances of r'd while baaling (i run 2 bots, sorc and pally) so it only restarts like this if im trying to use multiple keys on the sorc..? no matter what i set the game # to, for how many to join before switching, it still restarts every game.

Offline TheFreak

  • Just like an admin ;)
  • PK Pro
  • ****
  • Posts: 373
  • Reputation 1
  • I rap and write javascript mutha fucka!
    • View Profile
Re: Leech Fight New issue out of nowhere
« Reply #5 on: July 15, 2010, 07:55:15 PM »
Are yu sure yu separated by ; ?

I just edited my guide, It now includes pics. Go check it out.


My New function:

function AlbertEinstein()
{
If (A = success in life)
A = x + y + z;
x = Work;
y = Play;
z = Keeping your mouth shut;
}

"Right after the Sam-Frodo suckfest, right before the credits roll, Sam fuckin' flat-out brick's in Frodo's mouth"

cooptheking

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #6 on: July 15, 2010, 08:02:38 PM »
hm.. i dont switch cdkeys
my bots are on run 392
sorc follower
hdin leader
i do chaos+baal every game tho

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #7 on: July 15, 2010, 08:03:44 PM »
Yep they were, I also re-did it again, and ran another time just to make sure, and that wasnt the problem.

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #8 on: July 15, 2010, 08:08:04 PM »
checked out the guide, did it all correctly... any more suggestions?

Offline Mad-Max

  • Donors
  • PK Novice
  • ***
  • Posts: 126
  • Reputation 5
    • View Profile
Re: Leech Fight New issue out of nowhere
« Reply #9 on: July 15, 2010, 10:03:37 PM »
checked out the guide, did it all correctly... any more suggestions?

post an s/s of your d2nt manager "profile settings" for the sorc leecher
and post the NTBotleech.ntj file

curious to see your settings

you wernt having this problem with just one key were you??
imo your game is too short id make the leader do some thing befor he runs baal to make the games longer, this will give you less chance of getting realm down as the games with 2xbaalers ends up being pretty quick
this also means you can have your sorc run some thing at the beginning of her runs like countess maybe

id say cooptheking has the right idea running chaos+baal with leech fight this gives him longer games and a less chance of realm down (hence why he gets away with using only 1 cd key per char)
« Last Edit: July 15, 2010, 10:13:44 PM by mad-max-hq »

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #10 on: July 15, 2010, 10:34:06 PM »

Offline TheFreak

  • Just like an admin ;)
  • PK Pro
  • ****
  • Posts: 373
  • Reputation 1
  • I rap and write javascript mutha fucka!
    • View Profile
Re: Leech Fight New issue out of nowhere
« Reply #11 on: July 15, 2010, 10:56:02 PM »
Is that exactly how yu spelled tha .mpq files? No capitals at all?


My New function:

function AlbertEinstein()
{
If (A = success in life)
A = x + y + z;
x = Work;
y = Play;
z = Keeping your mouth shut;
}

"Right after the Sam-Frodo suckfest, right before the credits roll, Sam fuckin' flat-out brick's in Frodo's mouth"

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #12 on: July 15, 2010, 11:06:43 PM »
yep

iKeven

  • Guest
Re: Leech Fight New issue out of nowhere
« Reply #13 on: July 15, 2010, 11:22:39 PM »
guys maybe theres just some bug with the scripts that doesnt allow multiple keys for a leecher.. idk..

Offline TheFreak

  • Just like an admin ;)
  • PK Pro
  • ****
  • Posts: 373
  • Reputation 1
  • I rap and write javascript mutha fucka!
    • View Profile
Re: Leech Fight New issue out of nowhere
« Reply #14 on: July 15, 2010, 11:26:11 PM »
Its not a 'bug'. post yur NTBotLeech.ntj so i can look at it, It HAS to be something in there, either missing, or changed. I'm pretty sure i can get it workin :)


My New function:

function AlbertEinstein()
{
If (A = success in life)
A = x + y + z;
x = Work;
y = Play;
z = Keeping your mouth shut;
}

"Right after the Sam-Frodo suckfest, right before the credits roll, Sam fuckin' flat-out brick's in Frodo's mouth"