设为首页 收藏本站
登录 /立即注册 /找回密码

URPGs

快捷导航
  • 门户Portal
  • 论坛BBS
  • 群组Group
  • 导读Guide
  • 家园Space
  • 工具Tools
  • 广播Follow
  • 期刊Periodical
  • 排行榜Ranklist
  • 社区茶坊
  • pixlr图片编辑
  • 资源列表
  • photobucket
  • RMVA Lite [In English]
  • RM RTP
  • TryRUBY
  • RMXP+RMVX下载[VeryCD]
  • RMVA下载[66RPG]
搜索
  • 本版
  • 帖子
  • 用户
URPGs»论坛 › 休闲区 › 茶馆 › 额,有人能帮我把我的脚本提取出来吗? ...
返回列表 发新帖
查看: 2272|回复: 2

[胡扯] 额,有人能帮我把我的脚本提取出来吗?

[复制链接]
lbq
lbq 当前离线
积分
199
查看详细资料 窥视卡 雷达卡
发表于 2013-3-26 06:37:47 | 显示全部楼层 |阅读模式
Wine下的XP貌似没法拷贝出去东西。。。。。于是麻烦某人把我写的脚本给提取出来弄成txt给我好吗。。。。。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

  • 提升卡
  • 置顶卡
  • 沉默卡
  • 喧嚣卡
  • 变色卡
  • 抢沙发
  • 千斤顶
  • 显身卡
Sonic1997
Sonic1997 当前离线
积分
212
查看详细资料 窥视卡 雷达卡
发表于 2013-3-26 07:02:41 | 显示全部楼层
[code=ruby]#==============================================================================
# ■ Afterimage - LBQ Evensong Scripts
#------------------------------------------------------------------------------
#  Adds Afterimage Effect to The Player When It is Needed
#==============================================================================
module HPWG
  module Afterimage
    DISABLE=1
  end
end

class Afterimage < Sprite
  def initialize(viewport)
    super(viewport)
    @character = $game_player
    self.bitmap = RPG::Cache.character(@character.character_name,@character.character_hue)



    self.visible=false
    self.opacity=170
    self.x,self.y=$game_player.screen_x,$game_player.screen_y
        @cw = self.bitmap.width / 4
    @ch = self.bitmap.height / 4
    self.ox = @cw / 2
    self.oy = @ch
    sx = @character.pattern * @cw
    sy = (@character.direction - 2) / 2 * @ch
    self.visible=true

    self.src_rect.set(sx, sy, @cw, @ch)
end
  
  def update
    unless self.disposed?
    super
    self.opacity-=4#4
    if self.opacity<=0
      self.dispose
    end
    end
  end
end

#==============================================================================
# ■ Spriteset_Map
#------------------------------------------------------------------------------
#  处理地图画面活动块和元件的类。本类在
# Scene_Map 类的内部使用。
#==============================================================================

class Spriteset_Map
  include HPWG::Afterimage
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #--------------------------------------------------------------------------
  alias hpwg_afterimage_sptmap_init initialize
  def initialize
    @afterimages=[]
    @aft_img_timer=0
    hpwg_afterimage_sptmap_init
  end
  
  
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  alias hpwg_afterimage_sptmap_update update
  def update
        @aft_img_timer+=1
   
    @afterimages.push(Afterimage.new(@viewport1)) if @aft_img_timer%2==0 && $game_player.moving? && !$game_switches[DISABLE]
    @afterimages.each{|aft| aft.update}
    hpwg_afterimage_sptmap_update


  end
  
end[/code][code=ruby]#==============================================================================
# ■ Pretitle - LBQ Evensong Scripts
#------------------------------------------------------------------------------
#  A simple scene for displaying a picture before the title scene
#==============================================================================
module HPWG
  module Pretitle
    IMAGE="Demo"
   
   
    SPEED=8
    STAY=30
   
    SE=""
  end
end

class Scene_Pretitle
  include HPWG::Pretitle
  def main
    @title_view=Viewport.new(0,0,640,480)
    @title_view.z=1000
   
    @title=Sprite.new(@title_view)
    @title.bitmap=RPG::Cache.picture(IMAGE)
    @title.opacity=0
   
    @motion=1
    @timer=0
     # 执行过渡
    Graphics.transition
      loop do
      # 刷新游戏画面
      Graphics.update
      # 刷新输入信息
      Input.update
      # 刷新画面
      update
      # 如果画面切换的话就中断循环
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @title.dispose
    @title_view.dispose
  end
  
    def update
      # for all motion stages
      case @motion
      when 1
        @title.opacity+=SPEED
        @motion=2 if @title.opacity>=255
      when 2
        @timer+=1
        @motion=3 if @timer>=STAY
      when 3
        @title.opacity-=SPEED
        @motion=4 if @title.opacity<=0
      when 4
      $scene=Scene_Title.new
    end
   
    end
    def update_input
      if Input.repeat?(C)
          @motion=4
        end
      end
      
   
