@name AddFriend
@persist [AddQue Name]:array Added:table
runOnChat(1)
if (first()) {timer("int",1000) timer("advert",100)}
if (lastSaid()=="!getfriend") {
    local ID=lastSpoke():steamID()
    
    if (!Added[ID,number]) {
        printColor(vec(255,255,0),"[AddFriend] ",vec(255),"Queueing "+ID,".")
        Added[ID,number]=1
        AddQue[AddQue:count()+1,string]=ID
        Name[AddQue:count(),string]=lastSpoke():name()
    }
}
if (clk("int")) {
    if (httpCanRequest() & AddQue:count()>0) {
        printColor(vec(255,255,0),"[AddFriend] ",vec(255),"Adding user "+AddQue[1,string],".")
        #concmd("say /advert [AddFriend] "+Name[1,string]+", you are being added on steam by our robot! :)")
        timer("advert",2000)
        httpRequest("http://scriptis.net/SteamBot.php?action=request&key=1820287!&id="+AddQue[1,string])
        AddQue:removeString(1)
        Name:removeString(1)
    }
    timer("int",1000)
}
if (clk("advert")) {
    #concmd("say /advert [AddFriend] Lonely? Request a friend today by saying !getfriend!")
}
setName("!getfriend
Friends added: "+Added:count()+"
Say !getfriend for a friendly 
robot to add you on steam!")
