Últimos temas
» Script de menupor maxi Jue 04 Dic 2014, 1:44 pm
» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm
» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am
» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am
» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm
» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm
» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am
» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am
» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am
» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am
» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am
» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm
» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am
» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am
» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado Ninguno
El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm
varios scripts
+2
iwanax
assagrado52
6 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
varios scripts
primero voy a poner los mas simples q no nesesitan imagen ni nada
moverse en diagonal
ese muy bonito lo encontre hace una semanita vageando
nombre de mapa
ese es de mapa muy simple
ahora pa no llenar mucho el post este ultimo
barra hp y mp
ok listo luego edito o pongo otro post con mas
moverse en diagonal
- Código:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ ◆ Adjustable Speed & 8-Way Directional Movement - KGC_Dash_8DirMove ◆ VX ◆
#_/ ◇ Last Update: 2008/05/29 ◇
#_/ ◆ Translation and Updates by by Mr. Anonymous ◆
#_/-----------------------------------------------------------------------------
#_/ This script adds 8-way-directional movement and speed adjustment settings.
#_/ Note: Still need to finish documentation concerning 8DIR_ANIMATION
#_/=============================================================================
#_/ Install: Insert below KGC_TilesetExtension.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#==============================================================================#
# ★ Customization ★ #
#==============================================================================#
module KGC
module Dash_8DirMove
# ◆ 8-Way Directional Movement ◆
# true = Enables the character to move in diagonal directions.
# false = Disable diagonal movement, restricting the player to the default
# movement system of up, down, left, and right.
ENABLE_8DIR = true
# ◆ 8-Way Directional Animation ◆
# I believe this toggle is to allow the system to use 8-way directional
# animations for charactersets who have the additional cells to do so.
# By default an image with the additional frames should be suffixed with a #
ENABLE_8DIR_ANIMATION = false
# ◆ Walk Speed ◆
# Allows you to change the default rate of speed the actor walks.
# A DEFAULT_WALK_SPEED of 4 is the default RMVX walk speed.
DEFAULT_WALK_SPEED = 4
# ◆ Dash Speed ◆
# Allows you to change the default rate of speed the actor dashes.
# A DASH_SPEED_RATE of 3 is the default RMVX dash speed.
DASH_SPEED_RATE = 3
end
end
#------------------------------------------------------------------------------#
$imported = {} if $imported == nil
$imported["Dash_8DirMove"] = true
module KGC::Dash_8DirMove
# Image Suffix
SLANT_SUFFIX = "#"
end
#==============================================================================
# □ KGC::Commands
#==============================================================================
module KGC::Commands
module_function
#--------------------------------------------------------------------------
# ○ Reset Walk Speed
#--------------------------------------------------------------------------
def reset_walk_speed
$game_player.reset_move_speed
end
#--------------------------------------------------------------------------
# ○ Set Walk Speed
#--------------------------------------------------------------------------
def set_walk_speed(value)
$game_system.temp_walk_speed = value
end
#--------------------------------------------------------------------------
# ○ Set Dash Speed
#--------------------------------------------------------------------------
def set_dash_speed(value)
$game_system.temp_dash_speed = value
end
end
class Game_Interpreter
include KGC::Commands
end
#==============================================================================
# □ Game_System
# * Added by Mr. Anonymous 5/29/08
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# ● Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :temp_dash_speed # Temporary Dash Speed
attr_accessor :temp_walk_speed # Temporary Walk Speed
#--------------------------------------------------------------------------
# ● Initialize
#--------------------------------------------------------------------------
alias initialize_KGC_Dash_8DirMove initialize
def initialize
initialize_KGC_Dash_8DirMove
@temp_dash_speed = nil
@temp_walk_speed = nil
end
end
#==============================================================================
# ■ Game_Party
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# ○ Decrease Steps
#--------------------------------------------------------------------------
def decrease_steps
@steps -= 1
end
end
#==============================================================================
# ■ Game_Character
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# ○ Direction (8-Way Movement)
#--------------------------------------------------------------------------
def direction_8dir
return @direction
end
#--------------------------------------------------------------------------
# ● Set Direction
# direction : Directions
#--------------------------------------------------------------------------
alias set_direction_KGC_Dash_8DirMove set_direction
def set_direction(direction)
last_dir = @direction
set_direction_KGC_Dash_8DirMove(direction)
if !@direction_fix && direction != 0
@direction_8dir = direction
end
end
#--------------------------------------------------------------------------
# ● 左下に移動
#--------------------------------------------------------------------------
alias move_lower_left_KGC_Dash_8DirMove move_lower_left
def move_lower_left
move_lower_left_KGC_Dash_8DirMove
@direction_8dir = 1 unless @direction_fix
end
#--------------------------------------------------------------------------
# ● 右下に移動
#--------------------------------------------------------------------------
alias move_lower_right_KGC_Dash_8DirMove move_lower_right
def move_lower_right
move_lower_right_KGC_Dash_8DirMove
@direction_8dir = 3 unless @direction_fix
end
#--------------------------------------------------------------------------
# ● 左上に移動
#--------------------------------------------------------------------------
alias move_upper_left_KGC_Dash_8DirMove move_upper_left
def move_upper_left
move_upper_left_KGC_Dash_8DirMove
@direction_8dir = 7 unless @direction_fix
end
#--------------------------------------------------------------------------
# ● 右上に移動
#--------------------------------------------------------------------------
alias move_upper_right_KGC_Dash_8DirMove move_upper_right
def move_upper_right
move_upper_right_KGC_Dash_8DirMove
@direction_8dir = 9 unless @direction_fix
end
end
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias initialize_KGC_Dash_8DirMove initialize
def initialize
initialize_KGC_Dash_8DirMove
reset_move_speed
end
#--------------------------------------------------------------------------
# ○ 向き (8方向用)
#--------------------------------------------------------------------------
def direction_8dir
@direction_8dir = @direction if @direction_8dir == nil
return @direction_8dir
end
#--------------------------------------------------------------------------
# ○ 移動速度のリセット
#--------------------------------------------------------------------------
def reset_move_speed
@move_speed = KGC::Dash_8DirMove::DEFAULT_WALK_SPEED
$game_system.temp_dash_speed = nil
$game_system.temp_walk_speed = nil
end
if KGC::Dash_8DirMove::ENABLE_8DIR
#--------------------------------------------------------------------------
# ● 方向ボタン入力による移動処理
#--------------------------------------------------------------------------
def move_by_input
return unless movable?
return if $game_map.interpreter.running?
last_steps = $game_party.steps
case Input.dir8
when 1; move_down; move_left; @direction = 2
when 2; move_down
when 3; move_down; move_right; @direction = 6
when 4; move_left
when 6; move_right
when 7; move_up; move_left; @direction = 4
when 8; move_up
when 9; move_up; move_right; @direction = 8
else; return
end
@direction_8dir = Input.dir8
# 2歩進んでいたら1歩戻す
if $game_party.steps - last_steps == 2
$game_party.decrease_steps
end
end
end # ENABLE_8DIR
#--------------------------------------------------------------------------
# ● Upate Movement
#--------------------------------------------------------------------------
def update_move
distance = 2 ** @move_speed # 移動速度から移動距離に変換
if dash? # ダッシュ状態なら速度変更
distance *= KGC::Dash_8DirMove::DASH_SPEED_RATE
#--------------------------------------------------------------------
# ● Process Temp Walk/Dash Speed
# * Added by Mr. Anonymous 5/29/08
#--------------------------------------------------------------------
if $game_system.temp_dash_speed == nil
@move_speed = KGC::Dash_8DirMove::DASH_SPEED_RATE
else
@move_speed = $game_system.temp_dash_speed
end
else
if $game_system.temp_walk_speed == nil
@move_speed = KGC::Dash_8DirMove::DEFAULT_WALK_SPEED
else
@move_speed = $game_system.temp_walk_speed
# Automatically adjust move frequency to move speed.
=begin
if $game_system.temp_walk_speed <= 4
@move_frequency = 6
elsif $game_system.temp_walk_speed == 3
@move_frequency = 5
elsif $game_system.temp_walk_speed == 2
@move_frequency = 3
elsif $game_system.temp_walk_speed == 1
@move_frequency = 3
end
=end
end
#--- End 5/29/08 Update
end
distance = Integer(distance)
@real_x = [@real_x - distance, @x * 256].max if @x * 256 < @real_x
@real_x = [@real_x + distance, @x * 256].min if @x * 256 > @real_x
@real_y = [@real_y - distance, @y * 256].max if @y * 256 < @real_y
@real_y = [@real_y + distance, @y * 256].min if @y * 256 > @real_y
update_bush_depth unless moving?
if @walk_anime
@anime_count += 1.5
elsif @step_anime
@anime_count += 1
end
end
end
#==============================================================================
# ■ Sprite_Character
#==============================================================================
if KGC::Dash_8DirMove::ENABLE_8DIR_ANIMATION
class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# ○ 定数
#--------------------------------------------------------------------------
SLANT_ANIME_TABLE = { 1=>2, 3=>6, 7=>4, 9=>8 }
#--------------------------------------------------------------------------
# ● 転送元ビットマップの更新
#--------------------------------------------------------------------------
alias update_bitmap_KGC_Dash_8DirMove update_bitmap
def update_bitmap
name_changed = (@character_name != @character.character_name)
update_bitmap_KGC_Dash_8DirMove
if @tile_id > 0 # タイル画像使用
@enable_slant = false
return
end
return unless name_changed # 画像名変化なし
# 斜め移動アニメ有効判定
@enable_slant = true
begin
@character_name_slant = @character_name + KGC::Dash_8DirMove::SLANT_SUFFIX
Cache.character(@character_name_slant)
rescue
@enable_slant = false
end
end
#--------------------------------------------------------------------------
# ● 転送元矩形の更新
#--------------------------------------------------------------------------
alias update_src_rect_KGC_Dash_8DirMove update_src_rect
def update_src_rect
return if @tile_id > 0 # タイル画像
if @enable_slant
update_src_rect_for_slant
else
update_src_rect_KGC_Dash_8DirMove
end
end
#--------------------------------------------------------------------------
# ○ 斜め移動用転送元矩形の更新
#--------------------------------------------------------------------------
def update_src_rect_for_slant
index = @character.character_index
pattern = @character.pattern < 3 ? @character.pattern : 1
sx = (index % 4 * 3 + pattern) * @cw
dir = @character.direction_8dir
case dir % 2
when 0 # 上下左右
if @last_slant
self.bitmap = Cache.character(@character_name)
@last_slant = false
end
else # 斜め
unless @last_slant
self.bitmap = Cache.character(@character_name_slant)
@last_slant = true
end
# Convert 1, 3, 7, 9 を 2, 6, 4, 8
dir = SLANT_ANIME_TABLE[dir]
end
sy = (index / 4 * 4 + (dir - 2) / 2) * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
end
end # ENABLE_8DIR_ANIMATION
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ The original untranslated version of this script can be found here:
# http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/map&tech=dash_8dir_move
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
ese muy bonito lo encontre hace una semanita vageando
nombre de mapa
- Código:
#=================================================================#
#=================================================================#
# #*****************# Muestra en nombre del mapa en que #
# #*** By Falcao ***# se encuentra el jugador con efecto #
# #*****************# animado de fade. #
# RMVX V 1.1 #
# mundodeluxe.mforos.com #
#=================================================================#
module Fal_map_name
#------------------------------------------------------------------
# Interruptor que desabilita la ventana de nombre
Disable_window = 50
#------------------------------------------------------------------
# Cambiar posision de muestra de la ventana, se lee de la sigiente
# manera, cambiar del 1 al 2
#
# 1 = posision frontal, es la que esta por defecto
# 2 = se muestra al lado inferir izquierdo
Change_posision = 1
#------------------------------------------------------------------
# Desabilitar nombre de mapa en mapas espesificos, por ejemplo al
# entrar a una casa no mostrar el nombre de mapa. basta con poner
# el ID del mapa entre los corchetes separando cada ID con una coma
# quiedaria asi: Mapaid_Disables = [1,2,5,9] los numeros son los
# ID de mapas especificados.
Mapaid_Disables = [ ]
#------------------------------------------------------------------
# Tiempo para desaparecer la ventana de nombre
Fade_time = 140
#------------------------------------------------------------------
end
class Window_Nmap < Window_Base
def initialize
super(185, -70, 190, 50)
self.opacity = 200
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 20
data = load_data("Data/MapInfos.rvdata")
self.contents.draw_text(0, -7, 150, 32, data[$game_map.map_id].name, 2)
end
end
class Game_System
attr_accessor :fade_time
alias falcao_fading_initialize initialize
def initialize
@fade_time = 0
falcao_fading_initialize
end
end
class Scene_Map
include Fal_map_name
alias falcaoVX_Mname_main main
def main
@map_name = Window_Nmap.new
if $game_switches[Disable_window] == false
@map_name.visible = true
else
@map_name.visible = false
end
if Fal_map_name::Mapaid_Disables.include?($game_map.map_id)
@map_name.visible = false
end
if Change_posision == 2
@map_name.x = -200; @map_name.y = 300
end
falcaoVX_Mname_main
@map_name.dispose
end
alias falcaoVX_Mname_update update
def update
if $game_switches[Disable_window] == false
@map_name.visible = true
else
@map_name.visible = false
end
if Fal_map_name::Mapaid_Disables.include?($game_map.map_id)
@map_name.visible = false
end
@map_name.y += 2 if @map_name.y < 0 and Change_posision <= 1
@map_name.x += 5 if @map_name.x < -4 and Change_posision >= 2
if $game_system.fade_time == Fade_time
@map_name.y -= 3 if @map_name.y > -90 and Change_posision <= 1
@map_name.x -= 7 if @map_name.x < 20 and Change_posision >= 2
@map_name.contents_opacity -= 5
@map_name.opacity -= 5
else
$game_system.fade_time += 1
end
falcaoVX_Mname_update
end
alias falcao_transfer_player update_transfer_player
def update_transfer_player
@map_name.refresh
return unless $game_player.transfer?
@map_name.contents_opacity = 255; @map_name.opacity = 200
if Change_posision <= 1
@map_name.x = 185; @map_name.y = -70
elsif Change_posision >= 2
@map_name.x = -200; @map_name.y = 300
end
$game_system.fade_time = 0
falcao_transfer_player
end
end
ese es de mapa muy simple
ahora pa no llenar mucho el post este ultimo
barra hp y mp
- Código:
class HUD < Sprite
#Inicia
def initialize(view)
super(view)
#Cria as cores
@ch1 = Color.new(80,0,0)
@ch2 = Color.new(240,0,0)
@cm1 = Color.new(14,80,80)
@cm2 = Color.new(14,240,240)
@back = Color.new(20,20,20)
@back2 = Color.new(240,240,0)
#Cria o Bitmap
self.bitmap = Bitmap.new(200,200)
self.bitmap.font.name = "UmePlus Gothic"
self.bitmap.font.size = 20
self.z = 300
update
end
#Atualiza
def update
super
#Apaga o conteudo
self.bitmap.clear
#Cria a barra de HP
hp = $game_actors[1].hp
maxhp = $game_actors[1].maxhp
wb = 116 * hp / maxhp
self.bitmap.fill_rect(10, 10, 120, 10, @back)
self.bitmap.fill_rect(11, 11, 118, 8, @back2)
self.bitmap.fill_rect(12, 12, 116, 6, @back)
self.bitmap.gradient_fill_rect(12, 12, wb, 6, @ch1, @ch2)
self.bitmap.draw_text(10, 0, 200, 24, "HP")
#Cria a barra de MP
mp = $game_actors[1].mp
maxmp = $game_actors[1].maxmp
wb = 116 * mp / maxmp
self.bitmap.fill_rect(10, 30, 120, 10, @back)
self.bitmap.fill_rect(11, 31, 118, 8, @back2)
self.bitmap.fill_rect(12, 32, 116, 6, @back)
self.bitmap.gradient_fill_rect(12, 32, wb, 6, @cm1, @cm2)
self.bitmap.draw_text(10, 20, 200, 24, "MP")
end
def dispose
self.bitmap.dispose
super
end
end
#Instala o HUD
class Spriteset_Map
alias :or_initialize :initialize
def initialize
@hud = HUD.new(@viewport2)
or_initialize
end
alias :or_update :update
def update
@hud.update
or_update
end
alias :or_dispose :dispose
def dispose
@hud.dispose
or_dispose
end
end
ok listo luego edito o pongo otro post con mas
assagrado52- 0
-
32
8
9
1
Re: varios scripts
no decia donde paraece pero
ya ta
che me tira error el de nombre de mapa en la linea 94
ya ta
che me tira error el de nombre de mapa en la linea 94
iwanax- 130
-
33
216
275
-5
Re: varios scripts
no borres el main sino que ponlo en una fila encima
bobokukemon- 50
-
28
111
73
4
Extras
Sobre mí:: No os lo creereis...pero me acabo de caer de la silla
Re: varios scripts
no borres el main sino que ponlo en una fila encima
exacto tienes q poner boton derecho encima de main y luego insertar y listo
assagrado52- 0
-
32
8
9
1
Re: varios scripts
esta bueno el script de barras de hp y mp pero tengo una pregunta no ay una forma de apagarlas por que no se leer muy bien scripts pero yo no vi ninguna por eso pregunto y si hay me podrias ayudar?
cerberuz- 15
-
32
24
41
7
Extras
Sobre mí::
Re: varios scripts
Gracias. [Tienes que estar registrado y conectado para ver esa imagen]
juanzerox88- 15
-
28
21
27
0
Re: varios scripts
cerberuz escribió:esta bueno el script de barras de hp y mp pero tengo una pregunta no ay una forma de apagarlas por que no se leer muy bien scripts pero yo no vi ninguna por eso pregunto y si hay me podrias ayudar?
Mediante interruptores
TigreX- 500
-
26
1214
1679
105
Extras
Sobre mí::
Temas similares
» Scripts: varios nombres para el mapa...
» Scripts KGC
» 6 scripts en 1 (+ informacion)
» 3 scripts muy buenos :)
» KGC scripts library
» Scripts KGC
» 6 scripts en 1 (+ informacion)
» 3 scripts muy buenos :)
» KGC scripts library
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.