;Artificial Intelligence Script by TheStoryteller01 2012 ;Header desc= This script only works with FPSC 1.18 or later Made for dynamic entities that talk to the player. To start the script at any time, the player has to move the crosshair over the NPC and press . THIS SCRIPT IS DIFFERENT - IT STARTS WHEN THE PLAYER IS CLOSE ENOUGH TO THE NPC AND CAN BEE SEEN: ;Triggers :state=0:state=1 :state=1,shotdamage=1:state=290 :state=1,;plrcanbeseen,plrdistwithin=200:etimerstart,state=11 ;//NPC :state=11,shotdamage=1:state=290 ;state=11:rotatetoplr :state=11:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=11:fpgcrawtext=How is everything going? :state=11,etimergreater=500:plrusingaction=0:plrdisable=0,state=15 :state=11,etimergreater=500:plrusingaction=0:plrdisable=0,state=12 ;//NPC :state=12,shotdamage=1:state=290 ;state=12:rotatetoplr :state=12:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=12:fpgcrawtext=With this mayhem throughout town Im hoping this doesnt cost us :state=12,pickobject=1:plrdisable=0,state=21 ;//NPC2 ;state=21:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 ;state=21:fpgcrawtext=Quite well actually We've gotten everything prepared ;state=21,etimergreater=500:plrdisable=0,state=25 ;state=21,etimergreater=500:plrdisable=0,state=25 :state=21,shotdamage=1:state=290 ;state=21:rotatetoplr :state=21:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=21:fpgcrawtext=Quite well actually We've gotten everything prepared :state=21,pickobject=1;plrusingaction=0;plrdisable=0,state=25 :state=25:etimerstart,plrdisable=1000,rotatetoplr,state=31 ;//NPC :state=31:rotatetoplr :state=31:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=31:fpgcrawtext= So what about this breakout? :state=31,etimergreater=500,pickobject=1:plrdisable=0,state=35 :state=31,etimergreater=500:plrdisable=0,state=35 :state=35:etimerstart,plrdisable=1000,state=41 ;//NPC2 :state=41:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=41:fpgcrawtext=Some Saboteurs on the inside but theyll be dealt with :state=41,etimergreater=500:plrdisable=0,state=45 :state=41,etimergreater=500:plrdisable=0,state=45 :state=45:etimerstart,plrdisable=1000,state=51 ;//NPC :state=51:rotateheadrandom=10 :state=51:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=51:fpgcrawtext=And our "Friends" in high places? :state=51,etimergreater=500:plrdisable=0,state=55 :state=51,etimergreater=500:plrdisable=0,state=55 :state=55:etimerstart,plrdisable=1000,state=61 ;//NPC :state=61:rotateheadrandom=20 :state=61:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=61:fpgcrawtext=Are they still on board? :state=61,etimergreater=500:plrdisable=0,state=65 :state=61,etimergreater=6000:plrdisable=0,state=65 :state=65:etimerstart,plrdisable=1000,state=71 ;//NPC2 :state=71:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=71:fpgcrawtext=Of course they are they know what this project means :state=71,etimergreater=1000:state=71 :state=71,etimergreater=500,scancodekeypressed=59:etimerstart,state=81 :state=71,etimergreater=500,scancodekeypressed=60:plrdisable=0,state=125 :state=71,etimergreater=500,scancodekeypressed=61:plrdisable=0,state=290 ;//NPC :state=81:rotateheadrandom=20 :state=81:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=81:fpgcrawtext=They should David has shown them first hand :state=81,etimergreater=500:plrdisable=0,state=85 :state=81,etimergreater=500:plrdisable=0,state=85 :state=85:etimerstart,plrdisable=1000,state=91 ;//NPC2 :state=91:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=91:fpgcrawtext=They wont abandon this project they have too much at stake :state=91,etimergreater=500:plrdisable=0,state=95 :state=91,etimergreater=500:plrdisable=0,state=95 :state=95:etimerstart,plrdisable=1000,state=100 ;//NPC :state=100:rotateheadrandom=20 :state=100:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=100:fpgcrawtext=Well we have to clean up this mess at hand before we can proceed :state=100,etimergreater=500:state=101 :state=100,etimergreater=500:state=101 :state=101:etimerstart,plrdisable=1000,state=102 ;//NPC :state=102:rotateheadrandom=20 :state=102:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=102:fpgcrawtext=We cant move on when were all in danger like this :state=102,etimergreater=500:state=103 :state=102,etimergreater=500:state=103 :state=103:etimerstart,plrdisable=1000,state=104 ;//NPC :state=104:rotateheadrandom=20 :state=104:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=104:fpgcrawtext=The creatures broke out from The Castle and have wrecked havoc since then :state=104,etimergreater=500:state=105 :state=104,etimergreater=500:state=105 :state=105:etimerstart,plrdisable=1000,state=108 ;//NPC :state=108:rotateheadrandom=20 :state=108:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=108:fpgcrawtext=Many of our personnel have died already along with many townspeople :state=108,etimergreater=500:state=109 :state=108,etimergreater=500:state=109 :state=109:etimerstart,plrdisable=1000,state=110 ;//NPC :state=110:rotateheadrandom=20 :state=110:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=110:fpgcrawtext=There expendable of course but this could destroy all weve worked for :state=110,etimergreater=500:state=111 :state=110,etimergreater=500:state=111 :state=111:etimerstart,plrdisable=1000,state=112 ;//NPC2 :state=112:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=112:fpgcrawtext=You worry too much David's got it all under control :state=112,etimergreater=500:plrdisable=0,state=113 :state=112,etimergreater=500:state=113 :state=113:etimerstart,plrdisable=1000,state=114 ;//NPC :state=114:rotateheadrandom=20 :state=114:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=114:fpgcrawtext=Are you sure about that? I think he might have lost it :state=114,etimergreater=500:state=115 :state=114,etimergreater=500:state=115 :state=115:etimerstart,plrdisable=1000,state=116 ;//NPC :state=116:rotateheadrandom=20 :state=116:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=116:fpgcrawtext=He seems to want to replace all of us :state=116,etimergreater=500:state=117 :state=116,etimergreater=4000:state=117 :state=117:etimerstart,plrdisable=1000,state=118 ;//NPC :state=118:rotateheadrandom=20 :state=118:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=118:fpgcrawtext=He has started to make me nervous :state=118,etimergreater=500:state=119 :state=118,etimergreater=4000:state=119 :state=119:etimerstart,plrdisable=1000,state=120 ;//NPC2 :state=120:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=120:fpgcrawtext=Dont worry its all under control :state=120,etimergreater=500:plrdisable=0,state=121 :state=120,etimergreater=4000:state=121 :state=121:etimerstart,plrdisable=1000,state=122 ;//NPC :state=122:rotateheadrandom=20 :state=122:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=122:fpgcrawtext=You sound confident about that :state=122,etimergreater=500:state=123 :state=122,etimergreater=4000:state=123 :state=123:etimerstart,plrdisable=1000,state=124 ;//NPC2 :state=124:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=124:fpgcrawtext=I am and soon the next phases will commence But traitors like you wont live to see it! :state=124,etimergreater=500:plrdisable=0,state=125 :state=124,etimergreater=4000:plrdisable=0,state=125 :state=125,shotdamage=1:state=290 :state=125:etimerstart,state=126 ;//NPC :state=126,shotdamage=1:state=290 :state=126:fpgcrawtextsize=24,fpgcrawtextfont=verdana,fpgcrawtextr=051,fpgcrawtextg=204,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=15 :state=126:fpgcrawtext=What? Wait dont shoot me please! :state=126,etimergreater=500:plrdisable=0,state=127 :state=126,etimergreater=4000:state=127 :state=127:fpgcrawtextoff :state=127,shotdamage=1:state=128 ;//NPC2 :state=128:fpgcrawtextsize=26,fpgcrawtextfont=verdana,fpgcrawtextr=000,fpgcrawtextg=000,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80 :state=128:fpgcrawtext=Nobody crosses any of us you Bastard! :state=128,etimergreater=500:plrdisable=0,state=129 :state=128,etimergreater=4000:plrdisable=0,state=129 :state=129:fpgcrawtextoff :state=129,shotdamage=1:state=290 ;//NPC WALKING WAYPOINTS AND VANISHING - You need to set up 4 waypoints for the script to work :state=200,shotdamage=1:state=290 :state=200:waypointstart,animate=92,state=210 :state=210,shotdamage=1:state=290 :state=210,waypointstate=3:waypointnext,animate=92,state=220 :state=220,shotdamage=1:state=290 :state=220,waypointstate=3:waypointnext,animate=92,state=230 :state=230,shotdamage=1:state=290 :state=230,waypointstate=3:waypointnext,animate=92,state=240 :state=240,shotdamage=1:state=290 :state=240,waypointstate=5:destroy ;//NPC ATTACKS THE PLAYER :state=290:runfpi=people\dwarfattack.fpi ;End of Script