Battle Maker

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte para criação de Jogos


2 participantes

    Light Effects VX

    Vejeta
    Vejeta
    Membro
    Membro


    Mensagens : 7
    Credibilidade : 3

    Light Effects VX Empty Light Effects VX

    Mensagem por Vejeta Dom Jun 20, 2010 1:23 am

    Light Effects VX
    por Kylock

    Introdução

    Deixe seus mapas mais bonitos e iluminados, com diferentes estilos de luzes e efeitos de brilho.
    Muito simples.

    Características

    Este é um otimo script, para quem gosta de jogos criar seus jogos com mais realidade.

    Como usar

    Cole o script acima do main.
    IMPOTANTE:
    Cole esta imagem na pasta pictures:
    Light Effects VX Luzg

    Escolha em evento que deseja iluminar.
    Nele, adicione um comentário (ultima opção da primeira coluna da primeira pagina de eventos)
    Neste comentário escreva um dos 13 comandos:
    Esta versão posssui 13 diferentes tipos de iluminação
    Código:
    GROUND - Médio alcance e luz branca.
    [color=red]FIRE[/color]  - Luz vermelha que oscila levemente.
    LIGHT  - Alcance curto e luz branca.
    LIGHT2 - Longo alcance e luz branca.
    [color=red]TORCH[/color]  - Grande luz vermelha com muita oscilação.
    [color=red]TORCH2[/color] - Grande luz vermelha que oscila levemente.
    [color=blue]XENON[/color]  - Alcançe médio, luz azul imitando Xenon.
    [color=red]BLOOD[/color]  - Luz vermelho-sangue de alcançe médio, ideal para jogos de terror!
    [color=green]GREEN[/color]  - Luz verde de médio alcançe.
    WHITE  - Luz branca de médio alcançe, porém mais forte que GROUND e LIGHT.
    [color=green]CYAN[/color]    - Alcançe médio, cor verde piscina e um tanto forte.
    [color=pink]PINK[/color]    - Cor rosa , de médio alcançe.
    [color=yellow]YELLOW[/color]  - Luz forte de médio alcançe de cor amarela.

    Script
    Código:
    #==============================================================================
    #========================== Light Effects VX 2.0 ==============================
    #------------------------------------------------------------------------------
    #  Script de: Kylock (originalmente para RMXP por Near Fantastica)
    #  Tradução por Equipe Gemstone
    #  Novos modos de luz da versão 2.0 por Kbça
    #==============================================================================
    #  Para fazer com que um evento brilhe, escreva um Comentário: com qualquer um
    #                dos modos de luz suportados abaixo.
    #=============================== Versões ======================================
    # 1.0 - Lançamento original
    # 1.1 - Novos modos de luz adicionados: LIGHT2, TORCH, TORCH2.
    #    - Mudou o modo de blend do sprite para Adicionar (parece um pouco melhor).
    #    - Luzes de fogo agora estão com tonalidade vermelha.
    # 2.0 - Novos modos de luz adicionados: (by Kbça)
    #      XENON, BLOOD, GREEN, WHITE, CYAN, PINK e YELLOW
    #============================= Modos de Luz ====================================
    #  GROUND - Médio alcance e luz branca.
    #  FIRE  - Luz vermelha que oscila levemente.
    #  LIGHT  - Alcance curto e luz branca.
    #  LIGHT2 - Longo alcance e luz branca.
    #  TORCH  - Grande luz vermelha com muita oscilação.
    #  TORCH2 - Grande luz vermelha que oscila levemente.
    #  XENON  - Alcançe médio, luz azul imitando Xenon.
    #  BLOOD  - Luz vermelho-sangue de alcançe médio, ideal para jogos de terror!
    #  GREEN  - Luz verde de médio alcançe.
    #  WHITE  - Luz branca de médio alcançe, porém mais forte que GROUND e LIGHT.
    #  CYAN  - Alcançe médio, cor verde piscina e um tanto forte.
    #  PINK  - Cor rosa, de médio alcançe.
    #  YELLOW - Luz forte de médio alcançe de cor amarela.
    #==============================================================================
    # Altere aqui o ID do switch, se o switch esteja em ON os efeitos são desligados
    Le_Switch = 13
    #==============================================================================

    class Spriteset_Map
      alias les_spriteset_map_initalize initialize
      alias les_spriteset_map_dispose dispose
      alias les_spriteset_map_update update
      def initialize
        @light_effects = []
        setup_lights
        les_spriteset_map_initalize
        update
      end
      def dispose
        les_spriteset_map_dispose
        for effect in @light_effects
          effect.light.dispose
        end
        @light_effects = []
      end
      def update
        les_spriteset_map_update
        update_light_effects
      end
      def setup_lights
        for event in $game_map.events.values
          next if event.list == nil
          for i in 0...event.list.size
            if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"]
              type = "GROUND"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 100
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"]
              type = "FIRE"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 300 / 100.0
              light_effects.light.zoom_y = 300 / 100.0
              light_effects.light.opacity = 100
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"]
              type = "LIGHT"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 1
              light_effects.light.zoom_y = 1
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"]
              type = "LIGHT2"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 6
              light_effects.light.zoom_y = 6
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"]
              type = "TORCH"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 6
              light_effects.light.zoom_y = 6
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"]
              type = "TORCH2"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 6
              light_effects.light.zoom_y = 6
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["XENON"]
              type = "XENON"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["BLOOD"]
              type = "BLOOD"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["GREEN"]
              type = "GREEN"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 150
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["WHITE"]
              type = "WHITE"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 180
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["CYAN"]
              type = "CYAN"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 180
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["PINK"]
              type = "PINK"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 180
              @light_effects.push(light_effects)
            end
            if event.list[i].code == 108 and event.list[i].parameters == ["YELLOW"]
              type = "YELLOW"
              light_effects = Light_Effect.new(event,type)
              light_effects.light.zoom_x = 2
              light_effects.light.zoom_y = 2
              light_effects.light.opacity = 180
              @light_effects.push(light_effects)
            end
          end
        end
        for effect in @light_effects
          case effect.type
          when "GROUND"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.blend_type = 1
          when "FIRE"
            effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
            effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
            effect.light.tone = Tone.new(255,-100,-255,  0)
            effect.light.blend_type = 1
          when "LIGHT"
            effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
            effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
            effect.light.blend_type = 1
          when "LIGHT2"
            effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
            effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
            effect.light.blend_type = 1
          when "TORCH"
            effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
            effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(255,-100,-255,  0)
            effect.light.blend_type = 1
          when "TORCH2"
            effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
            effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(255,-100,-255,  0)
            effect.light.blend_type = 1
          when "XENON"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(-200,-200,255,  0)
            effect.light.blend_type = 1
          when "BLOOD"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(255,-230,-230,  0)
            effect.light.blend_type = 1
          when "GREEN"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(-150,255,-150,  0)
            effect.light.blend_type = 1
          when "WHITE"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(255,255,255,  0)
            effect.light.blend_type = 1
          when "CYAN"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(-255,0,0,  0)
            effect.light.blend_type = 1
          when "PINK"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(0,-255,0,  0)
            effect.light.blend_type = 1
          when "YELLOW"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
            effect.light.tone = Tone.new(0,0,-255,  0)
            effect.light.blend_type = 1
          end
        end
      end
      def update_light_effects
        if $game_switches[Le_Switch]
          for effect in @light_effects
            next if effect.type == "FIRE" || effect.type == "TORCH"
            effect.light.visible = false
          end
        else
          for effect in @light_effects
            next if effect.type == "FIRE" || effect.type == "TORCH"
            effect.light.visible = true
          end
        end
        for effect in @light_effects
          case effect.type
          when "GROUND"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "FIRE"
            effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
            effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
            effect.light.opacity = rand(10) + 90
          when "LIGHT"
            effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
            effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
          when "LIGHT2"
            effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
            effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
          when "TORCH"
            effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20 + rand(20) - 10
            effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8 + rand(20) - 10
            effect.light.opacity = rand(30) + 70
          when "TORCH2"
            effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
            effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
            effect.light.opacity = rand(10) + 90
          when "XENON"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "BLOOD"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "GREEN"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "WHITE"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "CYAN"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "PINK"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          when "YELLOW"
            effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
            effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
          end
        end
      end
    end

    class Light_Effect
      attr_accessor :light
      attr_accessor :event
      attr_accessor :type
      def initialize(event, type)
        @light = Sprite.new
        @light.bitmap = Cache.picture("le.png")
        @light.visible = true
        @light.z = 1000
        @event = event
        @type = type
      end
    end

    Créditos
    Por criar: Kylock
    Incrementado por: Kbça
    Disponibilizado por: Viking
    bruce-lee
    bruce-lee
    Membro Experiente
    Membro Experiente


    Mensagens : 84
    Credibilidade : 2

    Light Effects VX Empty Re: Light Effects VX

    Mensagem por bruce-lee Sáb Jul 10, 2010 3:25 pm

    Muito legal esse script, eu ja vi um desse só que era para XP

      Data/hora atual: Qui Mar 28, 2024 8:02 pm