Project1

标题: 求一个血条脚本 [打印本页]

作者: yinggai    时间: 2013-2-8 15:16
标题: 求一个血条脚本
不要再说自己去论坛内搜了,我搜到的不是失效的就是有bug的{:2_272:}。
顺便一说,我用的是va和sidevidw横版脚本的{:2_270:}
作者: 咕噜    时间: 2013-2-8 15:24
{:2_251:}你用横版自然BUG
作者: houyuxiaoyang    时间: 2013-2-8 15:25
我记得有一个叫什么VA轮盘血条啥的
作者: so_aries    时间: 2013-2-9 04:42
图MOG
受伤后表示
站内有整合版
图さば缶
点选后表示
http://petitrare.com/blog/?p=5070
(沉影大的脚本貌似vx?)
其他应该有,请自行搜寻(站内找不到,就去外站找)
继续做我的素材,做完应该有新的脚本了= ="

1.jpg (9.49 KB, 下载次数: 39)

MOG

MOG

2.jpg (7.63 KB, 下载次数: 26)

さば缶

さば缶

作者: 1396    时间: 2013-2-9 14:10

《转轮血条》

#转轮血条
#章半仙制作
module RollBar
ROLL_UNIT = 1       #每次转轮扣的血
ROLL_TIME = 0.05    #每次转轮花的秒数
DEFAULT_SYS= false  #如果是默认系统设为true会略微提升一点效率- -b
VERSION = 0.92
end
class Game_Actor
include RollBar
def hp=(hp)
    fucker_hp = [[hp, mhp].min, 0].max - @hp
    rec = fucker_hp > 0
    Thread.new do
     (fucker_hp / ROLL_UNIT).truncate.abs.times do
       rec ? @hp = [@hp + ROLL_UNIT, mhp].min  : @hp = [@hp - ROLL_UNIT, 0].max
       refresh
       sleep(ROLL_TIME)
      end
    end
end
def mp=(mp)
    fucker_mp = [[mp, mmp].min, 0].max - @mp
    rec = fucker_mp > 0
    Thread.new do
     (fucker_mp  / ROLL_UNIT).truncate.abs.times do
       rec ? @mp = [@mp + ROLL_UNIT, mmp].min : @mp = [@mp - ROLL_UNIT, 0].max
       refresh
       sleep(ROLL_TIME)
      end
    end
end
def tp=(tp)
    fucker_tp = [[tp, max_tp].min, 0].max - @tp
    rec = fucker_tp > 0
    Thread.new do
     (fucker_tp / ROLL_UNIT).truncate.abs.times do
       rec ? @tp = [@tp + ROLL_UNIT, max_tp].min : @tp = [@tp - ROLL_UNIT, 0].max
       sleep(ROLL_TIME)
      end
    end
  end
  alias fucker_clear_actions clear_actions
  def clear_actions
    fucker_clear_actions
    @actions.push Game_Action.new(self)
  end
end
class Window_Base
  include RollBar
  alias fucker_draw_actor_hp draw_actor_hp
  alias fucker_draw_actor_mp draw_actor_mp
  alias fucker_draw_actor_tp draw_actor_tp
  alias fucker_dispose dispose
  def draw_actor_hp(actor, x, y, width = 124)
    reg_window
    unless DEFAULT_SYS
     @hp_need_refresh.each_key do |i|
      @hp_need_refresh.delete(i) if i[1] == x && i[2] == y
     end
    end
    fucker_draw_actor_hp(actor, x, y, width)
  end
  def draw_actor_mp(actor, x, y, width = 124)
    reg_window
    unless DEFAULT_SYS
      @mp_need_refresh.each_key do |i|
       @mp_need_refresh.delete(i) if i[1] == x && i[2] == y
      end
    end
    fucker_draw_actor_mp(actor, x, y, width)
  end
  def draw_actor_tp(actor, x, y, width = 124)
    reg_window
    unless DEFAULT_SYS
      @tp_need_refresh.each_key do |i|
       @tp_need_refresh.delete(i) if i[1] == x && i[2] == y
      end
    end
    fucker_draw_actor_tp(actor, x, y, width)
  end
  def dispose
    unreg_window
    fucker_dispose
  end
  def reg_window
    unless @reg
      @reg = true     
      Graphics.reg_window(self)
      return if DEFAULT_SYS
      @hp_need_refresh = {}
      @mp_need_refresh = {}
      @tp_need_refresh = {}
      class << self
        def roll_bar_refresh
          @hp_need_refresh.each_pair do |p,v|
           next if p[0].hp == v
           contents.clear_rect(p[1], p[2], p[3], line_height)
           fucker_draw_actor_hp(*p)
          end
          @mp_need_refresh.each_pair do |p,v|
           next if p[0].mp == v
           contents.clear_rect(p[1], p[2], p[3], line_height)
           fucker_draw_actor_mp(*p)   
          end
          @tp_need_refresh.each_pair do |p,v|
           next if p[0].tp == v
           contents.clear_rect(p[1], p[2], p[3], line_height)
           fucker_draw_actor_tp(*p)
         end
        end
        def fucker_draw_actor_hp(*args)
          @hp_need_refresh[args] = args[0].hp
          #super
          self.class.instance_method(:fucker_draw_actor_hp).bind(self).call(*args)
        end
        def fucker_draw_actor_mp(*args)        
          @mp_need_refresh[args] = args[0].mp
          #super
          self.class.instance_method(:fucker_draw_actor_mp).bind(self).call(*args)
        end   
        def fucker_draw_actor_tp(*args)
          @tp_need_refresh[args] = args[0].tp
          #super
          self.class.instance_method(:fucker_draw_actor_tp).bind(self).call(*args)
        end
      end
    end
  end
  def unreg_window
    @reg = false
    Graphics.unreg_window(self)
  end
