I just required some help with the script because of a dumb error, and now this script is working fine. So now i decided to give it back to the community that helped my learn how to script so here you go!
Attached is a copy of the script.
Also here is the script if you would like to preview it before you download.
;Artificial Intelligence Script
;Created by:Tomahawk
;Credits:ncmako
;Header
desc = Press (Z) and (X) repeatedly to pick the lock
;Triggers
:state=0,plrdistwithin=120:state=1
:state=1,scancodekeypressed=44:etimerstart,state=2
:state=2,etimergreater=250:state=0
:state=2,scancodekeypressed=45:state=3
:state=3,etimergreater=250:state=0
:state=3,scancodekeypressed=44:etimerstart,state=4
:state=4,etimergreater=250:state=0
:state=4,scancodekeypressed=45:etimerstart,state=5
:state=5,etimergreater=250:state=0
:state=5,scancodekeypressed=44:etimerstart,state=6
:state=6,etimergreater=250:state=0
:state=6,scancodekeypressed=45:etimerstart,state=7
:state=7,plrdistwithin=120:state=11
:state=8:incframe=0
:state=8,frameatend=0:state=9,coloff
:state=9,plrdistfurther=120:state=10,sound=$1,colon
:state=10:decframe=0
:state=10,frameatstart=0:state=7,setframe=0
:state=11,plrcanbeseen:state=8,setframe=0,sound=$0
:state=11:state=0
;End of Script
Note: there is no sound to go along with the script if you would
like to add one, go right ahead i wont stop you.
How it works:
To pick the lock you have to press Z and X repeatedly if you go to slow it will reset itself and you have to start all over again.
Licence: Free for commercial and noncommercial use, I would really appreciate credit, but don't go banging your head against your desk trying to remember how gave you the script, if you forget you forget. Also fell free to update and revise the script.
have fun with the script!