Author Topic: [d2NT] Skiping to next script while in game  (Read 1972 times)

noob_patrol

  • Guest
[d2NT] Skiping to next script while in game
« on: June 20, 2010, 12:12:16 AM »
Hey all


To use
pause the script via the pause/break button
and hit pg down
to cycle through scripts
then hit pause/break 2 start again

all you need to do is:
Find that function in ntbotgame file and replace it with provided lines.

Code: [Select]
function NT_KeyEvents(keycode)
{
   var _script;

   switch(keycode)
   {
      case 19:
         _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
         if(_script)
         {
            if(_script.running)
            {
               _script.Stop();

               NTC_Delay(300);
               ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);

               SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
            }
            else
            {
               Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
               SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
            }
         }
         break;
         
      case 34:
         _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
         if(_script.running)
         {   
            _script.Stop();
             
            NTC_Delay(300);
            ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
             
            SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
         }       
         else if(++CurScriptIndex < NTConfig_Script.length)
            SetStatusText("Skipped to " + NTConfig_Script[CurScriptIndex]);
         else if(++CurScriptIndex >= NTConfig_Script.length)
         {
            CurScriptIndex = 0
            SetStatusText("Skipped to " + NTConfig_Script[CurScriptIndex]);
         }
         break;
   }
}
 

Credits
~Thursty


Offline BlackOut ?

  • Donors
  • PK Novice
  • ***
  • Posts: 176
  • Reputation 5
    • View Profile
Re: [d2NT] Skiping to next script while in game
« Reply #1 on: August 15, 2010, 12:57:28 PM »
i got an error msg i put it in the place that matches it i thk it might be missing somthin idk
how can i fix?

Offline TheFreak

  • Just like an admin ;)
  • PK Pro
  • ****
  • Posts: 373
  • Reputation 1
  • I rap and write javascript mutha fucka!
    • View Profile
Re: [d2NT] Skiping to next script while in game
« Reply #2 on: August 15, 2010, 01:17:32 PM »
If yu want to be able to skip forward, and back, do this:
Code: [Select]
function NT_KeyEvents(keycode)
{
   var _script;

   switch(keycode)
   {
   case 19:
      _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
      if(_script)
      {
         if(_script.running)
         {
            _script.Stop();

            NTC_Delay(300);
            ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);

            SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
         }
         else
         {
            Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
            SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
         }
      }
      break;
       
       case 33:
               _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
               
         if(_script.running)
               {   
                     _script.Stop();
           
                     NTC_Delay(300);
                     ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
           
                     SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
              }     
              else if(--CurScriptIndex >= 0)
                     SetStatusText("Back to " + NTConfig_Script[CurScriptIndex]);
               else if(--CurScriptIndex < 0)
               {
                    CurScriptIndex = 0
                     SetStatusText("First script " + NTConfig_Script[CurScriptIndex]);

               }
               break;   

   case 34:
         _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
   
         if(_script.running)
         {   
            _script.Stop();
            SetStatusText("Stopped " + NTConfig_Script[CurScriptIndex]);
         }       
         else if(++CurScriptIndex < NTConfig_Script.length)
            SetStatusText("Skipped to " + NTConfig_Script[CurScriptIndex]);
         else if(++CurScriptIndex >= NTConfig_Script.length)
         {
            CurScriptIndex = 0
            SetStatusText("Skipped to " + NTConfig_Script[CurScriptIndex]);
         }
         break;
                   
   }

}


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"

Offline BlackOut ?

  • Donors
  • PK Novice
  • ***
  • Posts: 176
  • Reputation 5
    • View Profile
Re: [d2NT] Skiping to next script while in game
« Reply #3 on: August 15, 2010, 06:37:46 PM »
i stilll got an error lol can u make it so i can just download the NTBotGame file so i can put it in my bot in place of the other NTBotGame ;D

Offline TheFreak

  • Just like an admin ;)
  • PK Pro
  • ****
  • Posts: 373
  • Reputation 1
  • I rap and write javascript mutha fucka!
    • View Profile
Re: [d2NT] Skiping to next script while in game
« Reply #4 on: August 15, 2010, 07:05:37 PM »
Whats tha error?


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"

killziky

  • Guest
Re: [d2NT] Skiping to next script while in game
« Reply #5 on: August 16, 2010, 02:53:52 AM »
i stilll got an error lol can u make it so i can just download the NTBotGame file so i can put it in my bot in place of the other NTBotGame ;D

you might have confuused either

function NT_ScriptMsgEvents(msg)
function NT_GameMsgEvents(msg, type)

one of those with this

function NT_KeyEvents(keycode)

manto0301

  • Guest
Re: [d2NT] Skiping to next script while in game
« Reply #6 on: September 11, 2010, 12:15:46 AM »
Okay this is going to sound stupid but for some reason i am not allowed to have quotations as a file name (windows)  and my file name under char configs looks like this
NTConfig_Script.push(NTBaalLeech.ntj)
and i know it is supposed to look like this:
NTConfig_Script.push("NTBaalLeech.ntj")
But Windows will not let me put in the Quotations and as a result i get the error when the character is in a chat room
"I cannot read this chat"
Any ideas???
Anything would be greatly appreciated

Offline TheFreak

  • Just like an admin ;)
  • PK Pro
  • ****
  • Posts: 373
  • Reputation 1
  • I rap and write javascript mutha fucka!
    • View Profile
Re: [d2NT] Skiping to next script while in game
« Reply #7 on: September 11, 2010, 12:33:21 AM »
.......Ummm. Tha file itself doesnt have tha quotes. But in yur char config yu need NTConfig_Script.push("NTBaalLeech.ntj");

And yu also need to make sure yu put tha line in tha controlInfo.ntl in order for tha bot to read chat.


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"