mIRC Home    About    Download    Register    News    Help

Print Thread
#98719 26/09/04 09:03 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
Okay i got this script and the first part workes fine but the last doesnt:

Code:
on *:text:*:?:{
  if (!login isin $1-) {
    %logon = $true
    msg $nick Please enter username.
  }
  elseif (%logon) {
    unset %logon
    if ($1- == $read(username.txt, w, $1-)) {
      %pass = $true
      msg $nick Username accepted.
      msg $nick Please enter password.
    }
    else {
      msg $nick Wrong username.
      elseif (%pass) {
        unset %pass
        if ($1- == [color:red]$read(311287.txt, w, $1-))[/color] {
          msg $nick Password accepted.
          msg $nick Login done.
        }
        else {
          msg $nick Wrong password, start over by using !login
        }
      }
    }
  }
}
  


when i'm suppose to enter the pass it doensnt work

And the red part i was just wonderring, can you make that like this:

Code:
 
$read([color:red]$1-.txt[/color], w, $1-))
 


$1-.txt = it search the filename that i wrote as pass.. If you understand.


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#98720 26/09/04 09:47 AM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Could the problem be misplaced brackets?

Code:
on *:text:*:?:{
  if (!login isin $1-) {
    %logon = $true
    msg $nick Please enter username.
  }
  elseif (%logon) {
    unset %logon
    if ($1- == $read(username.txt, w, $1-)) {
      %pass = $true
      msg $nick Username accepted.
      msg $nick Please enter password.
    }
    else {
      msg $nick Wrong username.
    [color:red]} [/color]
  [color:red]} [/color]
  elseif (%pass) {
    unset %pass
    if ($1- == $read(311287.txt, w, $1-)) {
      msg $nick Password accepted.
      msg $nick Login done.
    }
    else {
      msg $nick Wrong password, start over by using !login
    }
  }
}
  

#98721 26/09/04 09:59 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
okay thanks... Now there is just 2 tings more it says: Wrong password. all the time even if i type the right one.

And can i make this string like this:
Code:
if ($1- == $read[color:red]($1-).txt[/color], w, $1-)) {


So it will read from the file with the same name as the pass i type?


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#98722 26/09/04 09:59 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
okay thanks... Now there is just 2 tings more it says: Wrong password. all the time even if i type the right one.

And can i make this string like this:
Code:
if ($1- == $read[color:red](($1-).txt[/color], w, $1-)) {


So it will read from the file with the same name as the pass i type?


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#98723 26/09/04 10:18 AM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
$read(($1-).txt

Never seen that format.

$1- usually means more than one word.
What could be the value of " $1- " ?

#98724 26/09/04 10:21 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
when it ask to type password i type:

9850

then i want it to read the file called 9850 aswell

and if my pass is:

52114

then i reads the file named 52114


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX
#98725 26/09/04 10:55 AM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Rather than looking for 9850 in file 9850.txt, why not simply looking if the file exist.

on *:text:*:?: {
if ($file($+($1,.txt))) msg $nick ok
}


#98726 26/09/04 11:05 AM
Joined: May 2004
Posts: 132
N
NoPleX Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: May 2004
Posts: 132
ahh thanks mate.. laugh


if ($me != geek) { $life is $false }
else { $life is $true }
NoPleX

Link Copied to Clipboard