TheoAllen

Theo - Command Remover

Aug 9th, 2013
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.12 KB | None | 0 0
  1. # =============================================================================
  2. # TheoAllen - Command Remover
  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_CommandRemover] = true
  8. # =============================================================================
  9. # CHANGE LOGS:
  10. # -----------------------------------------------------------------------------
  11. # 2013.08.09 - Finished script
  12. # =============================================================================
  13. =begin
  14.  
  15.   Perkenalan :
  16.   Script ini berguna untuk menghapus command tertentu. Dan menampilkannya
  17.   kembali dengan menggunakan switch
  18.  
  19.   Cara penggunaan :
  20.   Pasang dibawah material namun diatas main
  21.   Edit konfigurasinya
  22.  
  23.   Terms of Use :
  24.   Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih
  25.   keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau
  26.   dipake buat komersil, jangan lupa, gw dibagi gratisannya.
  27.  
  28. =end
  29. # =============================================================================
  30. # Konfigurasi :
  31. # =============================================================================
  32. module THEO
  33.   module Command
  34.    
  35.     # Tulis nama command yg mau diremove. Kemudian nyalakan switchnya. Jika
  36.     # kamu ingin menampilkannya lagi, matikan switchnya
  37.    
  38.     List = {
  39.     # "Nama Command" => Switch id,
  40.       "Formation"    => 5,
  41.      
  42.     # Tambahin sendiri
  43.     }
  44.    
  45.   end
  46. end
  47. # =============================================================================
  48. # Akhir dari konfigurasi
  49. # =============================================================================
  50. class Window_Command < Window_Selectable
  51.   alias theo_disable_add_command add_command
  52.   def add_command(name, symbol, enabled = true, ext = nil)
  53.     hash = THEO::Command::List
  54.     if hash.include?(name)
  55.       return if $game_switches[hash[name]]
  56.     end
  57.     theo_disable_add_command(name,symbol,enabled,ext)
  58.   end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment