-
Numero contenuti
1074 -
Iscritto
-
Ultima visita
-
Days Won
17
Tipo di contenuto
Profili
Calendario
Forum
Gallery
Downloads
Tutti i contenuti di Ally
-
Nome Script: Dividi per...? Versione: 1.0 Autore/i: 3xter (io) Informazioni: Questo script serve per dividere per un determinato numero un characterset. Di default se antecediamo $ al nome di un chara, esso viene diviso per 3 (un solo elemento) e non per 12 (4 elementi) Con questo script, il file verrà diviso per il numero inserito all'inizio del chara. Istruzioni: Rinominare la risorsa interessata con il numero di frame presenti per X e Y. Prendiamo per esempio questo chara: Di default il vx lo visualizzerebbe male.. Importiamolo nel nostro progetto e rinominiamolo: 44 truppe.png Così facendo abbiamo ottenuto ciò che ci serviva: visualizzare correttamente qualsiasi chara! Script: =begin Script: Dividi per...? Autore: 3xter http://wwww.rpgmkr.net Questo script serve per dividere per un determinato numero un characterset. Di default se antecediamo $ al nome di un chara, esso viene diviso per 3 (un solo elemento) e non per 12 (4 elementi) Con questo script, il file verrà diviso per il numero inserito all'inizio del chara. Esempio: Chara (diviso per 12) $Chara (diviso per 3) 5Chara (diviso per 5) =end class Sprite_Character < Sprite_Base def update_bitmap if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_index != @character.character_index @tile_id = @character.tile_id @character_name = @character.character_name @character_index = @character.character_index if @tile_id > 0 sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32; sy = @tile_id % 256 / 8 % 16 * 32; self.bitmap = tileset_bitmap(@tile_id) self.src_rect.set(sx, sy, 32, 32) self.ox = 16 self.oy = 32 else self.bitmap = Cache.character(@character_name) #Il valore numerico di un numero in stringa è di (valore - 48) #La variabile num infatti è uguale al primo carattere di @character_name #meno 48. Visualizzo tramite finestra il valore di x e y con print (commentato) #dopo averli convertito in intero prima = @character_name[0].to_i seconda = @character_name[1].to_i x = (prima - 48) y = (seconda - 48) x.to_i y.to_i #Mostra il valore di X e Y #print x, " e ", y sign = @character_name[/^[!$]./] if sign != nil and sign.include?('$') @cw = bitmap.width / 3 @ch = bitmap.height / 4 #Delimita il campo ai numeri da -infinito a 9 elsif x < 10 and y < 10 @cw = bitmap.width / x @ch = bitmap.height / y else @cw = bitmap.width / 12 @ch = bitmap.height / 8 end self.ox = @cw / 2 self.oy = @ch end end end end ############################################################################# class Window_Base < Window def draw_character(character_name, character_index, x, y) return if character_name == nil bitmap = Cache.character(character_name) #Il valore numerico di un numero in stringa è di (valore - 48) #La variabile num infatti è uguale al primo carattere di @character_name #meno 48. Visualizzo tramite finestra il valore di num con print num #dopo averlo convertito in intero prima = @character_name[0].to_i seconda = @character_name[1].to_i x = (prima - 48) y = (seconda - 48) x.to_i y.to_i #Mostra il valore di X e Y #print x, " e ", y sign = @character_name[/^[!$]./] if sign != nil and sign.include?('$') @cw = bitmap.width / 3 @ch = bitmap.height / 4 #Delimita il campo ai numeri da -infinito a 9 elsif x < 10 and y < 10 @cw = bitmap.width / x @ch = bitmap.height / y else @cw = bitmap.width / 12 @ch = bitmap.height / 8 end n = character_index src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end
-
Nome Script: Rumore passi Versione: sconosciuta Autore/i: DeadlyDan Informazioni: questo script permette di fare il rumore dei passi... Istruzioni: inserire sotto materials inserire i SE nella cartella Audio/SE del progetto (http://www.megaupload.com/?d=O9VRGJ1Y) Script: #============================================================================== # ■ DeadlyDan_Footsteps by DeadlyDan #------------------------------------------------------------------------------ # Enables ability to "sound" footsteps when walking over specific tiles #============================================================================== # Usage: =begin Simple, place the audio files in your SE directory, and try the game. There are some known bugs in this, if anyone has any fixes just let me know:) To add custom sounds for custom tiles you can do for example: FOOTSTEP_WOOD = [15] # The tilenumber ID that you get with debug_tileid function FOOTSTEP_WOOD_FILE = "Audio/SE/stepwood" # The filename for the sound then add underneath the # Insert custom sounds here line: footstep_check ( FOOTSTEP_WOOD, FOOTSTEP_WOOD_FILE, 0 ) The last number in that function stands for the layer, since the wood tile i selected is on the ground layer, it's layer is 0. (NOTE) There is a problem that when you go on carpet it makes dirt and snow sounds, i currently can't find a way to fix this, so, the best thing to do is to call the command $game_player.footsteps_enabled = false. To enable footsteps while stopping the carpet and tables from making the snow and dirt sounds, there's an uneasy solution of placing a touch event which calls $game_player.footsteps_enabled = false. Sorry about this inconvenience. =end class Game_Player < Game_Character FOOTSTEP_GRASS = [28, 29, 30] FOOTSTEP_GRASS_LONG = [29, 30] FOOTSTEP_GRASS_FILE = "Audio/SE/stepgrass" FOOTSTEP_DIRT = [32, 33, 34] FOOTSTEP_DIRT_LONG = [32 ,34] FOOTSTEP_DIRT_FILE = "Audio/SE/stepdirt" FOOTSTEP_SAND = [36, 37, 38] FOOTSTEP_SAND_LONG = [36, 38] FOOTSTEP_SAND_FILE = "Audio/SE/stepdirt" FOOTSTEP_SNOW = [39, 41] FOOTSTEP_SNOW_LONG = [40, 41] FOOTSTEP_SNOW_FILE = "Audio/SE/stepsnow" FOOTSTEP_WOOD = [15] FOOTSTEP_WOOD_FILE = "Audio/SE/stepwood" FOOTSTEP_PITCH = 100 FOOTSTEP_PITCH2 = 90 attr_accessor :last_foot attr_accessor :footsteps_enabled alias foot_initialize initialize def initialize foot_initialize @last_foot = 0 @last_foot_pitch = FOOTSTEP_PITCH2 @next_foot_pitch = FOOTSTEP_PITCH @footsteps_enabled = true end alias foot_move_left move_left def move_left ( turn_ok = true ) foot_move_left ( turn_ok ) if ( @move_failed == false ) sound_foot end end alias foot_move_right move_right def move_right ( turn_ok = true ) foot_move_right ( turn_ok ) if ( @move_failed == false ) sound_foot end end alias foot_move_up move_up def move_up ( turn_ok = true ) foot_move_up ( turn_ok ) if ( @move_failed == false and @footsteps_enabled ) sound_foot end end alias foot_move_down move_down def move_down ( turn_ok = true ) foot_move_down ( turn_ok ) if ( @move_failed == false and @footsteps_enabled ) sound_foot end end def no_layer_tile? ( layer ) result = [false, false, false] for i in 0..2 if ( @map_tile_id[i] == 0 ) result[i] = true end end if ( layer == 0 ) if ( result[1] and result[2] ) return true else return false end end else if ( layer == 1 ) if ( result[2] ) return true else return false end else return true end end def debug_tileid $game_message.texts[0] = @map_tile_tex[0] $game_message.texts[1] = @map_tile_tex[1] $game_message.texts[2] = @map_tile_tex[2] end def footstep_check ( footstep, file, layer ) for i in 0..footstep.length if ( ( @map_tile_tex[layer] == footstep[i].to_s ) and ( no_layer_tile? ( layer ) ) ) Audio.se_play ( file, 100, @next_foot_pitch ) @last_foot = Graphics.frame_count return nil end end end def sound_foot if ( dash? ) mul = 6 else mul = 7 end if ( Graphics.frame_count > ( @last_foot + mul ) ) @map_tile_id = [] @map_tile_tex = [] for i in 0..2 @map_tile_id.push ( $game_map.data[@x, @y, i] ) @map_tile_tex.push ( @map_tile_id[i].to_s[0,2] ) end # Use "debug_tileid" here to bring up the numbers of all the current tiles # to use with definitions of the tileids, walk over tiles ingame... if ( @last_foot_pitch == FOOTSTEP_PITCH ) @next_foot_pitch = FOOTSTEP_PITCH2 @last_foot_pitch = FOOTSTEP_PITCH2 else @next_foot_pitch = FOOTSTEP_PITCH @last_foot_pitch = FOOTSTEP_PITCH end # Ground layer footstep_check ( FOOTSTEP_GRASS, FOOTSTEP_GRASS_FILE, 0 ) footstep_check ( FOOTSTEP_DIRT, FOOTSTEP_DIRT_FILE, 0 ) footstep_check ( FOOTSTEP_SAND, FOOTSTEP_SAND_FILE, 0 ) footstep_check ( FOOTSTEP_SNOW, FOOTSTEP_SNOW_FILE, 0 ) footstep_check ( FOOTSTEP_WOOD, FOOTSTEP_WOOD_FILE, 0 ) # Layer 1 footstep_check ( FOOTSTEP_GRASS_LONG, FOOTSTEP_GRASS_FILE, 1 ) footstep_check ( FOOTSTEP_DIRT_LONG, FOOTSTEP_DIRT_FILE, 1 ) footstep_check ( FOOTSTEP_SAND_LONG, FOOTSTEP_SAND_FILE, 1 ) footstep_check ( FOOTSTEP_SNOW_LONG, FOOTSTEP_SNOW_FILE, 1 ) # Insert custom sounds here end end end
-
Nome Script: Khas Script Core Versione: 1.0 Autore/i: Khas Informazioni: Il Khas Script Core è un insieme di classi, moduli, metodi, etc che verrà utilizzato su tutti gli altri script che creerà l'autore. Funzionerà più o meno un pò come l'SDK presente per XP... Istruzioni: Inserite lo script sotto Material... Script: #------------------------------------------------------------------------------- # * [RMVX] Khas Script Core #------------------------------------------------------------------------------- # * This script will activate and enhance compatibility of all Khas' Scripts # * Este script irá ativar a compatibilidade entre todos os scripts Khas #------------------------------------------------------------------------------- # * By Khas ([email protected]) # * Version: 1.0 # * Released on: 08/06/2010 # #------------------------------------------------------------------------------- # Terms of Use: #------------------------------------------------------------------------------- # * ENGLISH # All Khas' Scripts are licensed under a Creative Commons license # All Khas' Scripts are for non-commercial projects, if you need # them for a commercial game, please send a email to [email protected] # All Khas' Scripts are for personal use, you can edit them and use in your # own project, but you can't post any modified version without my permission # # * PORTUGUES # Todos os scripts Khas estão sob licença Creative Commons # Todos os scripts Khas são para projetos não comerciais, se você precisar em # seu projeto comercial, envie um email para [email protected] com o pedido # Todos os scripts Khas são para uso pessoal, você pode usar e editar para uso # no seu projeto, porém você não pode postar nenhuma versão modificada sem # a minha permissão # #------------------------------------------------------------------------------- # Installation: #------------------------------------------------------------------------------- # * ENGLISH # 1) This script should be placed after "Materials" and before any Khas' Scripts # 2) Setup this script in Setup Part below. # # *PORTUGUES # 1)Este script tem que ser colocado depois dos "Scripts Adicionais" e antes # de qualquer script Khas # 2) Configure o script na parte de configuração # #------------------------------------------------------------------------------- # Released Khas' Scripts: #------------------------------------------------------------------------------- # 13/06/2010 - Neo Light Effects 1.0 # 15/06/2010 - Khas Neo Title 1.0 # #------------------------------------------------------------------------------- # Setup Part #------------------------------------------------------------------------------- module Core # Khas scripts language | Lingua dos scripts Khas # 0 - English | 0 - Ingles # 1 - Portuguese | 1 - Portugues Language = 1 #------------------------------------------------------------------------------- # End of Setup Part #------------------------------------------------------------------------------- @scripts = {} def self.version return 1.0 end def self.register(script,version) @scripts[script] = version end def self.enabled?(script,version=1) en = @scripts.has_key?(script) ? true : false; return en unless en return (en and @scripts[script] >= version) end def self.load_matrix; $pixel_matrix = {} for x in 0..543 $pixel_matrix[x] = {} end for x in 0..543 for y in 0..415 $pixel_matrix[x][y] = (57.3*Math.atan2(272-x,208-y)).to_i end end end def self.require(script,from,version = 1.0) unless @scripts.has_key(script) if Language == 1 p "O script #{from} precisa do script #{script}" p "Por favor, instale o #{script} #{version}" else p "The script #{from} requires #{script}" p "Please install the #{script} #{version}" end exit else unless @scripts[script] >= version if Language == 1 p "#{script} #{version} é antigo" p "Por favor, instale o #{script} #{version}" else p "#{script} #{version} is obsolete" p "Please install the #{script} #{version}" end exit end end end def self.enter_fs $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ' ' $showm.call(18,0,0,0) $showm.call(13,0,0,0) $showm.call(13,0,2,0) $showm.call(18,0,2,0) end end $enabled_core = Core.version module Cache def self.particle(filename) load_bitmap("Graphics/Particles/", filename) end def self.title(filename) load_bitmap("Graphics/Title/", filename) end end module Bitcore @cached_bitmaps = {} def self.add(bitmap,key) if @cached_bitmaps.has_key?(key) p "Bitcore error!"; p "Cached bitmap: #{key}" else @cached_bitmaps[key] = bitmap end end def self::[](key) return @cached_bitmaps[key] end def self.delete(key) unless @cached_bitmaps.has_key?(key) p "Bitcore error!"; p "Uncached bitmap: #{key}" else @cached_bitmaps[key].dispose @cached_bitmaps.delete(key) end end def self.reset @cached_bitmaps.keys.each { |i| @cached_bitmaps[i].dispose } @cached_bitmaps.clear end def self.cached_bitmaps return @cached_bitmaps.keys end def self.cached_value return @cached_bitmaps.size end end class Neo_Effect attr_accessor :picture_name attr_accessor :opacity attr_accessor :color attr_accessor :blend_mode attr_accessor :angle attr_accessor :opacity_oscillation attr_accessor :ax attr_accessor :ay attr_accessor :hue_oscillation def initialize(picture, opacity, color=Tone.new(0,0,0), blend_mode=1, ax=0, ay=0, angle=0, op_os=0, hue=0) @picture_name = picture @opacity = opacity @color = color @blend_mode = blend_mode @angle = angle @opacity_oscillation = op_os @ax = ax @[member=ayrnvqrnsmij] = ay @hue_oscillation = (hue == 0 ? false : hue) end end class Title_Effect attr_accessor :picture_name attr_accessor :opacity attr_accessor :position attr_accessor :blend_mode attr_accessor :angle attr_accessor :ax attr_accessor :ay attr_accessor :z def initialize(picture, plane=false, z=1, op=255, pos=[0,0,0], blend=1, angle=0, ax=0, ay=0) @picture_name = picture @opacity = op @position = pos @blend_mode = blend @angle = angle @ax = ax @[member=ayrnvqrnsmij] = ay @z = z @plane = plane end def plane? return @plane end end
-
Nome Script: Video Picture Versione: 1.0 Autore/i: Rafidelis Informazioni: Questo script crea un video usando picture e animazioni separate... Con questo script si può: - Controllare la riproduzione del video (pausa,riavvia...) - Posizionare il video sullo schermo - Scegliere la velocità di esecuzione - Definire la velocità ...e altre cose che potete vedere nella demo =) Istruzioni: Le istruzioni sono all'inetrno della Demo. Script: #============================================================================== # [RGSS/RGSS2] Picture Video - Filme por Pictures #------------------------------------------------------------------------------ # $RafiScripts.by = Rafidelis(RafiScripts - RafideliSoft Brasil) # $RafiScripts.version = 1.0 # $RafiScripts.release_date = 18/06/10 (d/m/y) # $RafiScripts.email = [email protected] or [email protected] # $RafiScripts.website = www.ReinoRPG.com or www.ReinoRPG.com/forum # $RafiScripts.website² = www.RafideliScripts.4shared.com #============================================================================== # [** $RafiScripts.desc **] // Sobre o Script / About Script #------------------------------------------------------------------------------ # Este script cria um filme de Pictures,simulando um vídeo normal. # Idealização : Dark Goku (Ou viado sayajyn,dá tudo na mesma) # Características: # * - Controle de execução do vídeo -> ( Pausar,Retomar,Parar ) # * - Posicionamento do vídeo -> ( Centralizar Automaticamente,ou definir as # coordenadas (x e y) para exibição do vídeo ) # * - Definição da velocidade de execução -> ( Super Lento, Lento, Normal, # Rápido e Super Rápido ) # * - Executar com mapa no fundo,ou fundo preto. # # * - Redimensionamento do tamanho da tela do video # # OBS: Esse script provavelmente é incompativel com a maioria dos scripts de # pular a tela de título.Fique atento! # #============================================================================== # [** $RafiScripts.instr ] // Instruções / Instructions: #------------------------------------------------------------------------------ # * - Colar Acima do Main # * - Editar as Constantes no Modulo Rafidelis::Picture_Video_Conf # # ** Comandos para serem usados no comando 'chamar script'(3° Aba) # # $picture_video.path = String (Ex : 'Graphics/Pictures" ) # |_ Definição da Pasta onde se encontram as imagens usadas no vídeo atual # # $picture_video.pictures_prefix = String (Ex : 'Picture_' ) # |_ Definição do prefixo das imagens usadas no vídeo. # # $picture_video.max_frames = Inteiro (Ex : 45 ) # |_ Definição do número máximo de frames(pictures) do vídeo # # $picture_video.play_speed = String ou Inteiro # |_ Se for uma string(Texto),os possiveis valores são: # => "Super Slow","Super lento" : velocidade = 5 # => "Slow","Lento","Devagar" : velocidade = 10 # => "Normal" : velocidade = 20 # => "Fast","Rápido","Rapido" : velocidade = 40 # => "Super Fast","Super rápido" : velocidade = 60 # # $picture_video.from_map = Valor Booleano( true ou false) # |_ Definição se o fundo do vídeo será o mapa atual,ou fundo preto. # # $picture_video.x = Inteiro ( Ex : 50 ) # |_ Definição da posição horizontal do vídeo no mapa # # $picture_video.y = Inteiro ( Ex : 80 ) # |_ Definição da posição vertical do vídeo no mapa # # $picture_video.auto_center = Valor Booleano( true ou false ) # |_ Definição de auto centralização do vídeo no mapa. Se essa opção estiver # ativa,as opções $picture_video.x = valor e $picture_video.y = valor serão # ignoradas. Para poder definir as coordenas que quiser,através dos métodos # citados,essa opção deve estar desativada(false). # # $picture_video.music = String ( Ex : "Fundo_Filme01" ) # |_ Nome do arquivo de música do vídeo atual. Deve estar na pasta # 'Audio/BGM',e deve ser um arquivo de som valido(mp3,wav,etc) # # $picture_video.can_pause = Valor Booleano (true ou false) # |_ Permitir ou não que o vídeo seja pausado durante sua execução # # $picture_video.can_stop = Valor Booleano (true ou false) # |_ Permitir a possibilidade de sair da execução do vídeo. # # $picture_video.resize_screen(largura,altura) # |_ Define uma nova dimensão para a tela aonde o vídeo será exibido. # As imagens automaticamente se ajustam as dimensões passadas. # # $picture_video.reset_screen_dimensions! # |_ Restaura as dimensões da tela para o tamanho das imagens que serão # usadas no vídeo.Use esse método após utilizar o método # $picture.resize_screen(largura,altura) #----------------------------------------------------------------------------- # Exemplos de definições de vídeos: #============================================================================= # 1) # $picture_video.path = "Graphics/Pictures/Video1/" # $picture_video.pictures_prefix = "Picture_" # $picture_video.max_frame = 160 # $picture_video.play_speed = "Lento" # $picture_video.from_map = false # $picture_video.auto_center = false # $picture_video.x = 20 # $picture_video.y = 100 # $picture_video.play! # Executar Vídeo! # # - O exemplo acima irá definir as posições 20 e 100 para exibir o vídeo,pois # a opção 'auto_center' foi desativada. O prefixo das pictures é : 'Picture_', # ou seja, quando estiver no primeiro frame,a imagem procurada na pasta será: # 'Picture_0',e quando estiver no frame 15,por exemplo,a imagem procurada na # pasta 'Graphics/Pictures/Video01/' será 'Picture_15'.O numero máximo de # frames é de 160,ou seja a ultima picture será : 'Picture_160'. # Nesse exemplo,o fundo do vídeo ficara preto,pois não sera exibido o mapa # atual. O vídeo ficara lento durante sua execução, pois foi definida a # velocidade lenta para a execução. #------------------------------------------------------------------------------- # 2) # $picture_video.path = "Graphics/Pictures/Video2" # $picture_video.pictures_prefix = "Picture_" # $picture_video.max_frame = 80 # $picture_video.from_map = false # $picture_video.music = "Video02_Sound" # $picture_video.can_pause = false # $picture_video.can_stop = false # $picture_video.play! # # - O exemplo acima,executa um vídeo com o total de 80 frames,e as imagens # usadas devem estar na pasta "Graphics/Pictures/Video2" com o prefixo # 'Picture_'. # O vídeo ficara posicionado no centro da tela,com o fundo preto e velocidade # de execução normal(se a velocidade de execução não tiver sido modificada # anteriormente). # O som a ser tocado será o 'Video2_Sound',na pasta 'Sound/BGM',e por fim # não será possível pausar ,nem parar o vídeo durante sua execuçao. Ou seja, # só sera possível retornar ao mapa quando o vídeo terminar. # #------------------------------------------------------------------------------ # Baixe a demo(que se encontra no Tópico 'Picture Video',na sessão de Scripts # RGSS2 do forum da ReinoRPG.com(www.ReinoRPG.com/Forum) para demonstração de # como usar esse script com imagens. # Lembrando que esse script funciona tanto no RPGMaker VX e RPGMaker XP. #============================================================================= #============================================================== # ATENÇÃO! # Se você for usar esse script no RPGMaker XP, retire a linha # '=begin'(Linha 142) e a linha '=end'(Linha 148) logo abaixo: #============================================================== =begin module Cache def self.load_bitmap(path,file,hue=0) return RPG::Cache.load_bitmap(path,file,hue) end end =end module Rafidelis #========================================================================== # ** Modulo de Configurações do Script de Video por Imagens #-------------------------------------------------------------------------- module Picture_Video_Conf # Scene que retorna quando acabar o 'filme de pictures'( Padrão: Scene_Map ) Scene_When_Return = Scene_Map # Segundos a esperar,antes de fechar o filme ( Padrão : 0.5 ) Wait_Seconds_Before_Terminate = 0.5 # Tecla para pausar o vídeo ( Padrão : Input::C ) (Enter) Pause_Key = Input::C # Tecla para retornar o vídeo quando estiver pausado ( Padrão : Input::C ) Play_Key = Input::C # Tecla para sair da execução do vídeo ( Padrão : Input:: (Esc) Stop_Key = Input::B # Escrever ou não na tela do vídeo o texto de pause ( Padrão : true) Show_Pause_Text = true # Texto a ser exibido enquanto o vídeo estiver pausado Pause_Text = "-- Pausado -- Pressione Enter para Executar" # Propriedades da Fonte do Texto de Pause Pause_Text_Font = { "Cor" => Color.new(255,255,255) , # Branco "Negrito" => false , # C/ Negrito "Itálico" => true , # S/ itálico "Nome" => Font.default_name } # Fonte Padrão # Nome do som(SE) a ser tocado quando pressionar a tecla de pausar # o filme for pressionada Pause_Sound = 'Cursor' # No XP use : '001-System01' # Nome do som(SE) a ser tocado quando a tecla de executar o filme # for pressionada Play_Sound = 'Cursor' # No vx use : '001-System01' # Nome do som(SE) a ser tocado quando a pressionar a tecla de sair # da execução do filme Stop_Sound = 'Cancel' # No XP use : '003-System03' # Parar os sons do mapa(BGM,BGS,SE e ME) quando iniciar a execução do filme Stop_Map_Sounds = true #========================================================================== # ** Retornar as dimensões da janela de jogo,dependendo do RPGMaker usado #-------------------------------------------------------------------------- def self.screen_dimensions if defined?($TEST) # Se for o VX return [Graphics.width,Graphics.height] elsif defined?($DEBUG) # Se for o XP return [640,480] end end end #============================================================================ # ** Picture Video #---------------------------------------------------------------------------- # Esta classe é usada para armazenar os dados do vídeo de imagens. # Pode ser acessada usando $picture_video #============================================================================ class Picture_Video # Variáveis de instancias com acesso de leitura e escrita permitidos : attr_accessor ( :auto_center,:can_pause,:can_stop,:dimensions,:frame, :from_map,:path,:pictures_prefix,:playing,:max_frames,:x,:y ) # Variáveis de Instancia com acesso somente de leitura. attr_reader ( :play_speed , :music ) #========================================================================= # ** Inicialização do Objeto #------------------------------------------------------------------------- def initialize @auto_center = true # Auto centralizar a tela do vídeo na Janela @can_pause = true @can_stop = true @frame = 0 @from_map = true @path = "" @pictures_prefix = "" @playing = false @play_speed = 20 @max_frames = 0 @music = "" @x = 0 @y = 0 @repeat = false @wait_count = 0 @dimensions = [nil,nil] end #========================================================================= # ** Retorno do largura da tela de vídeo #------------------------------------------------------------------------- def screen_width return @dimensions[0].nil? ? 0 : @dimensions[0] end #========================================================================= # ** Retorno do altura da tela de vídeo #------------------------------------------------------------------------- def screen_height return @dimensions[1].nil? ? 0 : @dimensions[1] end #========================================================================= # ** Definir novas dimensões para a tela do vídeo #------------------------------------------------------------------------- def resize_screen(width,height) @dimensions[0] = width if ( @dimensions[0] != width ) @dimensions[1] = height if ( @dimensions[1] != height ) end #========================================================================= # ** Definição do novo arquivo de som #------------------------------------------------------------------------- def music=(sound) @music = sound end #========================================================================= # ** Definição do velocidade de execução do vídeo #------------------------------------------------------------------------- def play_speed=(speed) return if @play_speed == speed @play_speed = speed.is_a?(String) ? return_play_speed(speed) : speed end #========================================================================= # ** Executar vídeo #------------------------------------------------------------------------- def play! if Rafidelis::Picture_Video_Conf::Stop_Map_Sounds Audio.bgm_stop Audio.bgs_stop Audio.me_stop Audio.se_stop end @playing = true Audio.bgm_play("Audio/BGM/#{@music}") $scene = Rafidelis::Scene_Picture_Video.new end #========================================================================= # ** Pausar Vídeo #------------------------------------------------------------------------- def pause! @playing = false Audio.bgm_stop end #========================================================================= # ** Parar Vídeo #------------------------------------------------------------------------- def stop! Audio.bgm_stop @playing = false @frame = 0 Graphics.transition(10) $scene = Rafidelis::Picture_Video_Conf::Scene_When_Return.new end #========================================================================= # ** Verificação da flag de vídeo pausado #------------------------------------------------------------------------- def paused? return (not playing?) end #========================================================================= # ** Verificação da flag de vídeo sendo executado #------------------------------------------------------------------------- def playing? return @playing end #========================================================================= # ** Verificação da flag de vídeo finalizado #------------------------------------------------------------------------- def finished? return (@frame >= @max_frames) end #========================================================================= # ** Resetar as dimensoes da tela para o tamanho da imagem #------------------------------------------------------------------------- def reset_screen_dimensions! @dimensions = [nil,nil] end #========================================================================= # ** Atualização #------------------------------------------------------------------------- def update return if paused? # Se ainda não tiver chegado ao ultimo frame if ( @frame < @max_frames ) if ( @wait_count < 100 ) @wait_count += @play_speed else @wait_count = 0 # Se estiver no ultimo frame if ( @frame >= @max_frames ) @frame = 0 if @repeat else @frame += 1 end end end end private # Método Privado da classe #========================================================================= # ** Privado : Retornar velocidade de execução,através de uma string #------------------------------------------------------------------------- def return_play_speed(label) case label.downcase when "super slow","super lento","super devagar" ; 5 when "slow","devagar","lento" ; 10 when "normal" ; 20 when "fast","rapido","rápido" ; 40 when "super fast","super rapido","super rápido" ; 60 else ; 20 end end end #============================================================================ # ** Sprite Picture Video #---------------------------------------------------------------------------- # Esta classe é usada para criar os sprites durante a exibição dos vídeos # por pictures. #============================================================================ class Sprite_Picture_Video < Sprite #========================================================================= # ** Inicialização do Objeto #------------------------------------------------------------------------- def initialize super() self.z = 999 update @pause_sprite = Sprite.new @pause_sprite.bitmap = Bitmap.new(bitmap.width,bitmap.height) @pause_sprite.x = self.x @pause_sprite.y = self.y @pause_sprite.z = self.z + 10 end #========================================================================= # ** Atualização #------------------------------------------------------------------------- def update if $picture_video.dimensions != @dimensions @dimensions = $picture_video.dimensions end if ($picture_video.frame != @frame) @frame = $picture_video.frame update_bitmap end end #========================================================================= # ** Exibição do Texto de Pause #------------------------------------------------------------------------- def draw_pause_text text = Rafidelis::Picture_Video_Conf::Pause_Text @pause_sprite.bitmap.clear font_size = ( @dimensions[0] <= 150 ? 14 : 17 ) f = Rafidelis::Picture_Video_Conf::Pause_Text_Font self.bitmap.font.name = f["Nome"] @pause_sprite.bitmap.font.color = f["Cor"] @pause_sprite.bitmap.font.bold = f["Negrito"] @pause_sprite.bitmap.font.italic = f["Itálico"] @pause_sprite.bitmap.font.size = font_size @pause_sprite.bitmap.draw_text(0,0,bitmap.width,32,text,1) end #========================================================================= # ** Deletar texto de Pause #------------------------------------------------------------------------- def erase_pause_text @pause_sprite.bitmap.clear end #========================================================================= # ** Atualização do Bitmap do Sprite #------------------------------------------------------------------------- def update_bitmap unless self.bitmap.nil? self.bitmap.dispose unless self.bitmap.disposed? end picture = ($picture_video.pictures_prefix + @frame.to_s) bitmap = Cache.load_bitmap($picture_video.path,picture) if @dimensions[0].nil? $picture_video.dimensions[0] = @dimensions[0] = bitmap.width end if @dimensions[1].nil? $picture_video.dimensions[1] = @dimensions[1] = bitmap.height end w,h = $picture_video.screen_width,$picture_video.screen_height self.bitmap = Bitmap.new(w,h) dest_rect = Rect.new(0,0,w,h) self.bitmap.stretch_blt(dest_rect, bitmap, bitmap.rect) # Se a opção de auto centralizar estiver ativa if $picture_video.auto_center # A picture é centralizada na tela w = Picture_Video_Conf.screen_dimensions[0] h = Picture_Video_Conf.screen_dimensions[1] self.x = ( w - self.bitmap.width ) / 2 self.y = ( h - self.bitmap.height ) / 2 else self.x = $picture_video.x self.y = $picture_video.y end end end #============================================================================ # ** Scene Picture Video #---------------------------------------------------------------------------- # Esta classe processa a execução dos vídeos por pictures. #============================================================================ class Scene_Picture_Video include Rafidelis::Picture_Video_Conf #========================================================================= # ** Inicialização do Objeto #------------------------------------------------------------------------- def initialize @spriteset = Spriteset_Map.new if $picture_video.from_map @sprite_picture_video = Sprite_Picture_Video.new() end #========================================================================= # ** Processo Principal #------------------------------------------------------------------------- def main Graphics.transition(10) Input.update # Atualiza as informações inseridas loop do Graphics.update # Atualiza os gráficos Input.update # Atualiza as informações inseridas update # Atualização break if $scene != self # Descontinuação do loop end Graphics.update Graphics.freeze # Congelamento dos gráficos terminate # Fim end #========================================================================= # ** Atualização #------------------------------------------------------------------------- def update @sprite_picture_video.update $picture_video.update if $picture_video.playing? # Se estiver sendo executando if Input.trigger?(Pause_Key) and $picture_video.can_pause Audio.se_play("Audio/SE/#{Pause_Sound}") $picture_video.pause! end elsif $picture_video.paused? # Se estiver pausado @sprite_picture_video.draw_pause_text if Show_Pause_Text if Input.trigger?(Play_Key) @sprite_picture_video.erase_pause_text if Show_Pause_Text Audio.se_play("Audio/SE/#{Play_Sound}") Audio.bgm_play("Audio/BGM/#{$picture_video.music}") $picture_video.playing = true end end # Se for possivel parar o vídeo if Input.trigger?(Stop_Key) and $picture_video.can_stop @sprite_picture_video.erase_pause_text if Show_Pause_Text Audio.se_play("Audio/SE/#{Stop_Sound}") $picture_video.stop! end # Se o vídeo tiver terminado if $picture_video.finished? time = Wait_Seconds_Before_Terminate * 60 time.to_i.times {Graphics.update()} $picture_video.stop! end end #========================================================================= # ** Finalização #------------------------------------------------------------------------- def terminate @sprite_picture_video.dispose end end end #============================================================================== # Scene_Title #------------------------------------------------------------------------------ # Classe das operações na tela de título. #============================================================================== class Scene_Title alias rafidelis_picture_video_main main #========================================================================= # ** Inicialização do Processo #------------------------------------------------------------------------- def main $picture_video = Rafidelis::Picture_Video.new rafidelis_picture_video_main end end Demo: http://www.4shared.com/file/QPVerGV_/Picture_Video_-_Vdeo_por_Pictu.html
-
BS/Battlers Addon Allineamento personaggio
Ally ha aggiunto un topic in Scripts RPG Maker VX (RGSS2)
Richiede la Total Conversion Nome Script: Allineamento personaggio Versione: N/D Autore/i: Leon w adattato da Rinnegatamante Informazioni: questo script permette di scegliere l'allineamento del PG: buono/neutrale/malvagio Istruzioni: Inserire sotto la total conversion Script: #=================================== # Leon's Good and Evil script adattato da Rinnegatamante #---------------------------------------------------------------------- # Features: # Gives an actor the "good", "Neutral" or "evil" alignment, based # upon their actions. # # Instructions: # Place above main, and below other scripts. # Use: draw_alignment_bar(actor, x, y) in a script to draw the alignment bar. # x and y being the position of the bar, and actor being the syntax for the actor's information. # # To use: # To add or subtract from their alignment, use: $game_actors[actor_id].alignment += x # To see if the actor's alignment is good, evil or neutral, use: # * Conditional Branch, tab 4, Script. # * For good, use $game_actors[actor_id] > 0 # * For evil, use $game_actors[actor_id] < 0 # * For neutral, use $game_actors[actor_id] == 0 # # Extra Information: # This script edits the original Window_Status script to add the good/evil. #=================================== #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Game_Actor #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Game_Actor < Game_Battler attr_accessor :alignment attr_accessor :alignment_name alias leon_alignment_bars_ga_setup setup def setup(actor_id) @alignment = 0 @alignment_name = "Neutrale" leon_alignment_bars_ga_setup(actor_id) end def alignment if @alignment > 0 if @alignment > 100 @alignment = 100 end @alignment_name = "Buono" return @alignment end if @alignment < 0 if @alignment < -100 @alignment = -100 end @alignment_name = "Cattivo" return @alignment end @alignment_name = "Neutrale" return @alignment end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Window_Base #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Window_Base def draw_bar(x, y, min, max, width = 152, height = 6, bar_color = Color.new(0, 75, 0, 255), end_color = Color.new(0, 255, 0, 255)) for i in 0..height self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255)) end for i in 1..(height - 1) r = 100 * (height - i) / height + 0 * i / height g = 100 * (height - i) / height + 0 * i / height b = 100 * (height - i) / height + 0 * i / height a = 255 * (height - i) / height + 255 * i / height self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a)) end for i in 1..( (min.to_f / max.to_f) * width - 1) for j in 1..(height - 1) r = bar_color.red * (width - i) / width + end_color.red * i / width g = bar_color.green * (width - i) / width + end_color.green * i / width b = bar_color.blue * (width - i) / width + end_color.blue * i / width a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a)) end end end def draw_backward_bar(x, y, min, max, width = 152, height = 6, bar_color = Color.new(75, 0, 0, 255), end_color = Color.new(255, 0, 0, 255)) for i in 0..height self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255)) end for i in 1..(height - 1) r = 100 * (height - i) / height + 0 * i / height g = 100 * (height - i) / height + 0 * i / height b = 100 * (height - i) / height + 0 * i / height a = 255 * (height - i) / height + 255 * i / height self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a)) end for i in 1..( (min.to_f / max.to_f) * width - 1) for j in 1..(height - 1) r = bar_color.red * (width - i) / width + end_color.red * i / width g = bar_color.green * (width - i) / width + end_color.green * i / width b = bar_color.blue * (width - i) / width + end_color.blue * i / width a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width self.contents.fill_rect(x - i + j, y + height - j, 1, 1, Color.new(r, g, b, a)) end end end def draw_alignment_bar(actor, x, y) #x = 320 y = 147 draw_bar(x, y, 0, 200, 200, 6) if actor.alignment > 0 draw_bar(x + 100, y, actor.alignment, 100, 100, 6) actor.alignment_name = "Buono" elsif actor.alignment < 0 draw_backward_bar(x + 100, y, -1 * actor.alignment, 100, 100, 6) actor.alignment_name = "Cattivo" elsif actor.alignment == 0 draw_bar(x + 100, y, actor.alignment, 100, 100, 6) actor.alignment_name = "Neutrale" end draw_bar(x + 97, y - 2, 2, 2, 2, 10, Color.new(255, 255, 255, 255), Color.new(255, 255, 255,255)) end end #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Window_Status #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class Window_Status < Window_Base alias leon_alignment_bars_ws_refresh refresh def refresh leon_alignment_bars_ws_refresh if @actor.alignment > 100 @actor.alignment = 100 elsif @actor.alignment < -100 @actor.alignment = -100 end self.contents.font.color = system_color self.contents.draw_text(290, 122, 120, 32, "Carattere") draw_alignment_bar(@actor, 280, 157) self.contents.font.color = normal_color self.contents.draw_text(380, 122, 120, 32, @actor.alignment_name) end end -
Nome Script: HUD Personalizzato Versione: 2.0 Autore/i: Shepher Informazioni: Crea un HUD personalizzato... Istruzioni: Inserite lo script sotto Material e importate le immagini contenute nella demo nel vostro progetto. Script: ############################################ ########### HUD - HP SP LVL ################ ############# By : Shepher ################# ########### Agradecimentos ################# ############# FlyBoyUnder ################## ############################################ ################################################ # Instruções do script : # # Apenas cole acima do Main e jogue ^^ # # Para trocar a opacidade vá na linha 24 # # Dica: Não altere o tamanho da janela # ################################################ ############################################################# # INICIO DO SCRIPT # ##################### By Shepher ############################ module Shepher_HUD Barra_HP = "HP-Bar" # Imagem da barra de HP Barra_MP = "MP-Bar" # Imagem da barra de MP Base = "Bars-Base" # Imagm do fundo das barras Switch_q_Ativa_O_Script = 10 # Switch que ativa / desativa a HUD Opacidade = 0 # Opacidade da janela | Recomendo 0 Ativar_Botao = Input::R Mostrar_Face = false # Mostrar a face ou não true/false # Recomendo deixar false, pois pode dar mto lag end class Window_Teste < Window_Base def initialize super(0, 0,544, 120) #280,120 self.opacity = (Shepher_HUD::Opacidade) @actor = $game_party.members[0] @actor2 = $game_party.members[1] @actor3 = $game_party.members[2] @actor4 = $game_party.members[3] self.contents.font.color = Color.new(255,0,0,0) end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def update self.contents.clear if Shepher_HUD::Mostrar_Face == true draw_hp(@actor, 70, 40) draw_mp(@actor, 70, 64) show_state(@actor, 130, 0) @item_max = $game_party.members.size for actor in $game_party.members draw_actor_face(actor, 2, actor.index * 96 + 2, 92) x = 40 y = actor.index * 96 + WLH / 2 draw_actor_name(actor, x, y) draw_actor_level(actor, 136, y) end end if Shepher_HUD::Mostrar_Face == false draw_hp(@actor, 0, 35) draw_mp(@actor, 0, 59) draw_hp(@actor2,130,35) draw_mp(@actor2,130,59) draw_hp(@actor3,260,35) draw_mp(@actor3,260,59) draw_hp(@actor4,390,35) draw_mp(@actor4,390,59) show_state(@actor, 130, 0) @item_max = $game_party.members.size for actor in $game_party.members x = 0 y = actor.index * 96 + WLH / 2 x2 = 130 self.contents.font.color = Color.new(255,0,0,0) draw_actor_name(actor, x, y) draw_actor_name(@actor2,x2,y) draw_actor_name(@actor3,260,y) draw_actor_name(@actor4,390,y) end end end def show_state(actor, x, y) count = 0 for state in actor.states draw_icon(state.icon_index, x, y + 24 * count) count += 1 break if (24 * count > 76) end end def draw_hp(actor, x, y) back = Cache.system(Shepher_HUD::Base) cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y-ch+24, back, src_rect) meter = Cache.system(Shepher_HUD::Barra_HP) cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x+5, y-ch+17, meter, src_rect) end def draw_mp(actor, x, y) back = Cache.system(Shepher_HUD::Base) cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y-ch+24, back, src_rect) meter = Cache.system(Shepher_HUD::Barra_MP) cw = meter.width * actor.mp / actor.maxmp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x+5, y-ch+17, meter, src_rect) end end ############################################################# # Fim do Script # ######################### By Shepher ######################## class Scene_Map alias shepher_hud_shepher_start start alias shepher_hud_shepher_update update alias shepher_hud_shepher_terminate terminate def start shepher_hud_shepher_start @show = true @hud = Window_Teste.new end def update shepher_hud_shepher_update @hud.update showing_hud end def terminate shepher_hud_shepher_terminate @hud.dispose end def showing_hud if Input.trigger?(Shepher_HUD::Ativar_Botao) if @show == true @show = false else @show = true end end if Shepher_HUD::Switch_q_Ativa_O_Script == 0 or $game_switches[Shepher_HUD] == true if @show == true @hud.visible = true elsif @show == false @hud.visible = false end else @hud.visible = false end end end Demo: http://www.mediafire.com/?sharekey=11d6977360083ebe00d27174b47c6657224eabca47fe4d38f7e866bfb1230ce0
-
Nome Script: napco's XP Sprite_Character Versione: 0.1 Autore/i: napco Informazioni: Permette di utilizzare i characters di RPGMaker XP al posto dei charset del VX, importandoli semplicemente. Istruzioni: Inserire lo script sotto "Materials". Script: #============================================================================== # ** napco's XP Sprite_Character #------------------------------------------------------------------------------ # Permette di utilizzare i chara dell'XP al posto di quelli del VX #============================================================================== class Sprite_Character < Sprite_Base def update_bitmap if @tile_id != @character.tile_id or @character_name != @character.character_name @tile_id = @character.tile_id @character_name = @character.character_name if @tile_id > 0 sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32; sy = @tile_id % 256 / 8 % 16 * 32; self.bitmap = tileset_bitmap(@tile_id) self.src_rect.set(sx, sy, 32, 32) self.ox = 16 self.oy = 32 else self.bitmap = Cache.character(@character_name) @cw = bitmap.width / 4 @ch = bitmap.height / 4 self.ox = @cw / 2 self.oy = @ch end end end def update_src_rect if @tile_id == 0 pattern = @character.pattern > 0 ? @character.pattern - 1 : 3 sx = pattern * @cw sy = (@character.direction - 2) / 2 * @ch self.src_rect.set(sx, sy, @cw, @ch) end end end Incompatibilità: Lo script potrebbe essere incompatibile con altri script che agiscono sulla classe Sprite_Character, come lo script per il riflesso. Se trovate qualche incompatibilità o bug segnalatemelo e provvederò con la correzione.
-
Nome Script: Rei Dance Minigame v1.1.0b Versione: 1.1b Autore/i: reijubv Informazioni: Uno script che simula quello che potete trovare nelle sale giochi,in cui bisogna schiacciare sulle frecce al momento giusto... Gli screen vi faranno capire meglio. Screenshots: Istruzioni: All'interno della demo. Demo: http://www.mediafire.com/?q5jlqo5vewr
-
Nome Script: napco's Side View BS Versione: 0.1 Autore/i: napco Informazioni: Lo script è ancora nelle sue fasi iniziali. Si tratta di un plugin al sistema di combattimento che dovrebbe trasformarlo in battaglie laterali. Purtroppo i membri del gruppo sono statici (mancano di animazioni), ma risolverò al più presto. Screenshots: Istruzioni: Inserite lo script sotto "materials". Script: module Cache def self.character(filename, hue = 0) load_bitmap("Graphics/Characters/", filename, hue) end end class Game_Actor < Game_Battler def use_sprite? return true end def screen_x return 512 - ($game_party.members.size - self.index) * 16 end def screen_y return 160 + self.index * 32 end def screen_z return 100 end end class Sprite_Battler < Sprite_Base def update_battler_bitmap if @battler.actor? update_actor_bitmap else update_enemy_bitmap end end def update_actor_bitmap if @battler.character_name != @battler_name or @battler.battler_hue != @battler_hue @battler_name = @battler.character_name @battler_hue = @battler.battler_hue self.bitmap = Cache.character(@battler_name, @battler_hue) sign = @battler_name[/^[!$]./] if sign != nil and sign.include?('$') @width = bitmap.width / 3 @height = bitmap.height / 4 else @width = bitmap.width / 12 @height = bitmap.height / 8 end self.ox = @width / 2 self.oy = @height index = @battler.character_index pattern = 1 sx = (index % 4 * 3 + pattern) * @width sy = (index / 4 * 4 + (4 - 2) / 2) * @height self.src_rect.set(sx, sy, @width, @height) if @battler.dead? or @battler.hidden self.opacity = 0 end end end def update_enemy_bitmap if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue @battler_name = @battler.battler_name @battler_hue = @battler.battler_hue self.bitmap = Cache.battler(@battler_name, @battler_hue) @width = bitmap.width @height = bitmap.height self.ox = @width / 2 self.oy = @height if @battler.dead? or @battler.hidden self.opacity = 0 end end end end class Spriteset_Battle def create_battleback source = $game_temp.background_bitmap bitmap = Bitmap.new(640, 480) bitmap.stretch_blt(bitmap.rect, source, source.rect) bitmap.radial_blur(90, 12) @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = bitmap @battleback_sprite.ox = 320 @battleback_sprite.oy = 240 @battleback_sprite.x = 272 @battleback_sprite.y = 176 @battleback_sprite.wave_amp = 8 @battleback_sprite.wave_length = 240 @battleback_sprite.wave_speed = 120 end def create_battlefloor @battlefloor_sprite = Sprite.new(@viewport1) @battlefloor_sprite.bitmap = Cache.system("BattleFloor") @battlefloor_sprite.x = -136 @battlefloor_sprite.y = 48 @battlefloor_sprite.z = 1 @battlefloor_sprite.zoom_x = 1.5 @battlefloor_sprite.zoom_y = 2.0 @battlefloor_sprite.opacity = 128 end end Incompatibilità: Presumo che lo script sia incompatibile con altri Side View Battle scripts.
-
Nome Script: Syvkal's Menu Bars Versione: 4.1 Autore/i: Syvkal Informazioni: Con questo script,potete avere le barre HP, MP etc,in stile diverso,come potete vedere dalle immagini ^^ Screenshots: Istruzioni: Inserite lo script sotto Material. Le istruzioni sono all'interno dello Script Script: #============================================================================== # ** Syvkal's Menu Bars #------------------------------------------------------------------------------ # by Syvkal # Version 4.1 # 05-20-08 #============================================================================== # # - INTRODUCTION - # # This system implements a series of Plug 'N' Play Menu Bars # The Bars were inspired CogWheel, but all coding was done by me # ( Except Wortana's 'gradient_fill_rect' Bug Fix ) # #------------------------------------------------------------------------------ # # - USAGE - # # This system will work as soon as you put it in the Script Editor # You can edit the script from the Configuration System # However, it has also been made so you can easily make your own bars # # --------------------------------------------------- # # To draw a bar use: # draw_custom_gauge # # Followed by: # (value, max, x, y, color1, color2, width, height, slanted, up) # # value : bar calculation value # max : bar max value # x : draw spot x-coordinate # y : draw spot y-coordinate # color1 : bar gradient color 1 EITHER Color.new(r,g,b,a) # color2 : bar gradient color 2 OR Numeric Text color # width : Width # height : Height # slanted : draw slanted bar # vertical : draw bar vertically # # --------------------------------------------------- # # To draw a ring use: # draw_custom_ring # # Followed by: # (value, max, x, y, color1, color2, radius, height, amount, start, reverse) # value : bar calculation value # max : bar max value # x : draw spot x-coordinate # y : draw spot y-coordinate # color1 : bar gradient color 1 # color2 : bar gradient color 2 # radius : distance from center point # height : Height # amount : size of ring - default 360� # start : start position - max 360� # reverse : draw ring in reverse # #------------------------------------------------------------------------------ # # - SCRIPTERS USAGE - # # I have added a few extra features to allow scripters to easily use the bars # Seeing as the bars can be drawn Normal, Vertical or in a Ring I've added a # feature to allow you to turn off the bars when drawing an actors HP, MP etc. # When drawing an actors HP etc. simply add 'true' on the end. Like this: # draw_actor_hp(actor, x, y, width, true) # # I've also separated the different bars so they're easier to draw # # draw_actor_hp_gauge(actor, x, y, width) Will draw a normal bar # draw_actor_hp_gauge(actor, x, y, width, true) Will draw a vertical bar # draw_actor_hp_ring(actor, x, y, radius, height, amount, start) # Will draw a ring # #------------------------------------------------------------------------------ # # - SCRIPT CALLS - # # There are no script calls necessary to enable this script # However, you can change any of the constants in game if you wish # This can be done by the Script Call Funtion in an event # # For example: # COG::HPMPSLANT = true # # Will make the HP and MP bars Slant # And setting it to false will turn them back to normal # #============================================================================== module BAR #===================================================# # ** C O N F I G U R A T I O N S Y S T E M ** # #===================================================# # Parameter Max Value P_MAX = 500 # The system uses a 'rate' feature. It is set when drawing a bar # The 'rate' is how much the bar is filled as a decimal (max : 1) # This is used to enable color change as the bar decreased in amount $rate = 0 # Don't touch this # The system uses a series of CONSTANTS that can be edited here # They control the basic gauge colors and the manner the gauge is filled: # Gauge Border Colors COLOR1 = Color.new(0, 0, 0, 192) # Outer Border COLOR2 = Color.new(255, 255, 192, 192) # Inner Border # Gauge Empty filler COLOR3 = Color.new(0, 0, 0, 12) # Half of Inner Shading COLOR4 = Color.new(64, 0, 0, 92) # Half of Inner Shading # Gauge Settings EMPTY = false # EMPTY gauge (false - Side : true - Vertical) FILLER = false # FILLER gauge (false - Side : true - Vertical) # Border Settings - Applies only to standard bars CORNER = false # Remove corners? # The Parameter colors can be text colors taken from the windowskin or # colors like above. You don't need set your own 'rate' functions # it does it for you # Parameter Gauge Color1 ATKCOLOR1 = 2 DEFCOLOR1 = 17 SPICOLOR1 = 30 AGICOLOR1 = 12 # Parameter Gauge Color2 ATKCOLOR2 = 20 DEFCOLOR2 = 21 SPICOLOR2 = 31 AGICOLOR2 = 4 # The system has been made to use a series of SWITCHES that can be edited here # They control whether certain Bars are Normal or Slanted: HPMPSLANT = false # Slanted HP and MP Bars? EXPSLANT = false # Slanted Exp Bars? PARSLANT = false # Slanted Parameter Bars? DVVLBSLANT = true # Slanted Limit Break Bars? #===================================================# # ** C O M P L E X C O N F I G U R A T I O N ** # #===================================================# # The system allows you to edit the main gauge colous from here # Functions had to be used instead of Constants so the $rate feature still works # Edit only if you know what you're doing: def self::hpcolor1 # HP Guage Color1 return Color.new(80 - 24 * $rate, 80 * $rate, 14 * $rate, 192) end def self::hpcolor2 # HP Guage Color2 return Color.new(240 - 72 * $rate, 240 * $rate, 62 * $rate, 192) end def self::mpcolor1 # MP Guage Color1 return Color.new(14 * $rate, 80 - 24 * $rate, 80 * $rate, 192) end def self::mpcolor2 # MP Guage Color2 return Color.new(62 * $rate, 240 - 72 * $rate, 240 * $rate, 192) end def self::expcolor1 # EXP Guage Color1 Color.new(80 * $rate, 80 - 80 * $rate ** 2, 80 - 80 * $rate, 192) end def self::expcolor2 # EXP Guage Color2 Color.new(240 * $rate, 240 - 240 * $rate ** 2, 240 - 240 * $rate, 192) end #===================================================# # ** E N D C O N F I G U R A T I O N ** # #===================================================# end #============================================================================== # ** Game_Actor #------------------------------------------------------------------------------ # Added EXP and Next Level EXP for numeric for calculations #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Get EXP - numeric for calculations #-------------------------------------------------------------------------- def now_exp return @exp - @exp_list[@level] end #-------------------------------------------------------------------------- # * Get Next Level EXP - numeric for calculations #-------------------------------------------------------------------------- def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end #============================================================================== # ** Window_Base #------------------------------------------------------------------------------ # Added the 'Draw' functions for each gauge #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # * Includes The BAR Module #-------------------------------------------------------------------------- include BAR #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias draw_actor_parameter_original draw_actor_parameter #-------------------------------------------------------------------------- # * Draw HP gauge # vertical : draw bar vertically #-------------------------------------------------------------------------- def draw_actor_hp_gauge(actor, x, y, width = 120, vertical = false) $rate = actor.hp.to_f / actor.maxhp gw = width * actor.hp / actor.maxhp w = vertical ? 6 : width; h = vertical ? width : 6 HPMPSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, BAR::hpcolor1, BAR::hpcolor2, vertical) : self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, BAR::hpcolor1, BAR::hpcolor2, vertical) end #-------------------------------------------------------------------------- # * Draw MP gauge # vertical : draw bar vertically #-------------------------------------------------------------------------- def draw_actor_mp_gauge(actor, x, y, width = 120, vertical = false) $rate = actor.mp.to_f / [actor.maxmp, 1].max gw = width * actor.mp / [actor.maxmp, 1].max w = vertical ? 6 : width; h = vertical ? width : 6 HPMPSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, BAR::mpcolor1, BAR::mpcolor2, vertical) : self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, BAR::mpcolor1, BAR::mpcolor2, vertical) end #-------------------------------------------------------------------------- # * Draw Exp gauge # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : Width # vertical : draw bar vertically #-------------------------------------------------------------------------- def draw_actor_exp_gauge(actor, x, y, width = 170, vertical = false) $rate = actor.now_exp.to_f / [actor.next_exp, 1].max gw = width * actor.now_exp / [actor.next_exp, 1].max w = vertical ? 6 : width; h = vertical ? width : 6 EXPSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, BAR::expcolor1, BAR::expcolor2, vertical) : self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, BAR::expcolor1, BAR::expcolor2, vertical) end #-------------------------------------------------------------------------- # * Draw Parameters # hide_bar : draw Parameters without gauge #-------------------------------------------------------------------------- def draw_actor_parameter(actor, x, y, type, hide_bar = false) hide_bar ? nil : draw_actor_parameter_gauge(actor, x, y, type) draw_actor_parameter_original(actor, x, y, type) end #-------------------------------------------------------------------------- # * Draw Parameters gauge # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # type : Type of parameters (0-3) # width : Width # vertical : draw bar vertically #-------------------------------------------------------------------------- def draw_actor_parameter_gauge(actor, x, y, type, width = 160, vertical = false) case type when 0 e1 = actor.atk gc1 = ATKCOLOR1.is_a?(Integer) ? text_color(ATKCOLOR1) : ATKCOLOR1 gc2 = ATKCOLOR2.is_a?(Integer) ? text_color(ATKCOLOR2) : ATKCOLOR2 when 1 e1 = actor.def gc1 = DEFCOLOR1.is_a?(Integer) ? text_color(DEFCOLOR1) : DEFCOLOR1 gc2 = DEFCOLOR2.is_a?(Integer) ? text_color(DEFCOLOR2) : DEFCOLOR2 when 2 e1 = actor.spi gc1 = SPICOLOR1.is_a?(Integer) ? text_color(SPICOLOR1) : SPICOLOR1 gc2 = SPICOLOR2.is_a?(Integer) ? text_color(SPICOLOR2) : SPICOLOR2 when 3 e1 = actor.agi gc1 = AGICOLOR1.is_a?(Integer) ? text_color(AGICOLOR1) : AGICOLOR1 gc2 = AGICOLOR2.is_a?(Integer) ? text_color(AGICOLOR2) : AGICOLOR2 end e2 = P_MAX rate = [e1.to_f / e2.to_f, 1].min gw = width * [e1.to_f / e2.to_f, 1].min r = gc2.red * rate g = (gc2.green - 72) * rate b = gc2.blue * rate a = gc2.alpha w = vertical ? 6 : width; h = vertical ? width : 6 PARSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical) : self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical) end #-------------------------------------------------------------------------- # * Draw Custom gauge # value : bar calculation value # max : bar max value # x : draw spot x-coordinate # y : draw spot y-coordinate # color1 : bar gradient color 1 # color2 : bar gradient color 2 # width : Width # height : Height # slanted : draw slanted bar # vertical : draw bar vertically #-------------------------------------------------------------------------- def draw_custom_gauge(value, max, x, y, color1, color2, width=120, height=6, slanted = false, vertical = false) rate = [value.to_f / max.to_f, 1].min gw = width * [value.to_f / max.to_f, 1].min gc1 = color1.is_a?(Integer) ? text_color(color1) : color1 gc2 = color2.is_a?(Integer) ? text_color(color2) : color2 r = gc2.red * rate g = (gc2.green - 72) * rate b = gc2.blue * rate a = gc2.alpha w = vertical ? 6 : width; h = vertical ? width : 6 slanted ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical) : self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical) end #-------------------------------------------------------------------------- # * Draw Limit Break gauge # vertical : draw bar vertically #-------------------------------------------------------------------------- def draw_actor_lb(actor, x, y, width = 120, vertical = false) return unless actor.lb_gauge_visible? st1 = lb_gauge_normal_start_color; st2 = lb_gauge_max_start_color ed1 = lb_gauge_normal_end_color; ed2 = lb_gauge_max_end_color rate = actor.limitbreak.to_f / [LB_MAX, 1].max gw = width * actor.limitbreak / LB_MAX gc1 = (gw == width ? st2 : Color.new(st1.red,st1.green-(10*rate),st1.blue-(10*rate), 192)) gc2 = (gw == width ? ed2 : Color.new(ed1.red,ed1.green-(10*rate),ed1.blue-(10*rate), 192)) w = vertical ? 6 : width; h = vertical ? width : 6 DVVLBSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, gc1, gc2, vertical) : self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, gc1, gc2, vertical) end #-------------------------------------------------------------------------- # * Draw HP gauge ring # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # radius : distance from center point # height : Height # amount : size of ring - default 360� # start : start position - max 360� # reverse : draw ring in reverse #-------------------------------------------------------------------------- def draw_actor_hp_ring(actor, x, y, radius, height, amount = 360, start = 0, reverse = false) $rate = actor.hp.to_f / actor.maxhp gw = amount * actor.hp / actor.maxhp self.contents.cogwheel_fill_ring(x, y, gw, radius, height, BAR::hpcolor1, BAR::hpcolor2, amount, start, reverse) end #-------------------------------------------------------------------------- # * Draw MP gauge ring # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # radius : distance from center point # height : Height # amount : size of ring - default 360� # start : start position - max 360� # reverse : draw ring in reverse #-------------------------------------------------------------------------- def draw_actor_mp_ring(actor, x, y, radius, height, amount = 360, start = 0, reverse = false) $rate = actor.mp.to_f / [actor.maxmp, 1].max gw = amount * actor.mp / [actor.maxmp, 1].max self.contents.cogwheel_fill_ring(x, y, gw, radius, height, BAR::mpcolor1, BAR::mpcolor2, amount, start, reverse) end #-------------------------------------------------------------------------- # * Draw Exp gauge ring # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # radius : distance from center point # height : Height # amount : size of ring - default 360� # start : start position - max 360� # reverse : draw ring in reverse #-------------------------------------------------------------------------- def draw_actor_exp_ring(actor, x, y, radius, height, amount = 360, start = 0, reverse = false) $rate = actor.now_exp.to_f / [actor.next_exp, 1].max gw = amount * actor.now_exp / [actor.next_exp, 1].max self.contents.cogwheel_fill_ring(x, y, gw, radius, height, BAR::expcolor1, BAR::expcolor2, amount, start, reverse) end #-------------------------------------------------------------------------- # * Draw Custom gauge ring # value : bar calculation value # max : bar max value # x : draw spot x-coordinate # y : draw spot y-coordinate # color1 : bar gradient color 1 # color2 : bar gradient color 2 # radius : distance from center point # height : Height # amount : size of ring - default 360� # start : start position - max 360� # reverse : draw ring in reverse #-------------------------------------------------------------------------- def draw_custom_ring(value, max, x, y, color1, color2, radius, height, amount = 360, start = 0, reverse = false) rate = [value.to_f / max.to_f, 1].min gw = amount * [value.to_f / max.to_f, 1].min gc1 = color1.is_a?(Integer) ? text_color(color1) : color1 gc2 = color2.is_a?(Integer) ? text_color(color2) : color2 r = gc2.red * rate g = (gc2.green - 72) * rate b = gc2.blue * rate a = gc2.alpha self.contents.cogwheel_fill_ring(x, y, gw, radius, height, gc1, Color.new(r, g, b, a), amount, start, reverse) end #-------------------------------------------------------------------------- # * Draw HP # hide_bar : draw Parameters without gauge #-------------------------------------------------------------------------- def draw_actor_hp(actor, x, y, width = 120, hide_bar = false) hide_bar ? nil : draw_actor_hp_gauge(actor, x, y, width) self.contents.font.color = system_color self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a) self.contents.font.color = hp_color(actor) last_font_size = self.contents.font.size xr = x + width if width < 120 self.contents.draw_text(xr - 44, y, 44, WLH, actor.hp, 2) else self.contents.draw_text(xr - 99, y, 44, WLH, actor.hp, 2) self.contents.font.color = normal_color self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2) self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxhp, 2) end end #-------------------------------------------------------------------------- # * Draw MP # hide_bar : draw Parameters without gauge #-------------------------------------------------------------------------- def draw_actor_mp(actor, x, y, width = 120, hide_bar = false) hide_bar ? nil : draw_actor_mp_gauge(actor, x, y, width) self.contents.font.color = system_color self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a) self.contents.font.color = mp_color(actor) last_font_size = self.contents.font.size xr = x + width if width < 120 self.contents.draw_text(xr - 44, y, 44, WLH, actor.mp, 2) else self.contents.draw_text(xr - 99, y, 44, WLH, actor.mp, 2) self.contents.font.color = normal_color self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2) self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxmp, 2) end end #-------------------------------------------------------------------------- # * Draw Exp # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : Width # hide_bar : draw Parameters without gauge #-------------------------------------------------------------------------- def draw_actor_exp(actor, x, y, width = 170, hide_bar = false) hide_bar ? nil : draw_actor_exp_gauge(actor, x, y, width) self.contents.font.color = system_color self.contents.draw_text(x, y, 45, WLH, "Exp") self.contents.font.color = normal_color xr = x + width if width < 170 self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2) else self.contents.draw_text(xr - 131, y, 60, WLH, actor.exp_s, 2) self.contents.draw_text(xr - 71, y, 11, WLH, "/", 2) self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_exp_s, 2) end end end #============================================================================== # ** Window_SkillStatus #------------------------------------------------------------------------------ # Edited so te Bars don't cut off #============================================================================== class Window_SkillStatus < Window_Base #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 4, 0) draw_actor_level(@actor, 140, 0) draw_actor_hp(@actor, 238, 0) draw_actor_mp(@actor, 390, 0) end end #============================================================================== # ** Bitmap #------------------------------------------------------------------------------ # Added gauge Calculations #============================================================================== class Bitmap #-------------------------------------------------------------------------- # * Includes The BAR Module #-------------------------------------------------------------------------- include BAR #-------------------------------------------------------------------------- # * Wortana's 'gradient_fill_rect' Bug Fix #-------------------------------------------------------------------------- alias gradient_original gradient_fill_rect unless method_defined?('gradient_original') def gradient_fill_rect(*args) args.pop if !args.last if args.size == 4 || 7 and !args.last gradient_original(*args) end #-------------------------------------------------------------------------- # * CogWheel Style Fill of Rect #-------------------------------------------------------------------------- def cogwheel_fill_rect(x, y, gw, width, height, gc1, gc2, up = false) rect_border(x-2, y-2, width+4, height+4, COLOR1, CORNER) rect_border(x-1, y-1, width+2, height+2, COLOR2, CORNER) gradient_fill_rect(x, y, width, height, COLOR3, COLOR4, EMPTY) gradient_fill_rect(x, y, up ? width : gw, up ? gw : height, gc1, gc2, FILLER) end #-------------------------------------------------------------------------- # * CogWheel Style Fill of Slanted Rect #-------------------------------------------------------------------------- def cogwheel_fill_slant(x, y, gw, width, height, gc1, gc2, up = false) bgx = up ? 2 : 4; bdx = up ? 1 : 2 bgy = up ? 4 : 2; bdy = up ? 2 : 1 bgw = up ? 4 : 8; bdw = up ? 2 : 4 bgh = up ? 8 : 4; bdh = up ? 4 : 2 slant_border(x-bgx, y-bgy, width+bgw, height+bgh, COLOR1, up) slant_border(x-bdx, y-bdy, width+bdw, height+bdh, COLOR2, up) gradient_fill_slant(x, y, width, height, COLOR3, COLOR4, EMPTY, up) gradient_fill_slant(x, y,up ? width : gw,up ? gw : height, gc1, gc2, FILLER, up) end #-------------------------------------------------------------------------- # * CogWheel Style Fill of Ring #-------------------------------------------------------------------------- def cogwheel_fill_ring(x, y, gw, radius, height, gc1, gc2, amount = 360, start = 0, reverse = false) fill_ring(x-2, y-2, radius, height+4, COLOR1, amount, start, reverse) fill_ring(x-1, y-1, radius, height+2, COLOR2, amount, start, reverse) if amount >= 220 gradient_fill_ring(x, y, radius, height, COLOR3, COLOR4, [amount/2, 180].min, start, reverse) gradient_fill_ring(x, y, radius, height, COLOR4, COLOR3, [amount/2, 180].min, start+(amount/2), reverse) else gradient_fill_ring(x, y, radius, height, COLOR3, COLOR4, [amount, 360].min, start, reverse) end if gw >= 220 gw1 = amount/2; gw2 = gw / 2 gradient_fill_ring(x, y, radius, height, gc1, gc2, gw1, start, reverse) gradient_fill_ring(x, y, radius, height, gc2, gc1, gw2, start +(amount/2), reverse) else gradient_fill_ring(x, y, radius, height, gc1, gc2, gw, start, reverse) end end #-------------------------------------------------------------------------- # * Fill of Border #-------------------------------------------------------------------------- def rect_border(x, y, width, height, gc1, edge = false) fill_rect(x + (edge ? 1 : 0), y, width - (edge ? 2 : 0), 2, gc1) fill_rect(x + (edge ? 1 : 0), y+(height-2), width - (edge ? 2 : 0), 2, gc1) fill_rect(x, y+1, 2, height-2, gc1) fill_rect(x +(width-2), y+1, 2, height-2, gc1) end #-------------------------------------------------------------------------- # * Gradient Fill of Slanted Rect #-------------------------------------------------------------------------- def gradient_fill_slant(x, y, width, height, gc1, gc2, vertical = false, up = false) if up for i in 1..width if vertical gradient_fill_rect(x + width - i, y+i+1, 1, (height-2)-width, gc1, gc2, vertical) else color = get_gradient_pixel(gc1, gc2, width, i) fill_rect(x + width - i, y+i+1, 1, (height-2)-width, color) end end else for i in 1..height if vertical color = get_gradient_pixel(gc1, gc2, height, i) fill_rect(x+i+1, y + height - i, (width-2)-height, 1, color) else gradient_fill_rect(x+i+1, y + height - i, (width-2)-height, 1, gc1, gc2) end end end end #-------------------------------------------------------------------------- # * Fill of Slanted Rect #-------------------------------------------------------------------------- def fill_slant(x, y, width, height, gc1, up = false) oh = up ? width : height for i in 1..oh if up fill_rect(x + width -i, y+i, 1, height-width, gc1) else fill_rect(x+i, y + height -i, width-height, 1, gc1) end end end #-------------------------------------------------------------------------- # * Fill of Slanted Border #-------------------------------------------------------------------------- def slant_border(x, y, width, height, gc1, up = false) oh = up ? width : height for i in 1..oh-2 if up fill_rect(x + width-1 -i, y+((height-1)-width)+i, 1, 2, gc1) fill_rect(x + width-1 -i, y+1+i, 1, 2, gc1) fill_rect(x + width-1, y+1, 1, height-width, gc1) fill_rect(x, y+width, 1, height-width, gc1) else fill_rect(x+((width-1)-height)+i, y + height-1 -i, 2, 1, gc1) fill_rect(x+1+i, y + height-1 -i, 2, 1, gc1) fill_rect(x+1, y + height -1, width-height, 1, gc1) fill_rect(x+height, y, width-height, 1, gc1) end end end #-------------------------------------------------------------------------- # * Fill of Ring #-------------------------------------------------------------------------- def fill_ring(ox, oy, radius, height, gc1, amount = 360, start = 0, reverse = false) d = 2.0 * Math::PI / 360 for i in 1..[amount, 360].min s = i + start if reverse x = ox + ( radius * Math.sin( d * s ) ).to_i y = oy - ( radius * Math.cos( d * s ) ).to_i else x = ox - ( radius * Math.cos( d * s ) ).to_i y = oy + ( radius * Math.sin( d * s ) ).to_i end fill_rect(x, y, height, height, gc1) end end #-------------------------------------------------------------------------- # * Gradient Fill of Ring #-------------------------------------------------------------------------- def gradient_fill_ring(ox, oy, radius, height, gc1, gc2, amount = 360, start = 0, reverse = false) d = 2.0 * Math::PI / 360 for i in 1..amount s = i + start if reverse x = ox + ( radius * Math.sin( d * s ) ).to_i y = oy - ( radius * Math.cos( d * s ) ).to_i else x = ox - ( radius * Math.cos( d * s ) ).to_i y = oy + ( radius * Math.sin( d * s ) ).to_i end color = get_gradient_pixel(gc1, gc2, amount, i) fill_rect(x, y, height, height, color) end end #-------------------------------------------------------------------------- # * Get Pixel Color for Gradient Fill #-------------------------------------------------------------------------- def get_gradient_pixel(gc1, gc2, amount, i) red = gc1.red * (amount - i) / amount + gc2.red * i / amount green = gc1.green * (amount - i) / amount + gc2.green * i / amount blue = gc1.blue * (amount - i) / amount + gc2.blue * i / amount alpha = gc1.alpha * (amount - i) / amount + gc2.alpha * i / amount return Color.new(red, green, blue, alpha) end end
-
Nome Script: Sistema Repellente Versione: N/D Autore/i: Puppeto4 Informazioni: Sistema di Repellente usato nei giochi dei Pokèmon =P Istruzioni: All'interno della Demo Demo: http://www.4shared.com/file/67209197/2c961f20/RepelEffectDemo.html
-
Nome Script: Scene_NoTitle Versione: 1.0 Autore/i: .:: Tidus 00 ::. Informazioni: Con questo script è possibile disabilitare il Title, mandando il giocatore direttamente nel punto Iniziale del gioco. E' uno script molto utile per creare un vostro Title fatto ad eventi. Istruzioni: Mettete questo script sopra Main. Dopo di che, andate nel Main alla riga 9 e cambiate: $scene = Scene_Title.new con: $scene = Scene_NoTitle.new Script: #=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # ~ Scene_NoTitle ~ : # Autore: .:: Tidus 00 ::. : # Versione: 1.0 : # Data di Rilascio: 15/05/2010 : #=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # * Descrizione: : # Con questo script è possibile disabilitare il Title, mandando il giocatore : # direttamente nel punto Iniziale del gioco. E' uno script molto utile per : # creare un vostro Title fatto ad eventi. ^^ : #=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # * Istruzioni: : # Mettete questo script sopra Main. Dopo di che, andate nel Main alla riga 9 : # e cambiate: : # $scene = Scene_Title.new : # con: : # $scene = Scene_NoTitle.new : #=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # * Bug e Problemi Noti: : : # Tutti gli eventi in "Processo Parallelo" e "Inizio Automatico" cominciano : # con circa 1-3 frame di ritardo. : #=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: class Scene_NoTitle < Scene_Base #-------------------------------------------------------------------------- # * Processo del Sistema #-------------------------------------------------------------------------- def main if $BTEST # Se "Test di battaglia" battle_test # Inizio Test di Battaglia else # Se "Test Normale" super # Processo del Title Modificato end end #-------------------------------------------------------------------------- # * Processo Iniziale #-------------------------------------------------------------------------- def start super load_database # Carica i dati del Database create_game_objects # Crea gli oggetti del gioco command_start end #-------------------------------------------------------------------------- # * Caricamento del Database #-------------------------------------------------------------------------- def load_database $data_actors = load_data("Data/Actors.rvdata") $data_classes = load_data("Data/Classes.rvdata") $data_skills = load_data("Data/Skills.rvdata") $data_items = load_data("Data/Items.rvdata") $data_weapons = load_data("Data/Weapons.rvdata") $data_armors = load_data("Data/Armors.rvdata") $data_enemies = load_data("Data/Enemies.rvdata") $data_troops = load_data("Data/Troops.rvdata") $data_states = load_data("Data/States.rvdata") $data_animations = load_data("Data/Animations.rvdata") $data_common_events = load_data("Data/CommonEvents.rvdata") $data_system = load_data("Data/System.rvdata") $data_areas = load_data("Data/Areas.rvdata") end #-------------------------------------------------------------------------- # * Caricamento del Database in caso di "Test di Battaglia" #-------------------------------------------------------------------------- def load_bt_database $data_actors = load_data("Data/BT_Actors.rvdata") $data_classes = load_data("Data/BT_Classes.rvdata") $data_skills = load_data("Data/BT_Skills.rvdata") $data_items = load_data("Data/BT_Items.rvdata") $data_weapons = load_data("Data/BT_Weapons.rvdata") $data_armors = load_data("Data/BT_Armors.rvdata") $data_enemies = load_data("Data/BT_Enemies.rvdata") $data_troops = load_data("Data/BT_Troops.rvdata") $data_states = load_data("Data/BT_States.rvdata") $data_animations = load_data("Data/BT_Animations.rvdata") $data_common_events = load_data("Data/BT_CommonEvents.rvdata") $data_system = load_data("Data/BT_System.rvdata") end #-------------------------------------------------------------------------- # * Creazione degli Oggetti #-------------------------------------------------------------------------- def create_game_objects $game_temp = Game_Temp.new $game_message = Game_Message.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new end #-------------------------------------------------------------------------- # * Ricerca del Punto di Partenza #-------------------------------------------------------------------------- def confirm_player_location if $data_system.start_map_id == 0 print "Nessun punto di partenza trovato. Impostalo sulla mappa." exit end end #-------------------------------------------------------------------------- # * Dati Finali prima di Iniziare #-------------------------------------------------------------------------- def command_start confirm_player_location $game_party.setup_starting_members # Gruppo Iniziale $game_map.setup($data_system.start_map_id) # Punto di Partenza del gioco $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.refresh $scene = Scene_Map.new Graphics.wait(70) Graphics.frame_count = 0 $game_map.autoplay end #-------------------------------------------------------------------------- # * Dati Finali prima del "Test di battaglia" #-------------------------------------------------------------------------- def battle_test load_bt_database # Caricamento del Database in caso di "Test di Battaglia" create_game_objects # Creazione degli Oggetti Graphics.frame_count = 0 # Processo del Tempo di gioco $game_party.setup_battle_test_members $game_troop.setup($data_system.test_troop_id) $game_troop.can_escape = true $game_system.battle_bgm.play snapshot_for_background $scene = Scene_Battle.new end end Incompatibilità: N/D Note dell'Autore: Tutti gli eventi in "Processo Parallelo" e "Inizio Automatico" cominciano con circa 1-3 frame di ritardo.
-
Nome Script: Profilo Status Versione: N/D Autore/i: DarkChocobo Informazioni: Lo script permettere,attraverso una finestra aggiuntiva,di poter visualizzare il profilo dell'eroe... Screenshots: Istruzioni: All'interno dello Script Script: =begin [ =================================================================== ] [ =================================================================== ] [ ============= ] SCRIPT CRIADO POR: [ ============= ] [ ============= ] [ ============= ] [ ============= ] >>> Dark Chocobo [ ============= ] [ ============= ] [ ============= ] [ ============= ] [ ============= ] [ ============= ] > Status: Profile < [ ============= ] [ ============= ] [ ============= ] [ =================================================================== ] [ ============ ] Mais scripts de Dark Chocobo em: [ ============ ] [ ============ ] DarkChocoboScripts.4shared.com [ ============ ] [ =================================================================== ] [ =============== ] : Comunidade RPG Maker VX : [ =============== ] [ ===== ] http://www.orkut.com/Community.aspx?cmm=40232098 [ ==== ] [ =================================================================== ] [ =================================================================== ] Resumo - Cria uma área da tela de status para mostrar informações detalhadas do heroi. - Para acessá-la basta clicar para baixo, quando estiver na tela de status. Instruções - Você pode alterar o nome das informações nas linhas 31 à 35. - Você pode alterar as informações de cada herói nas linhas 38 à 91 - Você pode alterar as informações de cada herói no meio do jogo chamando script com a linha exata igual a referente do heró neste script. ex Na linha 59 está assim $DarkChocoboScripts["Status Profile"]["Idades"][5] = 19 significa que a idade do herói 5 é '19'. para alterar a idade do herói 5, ao decorrer do jogo chame o comando chamar script dos eventos digite a linha que deseja alterar, neste caso $DarkChocoboScripts["Status Profile"]["Idades"][5] = 20 =end # Cria as configurações iniciais $DarkChocoboScripts = {} if $DarkChocoboScripts.nil? $DarkChocoboScripts["Status Profile"] = {} # Traduções $DarkChocoboScripts["Status Profile"]["Nome Completo"] = "Nome Completo: " $DarkChocoboScripts["Status Profile"]["Idade"] = "Idade: " $DarkChocoboScripts["Status Profile"]["Cidade Natal"] = "Cidade Natal: " $DarkChocoboScripts["Status Profile"]["Oculpação"] = "Oculpação: " $DarkChocoboScripts["Status Profile"]["Descrição"] = "Sobre: " # Nomes $DarkChocoboScripts["Status Profile"]["Nomes Completos"] = [] $DarkChocoboScripts["Status Profile"]["Nomes Completos"][1] = "Ralphael Monroe" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][2] = "Ulrika Jones" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][3] = "Bennett Thompson" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][4] = "Iruva Walsh" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][5] = "Lawrence Dent" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][6] = "Oscar Mazzini" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][7] = "Vera Edwards" $DarkChocoboScripts["Status Profile"]["Nomes Completos"][8] = "Elmer Meisner" # Idades $DarkChocoboScripts["Status Profile"]["Idades"] = [] $DarkChocoboScripts["Status Profile"]["Idades"][1] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Idades"][2] = "Criança" $DarkChocoboScripts["Status Profile"]["Idades"][3] = "Adolescênte" $DarkChocoboScripts["Status Profile"]["Idades"][4] = "Adulto" $DarkChocoboScripts["Status Profile"]["Idades"][5] = "19" # pode ser colocado $DarkChocoboScripts["Status Profile"]["Idades"][6] = "16" # tanto em números $DarkChocoboScripts["Status Profile"]["Idades"][7] = "17" # quanto em parênteses $DarkChocoboScripts["Status Profile"]["Idades"][8] = 22 # sem nenhum problema # Cidades Natal $DarkChocoboScripts["Status Profile"]["Cidades Natal"] = [] $DarkChocoboScripts["Status Profile"]["Cidades Natal"][1] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][2] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][3] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][4] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][5] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][6] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][7] = "Desconhecido" $DarkChocoboScripts["Status Profile"]["Cidades Natal"][8] = "Desconhecido" # Oculpações $DarkChocoboScripts["Status Profile"]["Oculpações"] = [] $DarkChocoboScripts["Status Profile"]["Oculpações"][1] = "Personagem Principal" $DarkChocoboScripts["Status Profile"]["Oculpações"][2] = "Herói." $DarkChocoboScripts["Status Profile"]["Oculpações"][3] = "Herói." $DarkChocoboScripts["Status Profile"]["Oculpações"][4] = "Herói." $DarkChocoboScripts["Status Profile"]["Oculpações"][5] = "Herói." $DarkChocoboScripts["Status Profile"]["Oculpações"][6] = "Herói." $DarkChocoboScripts["Status Profile"]["Oculpações"][7] = "Herói." $DarkChocoboScripts["Status Profile"]["Oculpações"][8] = "Herói." # Descrições $DarkChocoboScripts["Status Profile"]["Descrições"] = [] $DarkChocoboScripts["Status Profile"]["Descrições"][1] = "Personagem principal do jogo, ele vai salvar o mundo do malvado "Vingador", que quer do-minar o mundo com seu diabólico plano criado pelo Cebolinha." $DarkChocoboScripts["Status Profile"]["Descrições"][2] = "Descrição." $DarkChocoboScripts["Status Profile"]["Descrições"][3] = "Descrição." $DarkChocoboScripts["Status Profile"]["Descrições"][4] = "Descrição." $DarkChocoboScripts["Status Profile"]["Descrições"][5] = "Descrição." $DarkChocoboScripts["Status Profile"]["Descrições"][6] = "Descrição." $DarkChocoboScripts["Status Profile"]["Descrições"][7] = "Descrição." $DarkChocoboScripts["Status Profile"]["Descrições"][8] = "Descrição." # Script (não mecher) class Window_Status < Window_Base alias dc_status_profile_refresh refresh def refresh1 dc_status_profile_refresh self.oy = -1 self.ox = 0 @refresh = 1 end def refresh2 self.contents.clear draw_actor_face(@actor, 8, 0) draw_actor_name(@actor, 4, 72) self.contents.font.color = system_color self.contents.draw_text(4, 100 + 32 * 0, 360, 32, $DarkChocoboScripts["Status Profile"]["Nome Completo"]) self.contents.font.color = normal_color self.contents.draw_text(4 + contents.text_size($DarkChocoboScripts["Status Profile"]["Nome Completo"]).width, 100 + 32 * 0, 360, 32, $DarkChocoboScripts["Status Profile"]["Nomes Completos"][@actor.id]) self.contents.font.color = system_color self.contents.draw_text(4, 100 + 32 * 1, 360, 32, $DarkChocoboScripts["Status Profile"]["Idade"]) self.contents.font.color = normal_color self.contents.draw_text(4 + contents.text_size($DarkChocoboScripts["Status Profile"]["Idade"]).width, 100 + 32 * 1, 360, 32, $DarkChocoboScripts["Status Profile"]["Idades"][@actor.id].to_s) self.contents.font.color = system_color self.contents.draw_text(4, 100 + 32 * 2, 360, 32, $DarkChocoboScripts["Status Profile"]["Cidade Natal"]) self.contents.font.color = normal_color self.contents.draw_text(4 + contents.text_size($DarkChocoboScripts["Status Profile"]["Cidade Natal"]).width, 100 + 32 * 2, 360, 32, $DarkChocoboScripts["Status Profile"]["Cidades Natal"][@actor.id]) self.contents.font.color = system_color self.contents.draw_text(4, 100 + 32 * 3, 360, 32, $DarkChocoboScripts["Status Profile"]["Oculpação"]) self.contents.font.color = normal_color self.contents.draw_text(4 + contents.text_size($DarkChocoboScripts["Status Profile"]["Oculpação"]).width, 100 + 32 * 3, 360, 32, $DarkChocoboScripts["Status Profile"]["Oculpações"][@actor.id]) self.contents.font.color = system_color self.contents.draw_text(4, 100 + 32 * 4, 360, 32, $DarkChocoboScripts["Status Profile"]["Descrição"]) self.contents.font.color = normal_color description = $DarkChocoboScripts["Status Profile"]["Descrições"][@actor.id].clone contents_x = 4 + self.contents.text_size($DarkChocoboScripts["Status Profile"]["Descrição"]).width contents_y = 100 + 32 * 4 + 4 while description != "" letter = description.slice!(/./m) unless letter == " " ;self.contents.draw_text(contents_x, contents_y, 40, 24, letter) letter_width = self.contents.text_size(letter).width contents_x += letter_width contents_y += 24 if contents_x >= 320; contents_x = 4 if contents_x >= 320 end end self.oy = 1 self.ox = 0 @refresh = 2 end def refresh if @refresh.nil? refresh1 else return @refresh end end end class Scene_Status < Scene_Base def update update_menu_background @status_window.update if Input.trigger?(Input:: Sound.play_cancel return_scene elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT) Sound.play_cursor next_actor while @status_window.contents_opacity > 0 Graphics.update @status_window.ox += 1 @status_window.contents_opacity -= 25 end @status_window.refresh == 1 ? @status_window.refresh1 : @status_window.refresh2 elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT) Sound.play_cursor prev_actor while @status_window.contents_opacity > 0 Graphics.update @status_window.ox -= 1 @status_window.contents_opacity -= 25 end @status_window.refresh == 1 ? @status_window.refresh1 : @status_window.refresh2 elsif Input.trigger?(Input::UP) return if @status_window.refresh == 1 Sound.play_cursor while @status_window.contents_opacity > 0 Graphics.update @status_window.oy -= 1 @status_window.contents_opacity -= 25 end @status_window.refresh == 1 ? @status_window.refresh2 : @status_window.refresh1 @status_window.oy = 8 while @status_window.contents_opacity < 255 Graphics.update @status_window.oy -= 1 @status_window.contents_opacity += 25 end elsif Input.trigger?(Input::DOWN) return if @status_window.refresh == 2 Sound.play_cursor while @status_window.contents_opacity > 0 Graphics.update @status_window.oy += 1 @status_window.contents_opacity -= 25 end @status_window.refresh == 1 ? @status_window.refresh2 : @status_window.refresh1 @status_window.oy = -8 while @status_window.contents_opacity < 255 Graphics.update @status_window.oy += 1 @status_window.contents_opacity += 25 end end super end end Incompatibilità: Incompatibilità con altri Script che modificano la scena dello Status.
-
Nome Script: Slow Motion Effect Versione: 1.0 Autore/i: Rafidelis Informazioni: Questo script ricrea un effetto rallentatore molto bello...può essere utile se usato ad esempio quando il PG è sotto effetto del veleno,o modificarlo per implementarlo in un sistema di corsa ^^ Funziona sia su XP sia su VX. Istruzioni: All'interno dello Script Script: #==============================================================================# # [RGSS/RGSS2] Slow Motion Versão 1.0 # #------------------------------------------------------------------------------# # $RafiScripts.by = Rafidelis(Rafis) # # $RafiScripts.version = 1.0 # # $RafiScripts.release_date = 28/12/09 (d/m/y) # # $RafiScripts.email = [email protected] or [email protected] # # $RafiScripts.website = www.ReinoRPG.com or www.ReinoRPG.com/forum # #==============================================================================# # [** $RafiScripts.desc **] // Sobre o Script / About Script # #------------------------------------------------------------------------------# # Este script foi primeiramente criado por Fênix,então crêditos a ele tambem. # # Na versão criada pelo Fenix,o script somente deixava a tela lenta e não # # exibia os'rastros dos sprites' dos eventos e do jogador na telas. # # Funciona no RPGMaker VX e no RPGMaker XP # #==============================================================================# # [** $RafiScripts.instr ] // Instruções / Instructions: # #------------------------------------------------------------------------------# # ? 1° - Colar acima do Main # # ? 2° - Edite a opção Effect_Only_In_Visible_Events na Linha 38 se desejar. # # ? 3° - Para ativar o efeito de slow_motion use no comando chamar script: # # $game_temp.slow_motion = true # # E para desativar o Efeito de slow motion quando ele estiver habilitado,use: # # $game_temp.slow_motion = false # # ? 4° - Para definir se o sprite do personagem jogavel vai sofrer o efeito do # # 'slow' motion,use: # # $game_temp.slow_motion_effect_in_player = valor # # valor deve ser true ou false,true ativa o efeito,e false desliga # # 5° - Para mudar o tempo de atualização da tela,durante o slow motion use: # # # $game_temp.slow_motion_time = valor # # valor deve ser um numero inteiro maior que 0,padrão = 4 # #==============================================================================# #==============================================================================# # [ ** Modulo necessarios para usar os Scripts Criados por Rafidelis ** ] # #==============================================================================# module Rafidelis #==============================================================================# # Rafidelis.add_script - Name : Name of Script - Version : Version of Script # #------------------------------------------------------------------------------# def self.add_script(name,version) $RafiScripts = [] if $RafiScripts.nil? $RafiScripts.push("Name : #{name} - Version: #{version}") $RafiScripts.compact! end #==============================================================================# # Rafidelis.script_exist? - Name : Name of Script - Version : Version of Script# #------------------------------------------------------------------------------# def self.script_exist?(name,version) $RafiScripts = [] if $RafiScripts.nil? return $RafiScripts.include?("Name : #{name} - Version: #{version}") end #==============================================================================# # Rafidelis.scripts - Return all scripts create by Rafidelis(RafiScripts) # #------------------------------------------------------------------------------# def self.scripts print $RafiScripts end #==============================================================================# # Rafidelis.create_txt - Create a .txt with all Rafidelis(RafiScripts) scripts # #------------------------------------------------------------------------------# def self.create_txt(filename="RafideliScripts") file = File.open("#{filename}.txt","wb") for i in 0...$RafiScripts.size file.write("#{$RafiScripts[i]}rn") end end #==============================================================================# # Modulo com Opções do Script de Slow Motion # #------------------------------------------------------------------------------# module Slow_Motion # Adicionando o Script ao Sistema.Não Modificar name = "Fenix Slow Motion - Edit" version = "1.0" Rafidelis.add_script(name,version) # Script adicionado ao Sistema. #=========================================================================== # Defina abaixo se o efeito de slow motion,terá efeito somente nos eventos # visiveis no mapa,ou se todos os eventos sofrerão o efeito de slow motion # false = todos os eventos sofrerão o efeito # true = somente os eventos viseveis no mapa sofrerão efeito # Recomendado deixar em true #=========================================================================== Effect_Only_In_Visible_Events = true #=========================================================================== # Tempo de 'Recriação dos Sprites' #=========================================================================== Time = 4 end end #==============================================================================# # Verificando se o script esta incluso no sistema # #==============================================================================# name = "Fenix Slow Motion - Edit" version = "1.0" if Rafidelis.script_exist?(name,version) class Game_Temp attr_accessor :slow_motion attr_accessor :slow_motion_time attr_accessor :slow_motion_effect_in_player #-------------------------------------------------------------------------- # Processamento Principal #-------------------------------------------------------------------------- alias slow_motion_initialize initialize def initialize @slow_motion = false @slow_motion_time = Rafidelis::Slow_Motion::Time @slow_motion_effect_in_player = true slow_motion_initialize end #-------------------------------------------------------------------------- # Slow Motion [img]http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/xd.gif[/img] #-------------------------------------------------------------------------- def slow_motion=(valor) return if @slow_motion == valor @slow_motion = valor $scene = Scene_Map.new if valor.is_a?(FalseClass) end end #============================================================================== # Scene_Map #------------------------------------------------------------------------------ # Esta classe processa a tela de Mapa # Aliases: # * main # * update #============================================================================== class Scene_Map include Rafidelis::Slow_Motion #-------------------------------------------------------------------------- # Processamento Principal #-------------------------------------------------------------------------- alias slow_motion_main main def main @sprites_slow_motion = [] @slow_motion_time = 0 slow_motion_main for sprite in @sprites_slow_motion next if sprite.disposed? sprite.opacity = 0 sprite.dispose end end #-------------------------------------------------------------------------- # Atualização do Frame #-------------------------------------------------------------------------- alias slow_motion_update update def update # Se o efeito estiver ligado if $game_temp.slow_motion # Se já chegou ao tempo limite if @slow_motion_time >= $game_temp.slow_motion_time Graphics.transition Graphics.freeze events = $game_map.events for i in events.keys if Effect_Only_In_Visible_Events and event_in_screen?(events[i]) sprite = Sprite_Character.new(nil, events[i]) @sprites_slow_motion.push(sprite) else sprite = Sprite_Character.new(nil, events[i]) @sprites_slow_motion.push(sprite) end end # Criando Sprite do Jogador @sprites_slow_motion.push(Sprite_Character.new(nil, $game_player)) if $game_temp.slow_motion_effect_in_player # Resetando o tempo @slow_motion_time = 0 # Deletando todos os sprites for sprite in @sprites_slow_motion next if sprite.disposed? sprite.opacity -= 100 sprite.dispose if sprite.opacity <= 0 end # Se ainda não deu o tempo else sprite = @sprites_slow_motion for i in 0...sprite.size next if sprite[i].nil? if sprite[i].disposed? sprite.delete_at(i) end end # Adicionando mais um ao tempo @slow_motion_time += 1 end else # Recriando a variavel @sprites_slow_motion = [] if @sprites_slow_motion != [] end slow_motion_update end #-------------------------------------------------------------------------- # Verificação se o evento esta na tela #-------------------------------------------------------------------------- def event_in_screen?(event) if event.screen_x >= 0 and event.screen_x <= 640 and event.screen_y >= 0 and event.screen_y <= 480 return true end return false end end end
-
Nome Script: Battle Backgrounds Versione: 1.00A Autore/i: Written by Synthesize Traduzione IT: Translated by Herupty for rpgmkr.net Informazioni: Questo script permette di cambiare lo sfondo di battaglia con uno diverso per ogni mappa Istruzioni: inserire sotto Materials Script: #=============================================================================== # Battle Backgrounds - RMVX #=============================================================================== # Written by Synthesize # Translated by Herupty for rpgmkr.net # January 20, 2008 # Version 1.00A #=============================================================================== # # * This script is untested. * # # * Edit: Lo script è stato testato da Herupty e funge* # #=============================================================================== module SynBattleB =begin Metti l'immagine di Background nella cartella 'Pictures' (Graphics/Pictures) Format = {id_mappa => Battleback Name} Es. 1 => "nomepicture" 1: id_mappa (NO GLI ZERI) =>: segno di ? (X-D) "nomepicture": il nome della picture nella cartella 'Pictures' =end Battle_background = { 1 => "Cascatella" , 11 => "Grottarocce", } #----------------------------------------------------------------------------- # Crea l' "ombra" sotto il gruppo di mostri? #----------------------------------------------------------------------------- Create_battlefloor = true #----------------------------------------------------------------------------- # This was being requested on quite a fe forums now, so I threw a quick script # together. It is nice and simple, and does what it is suppsoed to do. Once # RMVX is released in English, then I will add additional features into this. #----------------------------------------------------------------------------- end #------------------------------------------------------------------------------- # Battler #------------------------------------------------------------------------------- class Spriteset_Battle alias syn_create_battlefloor create_battlefloor #----------------------------------------------------------------------------- # Crea Sfondo #----------------------------------------------------------------------------- def create_battleback image = SynBattleB::Battle_background[$game_map.map_id] @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = Cache.picture(image) end def create_battlefloor @battlefloor_sprite = Sprite.new(@viewport1) syn_create_battlefloor if SynBattleB::Create_battlefloor == true end end #=============================================================================== # # Version 1.00A # January 20, 2008 # Written by Synthesize # Translated by Herupty for rpgmkr.net #=============================================================================== # # Battle Backgrounds - RMVX #===============================================================================
-
Nome Script: Jumping System Versione: 0.5 Autore/i: Ally Informazioni: Questo script permette di far saltare il PG disattivando o attivando la Switch ^^ Istruzioni: Inserite lo script sotto Material Script: #============================================================================== #------------------------------------------------------------------------------ # Questo script da la possibilità di far saltare il PG con il tasto Z (C) # Autore: Ally # www.rpgmkr.net #______________________________________________________________________________ # °ISTRUZIONI° # - Inserite lo script sotto Material # - Create una Switch settata su On o Off per disabilitare/attivare # l'evento salto # - Per cambiare l'ID della Switch fate riferimento a questo codice: # SWITCHSALTO = 2 # ============================================================================= # Script totalmente creato grazie agli script originali presenti su RMVX #============================================================================== #------------------------------------------------------------------------------ # ° SETTAGGIO TASTI° # Per cambiare il tasto con cui volete far saltare il PG, fate riferimento # a questo pezzo di script: if Input.press?(Input::C) # I tasti ve li elenco qui sotto: # A = Shift o Z # B = ESCO, X o Numero 0 # C = Spazio,Invio o C # X = A # Y = S # Z = D # Mancano la L e la R che a parer mio sono tasti troppo 'lontani' # da accomunare al tasto per saltare. #============================================================================== class Game_Player < Game_Character SWITCHSALTO = 2 # Switch che attiva/disattiva il salto alla pressione # del tasto Z alias_method :salto_move_by_input, :move_by_input def move_by_input salto_move_by_input if Input.press?(Input::C) and $game_switches[SWITCHSALTO] and movable? case @direction when 2 if passable?(@x,@y+2) unless collide_with_characters?(@x,@y+1) @y += 2 distance = 2 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end elsif passable?(@x,@y+1) @y += 1 distance = 1 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end when 4 if passable?(@x-2,@y) unless collide_with_characters?(@x-1,@y) @x -= 2 distance = 2 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end elsif passable?(@x-1,@y) @x -= 1 distance = 1 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end when 6 if passable?(@x+2,@y) unless collide_with_characters?(@x+1,@y) @x += 2 distance = 2 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end elsif passable?(@x+1,@y) @x += 1 distance = 1 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end when 8 if passable?(@x,@y-2) unless collide_with_characters?(@x,@y-1) @y -= 2 distance = 2 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end elsif passable?(@x,@y-1) @y -= 1 distance = 1 @jump_peak = 10 + distance - @move_speed @jump_count = @jump_peak * 2 @stop_count = 0 straighten end end end end end #======================================================== # Fine Script =) #======================================================== Incompatibilità: Per adesso non credo sia incompatibile con nessun'altro script,ma se trovate delle incompatibilità,correggerò lo script al fine di renderlo compatibile.
-
Nome Script: Player_Plus v1.0.3 Versione: 1.0.3 Autore/i: SojaBird Informazioni: Gli screenshots parlano da soli :sbav: Si possono usare oggetti come candele o torce per avere effetti di luce ^^ Screenshots: Istruzioni: Inserite lo script sotto Material. Script: #################################################################### # PlayerPlus v1.0.3 # By: SojaBird # Site: http://www.nestcast.blogspot.com # Description: PlayerPlus draws and updates a stay-on-player-picture. #################################################################### # Start Setup #################################################################### module SojaBird_PP Use = true # Wheter or not to draw the players extra [true/false]. Activate = 4 # The mode to activate the players extra [1=Switch, 2=Key, 3=Switch AND Key, 4=Switch OR Key]. Switch = 1 # Number of the switch to show and hide the players extra. Key = Input::F5 # Keyboard input to activate the players extra ["..."] Picture = "PlayerPlus" # Name of the picture of the players extra ["..."]. Blend = 0 # Blending mode of the players extra [0=Normal, 1=More, 2=Less]. Opacity = 255 # Opacity of the players extra [0-255]. X = 1 # Horizontal placement of the players extra [1=Center, 2=Left, 3=Right, 0=Custom]. Y = 1 # Vertical placement of the players extra [1=Center, 2=Head, 3=Feet, 0=Custom]. Custom_x = 0 # The custom horizontal placement of the players extra. Custom_y = 0 # The custom vertical placement of the players extra. FlickerX = 0 # Amount of horizontal flicker of the players extra [<2=No flicker, >1=Flicker]. FlickerY = 0 # Amount of the vertical flicker of the players extra [<2=No flicker, >1=Flicker]. FlickerOpacity = 0 # Amount of the opacity flicker of the players extra [<2=No flicker, >1=Flicker]. end #################################################################### # End Setup #################################################################### X_Extra = case SojaBird_PP::X when 1 # Center -(Cache.picture(SojaBird_PP::Picture).width / 2) when 2 # Left -Cache.picture(SojaBird_PP::Picture).width - 16 when 3 # Right Cache.picture(SojaBird_PP::Picture).width - 16 when 0 # Custom SojaBird_PP::Custom_x end Y_Extra = case SojaBird_PP::Y when 1 # Center -(Cache.picture(SojaBird_PP::Picture).height / 2) + 2 when 2 # Head -(Cache.picture(SojaBird_PP::Picture).height / 2) - 36 when 3 # Feet -2 when 0 # Custom SojaBird_PP::Custom_y end ############################## class Scene_Map < Scene_Base ############################## def start super $game_map.refresh @spriteset = Spriteset_Map.new @message_window = Window_Message.new $PlayerPlus = PlayerPlus.new end ############### def terminate super if $scene.is_a?(Scene_Battle) @spriteset.dispose_characters end snapshot_for_background @spriteset.dispose @message_window.dispose $PlayerPlus.dispose if $scene.is_a?(Scene_Battle) perform_battle_transition end end ############### def update super $game_map.interpreter.update $game_map.update $game_player.update $game_system.update @spriteset.update @message_window.update $PlayerPlus.update unless $game_message.visible update_transfer_player update_encounter update_call_menu update_call_debug update_scene_change end end ############### def update_transfer_player return unless $game_player.transfer? fade = (Graphics.brightness > 0) fadeout(30) if fade @spriteset.dispose $game_player.perform_transfer $game_map.autoplay $game_map.update Graphics.wait(15) @spriteset = Spriteset_Map.new $PlayerPlus.dispose $PlayerPlus = PlayerPlus.new fadein(30) if fade Input.update end ############################## end ############################## ############################################################ ############################## class PlayerPlus include SojaBird_PP ############################## def initialize if Use == true @pp_viewport = Viewport.new(0, 0, 544, 416) @pp = Sprite.new(@pp_viewport) @pp.bitmap = Cache.picture(Picture) @pp.opacity = Opacity @pp.blend_type = Blend end update end ############### def update if Use == true case Activate when 1 @pp.visible = $game_switches[Switch] when 2 @pp.visible = Input.press?(Key) when 3 if Input.press?(Key) and $game_switches[Switch] @pp.visible = true else @pp.visible = false end when 4 if Input.press?(Key) or $game_switches[Switch] @pp.visible = true else @pp.visible = false end end return if [email protected] @pp.opacity = Opacity - rand(FlickerOpacity) if @pp.x != $game_player.screen_x or @pp.y != $game_player.screen_y @pp.x = $game_player.screen_x + rand(FlickerX) + X_Extra @pp.y = $game_player.screen_y + rand(FlickerY) + Y_Extra end end end ############### def dispose if Use == true @pp_viewport.dispose @pp.dispose end end ############################## end ##############################
-
RPGMAKER VX ACE Problemi con la riflessione della magia
Ally replied to Kyusef's topic in Chiedi Aiuto alla Comunity
Utilizzi uno script? O ne hai creata una direttamente dal Database?- 2 replies
-
- assistenza
- aiuto
-
(and 7 more)
Taggato come:
-
Buon lavoro e buona moderazione @@Juunanagou =D
-
@@Monkey non ti preoccupare non è successo nulla ^^ Probabilmente hai votato quando è stata inserita la terza opzione (vedremo di risolvere per ripristinare i tuoi voti).. Per curiosità stavo guardando nello store, e ci sono le app IRC, quindi sarebbe comodissimo *_*
-
Come ben sapete, Makerando da a disposizione per l'Utenza, un proprio 'Hosting' interno per l'upload delle immagini... Ebbene, lo abbiamo aggiornato con un pò di modifiche ^^ Ora avete la possibilità, oltre che caricare le immagini da HD o da URL, di gestirle dopo averle caricate, e inoltre, ad ogni upload, vi si creeranno automaticamente i codici per inserire i link sul forum e così via... Il link ovviamente lo trovate nel menù (lo lascio linkato anche qui) =D http://www.makerando.com/forum/ihost Spero sia cosa gradita! Stay Tuned!
-
@@Monkey sicuro di aver cliccato per dare il voto?
-
Io sono vecchio stile, quindi tornare a una chat IRC mi darebbe una gioia immensa =D Trovo che la chat ancorata ai piedi del forum, può essere sostituita benissimo con i messaggi privati..