Password (Game)

By Tamaki on Nov 07, 2008

ATTENTION! This game does NOT require The_Almighty_Duelist's Integration Script.

To play this game, all you have to do is guess a four character combination!
Very simple, until we throw in some twists. Here they are:

1a. The combination may consist of the following characters (Hard):
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789!@#$%^&;()<>?,./[]{}|':"

1b. The combination may consist of the following characters (Medium):
abcdefghijklmnopqrstuvwxyz0123456789

1c. The combination may consist of the following characters (Easy):
0123456789

  1. Every time you get a single character wrong, that particular character changes.

  2. The combination will change at random times no matter how many characters you
    currently have correct. This will always happen between your first and tenth
    guess. (Medium & Hard Only)

Helpers:

We have added the following helpers:

  1. Auto-advance. This feature automatically advances the cursor to the next box
    as long as you type a character in the current box. (limit one character per
    box).

  2. Missing Number Cursor Placement. This feature automatically places your cursor
    inside an empty box when you attempt to check the password.

  3. Auto-check. This option forces the game to check the answer against the
    password when a character is put into the final box. If there is an empty box,
    the cursor will be placed in the empty box. In most cases, you will have to
    delete the last character box and re-enter a character in that box for the auto-
    check to work again, or you can simply click the 'check' button.

  4. Give Hint. If you absolutely must have one, the system will give you an
    en cryptic hint that will tell you whether or not you are moving in the right
    direction. Please note that this will probably not help you at all. In fact it is
    NOT recommended that you have both auto-check and give hint buttons enabled.

Other cool stuff:

  • Statistics and Guess Counter

  • Difficulty Settings

  • Wanna start over? Just hit the "Reset Bot" button or type /r3537

TO OPEN THIS BOT, SIMPLY TYPE /Z2F5

on *:LOAD: {
  change2 1
  change2 2
  change2 3
  change2 4
  set %give.hint no
  set %auto.check no
  set %counter 0
  set %psprc 0
  set %pswns 0
  set %pslss 0
  set %pslaw 0
  set %difficulty easy
}

alias Z2F5 {
  dialog -md password password
}

alias r3537 {
  change2 1
  change2 2
  change2 3
  change2 4
  set %counter 0
  dialog -x password
  dialog -md password password
}

dialog password {
  title Password
  option dbu
  size -1 -1 201 67
  edit "", 1, 10 11 10 10, default limit 1
  edit "", 2, 30 11 10 10, limit 1
  edit "", 3, 50 11 10 10, limit 1
  edit "", 4, 70 11 10 10, limit 1
  button "Check", 5, 1 31 100 10, default
  check "Auto-check", 8, 1 41 50 10
  check "Give Hint", 9, 51 41 49 10
  edit "", 7, 1 56 100 10, read
  text "", 10, 10 21 10 10
  text "", 11, 30 21 10 10
  text "", 12, 50 21 10 10
  text "", 13, 70 21 10 10
  text "Counter", 14, 1 1 50 10
  text "", 15, 51 1 49 10, right
  text "Last Win", 16, 101 1 50 10
  text %pslaw, 17, 152 1 48 10, right
  text "Total Wins", 18, 101 11 49 10
  text %pswns, 19, 151 11 49 10, right
  text "Total Losses", 20, 101 22 49 10
  text %pslss, 21, 151 22 49 10, right
  text "Percentage", 22, 101 33 49 10
  text %psprc, 23, 151 33 39 10, right
  text "%", 26, 191 33 9 10, right
  button "Reset Statistics", 24, 101 44 99 10
  button "Reset Bot", 25, 101 55 99 10
  menu "Difficulty", 27
  item "Easy", 28, 27
  item "Medium", 29, 27
  item "Hard", 30, 27
}

