额,有人能帮我把我的脚本提取出来吗?
Wine下的XP貌似没法拷贝出去东西{:nm03:}。。。。。于是麻烦某人把我写的脚本给提取出来弄成txt给我好吗。。。。。#==============================================================================
# ■ 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
@afterimages.each{|aft| aft.update}
hpwg_afterimage_sptmap_update
end
end#==============================================================================
# ■ 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
#===========================================================================
# 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=
# |Attack| |Be Attacked| |Every Turn| |Escape| |Win|
GAIN=
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
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}
when 1
$game_party.actors.each{|x| x.ovd+= GAIN}
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 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*((rand(40)+80)/100)
user.ovd += od_up.to_i
elsifself.is_a?(Game_Actor)
od_up = GAIN*((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
#==============================================================================
# ■ 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.is_a? Rect
x,y,my_width,my_height=args.x, args.y, args.width, args.height
str=args
if args.nil?
ali=0
else
ali=args
end
else
x, y, my_width, my_height=args
str=args
if args.nil?
ali=0
else
ali=args
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#==============================================================================
# ■ 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)
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)
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
#==============================================================================
# ■ 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
#========================
# Horizonal Things
#--------------------
# 0 => Left Align
# 1 => Center
# 2 => Right
#========================
# Vertical Things
#--------------------
# 0 => Upper Align
# 1 => Center
# 2 => Down Align
#========================
POS=
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
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
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
其实LBQ, 把脚本的Scripts.r?data上传到http://rgss.9bu.org就可以在浏览器里随意观看复制了~
页:
[1]