设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1598|回复: 4
打印 上一主题 下一主题

怎么让加点菜单不显示行走图而显示自定义图片

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
45
跳转到指定楼层
1
发表于 2007-8-24 03:21:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
45
2
 楼主| 发表于 2007-8-24 03:21:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽

Lv4.逐梦者

梦石
0
星屑
8003
在线时间
1184 小时
注册时间
2007-7-29
帖子
2057
3
发表于 2007-8-24 09:50:41 | 只看该作者
我稍微试了一下,也不是改动得很厉害,看看这样行吗?



这里就用脸来作解释。
在Graphics\Pictures\目录底下兴建一个文件夹,
名为Heads。(全:Graphics\Pictures\Heads)
兴建完了后,在里面放下相对角色号数的脸型图片。如:1号人物,脸型图片名为:1.jpg
以此类推。
注:设定图像大小:100x100

  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,转载和使用请保留此信息
  3. #==============================================================================

  4. # 脚本使用设定:

  5. LEVEL_UP_POINT = 5  # 每升一级所增加的点数
  6. LEVEL_UP_VARIABLE = 100  # 储存角色点数的变量编号与角色id编号的差值
  7.                          # 默认情况 = 100,
  8.                          # 则是数据库里1号角色的加点数存于101号变量
  9.                          # 3号角色的加点数存于103号变量。
  10.                          # 你可以直接操作变量赠与角色可分配点数

  11. # 每增加一次点数,各项能力值的变化:357-410行
  12.                         
  13. # 使用方法介绍:

  14. # 本脚本不会取代原猩?豆δ埽?皇且桓龈郊庸δ堋?BR># 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  15. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  16. # 1-99级全部等于一个相同数值就行了。

  17. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  18. # 默认都是0号

  19. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  20. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new

  21. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG

  22.   #--------------------------------------------------------------------------
  23.   # ● 脸形的描绘
  24.   #     actor : 角色
  25.   #     x     : 描画目标 X 坐标
  26.   #     y     : 描画目标 Y 坐标
  27.   #--------------------------------------------------------------------------
  28.   def draw_actor_head(actor, x, y)
  29.     name = @actor.id.to_s
  30.     bitmap = Bitmap.new("Graphics/Pictures/Heads/#{name}")
  31.     cw = 100
  32.     ch = 100
  33.     src_rect = Rect.new(0, 0, cw, ch)
  34.     self.contents.blt(x , y , bitmap, src_rect)
  35.   end

  36. #==============================================================================
  37. # ■ Window_Command
  38. #------------------------------------------------------------------------------
  39. #  一般的命令选择行窗口。(追加定义)
  40. #==============================================================================
  41. class Window_Command < Window_Selectable
  42.   #--------------------------------------------------------------------------
  43.   # ● 项目有效化
  44.   #     index : 项目编号
  45.   #--------------------------------------------------------------------------
  46.   def able_item(index)
  47.     draw_item(index, normal_color)
  48.   end
  49. end
  50. #==============================================================================
  51. # ■ Game_Actor
  52. #------------------------------------------------------------------------------
  53. #  处理角色的类。(再定义)
  54. #==============================================================================
  55. class Game_Actor < Game_Battler
  56.   #--------------------------------------------------------------------------
  57.   # ● 更改 EXP
  58.   #     exp : 新的 EXP
  59.   #--------------------------------------------------------------------------
  60.   def exp=(exp)
  61.     @exp = [[exp, 9999999].min, 0].max
  62.     # 升级
  63.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  64.       @level += 1
  65.       # 增加4点可自由分配的点数
  66.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  67.       # 学会特技
  68.       for j in $data_classes[@class_id].learnings
  69.         if j.level == @level
  70.           learn_skill(j.skill_id)
  71.         end
  72.       end
  73.     end
  74.     # 降级
  75.     while @exp < @exp_list[@level]
  76.       @level -= 1
  77.     end
  78.     # 修正当前的 HP 与 SP 超过最大值
  79.     @hp = [@hp, self.maxhp].min
  80.     @sp = [@sp, self.maxsp].min
  81.   end
  82. end
  83. #==============================================================================
  84. # ■ Window_Base
  85. #------------------------------------------------------------------------------
  86. #  游戏中全部窗口的超级类(追加定义)
  87. #==============================================================================
  88. class Window_Base < Window
  89.   #--------------------------------------------------------------------------
  90.   # ● 描绘 HP
  91.   #     actor : 角色
  92.   #     x     : 描画目标 X 坐标
  93.   #     y     : 描画目标 Y 坐标
  94.   #     width : 描画目标的宽
  95.   #--------------------------------------------------------------------------
  96.   def draw_actor_hp_lvup(actor, x, y)
  97.     self.contents.font.color = system_color
  98.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
  99.     if $temp_hp == 0
  100.       self.contents.font.color = normal_color
  101.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  102.     else
  103.       maxhp = actor.maxhp + $temp_hp
  104.       self.contents.font.color = Color.new(255, 128, 128, 255)
  105.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  106.       self.contents.font.color = normal_color      
  107.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  108.       if $temp_hp >=0
  109.         self.contents.font.color = Color.new(255, 128, 128, 255)
  110.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  111.       else
  112.         self.contents.font.color = Color.new(255,255,0,255)
  113.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  114.       end
  115.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  116.       self.contents.font.color = normal_color
  117.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  118.     end
  119.   end
  120.   #--------------------------------------------------------------------------
  121.   # ● 描绘 SP
  122.   #     actor : 角色
  123.   #     x     : 描画目标 X 坐标
  124.   #     y     : 描画目标 Y 坐标
  125.   #     width : 描画目标的宽
  126.   #--------------------------------------------------------------------------
  127.   def draw_actor_sp_lvup(actor, x, y)
  128.     self.contents.font.color = system_color
  129.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
  130.     if $temp_hp == 0
  131.       self.contents.font.color = normal_color
  132.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
  133.     else
  134.       maxsp = actor.maxsp + $temp_sp
  135.       self.contents.font.color = Color.new(255, 128, 128, 255)
  136.       self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
  137.       self.contents.font.color = normal_color      
  138.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  139.       if $temp_sp >=0
  140.         self.contents.font.color = Color.new(255, 128, 128, 255)
  141.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  142.       else
  143.         self.contents.font.color = Color.new(255,255,0,255)
  144.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  145.       end
  146.       self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
  147.       self.contents.font.color = normal_color
  148.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  149.     end
  150.   end
  151.   #--------------------------------------------------------------------------
  152.   # ● 描绘能力值
  153.   #     actor : 角色
  154.   #     x     : 描画目标 X 坐标
  155.   #     y     : 描画目标 Y 坐标
  156.   #     type  : 能力值种类 (0~4)
  157.   #--------------------------------------------------------------------------
  158.   def draw_actor_lvup(actor, x, y, type)   
  159.     # 定义数字颜色
  160.     lvup = normal_color
  161.     upcolor = Color.new(255, 128, 128, 255)
  162.     self.contents.font.color = normal_color   
  163.     case type
  164.     when 0
  165.       parameter_name = $data_system.words.str
  166.       parameter_value = actor.str
  167.       parameter_value_temp = parameter_value + $temp_str
  168.       if $temp_str != 0
  169.         lvup = upcolor
  170.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  171.         if $temp_str >= 0
  172.           self.contents.font.color = lvup
  173.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  174.         else
  175.           self.contents.font.color = Color.new(255,255,0,255)
  176.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  177.         end        
  178.         self.contents.draw_text(x + 272, y, 80, 32, $temp_str.abs.to_s,1)
  179.         self.contents.font.color = normal_color
  180.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  181.       end
  182.     when 1
  183.       parameter_name = $data_system.words.dex
  184.       parameter_value = actor.dex
  185.       parameter_value_temp = parameter_value + $temp_dex
  186.       if $temp_dex != 0
  187.         lvup = upcolor
  188.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  189.         if $temp_dex >= 0
  190.           self.contents.font.color = lvup
  191.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  192.         else
  193.           self.contents.font.color = Color.new(255,255,0,255)
  194.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  195.         end        
  196.         self.contents.draw_text(x + 272, y, 80, 32, $temp_dex.abs.to_s,1)
  197.         self.contents.font.color = normal_color
  198.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  199.       end
  200.     when 2
  201.       parameter_name = $data_system.words.agi
  202.       parameter_value = actor.agi
  203.       parameter_value_temp = parameter_value + $temp_agi
  204.       if $temp_agi != 0
  205.         lvup = upcolor
  206.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  207.         if $temp_agi >= 0
  208.           self.contents.font.color = lvup
  209.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  210.         else
  211.           self.contents.font.color = Color.new(255,255,0,255)
  212.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  213.         end        
  214.         self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
  215.         self.contents.font.color = normal_color
  216.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  217.       end
  218.     when 3
  219.       parameter_name = $data_system.words.int
  220.       parameter_value = actor.int
  221.       parameter_value_temp = parameter_value + $temp_int
  222.       if $temp_int != 0
  223.         lvup = upcolor
  224.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  225.         if $temp_int >= 0
  226.           self.contents.font.color = lvup
  227.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  228.         else
  229.           self.contents.font.color = Color.new(255,255,0,255)
  230.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  231.         end        
  232.         self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
  233.         self.contents.font.color = normal_color
  234.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  235.       end
  236.     when 4
  237.       parameter_name = "剩余点数"
  238.       parameter_value = $point
  239.       if $point != 0
  240.         lvup = upcolor
  241.       end
  242.     end   
  243.     self.contents.font.color = system_color
  244.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  245.     self.contents.font.color = normal_color
  246.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  247.     if type != 4
  248.       self.contents.draw_text(x + 150, y, 36, 32, "  →  ")
  249.     end  
  250.     self.contents.font.color = lvup
  251.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  252.     self.contents.font.color = normal_color        
  253.   end
  254. end
  255. #==============================================================================
  256. # ■ Window_lvup
  257. #------------------------------------------------------------------------------
  258. #  显示升级状态窗口。
  259. #==============================================================================
  260. class Window_Lvup < Window_Base
  261.   #--------------------------------------------------------------------------
  262.   # ● 初始化对像
  263.   #     actor : 角色
  264.   #--------------------------------------------------------------------------
  265.   def initialize(actor)
  266.     super(0, 0, 512, 320)
  267.     self.contents = Bitmap.new(width - 32, height - 32)
  268.     @actor = actor
  269.     refresh
  270.   end  
  271.   #--------------------------------------------------------------------------
  272.   # ● 刷新
  273.   #--------------------------------------------------------------------------
  274.   
  275.   def refresh
  276.     self.contents.clear
  277.     draw_actor_head(@actor,2,50)
  278.     #draw_actor_graphic(@actor, 40, 112)
  279.     draw_actor_name(@actor, 4, 0)
  280.     draw_actor_class(@actor, 4 + 144, 0)
  281.     draw_actor_level(@actor, 116, 32)
  282.     draw_actor_state(@actor, 116, 64)   
  283.     draw_actor_hp_lvup(@actor, 116+128, 32)
  284.     draw_actor_sp_lvup(@actor, 116+128, 64)
  285.     draw_actor_lvup(@actor, 116, 128, 0)
  286.     draw_actor_lvup(@actor, 116, 160, 1)
  287.     draw_actor_lvup(@actor, 116, 192, 2)
  288.     draw_actor_lvup(@actor, 116, 224, 3)
  289.     draw_actor_lvup(@actor, 116, 256, 4)
  290.   end
  291. end
  292. #==============================================================================
  293. # ■ Window_Help
  294. #------------------------------------------------------------------------------
  295. #  特技及物品的说明、角色的状态显示的窗口。
  296. #==============================================================================
  297. class Window_Lvup_Help < Window_Base
  298.   #--------------------------------------------------------------------------
  299.   # ● 初始化对像
  300.   #--------------------------------------------------------------------------
  301.   def initialize
  302.     super(0, 320, 640, 160)
  303.     self.contents = Bitmap.new(width - 32, height - 32)
  304.     @test = "" #——这个东西用来检测,节约内存专用
  305.   end  
  306.   #--------------------------------------------------------------------------
  307.   # ● 设置文本
  308.   #--------------------------------------------------------------------------
  309.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
  310.     if @test != text1
  311.       @test = text1
  312.     else
  313.       return
  314.     end   
  315.     self.contents.clear
  316.     self.contents.font.color = normal_color
  317.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  318.     if text2 != nil
  319.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  320.     end
  321.     self.contents.font.size -= 4
  322.     if text3 != nil
  323.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  324.     end
  325.     if text4 != nil
  326.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  327.     end
  328.     self.contents.font.size += 4
  329.   end
  330. end
  331. #==============================================================================
  332. # ■ Scene_lvup
  333. #------------------------------------------------------------------------------
  334. #  处理升级画面的类。
  335. #==============================================================================
  336. class Scene_Lvup
  337.   #--------------------------------------------------------------------------
  338.   # ● 初始化对像
  339.   #     actor_index : 角色索引
  340.   #     menu_index : 选项起始位置
  341.   #--------------------------------------------------------------------------
  342.   def initialize(actor_index = 0 , menu_index = 0)
  343.     @actor_index = actor_index
  344.     @menu_index = menu_index
  345.   end
  346.   #--------------------------------------------------------------------------
  347.   # ● 主处理
  348.   #--------------------------------------------------------------------------
  349.   def main
  350.     s1 = "增加体力"
  351.     s2 = "增加"+$data_system.words.str
  352.     s3 = "增加"+$data_system.words.dex
  353.     s4 = "增加"+$data_system.words.agi
  354.     s5 = "增加"+$data_system.words.int
  355.     s6 = "确认加点"
  356.     s7 = "点数重置"
  357.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  358.     @command_window.index = @menu_index
  359.     @command_window.height += 64
  360.     # 获取角色
  361.     @actor = $game_party.actors[@actor_index]
  362.     # 将角色的剩余点数带入
  363.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  364.     # 初始化临时量
  365.     $temp_str = 0
  366.     $temp_dex = 0
  367.     $temp_agi = 0
  368.     $temp_int = 0
  369.     $temp_hp = 0
  370.     $temp_sp = 0
  371.     #=========================================================================
  372.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  373.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  374.     #=========================================================================
  375.     # 每提升一次力量,提升多少附加能力
  376.     #=========================================================================
  377.     @str_hp = 0     # 每提升一次力量附加提升多少HP
  378.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  379.     @str_dex = 0    # 每提升一次力量附加提升多少灵巧
  380.     @str_agi = 0    # 每提升一次力量附加提升多少速度
  381.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  382.     @str_str = 10    # 每提升一次力量附加提升多少力量
  383.     #=========================================================================
  384.     # 每提升一次灵巧,提升多少附加能力
  385.     #=========================================================================
  386.     @dex_hp = 0     # 每提升一次灵巧附加提升多少HP
  387.     @dex_sp = 0     # 每提升一次灵巧附加提升多少SP
  388.     @dex_str = 0    # 每提升一次灵巧附加提升多少力量
  389.     @dex_agi = 0    # 每提升一次灵巧附加提升多少速度
  390.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  391.     @dex_dex = 10    # 每提升一次灵巧附加提升多少灵巧
  392.     #=========================================================================
  393.     # 每提升一次速度,提升多少附加能力
  394.     #=========================================================================
  395.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  396.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  397.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  398.     @agi_dex = 0    # 每提升一次速度附加提升多少灵巧
  399.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  400.     @agi_agi = 10    # 每提升一次速度附加提升多少速度
  401.     #=========================================================================
  402.     # 每提升一次魔力,提升多少附加能力
  403.     #=========================================================================
  404.     @int_hp = 0     # 每提升一次魔力附加提升多少HP
  405.     @int_sp = 0    # 每提升一次魔力附加提升多少SP
  406.     @int_str = 0   # 每提升一次魔力附加提升多少力量
  407.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  408.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  409.     @int_int = 10   # 每提升一次魔力附加提升多少魔力
  410.     #=========================================================================
  411.     # 每提升一次体力,提升多少附加能力
  412.     #=========================================================================
  413.     @hp = 100       # 每提升一次体力提升多少HP
  414.     @sp = 100       # 每提升一次体力提升多少SP
  415.     @hp_str = 0   # 每提升一次体力提升多少力量
  416.     @hp_dex = 0   # 每提升一次体力提升多少速度
  417.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  418.     @hp_int = 0   # 每提升一次体力提升多少魔力   
  419.     # 定义说明文字
  420.     @text_hp_sc = "体力可以增加生存的能力,可以延长生存的时间!"
  421.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  422.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀!"
  423.     @text_agi_sc = $data_system.words.agi + "可以提高回避、命中、逃跑成功率!"
  424.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果,可以增加1点魔法!"
  425.     @text_save = "保存分配情况并返回游戏"
  426.     @text_reset= "重新分配能力点数"
  427.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  428.     @text_hp = "最大" + $data_system.words.hp + "值"
  429.     @text_sp = "最大" + $data_system.words.sp + "值"
  430.     @text_str = "最大" + $data_system.words.str + "值"
  431.     @text_dex = "最大" + $data_system.words.dex + "值"
  432.     @text_agi = "最大" + $data_system.words.agi + "值"
  433.     @text_int = "最大" + $data_system.words.int + "值"
  434.     s_disable
  435.     # 生成状态窗口
  436.     @lvup_window = Window_Lvup.new(@actor)
  437.     @lvup_window.x = 128
  438.     @lvup_window.y = 0   
  439.     # 生成帮助窗口并初始化帮助文本
  440.     @help_window = Window_Lvup_Help.new   
  441.     # 执行过渡
  442.     Graphics.transition
  443.     # 主循环
  444.     loop do
  445.       # 刷新游戏画面
  446.       Graphics.update
  447.       # 刷新输入信息
  448.       Input.update
  449.       # 刷新画面
  450.       update
  451.       # 如果切换画面就中断循环
  452.       if $scene != self
  453.         break
  454.       end
  455.     end
  456.     # 准备过渡
  457.     Graphics.freeze
  458.     # 释放窗口
  459.     @command_window.dispose
  460.     @lvup_window.dispose
  461.     @help_window.dispose
  462.   end
  463.   #--------------------------------------------------------------------------
  464.   # ● 刷新画面
  465.   #--------------------------------------------------------------------------
  466.   def update
  467.     # 刷新窗口
  468.     @command_window.update
  469.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  470.     s_disable
  471.     @lvup_window.update
  472.     #=============================================================
  473.     # 按下 B 键的情况下
  474.     #=============================================================
  475.     if Input.trigger?(Input::B)
  476.       # 演奏取消 SE
  477.       $game_system.se_play($data_system.cancel_se)
  478.       # 切换到地图画面
  479.       $scene = Scene_Menu.new(6)
  480.       return
  481.     end
  482.     #=============================================================
  483.     # 按下 C 键的情况下
  484.     #=============================================================
  485.     if Input.trigger?(Input::C)      
  486.       if @command_window.index == 5
  487.           # 演奏确定 SE
  488.         $game_system.se_play($data_system.decision_se)
  489.         # 将角色的剩余点数带回
  490.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  491.         # 将角色点数实际加上
  492.         @actor.str += $temp_str
  493.         @actor.dex += $temp_dex
  494.         @actor.agi += $temp_agi
  495.         @actor.int += $temp_int
  496.         @actor.maxhp += $temp_hp
  497.         @actor.maxsp += $temp_sp
  498.         # 切换到地图画面
  499.         $scene = Scene_Map.new
  500.         return
  501.       end
  502.       if @command_window.index == 6
  503.           # 演奏确定 SE
  504.         $game_system.se_play($data_system.cancel_se)
  505.           # 将角色的剩余点数带入
  506.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  507.           # 初始化临时量
  508.         $temp_str = 0
  509.         $temp_dex = 0
  510.         $temp_agi = 0
  511.         $temp_int = 0
  512.         $temp_hp = 0
  513.         $temp_sp = 0
  514.         @lvup_window.refresh
  515.         return
  516.       end
  517.       if $point == 0
  518.         # 演奏冻结 SE
  519.         $game_system.se_play($data_system.buzzer_se)
  520.         return
  521.       end
  522.       case @command_window.index
  523.       when 0
  524.         # 演奏确定 SE
  525.         $game_system.se_play($data_system.decision_se)
  526.         $temp_hp += @hp
  527.         $temp_sp += @sp
  528.         $temp_str += @hp_str
  529.         $temp_dex += @hp_dex
  530.         $temp_agi += @hp_agi
  531.         $temp_int += @hp_int
  532.         $point -= 1
  533.         @lvup_window.refresh
  534.         s_disable
  535.         return
  536.       when 1
  537.         # 演奏确定 SE
  538.         $game_system.se_play($data_system.decision_se)
  539.         $temp_str += @str_str
  540.         $temp_hp += @str_hp
  541.         $temp_sp += @str_sp
  542.         $temp_dex += @str_dex
  543.         $temp_agi += @str_agi
  544.         $temp_int += @str_int
  545.         $point -= 1
  546.         @lvup_window.refresh
  547.         s_disable
  548.         return
  549.       when 2
  550.         # 演奏确定 SE
  551.         $game_system.se_play($data_system.decision_se)
  552.         $temp_dex += @dex_dex
  553.         $temp_hp += @dex_hp
  554.         $temp_sp += @dex_sp
  555.         $temp_str += @dex_str
  556.         $temp_agi += @dex_agi
  557.         $temp_int += @dex_int
  558.         $point -= 1
  559.         @lvup_window.refresh
  560.         s_disable
  561.         return
  562.       when 3
  563.         # 演奏确定 SE
  564.         $game_system.se_play($data_system.decision_se)
  565.         $temp_agi += @agi_agi
  566.         $temp_hp += @agi_hp
  567.         $temp_sp += @agi_sp
  568.         $temp_str += @agi_str
  569.         $temp_dex += @agi_dex
  570.         $temp_int += @agi_int
  571.         $point -= 1
  572.         @lvup_window.refresh
  573.         s_disable
  574.         return
  575.       when 4
  576.         # 演奏确定 SE
  577.         $game_system.se_play($data_system.decision_se)
  578.         $temp_int += @int_int
  579.         $temp_hp += @int_hp
  580.         $temp_sp += @int_sp
  581.         $temp_str += @int_str
  582.         $temp_dex += @int_dex
  583.         $temp_agi += @int_agi
  584.         $point -= 1
  585.         @lvup_window.refresh
  586.         s_disable
  587.         return
  588.       end
  589.     end
  590.     #=============================================================
  591.     # 什么都没有按下的情况
  592.     #=============================================================
  593.     case @command_window.index   
  594.     when 0  # 增加体力
  595.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  596.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  597.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  598.     when 1  # 增加力量
  599.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  600.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  601.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  602.     when 2  # 增加灵巧
  603.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  604.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  605.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  606.     when 3  # 增加速度
  607.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  608.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  609.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  610.     when 4  # 增加魔力
  611.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  612.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  613.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  614.     when 5 # 保存设定
  615.       @help_window.lvup_text(@text_save)
  616.     when 6 # 点数重置
  617.       @help_window.lvup_text(@text_reset)     
  618.     end
  619.     #=============================================================
  620.     # 按下R与L换人的情况
  621.     #=============================================================      
  622.     if Input.trigger?(Input::R)
  623.       # 演奏光标 SE
  624.       $game_system.se_play($data_system.cursor_se)
  625.       # 移至下一位角色
  626.       @actor_index += 1
  627.       @actor_index %= $game_party.actors.size
  628.       # 切换到别的状态画面
  629.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  630.       return
  631.     end
  632.     # 按下 L 键的情况下
  633.     if Input.trigger?(Input::L)
  634.       # 演奏光标 SE
  635.       $game_system.se_play($data_system.cursor_se)
  636.       # 移至上一位角色
  637.       @actor_index += $game_party.actors.size - 1
  638.       @actor_index %= $game_party.actors.size
  639.       # 切换到别的状态画面
  640.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  641.       return
  642.     end
  643.   end  
  644.   #--------------------------------------------------------------------------
  645.   # ● 选项明暗判断
  646.   #--------------------------------------------------------------------------
  647.   def s_disable
  648.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  649.     if $point == 0
  650.       @command_window.disable_item(0)
  651.       @command_window.disable_item(1)
  652.       @command_window.disable_item(2)
  653.       @command_window.disable_item(3)
  654.       @command_window.disable_item(4)
  655.     else
  656.       @command_window.able_item(0)
  657.       @command_window.able_item(1)      
  658.       @command_window.able_item(2)
  659.       @command_window.able_item(3)
  660.       @command_window.able_item(4)
  661.     end
  662.   end
  663. end
复制代码


为了方便,我还是放了范例,自己看吧。
http://rpg.blue/upload_program/files/Show Picture LVuP.zip
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-29
帖子
45
4
 楼主| 发表于 2007-8-24 22:15:56 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
229
在线时间
17 小时
注册时间
2007-8-22
帖子
114
5
发表于 2007-8-24 22:42:05 | 只看该作者
直接改脚本把如在Window_MenuStatus中的角色行走图,的字眼actor = $game_party.actors
改成testname=actor.id.to_s+"f"
      bitmap=Bitmap.new("Graphics/pictures/#{testname}")
    src_rect=Rect.new(0,0,bitmap.width,bitmap.height)#大小可调
    self.contents.blt(0,y,bitmap,src_rect)
这样改可以把1号角色行走图改成数据库中pictures文件甲名为1f的图片,2号的就是2f依次类推
还有你可以把上面的名字等坐标修改下那样会更好.
不要麻仁.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2026-6-25 06:44

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表