end
[/code][code=ruby]#===========================================================================
# Overdrive System v0.9 - LBQ Evensong Scripts
#---------------------------------------------------------------------------
# Credits: HPWG
#   - Inspired by KGC's OVD System
#===========================================================================

module HPWG
  module OVD
    MAX=100
   
    GRAPHICS="ovd_bar"
    #All things below are developer's settings, please do not modify without
    #knowing what you are doing
    SLICE=2
   
   
    SKILLS=[83,84,85,86]
   
   
   
    # |Attack| |Be Attacked| |Every Turn| |Escape| |Win|
    GAIN=[5   ,    10,            3,         0,      10]
  end
end



class Game_Actor
  include HPWG::OVD
  #--------------------------------------------------------------------------
  # ● 定义实例变量
  #--------------------------------------------------------------------------
attr_accessor   :ovd
  
  
  alias ovd_game_actor_setup setup
  def setup(actor_id)
    ovd_game_actor_setup(actor_id)
    @ovd=0
  end
  
  
  
  #
  def max?
    return MAX<=self.ovd
  end
  
  #
  def reset_ovd
    @ovd=0 if self.dead?
  end
end


class Window_Base
  include HPWG::OVD
  def draw_actor_ovd(actor,x,y)
    image = RPG::Cache.windowskin(GRAPHICS)
    my_width=image.width
    height=image.height/SLICE
    src_rect=Rect.new(0,0,my_width,height)
    self.contents.blt(x, y, image, src_rect)
   
   

    amount=100*actor.ovd/MAX
    #p amount
    row=1
    src_rect2=Rect.new(0,row*height,my_width*amount/100,height)
    self.contents.blt(x, y, image, src_rect2)
  end
end


class Game_Battler
  #--------------------------------------------------------------------------
  include HPWG::OVD
  #--------------------------------------------------------------------------
  alias hpwg_ovd_skill_can_use skill_can_use?
  def skill_can_use?(skill_id)
    skill = $data_skills[skill_id]
    if skill != nil && SKILLS.include?(skill.id)
      return false unless self.max?
    end
    hpwg_ovd_skill_can_use(skill_id)
  end  
end

#==============================================================================
# ■ Window_BattleStatus
#==============================================================================




#Position Fix For Overdrive
class Window_BattleStatus < Window_Base
  include HPWG::OVD
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      actor_x = i * 159 + 2
      draw_actor_name(actor, actor_x, 0)
      draw_actor_hp(actor, actor_x, 32, 120)
      draw_actor_sp(actor, actor_x, 64, 120)
      my_x = actor_x
      my_y = 112
      draw_actor_ovd(actor, my_x, my_y)
      if @level_up_flags
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x, 85)
      end
    end
  end
  
  
end


class Scene_Battle
  include HPWG::OVD
  alias hpwg_ovd_bt_end battle_end
  def battle_end(result)
    case result
    when 0
      $game_party.actors.each{|x| x.ovd+= GAIN[4]}
    when 1
      $game_party.actors.each{|x| x.ovd+= GAIN[3]}
    end
    #overdrive_update
       # ovd_update
    hpwg_ovd_bt_end(result)
    ovd_update

  end

  alias hpwg_ovd_asac make_skill_action_result
  def make_skill_action_result
    hpwg_ovd_asac
    @active_battler.ovd = 0 if @active_battler.is_a? Game_Actor and SKILLS.include?(@skill.id)
    ovd_update
  end
  

  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 2 : 开始行动)
  #--------------------------------------------------------------------------
  alias hpwg_ovd_ups2 update_phase4_step2
  def update_phase4_step2
    @active_battler.ovd += GAIN[2] if @active_battler.is_a? Game_Actor
        ovd_update
    hpwg_ovd_ups2
  end
   
  
  def ovd_update
    $game_party.actors.each{|x| x.reset_ovd}
    #@status_window.refresh
  end
  
  
end
class Game_Battler
    include HPWG::OVD
    def ovd_update
      $game_party.actors.each{|x| x.reset_ovd}
    end
   

   
   
  def attack_calc(user)
    if user.is_a? Game_Actor
      od_up = GAIN[0]*((rand(40)+80)/100)
      user.ovd += od_up.to_i
      
    elsif  self.is_a?(Game_Actor)
      od_up = GAIN[1]*((rand(40)+80)/100)
      self.ovd += od_up.to_i
    end

  end
  
  
  
  alias hpwg_ovd_skille skill_effect
  def skill_effect(user, skill)
    attack_calc(user)
            ovd_update
    return hpwg_ovd_skille(user, skill)


  end
  
  alias hpwg_ovd_atke attack_effect
  def attack_effect(attacker)
    attack_calc(attacker)
    return hpwg_ovd_atke(attacker)

  end
  
