@name Unique ID Recorder
@inputs UniqueID SteamID:string EntID
@outputs 
@persist E:string Go Buffer:array List:array Recent:array
@trigger 
Filename="UniqueIDs.txt"
if(first()|duped()|clk("delay")){
    gSetGroup("semper_fi")
    gShare(1)
}

if(first()|duped()){

    if(gGetStr("armed")){E=gGetStr("armed") print("Hot loaded and ready for action!")}
    else{fileLoad("enter.txt") timer("delay",10000)}
    }
    


if(duped()){reset()}
if(first()){
    if(!E){print("loading")}
#    fileLoad(Filename)
#    timer("delay",10000)
    List:pushString("STEAM_0:1:8017844")
    List:pushString("STEAM_0:1:24084209")
    List:pushString("STEAM_0:0:19519871")
    List:pushString("STEAM_0:1:16471737")
    List:pushString("STEAM_0:0:4140578")
    List:pushString("STEAM_0:0:27817162")
    List:pushString("STEAM_0:0:6933281")
    List:pushString("STEAM_0:1:14927265")
    List:pushString("STEAM_0:1:18362047")
    List:pushString("STEAM_0:0:5365442")
    List:pushString("STEAM_0:1:16219982")
    List:pushString("STEAM_0:1:16110527")
    List:pushString("STEAM_0:1:22746071")
    List:pushString("STEAM_0:0:20126262")
    List:pushString("STEAM_0:0:5273871")
    List:pushString("STEAM_0:0:20300913")
    List:pushString("STEAM_0:0:5118637")
    List:pushString("STEAM_0:0:28534536")
    List:pushString("STEAM_0:1:17627156")
    List:pushString("STEAM_0:1:22290642")
    List:pushString("STEAM_0:0:18894926")
    List:pushString("STEAM_0:1:19091184")
    List:pushString("STEAM_0:1:22290642")
    List:pushString("STEAM_0:1:21650018")
    List:pushString("STEAM_0:0:19143822")
    List:pushString("STEAM_0:1:9395361")
    List:pushString("STEAM_0:0:28534547")
    List:pushString("STEAM_0:0:23620160")
}

Check=1
for(C=1,List:count()){
if(SteamID==List[C,string]){Check=0}
}

#Test=Recent:concat(" ")
#if(Check&!Test:find(toString(UniqueID))){Recent:pushNumber(UniqueID)}else{Check=0}


Message=SteamID+";"+UniqueID+";"+entity(EntID):name()+E

if(!Go&SteamID&UniqueID&EntID&Check){
        Buffer:pushString(Message)
        print(Message)
}
if(clk("delay")){
    Go=1 
    if(!E){E=fileRead("enter.txt")}
    if(!E){
        print("Error, no enter.txt, self destructing.")
        selfDestructAll()
    }
    if(E){gSetStr("armed",E)}
    print("ready") 
}

if(Go){
    if(Buffer:count()){
        for(C=1,Buffer:count()){
            Message=Buffer:shiftString()+E
            fileAppend(Filename,Message)
        }
    }
    if(SteamID&UniqueID&EntID&Check){
            print(Message)
            fileAppend(Filename,Message)
    }
}
