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

Project1

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

菜单显示图片脚本的错误~~急求解决方案~~

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
171 小时
注册时间
2008-8-19
帖子
542
跳转到指定楼层
1
发表于 2009-4-5 11:27:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
怎么回事 大家帮帮忙!
  1. #==============================================================================
  2. # ■ Window_Status
  3. #------------------------------------------------------------------------------
  4. #  显示状态画面、完全规格的状态窗口。
  5. #==============================================================================

  6. class Window_Status < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor : 角色
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)
  12.     super(0, 0, 640, 480)
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     @actor = actor
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     testname = @actor.battler_name+"_h.png"
  23.     if $加密 == true
  24.       bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  25.       src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
  26.       self.contents.blt(0, y, bitmap, src_rect)  
  27.       self.contents.font.size = 18
  28.       self.contents.font.color = text_color(6)
  29.       draw_actor_name(@actor, 300, 0)
  30.       self.contents.font.color = text_color(0)
  31.       draw_actor_class(@actor, 400, 32)
  32.       draw_actor_level(@actor, 300, 32)
  33.       draw_actor_state(@actor, 480, 32)
  34.       draw_actor_hp(@actor, 300, 64, 150)
  35.       draw_actor_sp(@actor, 300, 96, 150)
  36.       draw_actor_exp_state(@actor, 300, 128, 150)
  37.       draw_actor_parameter_state(@actor, 480, 66, 0)
  38.       draw_actor_parameter_state(@actor, 480, 98, 1)
  39.       draw_actor_parameter_state(@actor, 480, 130, 2)
  40.       draw_actor_parameter_state(@actor, 320, 162, 3)
  41.       draw_actor_parameter_state(@actor, 320, 194, 4)
  42.       draw_actor_parameter_state(@actor, 480, 162, 5)
  43.       draw_actor_parameter_state(@actor, 480, 194, 6)
  44.       self.contents.font.color = system_color
  45.       self.contents.draw_text(300, 260, 96, 32, "身上装备")
  46.       draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
  47.       draw_item_name($data_armors[@actor.armor1_id], 460, 300)
  48.       draw_item_name($data_armors[@actor.armor2_id], 300, 340)
  49.       draw_item_name($data_armors[@actor.armor3_id], 460, 340)
  50.       draw_item_name($data_armors[@actor.armor4_id], 300, 380)
  51.     else
  52.       if FileTest.exist?("Graphics/battlers/#{testname}")
  53.         bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  54.         src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
  55.         self.contents.blt(0, y, bitmap, src_rect)  
  56.         self.contents.font.size = 18
  57.         self.contents.font.color = text_color(6)
  58.         draw_actor_name(@actor, 300, 0)
  59.         self.contents.font.color = text_color(0)
  60.         draw_actor_class(@actor, 400, 32)
  61.         draw_actor_level(@actor, 300, 32)
  62.         draw_actor_state(@actor, 480, 32)
  63.         draw_actor_hp(@actor, 300, 64, 150)
  64.         draw_actor_sp(@actor, 300, 96, 150)
  65.         draw_actor_exp_state(@actor, 300, 128, 150)
  66.         draw_actor_parameter_state(@actor, 480, 66, 0)
  67.         draw_actor_parameter_state(@actor, 480, 98, 1)
  68.         draw_actor_parameter_state(@actor, 480, 130, 2)
  69.         draw_actor_parameter_state(@actor, 320, 162, 3)
  70.         draw_actor_parameter_state(@actor, 320, 194, 4)
  71.         draw_actor_parameter_state(@actor, 480, 162, 5)
  72.         draw_actor_parameter_state(@actor, 480, 194, 6)
  73.         self.contents.font.color = system_color
  74.         self.contents.draw_text(300, 260, 96, 32, "身上装备")
  75.         draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
  76.         draw_item_name($data_armors[@actor.armor1_id], 460, 300)
  77.         draw_item_name($data_armors[@actor.armor2_id], 300, 340)
  78.         draw_item_name($data_armors[@actor.armor3_id], 460, 340)
  79.         draw_item_name($data_armors[@actor.armor4_id], 300, 380)
  80.       else
  81.         draw_actor_graphic(@actor, 40, 112)
  82.         draw_actor_name(@actor, 4, 0)
  83.         draw_actor_class(@actor, 4 + 144, 0)
  84.         draw_actor_level(@actor, 96, 32)
  85.         draw_actor_state(@actor, 96, 64)
  86.         draw_actor_hp(@actor, 96, 112, 172)
  87.         draw_actor_sp(@actor, 96, 144, 172)
  88.         draw_actor_parameter(@actor, 96, 192, 0)
  89.         draw_actor_parameter(@actor, 96, 224, 1)
  90.         draw_actor_parameter(@actor, 96, 256, 2)
  91.         draw_actor_parameter(@actor, 96, 304, 3)
  92.         draw_actor_parameter(@actor, 96, 336, 4)
  93.         draw_actor_parameter(@actor, 96, 368, 5)
  94.         draw_actor_parameter(@actor, 96, 400, 6)
  95.         self.contents.font.color = system_color
  96.         self.contents.draw_text(320, 48, 80, 32, "EXP")
  97.         self.contents.draw_text(320, 80, 80, 32, "NEXT")
  98.         self.contents.font.color = normal_color
  99.         self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
  100.         self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
  101.         self.contents.font.color = system_color
  102.         self.contents.draw_text(320, 160, 96, 32, "装备")
  103.         draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
  104.         draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
  105.         draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
  106.         draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
  107.         draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  108.       end
  109.     end
  110.   end
  111.   def dummy
  112.     self.contents.font.color = system_color
  113.     self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
  114.     self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
  115.     self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
  116.     self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
  117.     self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
  118.     draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
  119.     draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
  120.     draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
  121.     draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
  122.     draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  123.   end
  124. end
