Advertisement
Kakakadafi

Kadafi - [Add On] TheoAllen - Namebox Window

Dec 30th, 2014
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.65 KB | None | 0 0
  1. #=============================================================================
  2. # Kadafi - [Add On] TheoAllen - Namebox Window
  3. # Original Script: TheoAllen - Namebox Window
  4. # Version : 1.0
  5. # Contact : http://www.facebook.com/xandalfi
  6. # =============================================================================
  7. ($imported ||= {})[:Theo_Namebox_Add_On] = true
  8. # =============================================================================
  9. # CHANGE LOGS:
  10. # -----------------------------------------------------------------------------
  11. # 2014.12.31 - Finished script
  12. # =============================================================================
  13. =begin
  14.  
  15.   Perkenalan :
  16.   Cuma Add-On tambahan buat yang males ngeset key. Sekarang jadi lebih flexibel
  17.   dan support escape character juga.
  18.  
  19.   Cara penggunaan :
  20.   \RNB[text] >> untuk nampilin namebox disisi kanan
  21.   \LNB[text] >> untuk nampilin namebox disisi kiri
  22.  
  23.   Contoh:
  24.   \RNB[\C[1]Kadafi] >> Nanti text didalem box berubah warnane~
  25.  
  26.   Terms of Use :
  27.   Credit pemilik asline
  28.  
  29. =end
  30. # =============================================================================
  31. #
  32. # =============================================================================
  33. if $imported[:Theo_Namebox]
  34. class Window_Message < Window_Base
  35.   alias new_convert_namebox_char convert_namebox_char
  36.   def convert_namebox_char(text)
  37.     text.gsub!(/\eLNB\[\s*(.+)]/i) do
  38.       name = $1.to_s
  39.       @namebox.set_text(name, false, false)
  40.       ""
  41.     end
  42.     text.gsub!(/\eRNB\[\s*(.+)]/i) do
  43.       name = $1.to_s
  44.       @namebox.set_text(name, true, false)
  45.       ""
  46.     end
  47.     new_convert_namebox_char(text)
  48.   end
  49.  end
  50.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement