Guest User

Untitled

a guest
Apr 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.64 KB | None | 0 0
  1. #==============================================================================
  2. # Load
  3. #==============================================================================
  4.  
  5.   #--------------------------------------------------------------------------
  6.   if $TEST
  7.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  8.     dir = Dir["Scripts/*.rb"]
  9.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  10.   else
  11.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  12.     dir = Dir["Scripts/*.rgss2"]
  13.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  14.   end
  15.   #--------------------------------------------------------------------------
  16.   for script in dir
  17.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  18.     next if script.to_s.empty?
  19.     begin
  20.       if $TEST
  21.         Crypt.encrypt(script, script.gsub(".rb", ".rgss2"))
  22.         file = File.open(script, "r+")
  23.         eval(file.read)
  24.         file.close
  25.       else
  26.         temp = script.gsub(".rgss2", ".x")
  27.         Crypt.decrypt(script, temp)
  28.         file = File.open(temp, "r+")
  29.         eval(file.read)
  30.         file.close
  31.         File.delete(temp)
  32.       end
  33.     rescue Exception => exc
  34.       unless exc.message.include?("exit")
  35.         unless exc.message.include?("1147")
  36.           print(exc.message)
  37.         end
  38.       end
  39.     end
  40.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  41.   end
  42.   #--------------------------------------------------------------------------
  43.  
  44. #==============================================================================
Add Comment
Please, Sign In to add comment