on *:DIALOG:password:init:0: {
  If (%auto.check == yes ) {
    did -c password 8
  }
  If (%give.hint == yes ) {
    did -c password 9
  }
  did -a password 15 %counter
  genperc
  If (%difficulty == easy ) {
    did -c password 28
  }
  If (%difficulty == medium ) {
    did -c password 29
  }
  If (%difficulty == hard ) {
    did -c password 30
  }
}

on *:DIALOG:password:edit:1: {
  If ($did(1) != $null ) {
    did -f password 2
  }
}

on *:DIALOG:password:edit:2: {
  If ($did(2) != $null ) {
    did -f password 3
  }
}

on *:DIALOG:password:edit:3: {
  If ($did(3) != $null ) {
    did -f password 4
  }
}

on *:DIALOG:password:edit:4: {
  If (%auto.check == yes ) {
    If (%difficulty == hard ) {
      checkpassword
    }
    Else {
      If (%difficulty == medium ) {
        checkpassword 2
      }
      Else {
        checkpassword 3
      }
    }
  }
}

on *:DIALOG:password:sclick:5: {
  If (%difficulty == hard ) {
    checkpassword
  }
  Else {
    If (%difficulty == medium ) {
      checkpassword 2
    }
    Else {
      checkpassword 3
    }
  }
}

on *:DIALOG:password:sclick:8: {
  If (%auto.check == yes ) {
    set %auto.check no
    did -u password 8
    did -f password 1
  }
  Else {
    set %auto.check yes
    did -c password 8
    did -f password 1
  }
  If (%give.hint == yes ) {
    did -r password 7
    did -a password 7 It is not recommended...
    timer 1 2 /did -r password 7
    timer 1 2 /did -a password 7 that you use both
    timer 1 4 /did -r password 7
    timer 1 4 /did -a password 7 of these together!
    timer 1 6 /did -r password 7
    timer 1 7 /did -f password 1
  }
}

on *:DIALOG:password:sclick:9: {
  If (%give.hint == yes ) {
    set %give.hint no
    did -u password 9
    did -f password 1
  }
  Else {
    set %give.hint yes
    did -c password 9
    did -f password 1
  }
  If (%auto.check == yes ) {
    did -r password 7
    did -a password 7 It is not recommended...
    timer 1 2 /did -r password 7
    timer 1 2 /did -a password 7 that you use both
    timer 1 4 /did -r password 7
    timer 1 4 /did -a password 7 of these together!
    timer 1 6 /did -r password 7
    timer 1 7 /did -f password 1
  }
}

on *:DIALOG:password:sclick:24: {
  set %pslaw 0
  set %pswns 0
  set %pslss 0
  set %psprc 0
  did -r password 17,19,21,23
  did -a password 17,19,21,23 0
}

on *:DIALOG:password:sclick:25: {
  r3537
}

on *:DIALOG:password:menu:28: {
  set %difficulty easy
  did -u password 29,30
  did -c password 28
}

on *:DIALOG:password:menu:29: {
  set %difficulty medium
  did -u password 28,30
  did -c password 29
}

on *:DIALOG:password:menu:30: {
  set %difficulty hard
  did -u password 28,29
  did -c password 30
}

alias change {
  If (%guess.number < $rand(1,9) ) {
    If ($1 == yes ) {
      change2 1
    }
    If ($2 == yes ) {
      change2 2
    }
    If ($3 == yes ) {
      change2 3
    }
    If ($4 == yes ) {
      change2 4
    }
    inc %guess.number
  }
  Else {
    change2 1
    change2 2
    change2 3
    change2 4
    set %guess.number 0
  }
  inc %pslss
  genperc
  did -r password 1-4,7,21
  did -a password 21 %pslss
  did -a password 7 Incorrect! Please try again!
  timer 1 1 /did -r password 7
  did -f password 1
  inc %counter
  did -r password 15
  did -a password 15 %counter
}

