Web script loading system.
Older Method
If you want to store the file locally use the Older Method
def load() return eval HTTP::get('', 'raw.githubusercontent.com', '/Heark/rgss3/master/switch.rb')endThen use the call:
load()Terms of Use:
For non-commercial use only, Dekyde Studios forbids use in commercial projects
Hime requests that you speak to him.
Credits
Jet
Tsukihime
Dekyde Studios / Dekita
Yuuta Kirishima
Credit the above people.
Older Method
If you want to store the file locally use the Older Method
What does it do?
All it does is load a script from a website (pastebin, github or something) and caches it into a local folder.
What do you need?
begin http_reply = HTTP::get('', 'pastebin.com','/raw.php?i=msA8g6bV')In our script window we should have this so far:
begin http_reply = HTTP::get('', 'raw.githubusercontent.com','/Heark/rgss3/master/switch.rb')If you do not have this, turn back now.
Next, we create the 'out.rb' file:
add this simple line:
out_file = File.new("Web/out.rb", "w")next we want to write our webcalled script to 'out.rb';
add this simple line:
out_file.puts(http_reply)next add this
rescue IOError => e#...ensureout_file.closeendFixes an error that occurs.
next add:
if File.exist?('Web/out.rb')File.delete('Web/out.rb')endWe add this because if the the file is already in our folder we want to delete it so it can pull the newest version.
So our Script Window should look like this:
if File.exist?('Web/out.rb') File.delete('Web/out.rb')endbegin http_reply = HTTP::get('', 'raw.githubusercontent.com','/Heark/rgss3/master/switch.rb')out_file = File.new("Web/out.rb", "w")#...out_file.write(http_reply)rescue IOError => e#...ensureout_file.closeendYou could add many scripts just change the name of out.rb to whatever you want
Finally call the script in game or in the script window using the script call:
load_script("Web/out.rb")
All it does is load a script from a website (pastebin, github or something) and caches it into a local folder.
What do you need?
- All seven dragonballs
- Dekita's Basic HTTP Processing Script
- Hime's External Script Loader
- Github, pastebin or other script hosting site.
- Create a folder named "Web" in the directory of your project
- Paste that into your project.
- Create a new script section.
- Write or copy your script inside of your file hosting site (github, etc) for this example I will just enable a switch.
- This is how the file should look in github (for this example)
-
- Okay in your script window write your GET request: for my example it should look like this:
begin http_reply = HTTP::get('', 'pastebin.com','/raw.php?i=msA8g6bV')In our script window we should have this so far:
begin http_reply = HTTP::get('', 'raw.githubusercontent.com','/Heark/rgss3/master/switch.rb')If you do not have this, turn back now.
Next, we create the 'out.rb' file:
add this simple line:
out_file = File.new("Web/out.rb", "w")next we want to write our webcalled script to 'out.rb';
add this simple line:
out_file.puts(http_reply)next add this
rescue IOError => e#...ensureout_file.closeendFixes an error that occurs.
next add:
if File.exist?('Web/out.rb')File.delete('Web/out.rb')endWe add this because if the the file is already in our folder we want to delete it so it can pull the newest version.
So our Script Window should look like this:
if File.exist?('Web/out.rb') File.delete('Web/out.rb')endbegin http_reply = HTTP::get('', 'raw.githubusercontent.com','/Heark/rgss3/master/switch.rb')out_file = File.new("Web/out.rb", "w")#...out_file.write(http_reply)rescue IOError => e#...ensureout_file.closeendYou could add many scripts just change the name of out.rb to whatever you want
Finally call the script in game or in the script window using the script call:
load_script("Web/out.rb")
- First get Dekita's basic HTTP processing script.
- Get all necessary files (DLLS and what not).
def load() return eval HTTP::get('', 'raw.githubusercontent.com', '/Heark/rgss3/master/switch.rb')endThen use the call:
load()Terms of Use:
For non-commercial use only, Dekyde Studios forbids use in commercial projects
Hime requests that you speak to him.
Credits
Jet
Tsukihime
Dekyde Studios / Dekita
Yuuta Kirishima
Credit the above people.
Last edited by a moderator:

