Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker
Olá, visitante!
Seja bem-vindo ao fórum Arena RPG Maker, caso queira aprender sobre criação de jogos, está no fórum certo. Esperamos que possa aprender tanto quanto possa nos ensinar aqui.

Atenciosamente,
Equipe Arena RPG Maker.
Arena RPG Maker

Estamos de volta o/ ... Ou não.Eu amo a -Dark
Doações para o fórum abertas, clique aqui e saiba mais.
Últimos assuntos
» Ainda temos gente aqui?
Anti-Lag VX - Game Baker EmptyQui 25 Nov 2021, 14:04 por Halt

» [Dúvida] Como tirar a porcentagem de esquiva
Anti-Lag VX - Game Baker EmptySex 19 Nov 2021, 17:14 por Halt

» Pokémon Genesis Online! (PGO)
Anti-Lag VX - Game Baker EmptyQua 05 Jul 2017, 18:08 por Lexar

» Tileset Converter to MV
Anti-Lag VX - Game Baker EmptySex 12 maio 2017, 14:07 por Douggi

» Pack Resources, Sprites e etc
Anti-Lag VX - Game Baker EmptyQua 23 Dez 2015, 12:30 por raydengv

» Download RPG Maker 2003 + RTP em português
Anti-Lag VX - Game Baker EmptyTer 22 Dez 2015, 11:14 por ::KimMax::

» Fantasy Art Online
Anti-Lag VX - Game Baker EmptyDom 18 Out 2015, 18:42 por daviih123

» Você vai ter medo do Nerve gear?
Anti-Lag VX - Game Baker EmptySáb 25 Jul 2015, 17:02 por Kirito-kun

» O Barato é louco
Anti-Lag VX - Game Baker EmptySáb 27 Jun 2015, 16:26 por Halt

» Download RPG Maker 2000 + RTP em português
Anti-Lag VX - Game Baker EmptyQui 21 maio 2015, 20:28 por Wismael


Você não está conectado. Conecte-se ou registre-se

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

1Script Anti-Lag VX - Game Baker Qui 22 Nov 2012, 18:47

Tiaguu

Tiaguu
Membro - semi experiente
Membro - semi experiente
Anti-Lag VX - Game Baker
Por: GameBaker


Introdução

Este Script evita a causa de Lag no jogo.
Testado com mais de 300 Eventos e com um Mapa de 500x500.

Características

Este Script evita Lag no jogo, ou seja, Bug's no jogo.


Screenshots

Não precisa.

Como usar


Abra o ''Editor de Scripts''.
Cole este Script em ''▼ Scripts Adicionais''


Demo

Não necessita.


Script

Código:
#==========================================================================
# * GameBaker Anti-Event Lag
#==========================================================================
# by sandgolem
#  Concept based on Near Fantastica's original RMXP script
#
# Still a beta version, still the looping bug
#
# Version 3 [VX]
# February 22nd, 2008
#==========================================================================

module GameBaker
  AntiLagDisable = 0
  AntiLagModifierX = 408
  AntiLagModifierWidth = 272
  AntiLagModifierY = 272
  AntiLagModifierHeight = 408
  AntiLagAlwaysMove = '&'
end

#==========================================================================
#
# To check for updates or find more scripts, visit:
#      http://www.gamebaker.com/rmvx/scripts/
# Our RMXP scripts: http://www.gamebaker.com/rmxp/scripts/
#
# This script is not exclusive to our site!
# Feel free to pass around as long as you leave the links here.
# A license is required for commercial use, see instructions below.
#
# Instructions: http://www.gamebaker.com/rmvx/scripts/e/anti-event-lag.php
# Discussion/Help: http://forums.gamebaker.com/showthread.php?t=1242
#
#==========================================================================

class Game_CommonEvent
  alias gamebaker_antilag_commonrefresh refresh
  def refresh
    gamebaker_antilag_commonrefresh
    gamebaker_antilag_add if @interpreter
    gamebaker_antilag_remove if !@interpreter
  end
 
  def gamebaker_antilag_remove
    return if !$game_map.gb_antilagcommons.include?(@common_event_id)
    $game_map.gb_antilagcommons -= [@common_event_id]
  end
 
  def gamebaker_antilag_add
    return if $game_map.gb_antilagcommons.include?(@common_event_id)
    $game_map.gb_antilagcommons += [@common_event_id]
  end
end