end



class Scene_Skill
  include HPWG::OVD
  alias hpwg_ovd_updski update_skill
  def update_skill
    if Input.trigger?(Input::C)
      unless @skill == nil or not @actor.skill_can_use?(@skill.id) or @skill.scope >= 3
        @actor.ovd = 0 if SKILLS.include?(@skill.id)
      end
    end
    hpwg_ovd_updski
  end
end



[/code][code=ruby]#==============================================================================
# ■ Text Stroke - LBQ Evensong Scripts
#------------------------------------------------------------------------------
#  Adds stroke effect to the text
#==============================================================================
module HPWG
  module Stroke
    SHIFT=1
  end
end

class Bitmap
  include HPWG::Stroke
  alias HPWG_stroke_text draw_text
  def draw_text(*args)
    if args[0].is_a? Rect
      x,y,my_width,my_height=args[0].x, args[0].y, args[0].width, args[0].height
      str=args[1]
      if args[2].nil?
        ali=0
      else
        ali=args[2]
      end
    else
      x, y, my_width, my_height=args[0..3]
      str=args[4]
      if args[5].nil?
        ali=0
      else
        ali=args[5]
      end
    end
    mem_color = self.font.color.clone
    self.font.color = Color.new(0, 0, 0)
    HPWG_stroke_text(x-SHIFT, y, my_width, my_height, str, ali)
    HPWG_stroke_text(x+SHIFT, y, my_width, my_height, str, ali)
    HPWG_stroke_text(x, y+SHIFT, my_width, my_height, str, ali)
    HPWG_stroke_text(x, y-SHIFT, my_width, my_height, str, ali)
    self.font.color = mem_color
    HPWG_stroke_text(x, y, my_width, my_height, str, ali)
  end
end[/code][code=ruby]#==============================================================================
# ■ HP/MP Bar Plus - LBQ Evensong Scripts
#------------------------------------------------------------------------------
#  Changes the layout of the hp and mp bars
#==============================================================================

module HPWG
  module Bars
    FILES=["hp_bar","sp_bar","exp_bar"]
   
   
   
    #All things below are developer's settings, please do not modify without
    #knowing what you are doing
    SLICE=2
  end
end

class Window_Base
  include HPWG::Bars
  #-----------------------------------------
  # All aliasing
  #-----------------------------------------
  alias hpwg_draw_actor_sp draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
    my_y=y+Font.default_size * 2 /3
    row=0
     image = RPG::Cache.windowskin(FILES[1])
    my_width=image.width
    height=image.height/SLICE
    src_rect=Rect.new(0,0,my_width,height)
    self.contents.blt(x, my_y, image, src_rect)
   
   

    amount=100*actor.sp/actor.maxsp
    #p amount
    row=1
    src_rect2=Rect.new(0,row*height,my_width*amount/100,height)
    self.contents.blt(x, my_y, image, src_rect2)
   
    hpwg_draw_actor_sp(actor, x, y, width = 144)
  end
  
  
  alias hpwg_draw_actor_hp draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144)
    my_y=y+Font.default_size * 2 /3
    row=0
     image = RPG::Cache.windowskin(FILES[0])
    my_width=image.width
    height=image.height/SLICE
    src_rect=Rect.new(0,0,my_width,height)
    self.contents.blt(x, my_y, image, src_rect)
   
   

    amount=100*actor.hp/actor.maxhp
    #p amount
    row=1
    src_rect2=Rect.new(0,row*height,my_width*amount/100,height)
    self.contents.blt(x, my_y, image, src_rect2)
   
    hpwg_draw_actor_hp(actor, x, y, width = 144)
  end
end
[/code][code=ruby]#==============================================================================
# ■ Map Name Display - LBQ Evensong Scripts
#------------------------------------------------------------------------------
#  This script can display the current map name
#==============================================================================

module HPWG
  module Map_Name
    X_FIX=0
    Y_FIX=0
   
   
   
    # 0=> left, 1=> center 2=>right
    TEXT_ALI=1
   
   
    GRAPHICS="map_name"
    SPEED=3
   
   
    START=0
    CLOSE=true
    STAY_TIME=40
   
   
    DISABLED=[]
   
    #Pos [horz,vert]
    #========================
    # Horizonal Things
    #--------------------
    # 0 => Left Align
    # 1 => Center
    # 2 => Right
    #========================
    # Vertical Things
    #--------------------
    # 0 => Upper Align
    # 1 => Center
    # 2 => Down Align
    #========================
    POS=[1,1]
  end