alias change2 {
  var %a $rand(1,4)
  If (%a == 1 ) {
    set %password. $+ $1 $rand(0,9)
  }
  If (%a == 2 ) {
    set %password. $+ $1 $rand(A,Z)
  }
  If (%a == 3 ) {
    set %password. $+ $1 $rand(a,z)
  }
  If (%a == 4 ) {
    var %b $rand(1,30)
    If (%b == 1 ) {
      set -n %password. $+ $1 !
    }
    If (%b == 2 ) {
      set -n %password. $+ $1 @
    }
    If (%b == 3 ) {
      set -n %password. $+ $1 #
    }
    If (%b == 4 ) {
      set -n %password. $+ $1 $
    }
    If (%b == 5 ) {
      set -n %password. $+ $1 %
    }
    If (%b == 6 ) {
      set -n %password. $+ $1 ^
    }
    If (%b == 7 ) {
      set -n %password. $+ $1 &
    }
    If (%b == 8 ) {
      set -n %password. $+ $1 *
    }
    If (%b == 9 ) {
      set -n %password. $+ $1 ;
    }
    If (%b == 10 ) {
      set -n %password. $+ $1 (
    }
    If (%b == 11 ) {
      set -n %password. $+ $1 )
    }
    If (%b == 12 ) {
      set -n %password. $+ $1 <
    }
    If (%b == 13 ) {
      set -n %password. $+ $1 >
    }
    If (%b == 14 ) {
      set -n %password. $+ $1 ?
    }
    If (%b == 15 ) {
      set -n %password. $+ $1 ,
    }
    If (%b == 16 ) {
      set -n %password. $+ $1 .
    }
    If (%b == 17 ) {
      set -n %password. $+ $1 /
    }
    If (%b == 18 ) {
      set -n %password. $+ $1 \
    }
    If (%b == 19 ) {
      set -n %password. $+ $1 [
    }
    If (%b == 20 ) {
      set -n %password. $+ $1 ]
    }
    If (%b == 21 ) {
      set -n %password. $+ $1 {
      }
      If (%b == 22 ) {
      set -n %password. $+ $1 }
    }
    If (%b == 23 ) {
      set -n %password. $+ $1 |
    }
    If (%b == 24 ) {
      set -n %password. $+ $1 '
    }
    If (%b == 25 ) {
      set -n %password. $+ $1 :
    }
    If (%b == 26 ) {
      set -n %password. $+ $1 "
    }
    If (%b == 27 ) {
      set -n %password. $+ $1 -
    }
    If (%b == 28 ) {
      set -n %password. $+ $1 =
    }
    If (%b == 29 ) {
      set -n %password. $+ $1 _
    }
    If (%b == 30 ) {
      set -n %password. $+ $1 +
    }
  }
}

alias change3 {
  If (%guess.number < $rand(1,9) ) {
    If ($1 == yes ) {
      change4 1
    }
    If ($2 == yes ) {
      change4 2
    }
    If ($3 == yes ) {
      change4 3
    }
    If ($4 == yes ) {
      change4 4
    }
    inc %guess.number
  }
  Else {
    change2 1
    change2 2
    change2 3
    change2 4
    set %guess.number 0
  }
  inc %pslss
  genperc
  did -r password 1-4,7,21
  did -a password 21 %pslss
  did -a password 7 Incorrect! Please try again!
  timer 1 1 /did -r password 7
  did -f password 1
  inc %counter
  did -r password 15
  did -a password 15 %counter
}

alias change4 {
  var %a $rand(1,2)
  If (%a == 1 ) {
    set %password. $+ $1 $rand(0,9)
  }
  If (%a == 2 ) {
    set %password. $+ $1 $rand(a,z)
  }
}

alias change5 {
  If ($1 == yes ) {
    change6 1
  }
  If ($2 == yes ) {
    change6 2
  }
  If ($3 == yes ) {
    change6 3
  }
  If ($4 == yes ) {
    change6 4
  }
  inc %guess.number
  inc %pslss
  genperc
  did -r password 1-4,7,21
  did -a password 21 %pslss
  did -a password 7 Incorrect! Please try again!
  timer 1 1 /did -r password 7
  did -f password 1
  inc %counter
  did -r password 15
  did -a password 15 %counter
}

