mIRC Home    About    Download    Register    News    Help

Print Thread
#203036 05/08/08 03:33 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
alias nickchange {
  $iif(%z == $null,set %z 1,inc %z)
  .nick $read($mircdirnick.txt,%z)
  if %z == $lines($mircdirnick.txt) { unset %z } 
}

hello,
im using that code for change my nick to any nick from nick.txt
/timer 0 30 /nick nickchange
nick.txt has the nick like thish
xyzzy
huh
mmmhmm
spectre
etcetc
i just need to knw how can i ident them ?
like this
xyzzy:password
mmmhmm:password1
when im on xyzzy
need auto /ns identify password
then if change mmmhmm
need auto /ns identify password1
sorry for the bad english
thnx for helps smile

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
1) I wouldn't recommend using a non-terminating timer that is set for 30 seconds for your nick change. As an IRCop on a couple of networks, if I saw that I'd be asking them why they are changing their nick that often.

2) Since you have different passwords for each nick, you're going to have to store the passwords also. This can be done in the nick.txt file by altering the format to <nick> <password>
Note: the <> should not be included.

3)
Code:
alias nickchange {
  inc %z
  if %z > $lines($mircdirnick.txt)   %z = 1
  var %newnick = $read($mircdirnick.txt,%z)
  .nick $gettok(%newnick,1,32)
  .ns identify $gettok($%newnick,-1,32)
}

Again, use this code with the timer at your own risk.
\

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Code:
alias nickchange {
  inc %z
  if ($read(nick.txt,n,%z)) {
    nick $gettok($v1,1,58)
    ns identify $gettok($v1,2,58)
  }
  else {
    %z = 0
    .timer 1 0 nickchange
  }
}

Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
both not work confused
ill not use it everyday RusselB
i just want to ident ex: 100 nicks with diff pass
but im trying to do it all auto first change nick then ident it till all idented in the nick.txt list as nick:pass

Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
RusselB's code use a space to delimit the nick from the pass in the text file whereas hixxy is using a ":" you need to tell how is your text file.

Last edited by Wims; 06/08/08 12:32 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Wims:pass1
xyzzy:passe2
Rusel:pass17
away:nickpass1
lord:nopass
like that but hixxy's not worked too

Last edited by xyzzy; 06/08/08 12:35 AM.
Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
It should works, try to use .timer -h 1 0 instead of .timer 1 0.
Also, make sure that the path for nick.txt is the right one.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
* Timer 1 1 time(s) 1ms delay nickchange
not do anything after this
u guys sure got me right ?
i want it change nicks auto confused

Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
Code:
alias nickchange {
  inc %z
  tokenize 58 $read(nick.txt,n,%z)
  echo -a > $1-
  if ($0) { nick $1 | ns identify $2 }
  else { %z = 0 | .timer -h 1 0 nickchange }
}

Try with this, when the alias is called, check if the /echo echoed something, if not, it mean that the $read is $null.

Last edited by Wims; 06/08/08 02:28 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
it not echoed smthng it echoed a lot thing...
>
>
>
>
>
>
>
>
* All timers halted
wats that ? confused

Last edited by xyzzy; 06/08/08 02:31 AM.
Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
This mean that the $read is $null.
Have you check to see if it is the right path ? In mirc, type //Echo -a $exists(nick.txt), if it return $false, you would have to specified the exact path to the file.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
$false
$true
okies i did it true ummm must i type always /nickchange ?
cant make it change every 30 sec the nicks ?
btw the nick.txt was in $mircdirtexts\nick.txt
i copied it back in mirc main folder cant make it read from texts\nick.txt ?

Last edited by xyzzy; 06/08/08 02:45 AM.
Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
You can do what you want.
Quote:
btw the nick.txt was in $mircdirtexts\nick.txt
So the $read should be like this : $read("texts\nick.txt",n,%z)
And let your nick.txt in $mircdirtexts\



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
alias nickchange {
  inc %z
  tokenize 58 $read("texts\nick.txt",n,%z)
  if ($0) { nick $1 | ns identify $2 }
  else { %z = 0 | .timer -h 1 0 nickchange }
}

can i learn wats 58 ? also why need else { %z = 0 | .timer -h 1 0 nickchange
learning is good wink
("texts\nick.txt",n,%z) is $false
for //Echo -a $exists(nick.txt)
but the code working how O-o confused
aha i find it come $true
//Echo -a $exists(texts\nick.txt) great lol

Last edited by xyzzy; 06/08/08 02:56 AM.
Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
We suppose that at first, %z is $null or 0, then the alias inc this variable in order to begin with the first lines until the last.
The else is here in order to reset the meter, if $0 is 0, it mean that the line we want doesn't exists because %z is the total number of lines in the file + 1.
58 is for $chr(58), the ":", look at /help tokenize smile

If $exists(texts\nick.txt) is $true, then the $read(texts\nick.txt,n,%z) should work.

Last edited by Wims; 06/08/08 03:09 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
thanks a lot for helps smile
im trying to do smthng else like this
Code:
on me:*:NICK:{
  inc %x
  tokenize 58 $read("texts\nick.txt",n,%x)
  if ($0) { ns identify $2 }
  else { %x = 0 { halt } }
}

without use that alias if i change my nick to any nick of in that list
ident it if not in the list not ident but this one identify everything confused

Joined: Jul 2006
Posts: 4,023
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,023
Code:
on me:*:NICK:if ($read(texts\nick.txt,w,$+($newnick,:*))) ns identify $token($v1,2,58)


I think this is what you want.Something that you may want too is that if $newnick is in the file, next time your alias will be called, use the nick just after it.If it is the case, simply set %z to $readn :

Code:
on me:*:NICK:if ($read(texts\nick.txt,w,$+($newnick,:*))) { ns identify $token($v1,2,58) | %z = $readn }



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
2 great work thnxxxxxxxxx smirk smile


Link Copied to Clipboard