Помогите изменить маплистер

RSG

Участник
Сообщения
319
Реакции
26
Нужно сделать маплистер для карт из форк шопа.
#!/bin/bash
cd /home/hns/serverfiles/csgo/maps/workshop/
rm mapcycle.txt
ls *.bsp | cut -d. -f1 >> mapcycle.txt
я не шарю в кате как он работает
еще не знаю как получить правильно все пути
 
Последнее редактирование:

White Wolf

🍉
Сообщения
2,382
Реакции
2,187
  • Команда форума
  • #2
@RSG, тебе нужно будет обращаться к серверу стима и опрашивать коллекцию. POST запрос сюда:
[HIDE=100]http://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1[/HIDE]
Параметры запроса к примеру:
[HIDE=100]
C-подобный:
itemcount=1&publishedfileids[0]=800788186
[/HIDE]
Ответ в json:
[HIDE=100]
C-подобный:
{
    "response": {
        "result": 1,
        "resultcount": 1,
        "publishedfiledetails": [
            {
                "publishedfileid": "800788186",
                "result": 1,
                "creator": "76561198041197694",
                "creator_app_id": 730,
                "consumer_app_id": 730,
                "filename": "mymaps/aim_noisy360_f1.bsp",
                "file_size": 960084,
                "file_url": "http://cloud-3.steamusercontent.com/ugc/138878581184241597/570B6307B7B0A01AA118E0B5ECCBA14C7D44EDC0/",
                "hcontent_file": "138878581184241597",
                "preview_url": "http://images.akamai.steamusercontent.com/ugc/147885238900140508/22DE6958C3DEC9EF2C86251A881D132CF1396AFB/",
                "hcontent_preview": "147885238900140508",
                "title": "360 Aim & Coordination Training",
                "description": "improve aim, reflexes, sound and hand/mouse coordination in this unique training map!\r\n\r\n[img]https://image.jimcdn.com/app/cms/image/transf/none/path/saf5adc0061160c94/image/i29117f8f60bd1366/version/1478996657/image.png[/img]\r\n\r\n[b]This map can only be played alone! [/b]\r\n\r\nClick on [b]Subscribe[/b] to download the map.\r\n\r\nOpen CS:GO\r\nClick on [b]Offline with Bots[/b], which is located in the [b]Play Game[/b] menu\r\nSelect [b]Workhsop Maps[/b] on the top and find this map\r\nSelect any Bot-difficulty, exept \"no bots\"!\r\n\r\nYou can change Settings and equip yourself in the first room. \r\nShoot the [b]Start-Sign[/b] on the top of the room to start.\r\nNow you are in the [b]Arena[/b]. It contains 32 boxes in which a bot can randomly spawn.\r\nAfter you killed a bot [b]another one will spawn instantly[/b]. You can locate him by sound.\r\n\r\nYou can also change the [b]floor heigh[/b] with the green/red button on the ground and if you look up you can add bots, remove them or go back to the main menu!\r\n\r\n\r\n[img]https://image.jimcdn.com/app/cms/image/transf/none/path/saf5adc0061160c94/image/ia929348b60bbbb01/version/1478996621/image.png[/img]\r\n-You might have to wait a few seconds before the first bot spawns.\r\n-After selecting [b]Kevlar[/b] or [b]No Kevlar[/b] you also have to wait a moment until the bots spawn.\r\n-After using the [b]remove Bots[/b] option in the arena you have to [b]add a bot by yourself.[/b]\r\n- the [b]Headshot Only[/b] option will be added soon!\r\n\r\n\r\n\r\n\r\n\r\n[url=http://steamcommunity.com/sharedfiles/filedetails/?id=554795162][img]https://image.jimcdn.com/app/cms/image/transf/none/path/saf5adc0061160c94/image/i3c5e68dc1f8028ea/version/1478996634/image.png[/img][/url]\r\n[url=http://steamcommunity.com/id/HottestBoyOnSteam/myworkshopfiles/][img]https://image.jimcdn.com/app/cms/image/transf/none/path/saf5adc0061160c94/image/ic73c084cbc2d5ce5/version/1478996644/image.png[/img][/url]\r\n\r\n[h1] You prefer fast and a more intense training? Then check out my [url=http://steamcommunity.com/sharedfiles/filedetails/?id=368026786]Fast Aim/reflex Training Map! [/url]\r\n",
                "time_created": 1479310761,
                "time_updated": 1479310761,
                "visibility": 0,
                "banned": 0,
                "ban_reason": "",
                "subscriptions": 21591,
                "favorited": 181,
                "lifetime_subscriptions": 22305,
                "lifetime_favorited": 191,
                "views": 25204,
                "tags": [
                    {
                        "tag": "Custom"
                    },
                    {
                        "tag": "Map"
                    }
                ]
              
            }
        ]
      
    }
}
[/HIDE]
 
Сверху Снизу