end
class << Graphics
  alias fucker_update update
  def reg_window(window)
    @need_refresh ||= []
    @need_refresh.push window unless @need_refresh.include? window
  end
  def unreg_window(window)
    @need_refresh.delete window if @need_refresh.is_a? Array
  end
  def update
    fucker_update   
    unless @need_refresh.nil?
     for i in @need_refresh
       i.roll_bar_refresh if i.visible
     end
    end
  end
end
if RollBar::DEFAULT_SYS
#以下解决效率问题,可能会造成冲突- -b
class Window_BattleStatus
  def roll_bar_refresh
    for i in 0...$game_party.battle_members.size
      actor = $game_party.battle_members
      x = gauge_area_rect(i).x
      y = gauge_area_rect(i).y
      height = line_height
      @fucker_hp ||= []
      if @fucker_hp != actor.hp
         contents.clear_rect(x, y, 72, height)
         draw_actor_hp(actor, x, y,72)
         @fucker_hp = actor.hp
       end
      @fucker_mp ||= []
      if @fucker_mp != actor.mp
         contents.clear_rect(x + 82, y, 64, height)
         draw_actor_mp(actor, x + 82, y, 64)
         @fucker_mp = actor.mp
       end   
      @fucker_tp ||= []
      if @fucker_tp != actor.tp
         contents.clear_rect( x + 156, y, 64, height)
         draw_actor_tp(actor, x + 156, y, 64)
         @fucker_tp = actor.tp
      end        
    end
  end
end
class Window_MenuStatus
  def roll_bar_refresh
    for i in 0...$game_party.battle_members.size
      actor = $game_party.battle_members
       x = item_rect(i).x  + 108 + 120
       y = item_rect(i).y + line_height / 2
       width = 124
       height = line_height
       @fucker_hp ||= []
       if @fucker_hp != actor.hp
         contents.clear_rect(x, y + line_height, width, height)
         draw_actor_hp(actor, x, y + line_height)
         @fucker_hp = actor.hp
       end
       @fucker_mp ||= []
       if @fucker_mp != actor.mp
         contents.clear_rect(x, y + line_height * 2, width, height)
         draw_actor_mp(actor, x, y + line_height * 2)
         @fucker_mp = actor.mp
       end
    end
  end
end
class Window_SkillStatus
  def roll_bar_refresh
    x = 108 + 120
    y = line_height / 2
    width = 124
    height = line_height  
    if @fucker_hp != @actor.hp
      contents.clear_rect(x, y +  line_height, width, height)
      draw_actor_hp(@actor, x, y + line_height)
      @fucker_hp = @actor.hp
    end
    if @fucker_mp != @actor.mp
      contents.clear_rect(x, y + line_height * 2, width, height)
      draw_actor_mp(@actor, x, y + line_height * 2)
      @fucker_mp = @actor.mp
    end
  end
end
class Window_Status
  def roll_bar_refresh
    x = 136
    y = line_height * 3
    width = 124
    height = line_height
    if @fucker_hp != @actor.hp
      contents.clear_rect(x, y +  line_height, width, height)
      draw_actor_hp(@actor, x, y + line_height)
      @fucker_hp = @actor.hp
    end
    if @fucker_mp != @actor.mp
      contents.clear_rect(x, y + line_height * 2, width, height)
      draw_actor_mp(@actor, x, y + line_height * 2)
      @fucker_mp = @actor.mp
    end
  end
end
end





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1