复制代码


为什么总是说
  1. draw_actor_exp_state(@actor, 300, 128, 150)
  2.       draw_actor_parameter_state(@actor, 480, 66, 0)
  3.       draw_actor_parameter_state(@actor, 480, 98, 1)
  4.       draw_actor_parameter_state(@actor, 480, 130, 2)
  5.       draw_actor_parameter_state(@actor, 320, 162, 3)
  6.       draw_actor_parameter_state(@actor, 320, 194, 4)
  7.       draw_actor_parameter_state(@actor, 480, 162, 5)
  8.       draw_actor_parameter_state(@actor, 480, 194, 6)
复制代码

这里开始有错,晕死!!!
一开始,导入F的那张我都改了下脚本就可以了。这个怎么不行了?就是从66RPG那里找的,到底怎么会事???各位高手说说啊?~~拜托啦
版务信息:版主帮忙结贴~
HQSouL

Lv1.梦旅人


梦石
0
星屑
89
在线时间
24 小时
注册时间
2006-5-27
帖子
11425

贵宾

2
发表于 2009-4-6 17:43:17 | 只看该作者
你用了别的什么脚本没?

还有,从6R上找的脚本不代表每个脚本之间都没有冲突……
毕竟是不同的作者不同的效果范围。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
93 小时
注册时间
2008-5-16
帖子
745
3
发表于 2009-4-6 18:52:01 | 只看该作者
就这
  1. ]#==============================================================================
  2. # ■ Window_Status
  3. #------------------------------------------------------------------------------
  4. #  显示状态画面、完全规格的状态窗口。
  5. #==============================================================================

  6. class Window_Status < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor : 角色
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)
  12.     super(0, 0, 640, 480)
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     @actor = actor
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     testname = @actor.battler_name+"_h.png"
  23.     if $加密 == true
  24.       bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  25.       src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
  26.       self.contents.blt(0, y, bitmap, src_rect)  
  27.       self.contents.font.size = 18
  28.       self.contents.font.color = text_color(6)
  29.       draw_actor_name(@actor, 300, 0)
  30.       self.contents.font.color = text_color(0)
  31.       draw_actor_class(@actor, 400, 32)
  32.       draw_actor_level(@actor, 300, 32)
  33.       draw_actor_state(@actor, 480, 32)
  34.       draw_actor_hp(@actor, 300, 64, 150)
  35.       draw_actor_sp(@actor, 300, 96, 150)
  36.       draw_actor_exp_state(@actor, 300, 128, 150)
  37.       draw_actor_parameter_state(@actor, 480, 66, 0)
  38.       draw_actor_parameter_state(@actor, 480, 98, 1)
  39.       draw_actor_parameter_state(@actor, 480, 130, 2)
  40.       draw_actor_parameter_state(@actor, 320, 162, 3)
  41.       draw_actor_parameter_state(@actor, 320, 194, 4)
  42.       draw_actor_parameter_state(@actor, 480, 162, 5)
  43.       draw_actor_parameter_state(@actor, 480, 194, 6)
  44.       self.contents.font.color = system_color
  45.       self.contents.draw_text(300, 260, 96, 32, "身上装备")
  46.       draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
  47.       draw_item_name($data_armors[@actor.armor1_id], 460, 300)
  48.       draw_item_name($data_armors[@actor.armor2_id], 300, 340)
  49.       draw_item_name($data_armors[@actor.armor3_id], 460, 340)
  50.       draw_item_name($data_armors[@actor.armor4_id], 300, 380)
  51.     else
  52.       if FileTest.exist?("Graphics/battlers/#{testname}")
  53.         bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  54.         src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
  55.         self.contents.blt(0, y, bitmap, src_rect)  
  56.         self.contents.font.size = 18
  57.         self.contents.font.color = text_color(6)
  58.         draw_actor_name(@actor, 300, 0)
  59.         self.contents.font.color = text_color(0)
  60.         draw_actor_class(@actor, 400, 32)
  61.         draw_actor_level(@actor, 300, 32)
  62.         draw_actor_state(@actor, 480, 32)
  63.         draw_actor_hp(@actor, 300, 64, 150)
  64.         draw_actor_sp(@actor, 300, 96, 150)
  65.         draw_actor_exp_state(@actor, 300, 128, 150)
  66.         draw_actor_parameter_state(@actor, 480, 66, 0)
  67.         draw_actor_parameter_state(@actor, 480, 98, 1)
  68.         draw_actor_parameter_state(@actor, 480, 130, 2)
  69.         draw_actor_parameter_state(@actor, 320, 162, 3)
  70.         draw_actor_parameter_state(@actor, 320, 194, 4)
  71.         draw_actor_parameter_state(@actor, 480, 162, 5)
  72.         draw_actor_parameter_state(@actor, 480, 194, 6)
  73.         self.contents.font.color = system_color
  74.         self.contents.draw_text(300, 260, 96, 32, "身上装备")
  75.         draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
  76.         draw_item_name($data_armors[@actor.armor1_id], 460, 300)
  77.         draw_item_name($data_armors[@actor.armor2_id], 300, 340)
  78.         draw_item_name($data_armors[@actor.armor3_id], 460, 340)
  79.         draw_item_name($data_armors[@actor.armor4_id], 300, 380)
  80.       else
  81.         draw_actor_graphic(@actor, 40, 112)
  82.         draw_actor_name(@actor, 4, 0)
  83.         draw_actor_class(@actor, 4 + 144, 0)
  84.         draw_actor_level(@actor, 96, 32)
  85.         draw_actor_state(@actor, 96, 64)
  86.         draw_actor_hp(@actor, 96, 112, 172)
  87.         draw_actor_sp(@actor, 96, 144, 172)
  88.         draw_actor_parameter(@actor, 96, 192, 0)
  89.         draw_actor_parameter(@actor, 96, 224, 1)
  90.         draw_actor_parameter(@actor, 96, 256, 2)
  91.         draw_actor_parameter(@actor, 96, 304, 3)
  92.         draw_actor_parameter(@actor, 96, 336, 4)
  93.         draw_actor_parameter(@actor, 96, 368, 5)
  94.         draw_actor_parameter(@actor, 96, 400, 6)
  95.         self.contents.font.color = system_color
  96.         self.contents.draw_text(320, 48, 80, 32, "EXP")
  97.         self.contents.draw_text(320, 80, 80, 32, "NEXT")
  98.         self.contents.font.color = normal_color
  99.         self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
  100.         self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
  101.         self.contents.font.color = system_color
  102.         self.contents.draw_text(320, 160, 96, 32, "装备")
  103.         draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
  104.         draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
  105.         draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
  106.         draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
  107.         draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  108.       end
  109.     end
  110.   end
  111.   def dummy
  112.     self.contents.font.color = system_color
  113.     self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
  114.     self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
  115.     self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
  116.     self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
  117.     self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
  118.     draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
  119.     draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
  120.     draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
  121.     draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
  122.     draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  123.   end
  124. end
复制代码
一段脚本吗?
如果是的话,你贴出来的这段脚本
draw_actor_exp_state(@actor, 300, 128, 150)
      draw_actor_parameter_state(@actor, 480, 66, 0)
      draw_actor_parameter_state(@actor, 480, 98, 1)
      draw_actor_parameter_state(@actor, 480, 130, 2)
      draw_actor_parameter_state(@actor, 320, 162, 3)
      draw_actor_parameter_state(@actor, 320, 194, 4)
      draw_actor_parameter_state(@actor, 480, 162, 5)
      draw_actor_parameter_state(@actor, 480, 194, 6)

貌似都没有定义过的函数,所以才会出错。
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-1-16 17:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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