Credits: An alle die was damit zu tun hatten, weiss leider nimmer wo die Scripte herkommen die ich als Vorlage genommen habe. Aber auf alle Fälle Danke!
Features:
- Automatische Erkennung ob 2 oder 3 Zeilen
- Kein /f l Spamm
- 1 EntryPoint deckt Leader und Leecher ab
- AutoMule[1], KeyChange etc. sollten damit funktionieren
[1] Muss natürlich im Bot enthalten sein
Einfach NTBot.ntj anpassen!
Variablen (zum selber definieren):
Code:
[COLOR="Green"]// Leech settings[/COLOR] [B][I][COLOR="Navy"]var [/COLOR][/I][/B]LeaderAccountName = [COLOR="DimGray"]"DefaultAccount"[/COLOR]; [COLOR="Green"]// leader account name here[/COLOR] [B][I][COLOR="Navy"]var [/COLOR][/I][/B]LeaderGamePW = [COLOR="DimGray"]"default"[/COLOR]; [COLOR="Green"]// The password used for the games you want to join[/COLOR] [COLOR="Navy"][B][I]var [/I][/B][/COLOR]LeecherAccounts = [[COLOR="DimGray"]"DefaultAccount"[/COLOR]]; [COLOR="Green"]// List ALL accounts that use leechscript[/COLOR]
Variablen (vorgegeben)/Initialisierung:
Code:
[COLOR="Green"]// Set Leecher Settings[/COLOR] [B][I][COLOR="Navy"]var [/COLOR][/I][/B]isLeecher = [I][B][COLOR="Navy"]false[/COLOR][/B][/I]; [B][I][COLOR="Navy"]for [/COLOR][/I][/B]([B][I][COLOR="Navy"]var [/COLOR][/I][/B]i = [COLOR="Red"]0[/COLOR]; i < LeecherAccounts.length; i++) { [B][I][COLOR="Navy"]if [/COLOR][/I][/B](me.account == LeecherAccounts[i]) { isLeecher = [B][I][COLOR="Navy"]true[/COLOR][/I][/B]; } } [B][I][COLOR="Navy"]var [/COLOR][/I][/B]OldGame = [COLOR="DimGray"]''[/COLOR]; [I][COLOR="Navy"]var[/COLOR][/I] Check = [COLOR="Red"]1[/COLOR];
Und eine If .. else .. - Schleife (+ paar Variablen):
Code:
[B][I][COLOR="Navy"]case [/COLOR][/I][/B][COLOR="Red"]1[/COLOR]: // Lobby [B][I][COLOR="Navy"]var [/COLOR][/I][/B]_Lines; [B][I][COLOR="Navy"]var [/COLOR][/I][/B]chat; [B][I][COLOR="Navy"]var [/COLOR][/I][/B]_Game = [COLOR="DimGray"]""[/COLOR]; [B][I][COLOR="Navy"]var [/COLOR][/I][/B]_Errors = [COLOR="DimGray"]""[/COLOR]; [B][I][COLOR="Navy"]var [/COLOR][/I][/B]_FoundLeader = [B][I][COLOR="Navy"]false[/COLOR][/I][/B]; [B][I][COLOR="Navy"]var [/COLOR][/I][/B]_LineWithName = [COLOR="DimGray"]""[/COLOR]; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](isLeecher) { Delay([COLOR="Red"]1000[/COLOR]); [B][I][COLOR="Navy"]if [/COLOR][/I][/B](chat = controlData.get(controlData.controls.lobby.chat.textBox.channelText)) { _Lines = chat.GetText(); [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_Lines.length > [COLOR="Red"]1[/COLOR]) { [B][I][COLOR="Navy"]for [/COLOR][/I][/B]([B][I][COLOR="Navy"]var [/COLOR][/I][/B]_Friend = [COLOR="Red"]0[/COLOR]; _Friend < _Lines.length; _Friend++) { [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_Lines[_Friend].indexOf(LeaderAccountName) > [COLOR="Red"]-1[/COLOR]) { _Game = [COLOR="DimGray"]''[/COLOR]; _FoundLeader = [B][I][COLOR="Navy"]true[/COLOR][/I][/B]; [B][I][COLOR="Navy"]var [/COLOR][/I][/B]regOfflineEnglish=/^\d\s?:\s?(\w*)\s?,\s?offline\s*$/gi; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_Lines[_Friend].match(regOfflineEnglish)) { _Errors += (_Errors == [COLOR="DimGray"]''[/COLOR] ? [COLOR="DimGray"]''[/COLOR] : [COLOR="DimGray"]' '[/COLOR]) + [COLOR="DimGray"]'leader is offline'[/COLOR]; Delay([COLOR="Red"]5000[/COLOR]); [B][I][COLOR="Navy"]break[/COLOR][/I][/B]; } _LineWithName = _Lines[_Friend + [COLOR="Red"]2[/COLOR]]; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_LineWithName === undefined) _LineWithName = _Lines[_Friend + [COLOR="Red"]1[/COLOR]]; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_LineWithName !== undefined) _LineWithName = _LineWithName.replace(/^\s+/,[COLOR="DimGray"]""[/COLOR]); [B][I][COLOR="Navy"]else[/COLOR][/I][/B] [B][I][COLOR="Navy"]break[/COLOR][/I][/B]; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_LineWithName.indexOf([COLOR="DimGray"]'called'[/COLOR]) > [COLOR="Red"]-1[/COLOR]) _Game = _LineWithName.substring(_LineWithName.indexOf([COLOR="DimGray"]'called'[/COLOR])+[COLOR="Red"]7[/COLOR],_LineWithName.indexOf([COLOR="DimGray"]'.'[/COLOR])); [B][I][COLOR="Navy"]else[/COLOR][/I][/B] _Game = _LineWithName.substring([COLOR="Red"]0[/COLOR],_LineWithName.indexOf([COLOR="DimGray"]'.'[/COLOR])); _LineWithName = [COLOR="DimGray"]''[/COLOR]; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_Game != [COLOR="DimGray"]''[/COLOR] && _Game != OldGame) { controlData.click(controlData.controls.lobby.button.join); Delay([COLOR="Red"]200[/COLOR]); controlData.setText(controlData.controls.lobby.join.editBox.gameName, _Game); Delay ([COLOR="Red"]200[/COLOR]); controlData.setText(controlData.controls.lobby.join.editBox.password, LeaderGamePW); Delay ([COLOR="Red"]1234[/COLOR]); controlData.click(controlData.controls.lobby.join.button.joinGame); Check = [COLOR="Red"]1[/COLOR]; } [B][I][COLOR="Navy"]else[/COLOR][/I][/B] { [B][I][COLOR="Navy"]if [/COLOR][/I][/B](!_Errors) _Errors = [COLOR="DimGray"]'leader is not in game.'[/COLOR]; } } } } [B][I][COLOR="Navy"]if [/COLOR][/I][/B](!_FoundLeader && joinChannelInChat) { [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_Errors) Say([COLOR="DimGray"]'Errors : '[/COLOR] + _Errors); [B][I][COLOR="Navy"]else[/COLOR][/I][/B] Delay([COLOR="Red"]15000[/COLOR]); } } [B][I][COLOR="Navy"]else[/COLOR][/I][/B] { Delay([COLOR="Red"]1500[/COLOR]); } _Errors = [COLOR="DimGray"]''[/COLOR]; [B][I][COLOR="Navy"]if [/COLOR][/I][/B](_Game != [COLOR="DimGray"]''[/COLOR]) OldGame = _Game; [B][I][COLOR="Navy"]break[/COLOR][/I][/B]; } [B][I][COLOR="Navy"]else[/COLOR][/I][/B] { [COLOR="DarkGreen"]// der original Code kommt hier hin // das ist alles* zwischen "case 1: //Lobby" und dem "break;" am Ende[/COLOR] } [B][I][COLOR="Navy"]break[/COLOR][/I][/B];
Wenn ihr wollt dass eure Leecher einen Channel betreten, dann müsst ihr nicht ganz alles ins "else" kopieren sondern einen kleinen Teil vor das "if".
*Den Teil hier (oder ähnlich je nach Version) könnt ihr direkt nach das "case 1: // Lobby" kopieren, wenn der Leecher den Channel auch joinen soll (ist aber nicht nötig).
Code:
[B][I][COLOR="Navy"]if [/COLOR][/I][/B](location.id == [COLOR="Red"]1[/COLOR] && joinChatAfterLogin) { Delay(Random(waitBeforeEnterChatMin, waitBeforeEnterChatMax)); controlData.click(controlData.controls.lobby.button.enterChat); [B][I][COLOR="Navy"]break[/COLOR][/I][/B]; }
Achtung!: Ihr müsst uU folgende 2 Variablen anpassen:
controlData
joinChatAfterLogin
Die sind z.B. bei Muddy anders geschrieben. Schaut also kurz wie die bei eurer Version heissen, sollte aber eigentlich meistens korrekt sein.
edit: (Sop nun sollte auch in belebten Chats alles klappen )
Das PW für die NTBot.ntj für Muddy V1.2 (ohne AutoMule!) ist muddy