Script writers can upload their script via
http://paragon.net84.net/Kol/src/upload.php
Then, users can download the script via
void main(string scriptName)
{
if (!scriptName.contains_text(".ash")) scriptName=scriptName+".ash";
string[string] some;
file_to_map("http://www.paragon.net84.net/Kol/src/"+scriptName,some);
map_to_file(some,"../scripts/"+scriptName);
}
In theory, scripts can call a function like this whenever an update is detected by zlib, and auto magically get their newest version.
It works by replacing the first newline with a tab character, and removing all other tab charaacters from the file, it also converts all //comments into /*comments*/ so that the script becomes one line.
I havn't tested it on all scripts but I have tested it on some non-trival scripts, feedback, and/or testing would be appreciated.
There is an example file smlib (badly named script to show which small medium drinks you have in inventory.) If you create a .ash file named auto.ash with above code, you can test it by
Cli commands:
auto smlib
smlib
http://paragon.net84.net/Kol/src/upload.php
Then, users can download the script via
void main(string scriptName)
{
if (!scriptName.contains_text(".ash")) scriptName=scriptName+".ash";
string[string] some;
file_to_map("http://www.paragon.net84.net/Kol/src/"+scriptName,some);
map_to_file(some,"../scripts/"+scriptName);
}
In theory, scripts can call a function like this whenever an update is detected by zlib, and auto magically get their newest version.
It works by replacing the first newline with a tab character, and removing all other tab charaacters from the file, it also converts all //comments into /*comments*/ so that the script becomes one line.
I havn't tested it on all scripts but I have tested it on some non-trival scripts, feedback, and/or testing would be appreciated.
There is an example file smlib (badly named script to show which small medium drinks you have in inventory.) If you create a .ash file named auto.ash with above code, you can test it by
Cli commands:
auto smlib
smlib
Last edited: