I have a similar script and use double numbers. Try this and see if it works for you:
;Artificial Intelligence Script
; by xplosys
;INSTRUCTIONS
; In the lines state=10 through state=13
; change the scancodekeypressed=X value
; to change the access code.
;
; The code is only required to open and
; not to close. For instance, if used to
; open a door, the access code will open
; the door and the enter key will close
; it again.
;Header
desc = Switch Activate (enter pass code)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\enteraccesscode.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,scancodekeypressed=36:state=11,sound=audiobank\switches\press.wav,timerstart
:state=11,timergreater=500,scancodekeypressed=23:state=12,sound=audiobank\switches\press.wav,timerstart
:state=12,timergreater=500,scancodekeypressed=50:state=13,sound=audiobank\switches\press.wav,timerstart
:state=13,timergreater=500,scancodekeypressed=50:state=14,sound=audiobank\switches\press.wav,timerstart
:state=14,timergreater=500,scancodekeypressed=21:state=15,sound=audiobank\switches\press.wav,timerstart
:state=15,timergreater=500,scancodekeypressed=31:state=16,sound=audiobank\switches\press.wav,timerstart
:state=16,timergreater=500,scancodekeypressed=22:state=17,sound=audiobank\switches\press.wav,timerstart
:state=17,timergreater=500,scancodekeypressed=38:state=18,sound=audiobank\switches\press.wav,timerstart
:state=18,timergreater=500,scancodekeypressed=38:state=19,sound=audiobank\switches\press.wav,timerstart
:state=19,timergreater=500,scancodekeypressed=23:state=20,sound=audiobank\switches\press.wav,timerstart
:state=20,timergreater=500,scancodekeypressed=47:state=21,sound=audiobank\switches\press.wav,timerstart
:state=21,timergreater=500,scancodekeypressed=30:state=22,sound=audiobank\switches\press.wav,timerstart
:state=22,timergreater=500,scancodekeypressed=49:state=23,sound=audiobank\switches\press.wav
:state=23:state=1,plrsound=$0,activateifused=1,alttexture=1
:state=1,plrusingaction=0:state=2
:state=2,plrdistwithin=50,plrusingaction=1:state=3,plrsound=$1,activateifused=0,alttexture=0
:state=3,plrusingaction=0:state=10
;End of Script
I added the timerstart and then at the beginning of each state added the timergreater=500. This gives a small pause allowing you to have double letters or numbers when entering a code. You can't input the code at a rapid pace, but it will help when using double number/letters in a row.
You can adjust the timergreater=500 to a smaller number if you like. I tested this using the word FOOD and it worked fine for me.
- BlackFox