I ask for a help to remove the hyphen from the game name!
Ex: Pindle-01, Pindle-02 .. For Pindle 01, Pindle 02 ...
Thanks!
Ex: Pindle-01, Pindle-02 .. For Pindle 01, Pindle 02 ...
Thanks!
var gameName = 'Pc'; // name of the game without slash var gamePassword = 'ili'; // your game password, if no need, leave blank var gameDifficulty = 2; // game diff : 0 = normal, 1 = nightmare, 2 = hell var maxNumberOfPlayer = 8; var charDiff = [false, 20]; // [true/false to enable/disable, number]
controlData.click(controlData.controls.lobby.create.button.cancel);
sendEventToOOG(D2NT_MGR_CREATE_GAME, "Create fake game.", 0);
Delay(500);
if (!controlData.get(controlData.controls.lobby.button.create).pressed)
controlData.click(controlData.controls.lobby.button.create);
var runNumber = My_File ("NTBot/MyData/Custom/runNumber[" + gameCreater + "].txt", 0);
controlData.setText(controlData.controls.lobby.create.editBox.gameName, gameName + "-" + runNumber);
Delay(500);
if (gamePassword != "" )
controlData.setText (controlData.controls.lobby.create.editBox.password, gamePassword);
switch(gameDifficulty)
{
case 0 :
controlData.click(controlData.controls.lobby.create.button.normal);
break;
case 1 :
controlData.click(controlData.controls.lobby.create.button.nightmare);
break;
default :
controlData.click(controlData.controls.lobby.create.button.hell);
break;
}
tickCharDiff(charDiff[0], charDiff[1]);
Delay(200);
controlData.setText(controlData.controls.lobby.create.editBox.maxNumberOfPlayers, String(maxNumberOfPlayer));
Delay(200);
controlData.click(controlData.controls.lobby.create.button.createGame);
locationTimeout(5000, location);
function tickCharDiff (tick, reqLVL) // lambochan
{
if (tick)
{
var _control = controlData.get(controlData.controls.lobby.create.editBox.characterDifference);
if (!_control)
return;
if(_control.disabled == 4 )
controlData.click( controlData.controls.lobby.create.button.useCharacterDifference ); // enable it
controlData.setText( controlData.controls.lobby.create.editBox.characterDifference, reqLVL );
}
else
{
var _control = controlData.get(controlData.controls.lobby.create.editBox.characterDifference);
if (!_control)
return;
if (_control.disabled == 5)
controlData.click( controlData.controls.lobby.create.button.useCharacterDifference ); // disable it.
}
}
function MyIL_File(path, mode, msg, retry)
{
var _msg = "";
var _line = "";
var _fileHandle;
var _isFileCheck = false;
if (arguments.length < 3) msg = "";
if (arguments.length < 4) retry = (mode != 0) ? 25 : 5;
while (retry-- > 0)
{
if (mode == 2 && !_isFileCheck)
{
_fileHandle = FileOpen(path, 0);
if (!_fileHandle)
_fileHandle = FileOpen(path, 1);
if (_fileHandle)
_fileHandle.Close();
_isFileCheck = true;
}
_fileHandle = FileOpen(path, mode);
if (_fileHandle)
break;
if (retry > 0)
Delay(200);
}
if (_fileHandle)
{
if (mode == 0)
{
while (!_fileHandle.eof)
{
_line = _fileHandle.ReadLine();
if (_line || !_fileHandle.eof)
_msg += _line + msg;
}
}
else if (msg)
_fileHandle.WriteLine(msg);
_fileHandle.Close();
}
return _msg;
}
Quote:
Code:var gameName = 'Pc'; // name of the game without slash var gamePassword = 'ili'; // your game password, if no need, leave blank var gameDifficulty = 2; // game diff : 0 = normal, 1 = nightmare, 2 = hell var maxNumberOfPlayer = 8; var charDiff = [false, 20]; // [true/false to enable/disable, number]Code:controlData.click(controlData.controls.lobby.create.button.cancel); sendEventToOOG(D2NT_MGR_CREATE_GAME, "Create fake game.", 0); Delay(500); if (!controlData.get(controlData.controls.lobby.button.create).pressed) controlData.click(controlData.controls.lobby.button.create); var runNumber = My_File ("NTBot/MyData/Custom/runNumber[" + gameCreater + "].txt", 0); controlData.setText(controlData.controls.lobby.create.editBox.gameName, gameName + "-" + runNumber); Delay(500); if (gamePassword != "" ) controlData.setText (controlData.controls.lobby.create.editBox.password, gamePassword); switch(gameDifficulty) { case 0 : controlData.click(controlData.controls.lobby.create.button.normal); break; case 1 : controlData.click(controlData.controls.lobby.create.button.nightmare); break; default : controlData.click(controlData.controls.lobby.create.button.hell); break; } tickCharDiff(charDiff[0], charDiff[1]); Delay(200); controlData.setText(controlData.controls.lobby.create.editBox.maxNumberOfPlayers, String(maxNumberOfPlayer)); Delay(200); controlData.click(controlData.controls.lobby.create.button.createGame); locationTimeout(5000, location);Code:function tickCharDiff (tick, reqLVL) // lambochan { if (tick) { var _control = controlData.get(controlData.controls.lobby.create.editBox.characterDifference); if (!_control) return; if(_control.disabled == 4 ) controlData.click( controlData.controls.lobby.create.button.useCharacterDifference ); // enable it controlData.setText( controlData.controls.lobby.create.editBox.characterDifference, reqLVL ); } else { var _control = controlData.get(controlData.controls.lobby.create.editBox.characterDifference); if (!_control) return; if (_control.disabled == 5) controlData.click( controlData.controls.lobby.create.button.useCharacterDifference ); // disable it. } }lmk if i forgot somethingCode:function MyIL_File(path, mode, msg, retry) { var _msg = ""; var _line = ""; var _fileHandle; var _isFileCheck = false; if (arguments.length < 3) msg = ""; if (arguments.length < 4) retry = (mode != 0) ? 25 : 5; while (retry-- > 0) { if (mode == 2 && !_isFileCheck) { _fileHandle = FileOpen(path, 0); if (!_fileHandle) _fileHandle = FileOpen(path, 1); if (_fileHandle) _fileHandle.Close(); _isFileCheck = true; } _fileHandle = FileOpen(path, mode); if (_fileHandle) break; if (retry > 0) Delay(200); } if (_fileHandle) { if (mode == 0) { while (!_fileHandle.eof) { _line = _fileHandle.ReadLine(); if (_line || !_fileHandle.eof) _msg += _line + msg; } } else if (msg) _fileHandle.WriteLine(msg); _fileHandle.Close(); } return _msg; }