alias change6 {
  set %password. $+ $1 $rand(0,9)
}

alias checkpassword {
  If ($1 == $null ) {
    If ($did(1, password) != $null ) {
      If ($did(2, password) != $null ) {
        If ($did(3, password) != $null ) {
          If ($did(4, password) != $null ) {
            If ($did(1, password) == %password.1 ) {
              If ($did(2, password) == %password.2 ) {
                If ($did(3, password) == %password.3 ) {
                  If ($did(4, password) == %password.4 ) {
                    inc %pswns
                    genperc
                    set %pslaw %counter
                    did -r password 17,19
                    did -a password 17 %pslaw
                    did -a password 19 %pswns
                    did -r password 7
                    did -a password 7 You win!
                    timer 1 1 /did -r password 1-4,7
                    timer 1 1 /did -a password 7 A new password is being created!
                    timer 1 2 /did -r password 7
                    timer 1 2 /did -a password 7 Good luck!
                    timer 1 3 /did -r password 7
                    change2 1
                    change2 2
                    change2 3
                    change2 4
                    timer 1 3 /did -f password 1
                    set %guess.number 0
                    did -r password 15
                    did -a password 15 %counter
                    timer 1 3 /did -r password 15
                    timer 1 3 /set %counter 0
                    timer 1 3 /did -a password 15 %counter
                  }
                  Else {
                    change no no no yes
                    givehint x x x o
                  }
                }
                Else {
                  If ($did(4, password) == %password.4 ) {
                    change no no yes no
                    givehint x x o x
                  }
                  Else {
                    change no no yes yes
                    givehint x x o o
                  }
                }
              }
              Else {
                If ($did(3, password) == %password.3 ) {
                  If ($did(4, password) == %password.4 ) {
                    change no yes no no
                    givehint x o x x
                  }
                  Else {
                    change no yes no yes
                    givehint x o x o
                  }
                }
                Else {
                  If ($did(4, password) == %password.4 ) {
                    change no yes yes no
                    givehint x o o x
                  }
                  Else {
                    change no yes yes yes
                    givehint x o o o
                  }
                }
              }
            }
            Else {
              If ($did(2, password) == %password.2 ) {
                If ($did(3, password) == %password.3 ) {
                  If ($did(4, password) == %password.4 ) {
                    change yes no no no
                    givehint o x x x
                  }
                  Else {
                    change yes no no yes
                    givehint o x x o
                  }
                }
                Else {
                  If ($did(4, password) == %password.4 ) {
                    change yes no yes no
                    givehint o x o x
                  }
                  Else {
                    change yes no yes yes
                    givehint o x o o
                  }
                }
              }
              Else {
                If ($did(3, password) == %password.3 ) {
                  If ($did(4, password) == %password.4 ) {
                    change yes yes no no
                    givehint o o x x
                  }
                  Else {
                    change yes yes no yes
                    givehint o o x o
                  }
                }
                Else {
                  If ($did(4, password) == %password.4 ) {
                    change yes yes yes no
                    givehint o o o x
                  }
                  Else {
                    change yes yes yes yes
                    givehint o o o o
                  }
                }
              }
            }
          }
          Else {
            did -r password 4,7
            did -a password 7 Please fill out all boxes!
            timer 1 1 /did -r password 7
            did -f password 4
          }
        }
        Else {
          did -r password 3,7
          did -a password 7 Please fill out all boxes!
          timer 1 1 /did -r password 7
          did -f password 3
        }
      }
      Else {
        did -r password 2,7
        did -a password 7 Please fill out all boxes!
        timer 1 1 /did -r password 7
        did -f password 2
      }
    }
    Else {
      did -r password 1,7
      did -a password 7 Please fill out all boxes!
      timer 1 1 /did -r password 7
      did -f password 1
    }
  }
  Else {
    If ($1 == 2 ) {
      If ($did(1, password) != $null ) {
        If ($did(2, password) != $null ) {
          If ($did(3, password) != $null ) {
            If ($did(4, password) != $null ) {
              If ($did(1, password) == %password.1 ) {
                If ($did(2, password) == %password.2 ) {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      inc %pswns
                      genperc
                      set %pslaw %counter
                      did -r password 17,19
                      did -a password 17 %pslaw
                      did -a password 19 %pswns
                      did -r password 7
                      did -a password 7 You win!
                      timer 1 1 /did -r password 1-4,7
                      timer 1 1 /did -a password 7 A new password is being created!
                      timer 1 2 /did -r password 7
                      timer 1 2 /did -a password 7 Good luck!
                      timer 1 3 /did -r password 7
                      change4 1
                      change4 2
                      change4 3
                      change4 4
                      timer 1 3 /did -f password 1
                      set %guess.number 0
                      did -r password 15
                      did -a password 15 %counter
                      timer 1 3 /did -r password 15
                      timer 1 3 /set %counter 0
                      timer 1 3 /did -a password 15 %counter
                    }
                    Else {
                      change3 no no no yes
                      givehint x x x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change3 no no yes no
                      givehint x x o x
                    }
                    Else {
                      change3 no no yes yes
                      givehint x x o o
                    }
                  }
                }
                Else {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      change3 no yes no no
                      givehint x o x x
                    }
                    Else {
                      change3 no yes no yes
                      givehint x o x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change3 no yes yes no
                      givehint x o o x
                    }
                    Else {
                      change3 no yes yes yes
                      givehint x o o o
                    }
                  }
                }
              }
              Else {
                If ($did(2, password) == %password.2 ) {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      change3 yes no no no
                      givehint o x x x
                    }
                    Else {
                      change3 yes no no yes
                      givehint o x x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change3 yes no yes no
                      givehint o x o x
                    }
                    Else {
                      change3 yes no yes yes
                      givehint o x o o
                    }
                  }
                }
                Else {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      change3 yes yes no no
                      givehint o o x x
                    }
                    Else {
                      change3 yes yes no yes
                      givehint o o x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change3 yes yes yes no
                      givehint o o o x
                    }
                    Else {
                      change3 yes yes yes yes
                      givehint o o o o
                    }
                  }
                }
              }
            }
            Else {
              did -r password 4,7
              did -a password 7 Please fill out all boxes!
              timer 1 1 /did -r password 7
              did -f password 4
            }
          }
          Else {
            did -r password 3,7
            did -a password 7 Please fill out all boxes!
            timer 1 1 /did -r password 7
            did -f password 3
          }
        }
        Else {
          did -r password 2,7
          did -a password 7 Please fill out all boxes!
          timer 1 1 /did -r password 7
          did -f password 2
        }
      }
      Else {
        did -r password 1,7
        did -a password 7 Please fill out all boxes!
        timer 1 1 /did -r password 7
        did -f password 1
      }
    }
    Else {
      If ($did(1, password) != $null ) {
        If ($did(2, password) != $null ) {
          If ($did(3, password) != $null ) {
            If ($did(4, password) != $null ) {
              If ($did(1, password) == %password.1 ) {
                If ($did(2, password) == %password.2 ) {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      inc %pswns
                      genperc
                      set %pslaw %counter
                      did -r password 17,19
                      did -a password 17 %pslaw
                      did -a password 19 %pswns
                      did -r password 7
                      did -a password 7 You win!
                      timer 1 1 /did -r password 1-4,7
                      timer 1 1 /did -a password 7 A new password is being created!
                      timer 1 2 /did -r password 7
                      timer 1 2 /did -a password 7 Good luck!
                      timer 1 3 /did -r password 7
                      change6 1
                      change6 2
                      change6 3
                      change6 4
                      timer 1 3 /did -f password 1
                      set %guess.number 0
                      did -r password 15
                      did -a password 15 %counter
                      timer 1 3 /did -r password 15
                      timer 1 3 /set %counter 0
                      timer 1 3 /did -a password 15 %counter
                    }
                    Else {
                      change5 no no no yes
                      givehint x x x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change5 no no yes no
                      givehint x x o x
                    }
                    Else {
                      change5 no no yes yes
                      givehint x x o o
                    }
                  }
                }
                Else {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      change5 no yes no no
                      givehint x o x x
                    }
                    Else {
                      change5 no yes no yes
                      givehint x o x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change5 no yes yes no
                      givehint x o o x
                    }
                    Else {
                      change5 no yes yes yes
                      givehint x o o o
                    }
                  }
                }
              }
              Else {
                If ($did(2, password) == %password.2 ) {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      change5 yes no no no
                      givehint o x x x
                    }
                    Else {
                      change5 yes no no yes
                      givehint o x x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change5 yes no yes no
                      givehint o x o x
                    }
                    Else {
                      change5 yes no yes yes
                      givehint o x o o
                    }
                  }
                }
                Else {
                  If ($did(3, password) == %password.3 ) {
                    If ($did(4, password) == %password.4 ) {
                      change5 yes yes no no
                      givehint o o x x
                    }
                    Else {
                      change5 yes yes no yes
                      givehint o o x o
                    }
                  }
                  Else {
                    If ($did(4, password) == %password.4 ) {
                      change5 yes yes yes no
                      givehint o o o x
                    }
                    Else {
                      change5 yes yes yes yes
                      givehint o o o o
                    }
                  }
                }
              }
            }
            Else {
              did -r password 4,7
              did -a password 7 Please fill out all boxes!
              timer 1 1 /did -r password 7
              did -f password 4
            }
          }
          Else {
            did -r password 3,7
            did -a password 7 Please fill out all boxes!
            timer 1 1 /did -r password 7
            did -f password 3
          }
        }
        Else {
          did -r password 2,7
          did -a password 7 Please fill out all boxes!
          timer 1 1 /did -r password 7
          did -f password 2
        }
      }
      Else {
        did -r password 1,7
        did -a password 7 Please fill out all boxes!
        timer 1 1 /did -r password 7
        did -f password 1
      }
    }
  }
}

