Project1
标题:
Window_NameInput里的脚本有现成的么?(= =)
[打印本页]
作者:
笨ぁ丫头
时间:
2008-2-5 01:10
标题:
Window_NameInput里的脚本有现成的么?(= =)
刚接触RM没2天,看66的视频教学发现一个可以让自己的主角改名字的方法`
不过得自己一个一个的改,我嫌麻烦,网站上找了半天我也没找到,嘿嘿
所以请各位大侠们给我个现成的汉语脚本吧,谢谢啦!
■ Window_NameInput里的脚本
[LINE]1,#dddddd[/LINE]
帖子已被修改,详情
请看版规
。
[LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
天圣的马甲
时间:
2008-2-5 01:16
以下脚本取材自影北山人作品《回梦·风花雪月》(山人我崇拜你~),使用之前请论坛短信征求许可。{/hx}
#==============================================================================
# ■ Window_NameInput
#------------------------------------------------------------------------------
# 输入名称的画面、文字选择窗口。
#==============================================================================
class Window_NameInput < Window_Base
CHARACTER_TABLE =
[
"赤","橙","黄","绿","青",
"蓝","紫","红","白","黑",
"金","灰","小","阿","儿",
"日","月","星","天","子",
"雷","风","霞","云","の",
"光","暗","昏","魂","魄",
"剑","箭","灵","铃","翎",
"麒", "麟" ,"龙", "凤" ,"鹤",
"圭","玉","羽","御","银",
"音","柳" ,"琉","璃" ,"翡",
"翠","玛","瑙","珍","珠",
"朱","竹","猪","田","岚",
"雪","冰","清","暖","王",
"舞","叶","夜","枫","狂",
"莎","纱","笛","萧","胡",
"虎","豹","暴","郎","狼",
"姬","梅","菊","兰","画",
"鸟","花","柯","贝","鳞" ,
"一","二","双","三","四",
"五","六","七","八","久",
"十","百","千","万","亿",
"辰","尘","墨","魔","神",
"仙","鬼","人","佛","楠",
"猫","咪","喵","咩","叽",
"嗷","呜","东","西","南",
"娘", "雨" ,"兔", "瞳" ,"泪",
"★","☆","◇","◆","●",
"◎", "镜" ,"水", "火" ,"香",
"辣","血","邪","葵","兽",
"美","A","B","C","D",
"E","F","G","H","I",
"J","K","L","M","N",
"O","P","Q","R","S",
"T","U","V","W","X",
"Y","Z","亲","爱","的",
"+","影","北", "山" , "人" ,
]
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 128, 640, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@index = 0
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 获取文字
#--------------------------------------------------------------------------
def character
return CHARACTER_TABLE[@index]
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0..179
x = 4 + i / 5 / 9 * 152 + i % 5 * 28
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1)
end
self.contents.draw_text(544, 9 * 32, 64, 32, "确定", 1)
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
# 光标位置在 [确定] 的情况下
if @index >= 180
self.cursor_rect.set(544, 9 * 32, 64, 32)
# 光标位置在 [确定] 以外的情况下
else
x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 28, 32)
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 光标位置在 [确定] 的情况下
if @index >= 180
# 光标下
if Input.trigger?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@index -= 180
end
# 光标上
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@index -= 180 - 40
end
# 光标位置在 [确定] 以外的情况下
else
# 按下方向键右的情况下
if Input.repeat?(Input::RIGHT)
# 按下状态不是重复的情况下、
# 光标位置不在右端的情况下
if Input.trigger?(Input::RIGHT) or
@index / 45 < 3 or @index % 5 < 4
# 光标向右移动
$game_system.se_play($data_system.cursor_se)
if @index % 5 < 4
@index += 1
else
@index += 45 - 4
end
if @index >= 180
@index -= 180
end
end
end
# 按下方向键左的情况下
if Input.repeat?(Input::LEFT)
# 按下状态不是重复的情况下、
# 光标位置不在左端的情况下
if Input.trigger?(Input::LEFT) or
@index / 45 > 0 or @index % 5 > 0
# 光标向右移动
$game_system.se_play($data_system.cursor_se)
if @index % 5 > 0
@index -= 1
else
@index -= 45 - 4
end
if @index < 0
@index += 180
end
end
end
# 按下方向键下的情况下
if Input.repeat?(Input::DOWN)
# 光标向下移动
$game_system.se_play($data_system.cursor_se)
if @index % 45 < 40
@index += 5
else
@index += 180 - 40
end
end
# 按下方向键上的情况下
if Input.repeat?(Input::UP)
# 按下状态不是重复的情况下、
# 光标位置不在上端的情况下
if Input.trigger?(Input::UP) or @index % 45 >= 5
# 光标向上移动
$game_system.se_play($data_system.cursor_se)
if @index % 45 >= 5
@index -= 5
else
@index += 180
end
end
end
# L 键与 R 键被按下的情况下
if Input.repeat?(Input::L) or Input.repeat?(Input::R)
# 平假名 / 片假名 之间移动
$game_system.se_play($data_system.cursor_se)
if @index / 45 < 2
@index += 90
else
@index -= 90
end
end
end
update_cursor_rect
end
end
复制代码
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
darkten
时间:
2008-2-5 01:18
要汉字...不如用RM中文输入法...
http://rpg.blue/web/htm/news375.htm
作者:
笨ぁ丫头
时间:
2008-2-5 01:30
谢谢你啦`呵呵{/wx}
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1