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

Project1

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

[已经过期] 勋章脚本出错

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
255 小时
注册时间
2010-11-13
帖子
162
跳转到指定楼层
1
发表于 2012-2-4 16:09:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我刚刚写了一个勋章的脚本,插在菜单中用.
结果我发现无论当变量49等于多少时
勋章显示的都是变量49等于1时的图标
请问有人能教一下吗?谢谢了
一下是脚本
def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(10, 75, 120, 32, "勋章")
  if $game_variables[49] =1
    bitmap=Bitmap.new("Graphics/XZ/1")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =2
    bitmap=Bitmap.new("Graphics/XZ/2")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =3
    bitmap=Bitmap.new("Graphics/XZ/3")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =4
    bitmap=Bitmap.new("Graphics/XZ/4")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =5
    bitmap=Bitmap.new("Graphics/XZ/5")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =6
    bitmap=Bitmap.new("Graphics/XZ/6")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =7
    bitmap=Bitmap.new("Graphics/XZ/7")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =8
    bitmap=Bitmap.new("Graphics/XZ/8")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =9
    bitmap=Bitmap.new("Graphics/XZ/9")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =10
    bitmap=Bitmap.new("Graphics/XZ/10")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =11
    bitmap=Bitmap.new("Graphics/XZ/11")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =12
    bitmap=Bitmap.new("Graphics/XZ/12")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =13
    bitmap=Bitmap.new("Graphics/XZ/13")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =14
    bitmap=Bitmap.new("Graphics/XZ/14")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =15
    bitmap=Bitmap.new("Graphics/XZ/15")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =16
    bitmap=Bitmap.new("Graphics/XZ/16")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =17
    bitmap=Bitmap.new("Graphics/XZ/17")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =18
    bitmap=Bitmap.new("Graphics/XZ/18")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =19
    bitmap=Bitmap.new("Graphics/XZ/19")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =20
    bitmap=Bitmap.new("Graphics/XZ/20")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    elsif $game_variables[49] =21
    bitmap=Bitmap.new("Graphics/XZ/21")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    else
    bitmap=Bitmap.new("Graphics/XZ/21")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(50, 75, bitmap, src_rect)
    end
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-11-28 11:52

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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