class Game_Event
  def force_move_route(move_route)
    super(move_route)
    if $game_map.gb_antilagnonmove.include?(@id)
      $game_map.gb_antilagnonmove -= [@id]
      $game_map.gb_antilagmoveevents += [@id]
    end
  end 
 
  alias gamebaker_antilag_init initialize
  def initialize(map_id, event)
    gamebaker_antilag_init(map_id, event)
    if event.name.include?(GameBaker::AntiLagAlwaysMove)
      $game_map.gb_antilagmove += [@id]
    end
  end
 
  alias gamebaker_antilag_evsetup setup
  def setup(new_page)
    gamebaker_antilag_evsetup(new_page)
    if @trigger == 3 or @trigger == 4
      start if @trigger == 3
      if !$game_map.gb_antilagprocess.include?(@id)
        $game_map.gb_antilagprocess += [@id]
      end
    elsif $game_map.gb_antilagprocess.include?(@id)
      $game_map.gb_antilagprocess -= [@id]
    end
    if @character_name == "" && @tile_id == 0
      if !$game_map.gb_antilagnosprite.include?(@id)
        $game_map.gb_antilagnosprite += [@id]
      end
    elsif $game_map.gb_antilagnosprite.include?(@id)
      $game_map.gb_antilagnosprite -= [@id]
    end
    if @move_type == 0 && !@step_anime &&
      !$game_map.gb_antilagnonmove.include?(@id)
      $game_map.gb_antilagnonmove += [@id]
    elsif $game_map.gb_antilagnonmove.include?(@id)
      $game_map.gb_antilagnonmove -= [@id]
    end
  end
 
  def gamebaker_antilag_interupdate
    if @interpreter != nil
      unless @interpreter.running?
        @interpreter.setup(@list, @event.id)
      end
      @interpreter.update
    end
  end
 
  def update
    super
  end
end

class Game_Map
  attr_accessor :gb_antilagcommons, :gb_antilagnonmove, :gb_antilagnosprite,
    :gb_antilagmoveevents, :gb_antilagmove, :gb_antilagprocess,
    :gb_antilagspriteevents, :gb_antilag_spriteupdate
 
  def gamebaker_antilag?(sg)
    return false if sg.real_x < @gb_antilagscreen_x or
                    sg.real_x > @gb_antilagscreen_width or
                    sg.real_y < @gb_antilagscreen_y or
                    sg.real_y > @gb_antilagscreen_height
    return true
  end
 
  alias gamebaker_antilag_setupev setup_events
  def setup_events
    gamebaker_antilag_getscreen
    @gb_antilagnonmove = []
    @gb_antilagmove = []
    @gb_antilagnosprite = []
    @gb_antilagprocess = []
    @gb_antilagcommons = [] if !@gb_antilagcommons
    gamebaker_antilag_setupev
    gamebaker_antilag_refresh_events
  end
 
  def gamebaker_antilag_getscreen
    @gb_antilagscreen_x = @display_x - GameBaker::AntiLagModifierX
    @gb_antilagscreen_y = @display_y - GameBaker::AntiLagModifierY
    @gb_antilagscreen_width =
      @display_x + (Graphics.width * 8) + GameBaker::AntiLagModifierWidth
    @gb_antilagscreen_height =
      @display_y + (Graphics.height * 8) + GameBaker::AntiLagModifierHeight
  end
 
  def gamebaker_antilag_refresh_events
    @gb_antilagalwaysmove = []
    @gb_antilagmoveevents = []
    @gb_antilagspriteevents = []
    for i in @events.values
      next if @gb_antilagnosprite.include?(i)
      @gb_antilagspriteevents += [i]
    end
    @gb_antilagspriteevents += [$game_player]
    for vehicle in $game_map.vehicles
      next if vehicle.map_id != @map_id
      @gb_antilagspriteevents += [vehicle]
    end
    for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
      @gb_antilagalwaysmove += [@events[@gb_antilagmove[i]].id]
    end
    for i in @events.values
      next if @gb_antilagnonmove.include?(i.id)
      next if @gb_antilagmove.include?(i.id)
      @gb_antilagmoveevents += [i.id]
    end
    @gb_antilag_spriteupdate = true
  end
 
  alias gamebaker_antilag_ue update_events
  def update_events
    return gamebaker_antilag_ue if $game_switches[GameBaker::AntiLagDisable]
    gamebaker_antilag_getscreen
    for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
      @events[@gb_antilagprocess[i]].gamebaker_antilag_interupdate
    end
    for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
      @events[@gb_antilagalwaysmove[i]].update
    end
    for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
      j = @gb_antilagmoveevents[i]
      @events[j].update if gamebaker_antilag?(@events[j])
    end
    for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
      @common_events[@gb_antilagcommons[i]].update
    end
  end
 
  alias gamebaker_antilag_maprefresh refresh
  def refresh
    gamebaker_antilag_maprefresh
    gamebaker_antilag_refresh_events
  end
end

class Game_Vehicle; attr_accessor :map_id; end

class Spriteset_Map
  def gamebaker_antilag_characters
    @gb_antilag_eventsprites = []
    for sprite in @character_sprites
      next if !$game_map.gb_antilagspriteevents.include?(sprite.character)
      @gb_antilag_eventsprites += [sprite]
    end
    $game_map.gb_antilag_spriteupdate = nil
  end
 
  alias gamebaker_antilag_uc update_characters
  def update_characters
    return gamebaker_antilag_uc if $game_switches[GameBaker::AntiLagDisable]
    gamebaker_antilag_characters if $game_map.gb_antilag_spriteupdate
    for sprite in @gb_antilag_eventsprites
      sprite.update if $game_map.gamebaker_antilag?(sprite.character)
    end
  end
end

#==========================================================================
# End of file! You can find more of our scripts at http://www.gamebaker.com
#==========================================================================

Perguntas Frequentes

Este Script funciona no XP?
Não, porque ele já existe para XP.

Créditos e Agradecimentos

Game Baker

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos