| Kdell | Date: Sexta, 2009-10-16, 10:51 PM | Message # 1 |
Generalíssimo
Group: Administradores
Messages: 29
Awards: 0
Reputation: 3
Status: Offline
| Instrução: Bote acima de Main.Mais instruções em script. Code ########################################################### #### CHEATS SYSTEM - Script Version ######################## #### V 1.0.4 ############################################## ################################### Por: lb_guilherme ##### ###########################################################
class Window_Cheats < Window_Base attr_reader :name attr_reader :index attr_reader :max_char def initialize(max_char) super(88, 20, 368, 128) @name = "" @max_char = max_char name_array = @name.split(//)[0...@max_char] @name = "" for i in 0...name_array.size @name += name_array[i] end @default_name = @name @index = name_array.size self.active = false refresh update_cursor end def add(character) if @index < @max_char and character != "" @name += character.to_s @index += 1 refresh update_cursor end end def back if @index > 0 name_array = @name.split(//) @name = "" for i in 0...name_array.size-1 @name += name_array[i] end @index -= 1 refresh update_cursor end end def textc return @name end def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.x = 180 - (@max_char + 1) * 12 + index * 24 rect.y = 36 rect.width = 24 rect.height = WLH return rect end def refresh self.contents.clear name_array = @name.split(//) for i in 0...@max_char c = name_array[i] c = '_' if c == nil self.contents.draw_text(item_rect(i), c, 1) end end def update_cursor self.cursor_rect = item_rect(@index) end def update super update_cursor end end class Scene_Cheats < Scene_Base LETRAS = ["A","B","C","Ç","D","E","F","G","H","I","J","K","L", "M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] def start super create_menu_background @edit_window = Window_Cheats.new(12) end def terminate super dispose_menu_background @edit_window.dispose end def return_scene $scene = Scene_Map.new end def update super update_menu_background @edit_window.update for i in 0...27 letra = LETRAS[i] if Input.trigger?(Input::Letters[letra]) if @edit_window.index == @edit_window.max_char Sound.play_buzzer else Sound.play_decision @edit_window.add(letra) end end end for i in 0...10 if Input.trigger?(Input::Numberpad[i]) if @edit_window.index == @edit_window.max_char Sound.play_buzzer else Sound.play_decision @edit_window.add(i) end end end for i in 0...10 if Input.trigger?(Input::Numberkeys[i]) if @edit_window.index == @edit_window.max_char Sound.play_buzzer else Sound.play_decision @edit_window.add(i) end end end if Input.trigger?(Input::Space) if @edit_window.index == @edit_window.max_char Sound.play_buzzer else Sound.play_decision @edit_window.add(" ") end end if Input.repeat?(Input::Esc) or Input.repeat?(Input::Back) if @edit_window.index > 0 Sound.play_cancel @edit_window.back end
# ---------------------------------------------- # # CONFIGURAÇÕES: # # ---------------------------------------------- # # Aqui ficam as cheats: # Utilize APENAS espaços, letras MAIUSCULAS (Sem acento) e números # Com no maxímo 12 caracteres elsif Input.trigger?(Input::Enter) if @edit_window.textc == "GRANA500" gold(500) mensege("Ganhou 500G") elsif @edit_window.textc == "GRANA1000" gold(1000) mensege("Ganhou 1000G") elsif @edit_window.textc == "QUEST 1" switch(53,true) mensege("Você completou a Quest 1!!!") elsif @edit_window.textc == "50POÇAO" item(1,50) mensege("Você ganhou 50 Poções!") end return_scene end end # Algumas funções pre-programadas: def switch(id,value) # ex: (Ativa a switch 1) # switch(1,true) $game_switches[id] = value end def gold(value) # ex: (Ganha 250G) # gold(250) $game_party.gain_gold(value) end def item(id,value) # ex: (Ganha 5 Poção) # item(1,5) $game_party.gain_item($data_items[id], value) end def arma(id,value,equip) # ex: (Ganha 1 Espada e equipa) # arma(2,1,true) $game_party.gain_item($data_weapons[id], value, equip) end def armd(id,value,equip) # ex: (Ganha 1 Escudo e não equipa) # armd(1,1,false) $game_party.gain_item($data_armors[id], value, equip) end def mensege(text) # ex: (Exibe mensagem) # mensege("Ganhou 500G") $game_message.face_name = "" $game_message.background = 1 $game_message.position = 1 $game_message.texts.push(text) end Vlews
You Are Rum You're the life of the party, and a total flirt You are also pretty picky about what you drink Only the finest labels and best mixed cocktails will do Except if you're dieting - then it's Diet Coke and Bacardi all the way What Alcoholic Drink Are You? Work is Hard. Time for Blogthings!
|
| |
| |