Author Topic: D2NT Trapsin script  (Read 3832 times)

noob_patrol

  • Guest
D2NT Trapsin script
« on: June 20, 2010, 01:04:32 AM »
hey all trapsin script

put this into your ntattack config instead of whats there (delete old sin script put in new one
to find old ctrl+F
function NTA_AssassinAttackPatternInt()
Code: [Select]
function NTA_AssassinAttackPatternInt()
{
   var _maxindex, _maxskill;
   var _avgskilllevel = new Array();

   _avgskilllevel[0] = me.GetSkill(271, false);

   _maxindex = -1;
   _maxskill = 0;

   for(var i = 0 ; i < _avgskilllevel.length ; i++)
   {
      if(_avgskilllevel[i] > _maxskill)
      {
         _maxindex = i;
         _maxskill = _avgskilllevel[i];
      }
   }

   switch(_maxindex)
   {
   case 0: // Lightning Sentry + Fire Blast + Physical Hammer
      NTConfig_AttackSkill[1] = 271;
      NTConfig_AttackSkill[3] = 251;
      NTConfig_AttackSkill[5] = 253;
      break;
   }

   return (NTConfig_AttackSkill[1] && NTConfig_AttackSkill[3]);
}

function NTA_AssassinAttackInt(target, firstorder)
{
   var _primaryindex;

   if(NTTMGR_CheckCurse(NTConfig_CheckSelfSafe&0x04, NTConfig_CheckMercSafe&0x04))
   {
      if(!NTTMGR_VisitTown())
         return 0;
   }

   if(firstorder && NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[0]) < 100)
   {
      if(GetDistance(me, target) > _NTA_SkillRange[15] || !CheckCollision(me, target, 10))
      {
         var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, _NTA_SkillRange[0], 4);

         if(_pos)
            NTM_MoveTo(target.areaid, _pos[0], _pos[10], 0);
      }

      if(!NTC_CastSkill(NTConfig_AttackSkill[0], _NTA_SkillHand[0], target))
         return 2;

      return 3;
   }

   _primaryindex = (target.spectype&0x0A) ? 1 : 3;

   if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
   {
      if((_NTA_SkillRange[_primaryindex] < 4 || NTConfig_AttackSkill[_primaryindex] == 271) && !CheckCollision(target.areaid, target.x, target.y, 1))
         return 1;

      if(!NTA_AssassinCastSkillInt(_primaryindex, target))
         return 2;

      return 3;
   }

   if(NTConfig_AttackSkill[5] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[5]) < 100)
   {
      if((_NTA_SkillRange[5] < 4 || NTConfig_AttackSkill[5] == 271) && !CheckCollision(target.areaid, target.x, target.y, 1))
         return 1;

      if(!NTA_AssassinCastSkillInt(5, target))
         return 2;

      return 3;
   }

   return 1;
}

function NTA_AssassinCastSkillInt(index, target)
{
   if(NTConfig_AttackSkill[index] == 271)
   {
      var _castx, _casty;

      if(GetDistance(me, target) > _NTA_SkillRange[300] || !CheckCollision(me, target, 5))
      {
         var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, _NTA_SkillRange[index], 5);

         if(_pos)
            NTM_MoveTo(target.areaid, _pos[1], _pos[5], 0);
      }

      _castx =  target.x > me.x ? target.x+3 : target.x-3;
      _casty =  target.y > me.y ? target.y+3 : target.y-3;

      return NTC_CastSkill(NTConfig_AttackSkill[index], _NTA_SkillHand[index], _castx, _casty);
   }

   if(GetDistance(me, target) > _NTA_SkillRange[index] || !CheckCollision(me, target, 4))
   {
      var _pos = me.GetOptimalAttackPos(target.areaid, target.x, target.y, _NTA_SkillRange[index], 4);

      if(_pos)
         NTM_MoveTo(target.areaid, _pos[1], _pos[5], 0);
   }

   return NTC_CastSkill(NTConfig_AttackSkill[index], _NTA_SkillHand[index], target);
}


an example of  config for sin
Code: [Select]
NTConfig_AttackSkill[0] = 271;   // First skill. Set to 0 if you won't
   NTConfig_AttackSkill[1] = 271;   // Primary skill to boss.
   NTConfig_AttackSkill[2] = 256;   // Reserved
   NTConfig_AttackSkill[3] = 271;   // Primary skill to others.
   NTConfig_AttackSkill[4] = 273;   // Reserved
   NTConfig_AttackSkill[5] = 276;   // Secondary skill in case monster is immune to primary skill. Set to 0 if you won't
   NTConfig_AttackSkill[6] = 262;   // Reserved
   NTConfig_ClearPosition = false;   // Set to true if you want to clear area after killing boss.
Credits
~RDJ
« Last Edit: July 07, 2010, 12:48:11 AM by Justin »

Fernsdude

  • Guest
Re: D2NT Trapsin script
« Reply #1 on: April 13, 2011, 09:57:31 AM »
Ok I copied/paste this into NT attack , now when I try to run it, it says....... [...] NTBot/bots/NtBaal.ntj (14) : ReferenceError: NTA_Initialize is not defined.

Offline Justin

  • I run this bitch!
  • Administrator
  • PureKaoz HeRo
  • *****
  • Posts: 780
  • Reputation 3
  • Fck Bnet
    • View Profile
    • PureKaoz.com
Re: D2NT Trapsin script
« Reply #2 on: April 13, 2011, 10:32:13 AM »
Thats a problem in your baal script, go to the line that it is saying and check to make sure you changed nothing.

Owner of Cutting Edge Promotions http://CEPromotion.net

Offline cooptheking03

  • D2NT Specialist
  • Big Boss Man
  • PureKaoz HeRo
  • *******
  • Posts: 1656
  • Reputation 4
  • I Run This Chizz
    • View Profile
Re: D2NT Trapsin script
« Reply #3 on: April 13, 2011, 12:23:51 PM »
Thats a problem in your baal script, go to the line that it is saying and check to make sure you changed nothing.

Nope that means either the attack configuration (in the NTAttack.ntl) or the precast configuration (in the NTPrecast.ntl) are not properly wrote.

If it were an error in the baal script it would say something along the lines of
Missing } before statement line 123
I Do Not Do Support Via PM.
I Can Help Xfer Anycore/Anyrealm/Anytime.
PM me here or on JSP : TheAmazingShac0