PlatinuMie Foro sobre juegos rol, anime, rpg maker y mas |
|
| 4scripts de batalla para xp | |
| | Autor | Mensaje |
---|
Mie-Noir-ForPlatinum- HinataHokage -Admin-
Mensajes : 92 Fecha de inscripción : 12/09/2008 Edad : 30 Localización : With my love..
Hoja de personaje Personaje: (100/100) Nombre: Hatake Kanashi Raza: Elfo/a
| Tema: 4scripts de batalla para xp Sáb Sep 13, 2008 11:55 am | |
| Bien aqui pondre 4 scripts para empesar bien , aqui no se puede postear .Si quereis algun script en especial pedidlo en su foro 1:CREADOR:?? 2:SACADO DE: MUNDO DELUXE Este script sirve para ver el pv y el pm del enemigo tambien el estado. Creen una clase arriba de main y pongan esto: - Spoiler:
- Código:
-
#------------------------------------------------------------------------------ # Script Barras Hp y Sp del Enemigo #------------------------------------------------------------------------------
class Window_Help < Window_Base def set_enemy(actor) self.contents.clear draw_actor_name(actor, 4, 0) draw_actor_state(actor, 140, 0) carol3_draw_hp_bar(actor, 284, 0) carol3_draw_sp_bar(actor, 460, 0) @text = nil self.visible = true end def carol3_draw_hp_bar(actor, x, y, width = 128) self.contents.font.color = system_color self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255)) w = width * actor.hp / actor.maxhp self.contents.fill_rect(x, y+18, w,1, Color.new(255, 96, 96, 255)) self.contents.fill_rect(x, y+19, w,1, Color.new(255, 0, 0, 255)) self.contents.fill_rect(x, y+20, w,1, Color.new(128, 0, 0, 255)) self.contents.fill_rect(x, y+21, w,1, Color.new(0, 0, 0, 255)) self.contents.draw_text(x,y,128,32,$data_system.words.hp,1) self.contents.font.color = normal_color end def carol3_draw_sp_bar(actor, x, y, width = 128) self.contents.font.color = system_color self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255)) w = width * actor.sp / actor.maxsp self.contents.fill_rect(x, y+18, w,1, Color.new(128, 255, 255, 255)) self.contents.fill_rect(x, y+19, w,1, Color.new(0, 255, 255, 255)) self.contents.fill_rect(x, y+20, w,1, Color.new(0, 192, 192, 255)) self.contents.fill_rect(x, y+21, w,1, Color.new(0, 128, 128, 255)) self.contents.draw_text(x,y,128,32,$data_system.words.sp,1) self.contents.font.color = normal_color end end
| |
| | | Mie-Noir-ForPlatinum- HinataHokage -Admin-
Mensajes : 92 Fecha de inscripción : 12/09/2008 Edad : 30 Localización : With my love..
Hoja de personaje Personaje: (100/100) Nombre: Hatake Kanashi Raza: Elfo/a
| Tema: BARRA DE LOS HEROES Sáb Sep 13, 2008 12:00 pm | |
| Creador:??? Sacado de: Mundo Deluxe Este script sirve para ver la barra de vida ,pm y exp de los heroes - Spoiler:
- Código:
-
# HP/SP/EXPゲージ表\u31034 示スクリプト Ver 1.00 # 配布元・サポートURL # http://members.jcom.home.ne.jp/cogwheel/
#============================================================================== # ■ Game_Actor #------------------------------------------------------------------------------ # アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors) # の内部で使用され、Game_Party クラス ($game_party) からも参照されます。 #==============================================================================
class Game_Actor < Game_Battler def now_exp return @exp - @exp_list[@level] end def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end
#============================================================================== # ■ Window_Base #------------------------------------------------------------------------------ # ゲーム中のすべてのウィンドウのスーパークラスです。 #==============================================================================
class Window_Base < Window #-------------------------------------------------------------------------- # ● HP ゲージの描画 #-------------------------------------------------------------------------- # オリジナルのHP描画を draw_actor_hp_hpsp と名前変更 alias :draw_actor_hp_hpsp :draw_actor_hp def draw_actor_hp(actor, x, y, width = 144) # 変数rateに 現在のHP/MHPを代入 if actor.maxhp != 0 rate = actor.hp.to_f / actor.maxhp else rate = 0 end # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正 # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅 # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め # align3:ゲージタイプ 0:左詰め 1:右詰め plus_x = 0 rate_x = 0 plus_y = 25 plus_width = 0 rate_width = 100 height = 10 align1 = 1 align2 = 2 align3 = 0 # グラデーション設定 grade1:空ゲージ grade2:実ゲージ # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重)) grade1 = 1 grade2 = 0 # 色設定。color1:外枠,color2:中枠 # color3:空ゲージダークカラー,color4:空ゲージライトカラー # color5:実ゲージダークカラー,color6:実ゲージライトカラー color1 = Color.new(0, 0, 0, 192) color2 = Color.new(255, 255, 192, 192) color3 = Color.new(0, 0, 0, 192) color4 = Color.new(64, 0, 0, 192) color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192) color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192) # 変数spに描画するゲージの幅を代入 if actor.maxhp != 0 hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp else hp = 0 end # ゲージの描画 gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, width, plus_width + width * rate_width / 100, height, hp, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) # オリジナルのHP描画処理を呼び出し draw_actor_hp_hpsp(actor, x, y, width) end #-------------------------------------------------------------------------- # ● SP ゲージの描画 #-------------------------------------------------------------------------- # オリジナルのSP描画を draw_actor_sp_hpsp と名前変更 alias :draw_actor_sp_hpsp :draw_actor_sp def draw_actor_sp(actor, x, y, width = 144) # 変数rateに 現在のSP/MSPを代入 if actor.maxsp != 0 rate = actor.sp.to_f / actor.maxsp else rate = 1 end # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正 # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅 # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め # align3:ゲージタイプ 0:左詰め 1:右詰め plus_x = 0 rate_x = 0 plus_y = 25 plus_width = 0 rate_width = 100 height = 10 align1 = 1 align2 = 2 align3 = 0 # グラデーション設定 grade1:空ゲージ grade2:実ゲージ # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重)) grade1 = 1 grade2 = 0 # 色設定。color1:外枠,color2:中枠 # color3:空ゲージダークカラー,color4:空ゲージライトカラー # color5:実ゲージダークカラー,color6:実ゲージライトカラー color1 = Color.new(0, 0, 0, 192) color2 = Color.new(255, 255, 192, 192) color3 = Color.new(0, 0, 0, 192) color4 = Color.new(0, 64, 0, 192) color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192) color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192) # 変数spに描画するゲージの幅を代入 if actor.maxsp != 0 sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp else sp = (width + plus_width) * rate_width / 100 end # ゲージの描画 gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, width, plus_width + width * rate_width / 100, height, sp, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) # オリジナルのSP描画処理を呼び出し draw_actor_sp_hpsp(actor, x, y, width)
| |
| | | Mie-Noir-ForPlatinum- HinataHokage -Admin-
Mensajes : 92 Fecha de inscripción : 12/09/2008 Edad : 30 Localización : With my love..
Hoja de personaje Personaje: (100/100) Nombre: Hatake Kanashi Raza: Elfo/a
| Tema: continuacion de barra de los heroes Sáb Sep 13, 2008 12:02 pm | |
| El anterior script es muy largo y para no poner la descarga aqui teneis la continuacion (todo ba junto creais una nueva clase en main y poneis el script anterior y justo al final del script poneis la continuacion) - Spoiler:
- Código:
-
end #-------------------------------------------------------------------------- # ● EXP ゲージの描画 #-------------------------------------------------------------------------- # オリジナルのEXP描画を draw_actor_sp_hpsp と名前変更 alias :draw_actor_exp_hpsp :draw_actor_exp def draw_actor_exp(actor, x, y, width = 204) # 変数rateに 現在のexp/nextexpを代入 if actor.next_exp != 0 rate = actor.now_exp.to_f / actor.next_exp else rate = 1 end # plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正 # plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅 # align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め # align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め # align3:ゲージタイプ 0:左詰め 1:右詰め plus_x = 0 rate_x = 0 plus_y = 25 plus_width = 0 rate_width = 100 height = 10 align1 = 1 align2 = 2 align3 = 0 # グラデーション設定 grade1:空ゲージ grade2:実ゲージ # (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重)) grade1 = 1 grade2 = 0 # 色設定。color1:外枠,color2:中枠 # color3:空ゲージダークカラー,color4:空ゲージライトカラー # color5:実ゲージダークカラー,color6:実ゲージライトカラー color1 = Color.new(0, 0, 0, 192) color2 = Color.new(255, 255, 192, 192) color3 = Color.new(0, 0, 0, 192) color4 = Color.new(64, 0, 0, 192) color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192) color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192) # 変数expに描画するゲージの幅を代入 if actor.next_exp != 0 exp = (width + plus_width) * actor.now_exp * rate_width / 100 / actor.next_exp else exp = (width + plus_width) * rate_width / 100 end # ゲージの描画 gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, width, plus_width + width * rate_width / 100, height, exp, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) # オリジナルのEXP描画処理を呼び出し draw_actor_exp_hpsp(actor, x, y) end #-------------------------------------------------------------------------- # ● ゲージの描画 #-------------------------------------------------------------------------- def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) case align1 when 1 x += (rect_width - width) / 2 when 2 x += rect_width - width end [b]case align2 when 1 y -= height / 2 when 2 y -= height end # 枠描画 self.contents.fill_rect(x, y, width, height, color1) self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2) if align3 == 0 if grade1 == 2 grade1 = 3 end if grade2 == 2 grade2 = 3 end end if (align3 == 1 and grade1 == 0) or grade1 > 0 color = color3 color3 = color4 color4 = color end if (align3 == 1 and grade2 == 0) or grade2 > 0 color = color5 color5 = color6 color6 = color end # 空ゲージの描画 self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4, color3, color4, grade1) if align3 == 1 x += width - gauge end # 実ゲージの描画 self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4, color5, color6, grade2) end end
#------------------------------------------------------------------------------ # Bitmapクラスに新たな機能\u12434 を追加します。 #==============================================================================
class Bitmap #-------------------------------------------------------------------------- # ● 矩形をグラデーション表\u31034 示 # color1 : スタートカラー # color2 : エンドカラー # align : 0:横にグラデーション # 1:縦にグラデーション # 2:斜めにグラデーション(激重につき注意) #-------------------------------------------------------------------------- def gradation_rect(x, y, width, height, color1, color2, align = 0) if align == 0 for i in x...x + width red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1) green = color1.green + (color2.green - color1.green) * (i - x) / (width - 1) blue = color1.blue + (color2.blue - color1.blue) * (i - x) / (width - 1) alpha = color1.alpha + (color2.alpha - color1.alpha) * (i - x) / (width - 1) color = Color.new(red, green, blue, alpha) fill_rect(i, y, 1, height, color) end elsif align == 1 for i in y...y + height red = color1.red + (color2.red - color1.red) * (i - y) / (height - 1) green = color1.green + (color2.green - color1.green) * (i - y) / (height - 1) blue = color1.blue + (color2.blue - color1.blue) * (i - y) / (height - 1) alpha = color1.alpha + (color2.alpha - color1.alpha) * (i - y) / (height - 1) color = Color.new(red, green, blue, alpha) fill_rect(x, i, width, 1, color) end elsif align == 2 for i in x...x + width for j in y...y + height red = color1.red + (color2.red - color1.red) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 green = color1.green + (color2.green - color1.green) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 blue = color1.blue + (color2.blue - color1.blue) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 alpha = color1.alpha + (color2.alpha - color1.alpha) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 color = Color.new(red, green, blue, alpha) set_pixel(i, j, color) end end elsif align == 3 for i in x...x + width for j in y...y + height red = color1.red + (color2.red - color1.red) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 green = color1.green + (color2.green - color1.green) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 blue = color1.blue + (color2.blue - color1.blue) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 alpha = color1.alpha + (color2.alpha - color1.alpha) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 color = Color.new(red, green, blue, alpha) set_pixel(i, j, color) end end end end end
| |
| | | Mie-Noir-ForPlatinum- HinataHokage -Admin-
Mensajes : 92 Fecha de inscripción : 12/09/2008 Edad : 30 Localización : With my love..
Hoja de personaje Personaje: (100/100) Nombre: Hatake Kanashi Raza: Elfo/a
| Tema: CAMBIAR TONO DEL ENEMIGO Sáb Sep 13, 2008 12:06 pm | |
| Autor: Momomo cambia la tonalidad de un enemigo dependiendo de su HP Creais una nueva clase arriba de main y pegais esto : - Spoiler:
- Código:
-
#==================================================================== #Cambio de Tono en Batalla según el HP #Script de: Momomo # cambia la tonalidad de un ememigo # dependiendo de su HP #====================================================================
module Momo_Change_Tone # ???????????? ACTOR_CHANGE_TONE = false # ??????????? ENEMY_CHANGE_TONE = true # ?????? TONE_RED = 128 # ?????? TONE_GREEN = 0 # ?????? TONE_BLUE = 0 end
class Game_Battler attr_accessor :tone_change alias game_battler_change_color_initialize initialize def initialize game_battler_change_color_initialize # ????????? @tone_change = false end end
class Sprite_Battler < RPG::Sprite alias sprite_battler_change_color_initialize initialize def initialize(viewport, battler = nil) sprite_battler_change_color_initialize(viewport, battler) @change_tone = Tone.new(0, 0, 0) end alias sprite_battler_change_color_update update def update sprite_battler_change_color_update tone_update end def tone_update if @battler != nil if rest_hp_tone_change? if @battler.tone_change rest_hp_tone_change_set @battler.tone_change = false end self.tone = @change_tone end end end # ?????????? def rest_hp_tone_change? if (Momo_Change_Tone::ACTOR_CHANGE_TONE and @battler.is_a?(Game_Actor)) or (Momo_Change_Tone::ENEMY_CHANGE_TONE and @battler.is_a?(Game_Enemy)) return true end return false end # ??HP????????? def rest_hp_tone_change_set hp_rate = (@battler.hp.to_f / @battler.maxhp) * 100 rate = 100 - hp_rate red = Momo_Change_Tone::TONE_RED * rate / 100 green = Momo_Change_Tone::TONE_GREEN * rate / 100 blue = Momo_Change_Tone::TONE_BLUE * rate / 100 @change_tone.set(red, green, blue) end end
class Spriteset_Battle alias spriteset_battle_change_color_initialize initialize def initialize spriteset_battle_change_color_initialize # ???????????? for sprite in @actor_sprites if !sprite.battler.nil? sprite.battler.tone_change = true sprite.update end end end end
class Scene_Battle alias scene_battle_change_color_update_phase4_step5 update_phase4_step5 def update_phase4_step5 scene_battle_change_color_update_phase4_step5 # ????????????????????? for target in @target_battlers target.tone_change = true end end end
| |
| | | Contenido patrocinado
| Tema: Re: 4scripts de batalla para xp | |
| |
| | | | 4scripts de batalla para xp | |
|
Temas similares | |
|
| Permisos de este foro: | No puedes responder a temas en este foro.
| |
| |
| |
|