end

class Game_Map
  def map_name
    map_name = load_data("Data/MapInfos.rxdata")
    return map_name[@map_id].name
  end
end

class Scene_Map
  include HPWG::Map_Name
  
  def display_map_name
    map_name_skin=RPG::Cache.windowskin(GRAPHICS)
   
   
   
   
    # Avoid Cases when you fill in the wrong positions in the config menu
    x,y=0,0
    #---------------------
    # Position Calculation
    #---------------------
   
   
    # X
    case POS[0]
    when 0
      x=0
    when 1
      x=640/2-map_name_skin.width/2
    when 2
      x=640-map_name_skin.width
    end
   
    # Y
    case POS[1]
    when 0
      y=0
    when 1
      y=480/2-map_name_skin.height/2
    when 2
      y=480-map_name_skin.height
    end
    #=======================
    # End of Position Calc
    #=======================
    unless DISABLED.include? $game_map.map_id
      @map_view.dispose unless @map_view.nil?
      @map_name.bitmap.clear unless @map_name.nil?
      @map_view=Viewport.new(x,y,640,560)
      @map_view.z=100
      @count=START
        @map_name=Sprite.new(@map_view)
        @map_bg=Sprite.new(@map_view)
        @map_bg.bitmap=map_name_skin
        @map_bg.z=@map_name.z-1
        @map_name.src_rect.set(0, 0, @map_bg.bitmap.width, @map_bg.bitmap.height+100)
        @map_name.opacity=@count
        @map_bg.opacity=@count
        @map_name.bitmap=Bitmap.new(@map_bg.bitmap.width, @map_bg.bitmap.height)
        @map_name.bitmap.draw_text(X_FIX,Y_FIX,@map_bg.bitmap.width,@map_bg.bitmap.height,$game_map.map_name,TEXT_ALI)

    end
  end
  
  alias hpwg_map_init initialize
  def initialize
    hpwg_map_init
    display_map_name
  end
  
  alias hpwg_map_name_update update
  def update
    hpwg_map_name_update
    unless @map_view.nil? or @map_bg.disposed? or @map_name.disposed?
      @map_view.visible=false unless $scene.is_a? Scene_Map
      unless @display_finished
        @count+=SPEED
        @map_name.opacity=@count
        @map_bg.opacity=@count
        if @count-SPEED*STAY_TIME>=255
          @count=255
          @display_finished=true
        end
      
      else
        @count-=SPEED
        @map_name.opacity=@count
        @map_bg.opacity=@count
      end
    end
   
   
   
  end
  
  alias hpwg_map_transfer_player transfer_player
  def transfer_player
    @map_view.dispose unless @map_view.nil?
    hpwg_map_transfer_player
        @display_finished=false
        display_map_name
        @map_name.bitmap.clear
        @map_name.bitmap=Bitmap.new(@map_bg.bitmap.width, @map_bg.bitmap.height) unless @map_name.disposed?
        @map_name.bitmap.draw_text(X_FIX,Y_FIX,@map_bg.bitmap.width,@map_bg.bitmap.height,$game_map.map_name,TEXT_ALI) unless @map_name.disposed?
  end
end[/code]

评分

参与人数 1银币 +1 收起 理由
lbq + 1 虽然真的没有多少意义。。但是表达感谢。。.

查看全部评分

回复 Like Dislike

使用道具 举报

  • 显身卡
orzfly
orzfly 当前离线
积分
55
查看详细资料 窥视卡 雷达卡
发表于 2013-3-26 08:22:55 来自手机 | 显示全部楼层
其实LBQ, 把脚本的Scripts.r?data上传到http://rgss.9bu.org就可以在浏览器里随意观看复制了~

点评

lbq
这么好!感谢orzfly大人!  发表于 2013-3-26 09:00
回复 Like Dislike

使用道具 举报

  • 显身卡
返回列表 发新帖
高级模式
B Color Image Link Quote Code Smilies
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

站点统计|Archiver|手机版|意见反馈[feedback]| URPGs RPG Maker 游戏制作讨论

GMT+8, 2025-7-3 22:34 , Processed in 0.021252 second(s), 10 queries .

Powered by Discuz! X3.5

© 2011-2019 URPGs (Discuz! X3.4 © 2001-2019 Comsenz Inc.)

积分 0, 距离下一级还需 积分
快速回复 返回顶部 返回列表