k here it is...
Artificial Intelligence Script
by TheStoryteller01 2010
;Header
desc=
This script only works with FPSC 1.16.18, because FPGCRAWTEXT is used AND if using a mod that supports the PICKOBJECT condition.
Made for containers that can be searched for pick-up items.
- put the name of the item to be found in the "If Used" field of the container entity properites
- place the item to be found on top of the container and set the "Spawn At Start" field in the item properties to "no"
To start the script at any time, the player has to move the cursor over the item and press <Enter>.
While the script is running the player cannot move or use mouselook but still shoot. Pressing <Del> at any time ends the script.
To skip the second line of text (the "flavour text") delete all "state=9" lines and rename "state=9" in the 5th line to "state=11"
;Triggers
:state=0:state=1
:state=1,pickobject=1,plrdistwithin=60,plrusingaction=1:timerstart,plrdisable=100000,state=2,
:state=2:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=150,fpgcrawtextg=150,fpgcrawtextb=150,fpgcrawtextx=50,fpgcrawtexty=60
:state=2:fpgcrawtext=A wooden barrel. The lid is loosened.
:state=2,timergreater=500,plrusingaction=1:timerstart,state=9
:state=2,scancodekeypressed=14:plrdisable=0,state=0
:state=9:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=150,fpgcrawtextg=150,fpgcrawtextb=150,fpgcrawtextx=50,fpgcrawtexty=60
:state=9:fpgcrawtext=I wonder if I’ll find something useful inside.
:state=9,timergreater=500,plrusingaction=1:timerstart,state=11
:state=9,scancodekeypressed=14:plrdisable=0,state=0
:state=11:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=150,fpgcrawtextg=150,fpgcrawtextb=150,fpgcrawtextx=50,fpgcrawtexty=60
:state=11:fpgcrawtext=Press <Enter> to search the barrel or <Del> to leave it.
:state=11,timergreater=500,plrusingaction=1:plrsound=audiobank\thestoryteller01\woodencrateopen.wav,timerstart,state=12
:state=11,scancodekeypressed=14:plrdisable=0,state=0
:state=12:activateifused=1
:state=12:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=150,fpgcrawtextg=150,fpgcrawtextb=150,fpgcrawtextx=50,fpgcrawtexty=60
:state=12:fpgcrawtext=i found some arrows for a bow.
:state=12,timergreater=500,plrusingaction=1:timerstart,plrdisable=0,state=20
:state=12,timergreater=1500:plrdisable=0,state=20
:state=12,scancodekeypressed=14:plrdisable=0,state=20
:state=20
;End of Script
.....the feel of solitude hurts inside....