Advertisement
LiTTleDRAgo

[RGSS] Longer Script Calls

Aug 8th, 2013
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.25 KB | None | 0 0
  1. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  2. # [Xp] Longer Script Call
  3. # Version: 1.01
  4. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  5. #==============================================================================
  6. # ** Interpreter
  7. #------------------------------------------------------------------------------
  8. #  This interpreter runs event commands. This class is used within the
  9. #  Game_System class and the Game_Event class.
  10. #==============================================================================
  11. class Interpreter
  12.   #-------------------------------------------------------------------
  13.   # * Constant
  14.   #-------------------------------------------------------------------
  15.   SCRIPT_WAIT_RESULT = [:wait, FalseClass]
  16.   #-------------------------------------------------------------------
  17.   # * Script
  18.   #-------------------------------------------------------------------
  19.   def command_355
  20.     script = @list[index = @index].parameters[0] + "\n"
  21.     while [655, 355].include?(@list[@index + 1].code) do
  22.       script += @list[@index += 1].parameters[0] + "\n"
  23.     end
  24.     wait = SCRIPT_WAIT_RESULT.include?(eval(script))    
  25.     return wait ? !(@index = index) : true
  26.   end  
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement