赞 | 1 |
VIP | 17 |
好人卡 | 3 |
积分 | 1 |
经验 | 49919 |
最后登录 | 2020-2-6 |
在线时间 | 898 小时 |
Lv1.梦旅人 矿工
- 梦石
- 0
- 星屑
- 134
- 在线时间
- 898 小时
- 注册时间
- 2012-10-5
- 帖子
- 1535
|
本帖最后由 876加几 于 2013-8-3 23:17 编辑
乱按一个脚本,就有一些能@。
下面测试。
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# 人物介绍 Ver. 1.1 作者: Claimh 翻译与修正:柳柳
#------------------------------------------------------------------------------
# http://www.k3.dion.ne.jp/~claimh/
#==============================================================================
#——功能简介:在状态页面按下回车键会进入人物介绍页面。
#——如果想自行建立功能,使用$scene = Scene_Charactor.new(角色编号)即可
#——如果自行建立了功能不想使用默认的切换,去掉217行以后的内容
#——以下数组,如果人物超过8人,请自行继续添加(一般游戏没那么多主人公吧)
#——如果想更改内容,比如把“体重”改为“智商”,请修改102-107行的文字内容
# 从状态页面切换至人物介绍页面的按键
CHENGE_KEY = Input::C
#--------------------------------------------------------------------------
# 人物种族
#--------------------------------------------------------------------------
CHARA_AGE = ["人族","人族","天使族","人族"]
#--------------------------------------------------------------------------
# 人物智力
#--------------------------------------------------------------------------
CHARA_FROM = ["90","95","140","108"]
#--------------------------------------------------------------------------
# 人物全名
#--------------------------------------------------------------------------
CHARA_H = ["克萝莉亚·亚当斯","西露达·克斯","帕尔斯·怀特","艾斯迪尔·格林"]
#--------------------------------------------------------------------------
# 人物潜能
#--------------------------------------------------------------------------
CHARA_W = ["90","60","120","60"]
#--------------------------------------------------------------------------
# 人物介绍,可以写多行
#--------------------------------------------------------------------------
# 人物1号介绍
L1 = "运河之城的普通居民"
L2 = "她苦练治疗特技"
L3 = "但她常想:“难道我是帕尔斯的苦工吗?”"
L_SET1 = [L1, L2, L3] # 人物1号的数组
# 人物2号介绍
L1 = "他只是一个普通的魔法师,但却有着远大志向"
L2 = "他最想当一名最强大的魔法师"
L3 = "但是被帕尔斯领先"
L_SET2 = [L1, L2, L3] # 人物2号的数组
# 人物3号介绍
L1 = "她其实是天国守护,天使们没有一个敢违抗她的命令"
L2 = "她拥有很高的智商和潜能"
L3 = "她的种族其实与其他三个人物不同"
L_SET3 = [L1, L2, L3]
# 人物4号介绍
L1 = "她是一个猎人"
L2 = "也许她的绿发是为了装饰的"
L3 = "她的武器还拥有很高的射程"
L_SET4 = [L1, L2, L3]
# 人物介绍数组,如果不够继续添加。
CHARA_INFO = [L_SET1,L_SET2,L_SET3,L_SET4]
#==============================================================================
# Window_Charactor
#==============================================================================
class Window_Charactor < Window_Base
#--------------------------------------------------------------------------
# actor : 初始化的角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 100, 112)
self.contents.font.color = system_color
self.contents.draw_text(250, 10, 80, 32, "姓名")
self.contents.draw_text(250, 50, 80, 32, "种族")
self.contents.draw_text(250, 90, 80, 32, "智商")
self.contents.draw_text(250, 130, 80, 32, "全名")
self.contents.draw_text(250, 170, 80, 32, "潜力")
self.contents.font.color = normal_color
draw_actor_name(@actor, 350, 10)
draw_actor_age(@actor, 350, 50)
draw_actor_from(@actor, 350, 90)
draw_actor_height(@actor, 350, 130)
draw_actor_weight(@actor, 350, 170)
draw_actor_other(@actor, 50, 250)
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_battler_graphics(actor, x, y)
battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue)
w = battler.width
h = battler.height
self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h))
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_age(actor, x, y)
self.contents.draw_text(x, y, 80, 32, CHARA_AGE[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_from(actor, x, y)
self.contents.draw_text(x, y, 180, 32, CHARA_FROM[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_height(actor, x, y)
self.contents.draw_text(x, y , 200, 32, CHARA_H[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_weight(actor, x, y)
self.contents.draw_text(x, y, 250, 32, CHARA_W[actor.id-1])
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def draw_actor_other(actor, x, y)
info = CHARA_INFO[actor.id-1]
for i in 0...info.size
self.contents.draw_text(x, y+32*i, 600, 32, info)
end
end
end
#==============================================================================
# Scene_Charactor
#==============================================================================
class Scene_Charactor
#--------------------------------------------------------------------------
# actor_index :角色编号
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def main
@actor = $game_party.actors[@actor_index]
@status_window = Window_Charactor.new(@actor)
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@status_window.dispose
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Status.new
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Charactor.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Charactor.new(@actor_index)
return
end
end
end
#==============================================================================
# Scene_Status
#==============================================================================
class Scene_Status
alias update_chara update
def update
if Input.trigger?(CHENGE_KEY)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Charactor.new(@actor_index)
return
end
update_chara
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
最蛋疼的是,脚本中actor都能@。
还是想要[@][/@]
要是我按个“菜鸟横版”的脚本,现在这样要删死我们 |
|