;Artificial Intelligence Script

;Header

desc          = Use Item and Activate Ifused

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\notyet.png,hudname=notyet,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\hand.png,hudname=usedoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=usedoorprompt
:state=10,plrdistfurther=61:hudunshow=usedoorprompt,hudunshow=notyet

:state=10,plrdistwithin=60,plrhaskey=0,plrusingaction=1:hudshow=notyet
:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:activate=2,hudunshow=usedoorprompt,hudunshow=notyet
:state=10,activated=2:activateifused=1,destroy

;End of Script

