TheoAllen

Theo - Right Side Face

Oct 7th, 2013
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.98 KB | None | 0 0
  1. # =============================================================================
  2. # TheoAllen - Right Side Face
  3. # Version : 1.0
  4. # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
  5. # (This script documentation is written in informal indonesian language)
  6. # =============================================================================
  7. ($imported ||= {})[:Theo_RightSideFace] = true
  8. # =============================================================================
  9. # CHANGE LOGS:
  10. # -----------------------------------------------------------------------------
  11. # 2013.10.05 - Finished script
  12. # =============================================================================
  13. =begin
  14.  
  15.   Perkenalan :
  16.   Script ini ngebikin kamu bisa ngedraw gambar face pada kanan message box
  17.  
  18.   Cara penggunaan :
  19.   Pasang dibawah material namun dibawah main
  20.   Gunakan tag <rface> pada message untuk penggunaannya
  21.  
  22.   Terms of use :
  23.   Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih
  24.   keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau
  25.   dipake buat komersil, jangan lupa, gw dibagi gratisannya.  
  26.  
  27. =end
  28. # =============================================================================
  29. # Tidak ada konfigurasi
  30. # =============================================================================
  31. class Game_Message
  32.   attr_accessor :rface
  33.  
  34.   alias theo_rface_clear clear
  35.   def clear
  36.     theo_rface_clear
  37.     @rface = false
  38.   end
  39.  
  40.   alias theo_rface_add add
  41.   def add(text)
  42.     @rface = !(text =~ /<rface>/i).nil?
  43.     theo_rface_add(text.gsub(/<rface>/i){""})
  44.   end
  45.  
  46. end
  47.  
  48. class Window_Message < Window_Base
  49.  
  50.   alias theo_rface_draw_face draw_face
  51.   def draw_face(face_name, face_index, x, y, enabled = true)
  52.     x = contents.width - 96 if $game_message.rface
  53.     theo_rface_draw_face(face_name, face_index, x, y, enabled = true)
  54.   end
  55.  
  56.   def new_line_x
  57.     $game_message.face_name.empty? || $game_message.rface ? 0 : 112
  58.   end
  59.  
  60. end
Advertisement
Add Comment
Please, Sign In to add comment