[SMA]AS Plugins Downloader 4 Sven Coop

For scripting examples for learning how to use AMXX.
User avatar
Archive-Poster
Posts: 1229
Gender:
United States of America

[SMA]AS Plugins Downloader 4 Sven Coop

Post by Archive-Poster »

Use by input commands below in console:

Code: Select all

dick "install_auto PluginName"
//install via asp_urls.json
dick "install Author:Repo:Branch:File.as->LocalFile.as"
//install single as plugin (only available for Gitee for now)
Description:
This sma is my first attempt to write AMXX script, I use the json and the curl lib

Tested on Sven Coop 5.23 both on Client and Dedicated Server

Mechanism:
Use curl to download AS plugin from website with Remote Git Repo Service via RAW url access

Issue:
Due to some network issue, single AS download (or should I call it manual download) only supports Gitee, as raw.githubusercontent is blocked by my ISP, which make it hard for me to test on GitHub. But if a plugin is on GitHub, it can still be downloaded via configure asp_urls.json.

some assets (spr/wav) cannot be loaded inside scripts/plugins will be install use key-value to represent repo path and install path respectively, which will be introduced in next version.
An example of ASP Info Json:

Code: Select all

    "Sekiro":
    {
        "Website":"GitHub",
        "Author":"DrAbcrealone",
        "Repo":"AngelScripts",
        "Branch":"master",
        "File":
        {
            "Sekiro/cyberpunk2077.spr":"sprites/misc/cyberpunk2077.spr",
            "Sekiro/cyberpunk2077.wav":"sound/misc/cyberpunk2077.wav",
            "Sekiro/sekiro_death.spr":"sprites/misc/sekiro_death.spr",
            "Sekiro/sekiro_death.wav":"sound/misc/sekiro_death.wav",
            "Sekiro/sekiro.as":"Sekiro/sekiro.as"
        }
    }
Thx to those veterans who taught me a lot can I finish this little demo, I got ddl in my work recently, so I have to pause developing this unfinished plugin, hope to see some collaborators.
Attachments
ASD.zip
(805.12 KiB) Downloaded 6 times
User avatar
Archive-Poster
Posts: 1229
Gender:
United States of America

Re: [SMA]AS Plugins Downloader 4 Sven Coop

Post by Archive-Poster »

Update:

New functions allow client players upload their local AS plugin file to the server.

1.Execute Python script to convert AS codes into CFG files.
2.exec CFG file in client console, receivers on servers will handle the rest.

Receiver [SMA]:

Converter[PY]:

Sample CFG:
Attachments
upload_asp.cfg.zip
(1.41 KiB) Downloaded 5 times
AS2CFG.py.zip
(574 Bytes) Downloaded 6 times
asd.sma.zip
(2.38 KiB) Downloaded 7 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest