@name Everybody MOVE Chip
@inputs
@outputs A1ID Go:vector C
@persist A1:entity NPCs:array C Owner:entity
@persist Combine1 Zombie Friendly Rebel Crab
#if (first()) {
#A1 = npcSpawn("npc_alyx",entity():pos())
#A1:npcRelationship("player","like",99)
#A1:npcGiveWeapon("smg1")}
if (first()) {Owner=entity():owner() entity():setAlpha(10)
C=1}
interval(500)
#class list
NPC = "npc_"
P1 = "strider"
P2 = "combinegunship"
P3 = "helichopter"
P4 = "antlionguard"
P5 = "sniper"
P6 = "hunter"
P7 = NPC
#Friend List
F1 = "alyx"
F2 = "barney"
F3 = "citizen"
F4 = "eli"
F5 = "dog"
F6 = "magnusson"
F7 = "mossman"
F8 = "turret_floor"
F9 = "vortigaunt"
F10 = "kleiner"
F11 = "monk"
F12 = "prop_vehicle_airboat"
F13 = "rollermine"

HCrab="Head Crab mode: "
Combo="Combine mode is: "
Zombo="Zombie mode is: "
Friend1="Friendlies only mode is: "
Rebo="Rebel mode: "



Aim=Owner:aimEntity()
runOnChat(1)
K=chatClk()
Chat=Owner:lastSaid()
Com=!entity():isFrozen()
Brk="<"
Command="."
Break=Chat:find(Brk)
#Give=Chat:find(Command+"giveto")
Give=Owner:keyUse()
Take=Chat:find(Command+"takefrom")
Combine=Chat:find(Command+"combine")
All=Chat:find(Command+"all")
Zombies=Chat:find(Command+"zombie")
Friend=Chat:find(Command+"friendly")
Reb=Chat:find(Command+"rebel")
HeadCrab=Chat:find(Command+"crab")
Mode=Chat:find(Command+"mode")
if(Com){

if(Give){ 
    if(Aim:isPlayer()&Owner!=Aim){
        Owner=Aim
        print("given to: "+Owner:name())
        }#end than
}#end Give
if(K){
if(Take){
    
    print("you have taken control back")
}#end Take
if(HeadCrab){Crab=!Crab print(HCrab+Crab)}
if(Combine){Combine1=!Combine1 print(Combo+Combine1)}
if(Zombies){Zombie=!Zombie print(Zombo+Zombie)}
if(Friend){Friendly=!Friendly print(Friend1+Friendly)}
if(Reb){Rebel=!Rebel print(Rebo+Rebel)}
if(All){Combine1=Zombie=Friendly=Rebel=Crab=0 print("filters disabled")}
if(Mode){
    print(HCrab+Crab)
    print(Combo+Combine1)
    print(Zombo+Zombie)
    print(Friend1+Friendly)
    print(Rebo+Rebel)
    print("if all 0 then all npcs will move")
}#end mode
}#end K
}#end com


findInCone(Owner:pos(),Owner:eye(),15000,20)
findIncludeClass("npc")
if(Crab){findClipToClass("crab")}
if(Rebel){findClipToClass("citizen")}
if(Friendly){
    findClipToClass(F1)
    findClipToClass(F2)
    findClipToClass(F3)
    findClipToClass(F4)
    findClipToClass(F5)
    findClipToClass(F6)
    findClipToClass(F7)
    findClipToClass(F8)
    findClipToClass(F9)
    findClipToClass(F10)
    findClipToClass(F11)
}
if(Owner:name()==""){selfDestruct()}
if(Zombie){findClipToClass("zomb")}
if(Combine1){findClipToClass("combine")}
NPCs=findToArray()


Go = Owner:aimPos()
C=1
while(C<=NPCs:count()&perf()){
A1=NPCs:entity(C)
A1:npcGoRun(Go)
C++}

#if (!A1:isAlive()) {selfDestruct()}
if (entity():owner():aimEntity():isNPC()) {A1:npcShoot()}
A1ID=A1:id()
 
