@name Advanced Door Bomb
@inputs 
@outputs Explode
@persist Safe:array
@trigger
interval(200)
Origin=entity():pos()
findInSphere(Origin,1000)
findIncludeClass("player")
SteamID=findResult(1):steamID()
Bomb=entity():isConstrainedTo()
Trace=rangerOffset(Bomb:pos(),findResult(1):pos()):entity():steamID()

runOnChat(1)
K=chatClk()
Chat=entity():owner():lastSaid()
Trip="ADB"
Add="add"
Display="disp"
Brk="<"
Clear="clear"
S=" "

if(first()){
    Safe=array() 
    C=1
    Safe[C,string]="STEAM_0:1:8017844" C++ #Captain Maim
    Safe[C,string]="STEAM_0:0:19519871" C++ #Polymorph
    Safe[C,string]="STEAM_0:1:19091184" C++ #TurtleMadness
    Safe[C,string]="STEAM_0:0:5365442" C++ #Ronox
    Safe[C,string]="STEAM_0:0:18045151" C++ #Rexen
    Safe[C,string]="STEAM_0:0:20300913" C++ #Infested
print("Advanced DoorBomb Commands:")
print(Trip+S+Add+S+"Steam ID without STEAM_0: in front") 
print(Trip+S+Display+": this prints the current safe steam ID's")
print(Trip+S+Clear+": this resets the door bomb's safe steam list")
}



Trip1=Chat:find(Trip)
Add1=Chat:find(Add)
Disp=Chat:find(Display)
Break=Chat:find(Brk)
Clear1=Chat:find(Clear)

if(K&Trip1){
    if(Add1&Break){
        Added="STEAM_0:"+Chat:explode(Brk):string(2)
        Safe:pushString(Added)
        print(Added+" has been added")
        }
    if(Clear1){print("All turrets reset") reset()}
    if(Disp){print("current friends are: "+Safe:concat("<>"))}
}

if(SteamID!=Trace|SteamID==""|Safe:concat():find(SteamID)){Explode=0}else{Explode=1}