alias givehint {
  If (%give.hint == yes ) {
    If ($1 == x ) {
      did -r password 10
      did -a password 10 O
    }
    Else {
      did -r password 10
      did -a password 10 X
    }
    If ($2 == x ) {
      did -r password 11
      did -a password 11 O
    }
    Else {
      did -r password 11
      did -a password 11 X
    }
    If ($3 == x ) {
      did -r password 12
      did -a password 12 O
    }
    Else {
      did -r password 12
      did -a password 12 X
    }
    If ($4 == x ) {
      did -r password 13
      did -a password 13 O
    }
    Else {
      did -r password 13
      did -a password 13 X
    }
    timer 1 1 /did -r password 10-13
  }
}

alias genperc {
  If (%pslss == 0 ) {
    If (%pswns == 0 ) {
      set %psprc 0
    }
    Else {
      set %psprc 100
    }
  }
  Else {
    set %psprc $calc($calc(%pswns / %pslss ) * 100 )
  }
  did -r password 23
  did -a password 23 %psprc
}

Comments

Sign in to comment.
Tamaki   -  Nov 08, 2008

other than that, how did you like it? what else do you think could be improved?

 Respond  
guest598594   -  Nov 07, 2008
    timer 1 2 /did -r password 7
    timer 1 2 /did -a password 7 that you use both
    timer 1 4 /did -r password 7
    timer 1 4 /did -a password 7 of these together!
    timer 1 6 /did -r password 7
    timer 1 7 /did -f password 1

I'd silence the timers, make them .timer

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.