mIRC Homepage
Posted By: NlCe 2 little questions :o - 06/03/04 01:31 PM
1. Is there a possibility to find out from within a script, if a nick is already given? =o
For instance:
Code:
  
on *:connect: {
 while (NICK is ALREADY given) {
  var %mynick = $read(script\txt\randomnicks.txt)
 }
 nick %mynick
}


2. If i use a timer in my script, mIRC usually shows me the text
Code:
* Timer 1 activated
* Timer 1 halted
in my active window.

How can i make it shown in the Status Window? O_o

I had it once shown there, but really don't know why. o_O
Posted By: Skip Re: 2 little questions :o - 06/03/04 01:40 PM
For on CONNECT to trigger your nick would already have been 'given'; mIRC won't allow you to connect to a server without first specifying your nickname. Maybe you're looking for on LOGON?

Not sure about the timers, is that with the same mIRC version as before?

Hope that helps. smile
Posted By: Naz Re: 2 little questions :o - 06/03/04 07:23 PM
You can hide the timer by using a period in front of the timer command in your script. i.e: .timer 1 1 dostuff
Posted By: NlCe Re: 2 little questions :o - 06/03/04 09:09 PM
Thnx, it works. \o/

--

The on connect was just an example. The question was meant generally. smirk

I just want to know how to check if a nickname is already given from within the script. :\
Posted By: z0r Re: 2 little questions :o - 06/03/04 10:00 PM
Code:
 
; BEFORE the logon
on ^*:logon: {
  ; Read a nickname from randomnicks.txt
  var %nick = $read(script\txt\randomnicks.txt)
  if ($server($server).pass) {
    ; If there is a password specified, send it.
    pass $server($server).pass
  }
  ; Change the nickname [from null]
  nick %nick
  ; 'Register' with the server.
  user $gettok($emailaddr,1,64) " $+ $gettok($emailaddr,2,64) $+ " " $+ $server $+ " : $+ $fullname
  halt
}

; 433 means 'nick in use'
raw 433:*: {
  ; Change nick to a nickname from randomnicks.txt
  nick $read(script\txt\randomnicks.txt)
}
 
Posted By: NlCe Re: 2 little questions :o - 07/03/04 12:26 PM
Works so far, but why do i need that:
Code:
  if ($server($server).pass) {
    ; If there is a password specified, send it.
    pass $server($server).pass  }
blush ?
© mIRC Discussion Forums