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

Project1

 找回密码
 注册会员
搜索

求懂脚本前辈帮个小忙,谢谢

查看数: 1788 | 评论数: 3 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2014-8-25 10:33

正文摘要:

效果如图- -,我搞了好久搞不定. -.- 接触RPG MARKER断断续续也有好几年了,可是脚本还是不会写,求好心人帮助,我是学生 ,可能掏不出什么悬赏,不过我真的是真心求,如果有人能解决我真的感谢前辈,好人一生平安 ...

回复

summerxud 发表于 2014-8-25 18:36:12
永燃的狂炎 发表于 2014-8-25 11:00
回复 Reply[/box]
是否是要这样的
下面 #1 #2 中选出你想要的 功能

你好,只需要1个头像 旁边那槽是显示变量50的值,我不会修改脚本..(。◕∀◕。)
永燃的狂炎 发表于 2014-8-25 11:00:21
本帖最后由 永燃的狂炎 于 2014-8-25 11:04 编辑

[box=LightBlue]回复 Reply[/box]

是否是要这样的
下面 #1 #2 中选出你想要的 功能
[box=LightBlue]#1[/box]



[box=LightBlue]#2[/box]



[box=LightBlue]#1脚本[/box]
  1. #==============================================================================
  2. # ** Window_MapStatus
  3. #==============================================================================
  4. class Window_MapStatus < Window_Base
  5.   #----------------------------------------------------------------------------
  6.   # * 初始化
  7.   #----------------------------------------------------------------------------
  8.   def initialize
  9.     super(0, 0, 273, 144)
  10.     refresh
  11.   end
  12.   #----------------------------------------------------------------------------
  13.   # * 刷新画面
  14.   #----------------------------------------------------------------------------
  15.   def update
  16.     super
  17.     refresh
  18.   end
  19.   #----------------------------------------------------------------------------
  20.   # * 更新内容
  21.   #----------------------------------------------------------------------------
  22.   def refresh
  23.     self.contents.clear
  24.     draw_actor_face($game_party.members[0], 0, 0)
  25.     draw_actor_name($game_party.members[0], 0, 0)
  26.     draw_actor_level($game_party.members[0], 101, 0)
  27.     draw_actor_icons($game_party.members[0], 0, 72)
  28.     draw_actor_hp($game_party.members[0], 101, 24, self.contents.width - 101)
  29.     draw_actor_mp($game_party.members[0], 101, 48, self.contents.width - 101)
  30.     draw_actor_tp($game_party.members[0], 101, 72, self.contents.width - 101)
  31.   end
  32.   #----------------------------------------------------------------------------
  33.   # * 描绘值槽
  34.   #----------------------------------------------------------------------------
  35.   def draw_gauge(x, y, width, rate, color1, color2)
  36.     fill_w = (width * rate).to_i
  37.     self.contents.gradient_fill_rect(x, y+12, fill_w, 6, color1, color2, true)
  38.     self.contents.gradient_fill_rect(x, y+18, fill_w, 6, color2, color1, true)
  39.     self.contents.fill_rect(x, y+12, width, 2, Color.new(255, 255, 255))
  40.     self.contents.fill_rect(x, y+22, width, 2, Color.new(255, 255, 255))
  41.     self.contents.fill_rect(x, y+14, 2, 8, Color.new(255, 255, 255))
  42.     self.contents.fill_rect(x+width-2, y+14, 2, 8, Color.new(255, 255, 255))
  43.   end
  44. end
复制代码
[box=LightBlue]#2脚本[/box]
  1. class Game_Actor < Game_Battler
  2.   #----------------------------------------------------------------------------
  3.   # * 重命名方法
  4.   #----------------------------------------------------------------------------
  5.   alias ms_refresh refresh
  6.   alias ms_tp tp=
  7.   alias ms_add_state add_state
  8.   #--------------------------------------------------------------------------
  9.   # * 刷新
  10.   #--------------------------------------------------------------------------
  11.   def refresh
  12.     ms_refresh
  13.     $refresh = true
  14.   end
  15.   #----------------------------------------------------------------------------
  16.   # * 更改 TP
  17.   #----------------------------------------------------------------------------
  18.   def tp=(tp)
  19.     ms_tp(tp)
  20.     $refresh = true
  21.   end
  22.   #----------------------------------------------------------------------------
  23.   # * 附加状态
  24.   #----------------------------------------------------------------------------
  25.   def add_state(state_id)
  26.     ms_add_state(state_id)
  27.     $refresh = true
  28.   end
  29. end
  30. class Game_Party
  31.   #----------------------------------------------------------------------------
  32.   # * 重命名方法
  33.   #----------------------------------------------------------------------------
  34.   alias ms_swap_order swap_order
  35.   #----------------------------------------------------------------------------
  36.   # * 交换顺序
  37.   #----------------------------------------------------------------------------
  38.   def swap_order(index1, index2)
  39.     ms_swap_order(index1, index2)
  40.     $refresh = true
  41.   end
  42. end
  43. #==============================================================================
  44. # ** Window_MapStatus
  45. #==============================================================================
  46. class Window_MapStatus < Window_Base
  47.   #----------------------------------------------------------------------------
  48.   # * 初始化
  49.   #----------------------------------------------------------------------------
  50.   def initialize
  51.     super(0, 0, 273, 144)
  52.     self.opacity = 0
  53.     refresh
  54.   end
  55.   #----------------------------------------------------------------------------
  56.   # * 刷新画面
  57.   #----------------------------------------------------------------------------
  58.   def update
  59.     super
  60.     refresh if $refresh
  61.     $refresh = false
  62.     if $game_player.screen_x >= 0 and $game_player.screen_x <= self.width and
  63.        $game_player.screen_y >= 0 and $game_player.screen_y <= self.height
  64.       self.contents_opacity = 75
  65.     else self.contents_opacity = 255
  66.     end
  67.   end
  68.   #----------------------------------------------------------------------------
  69.   # * 更新内容
  70.   #----------------------------------------------------------------------------
  71.   def refresh
  72.     self.contents.clear
  73.     draw_actor_face($game_party.members[0], 0, 0)
  74.     draw_actor_name($game_party.members[0], 0, 0)
  75.     draw_actor_level($game_party.members[0], 101, 0)
  76.     draw_actor_icons($game_party.members[0], 0, 72)
  77.     draw_actor_hp($game_party.members[0], 101, 24, self.contents.width - 101)
  78.     draw_actor_mp($game_party.members[0], 101, 48, self.contents.width - 101)
  79.     draw_actor_tp($game_party.members[0], 101, 72, self.contents.width - 101)
  80.     draw_actor_exp($game_party.members[0], 0, 96, self.contents.width)
  81.   end
  82.   #----------------------------------------------------------------------------
  83.   # * 描绘EXP槽
  84.   #----------------------------------------------------------------------------
  85.   def draw_actor_exp(actor, x, y, width=124)
  86.     rate = actor.exp.to_f / actor.next_level_exp.to_f
  87.     draw_gauge(x, y, width, rate, Color.new(0, 255, 0), Color.new(100, 255, 100))
  88.     self.contents.font.color = text_color(16)
  89.     self.contents.draw_text(x, y, 56, 24, "EXP")
  90.     self.contents.font.color = Color.new(255, 255, 255)
  91.     en = "#{actor.exp}/#{actor.next_level_exp}"
  92.     self.contents.draw_text(x, y, width, 24, en, 2)
  93.   end
  94.   #----------------------------------------------------------------------------
  95.   # * 描绘值槽
  96.   #----------------------------------------------------------------------------
  97.   def draw_gauge(x, y, width, rate, color1, color2)
  98.     fill_w = (width * rate).to_i
  99.     self.contents.gradient_fill_rect(x, y+12, fill_w, 6, color1, color2, true)
  100.     self.contents.gradient_fill_rect(x, y+18, fill_w, 6, color2, color1, true)
  101.     self.contents.fill_rect(x, y+12, width, 2, Color.new(255, 255, 255))
  102.     self.contents.fill_rect(x, y+22, width, 2, Color.new(255, 255, 255))
  103.     self.contents.fill_rect(x, y+14, 2, 8, Color.new(255, 255, 255))
  104.     self.contents.fill_rect(x+width-2, y+14, 2, 8, Color.new(255, 255, 255))
  105.   end
  106. end
  107. class Scene_Map < Scene_Base
  108.   #----------------------------------------------------------------------------
  109.   # * 重命名方法
  110.   #----------------------------------------------------------------------------
  111.   alias ms_sta start
  112.   #----------------------------------------------------------------------------
  113.   # * 开始处理
  114.   #----------------------------------------------------------------------------
  115.   def start
  116.     ms_sta
  117.     @mapstatus_window = Window_MapStatus.new
  118.   end
  119. end
复制代码
[box=LightBlue]范例[/box]

只有#2有范例 好好观察
百度: http://pan.baidu.com/share/link?shareid=416364&uk=2735273937

[box=LightBlue]网址[/box]

#1网址
【渣作品】VA脚本教程(二)<2013.2.26完结>

#2网址
【渣作品】VA脚本教程(三)<2013.3.21 完结> color]

[box=LightBlue]回复后感谢Hui Fu Hou Gan Xiang[/box]

如果对的话请点评或回复说对,并召唤版主 来发糖,如果我说的 对你来说实在太有用 你可以另外 自己发糖 给我

[box=LightBlue][/box]

评分

参与人数 2星屑 +1 梦石 +1 收起 理由
taroxd + 1 我很赞同
kuerlulu + 1 头像好赞

查看全部评分

summerxud 发表于 2014-8-25 10:35:06
本帖最后由 summerxud 于 2014-8-25 10:38 编辑

发现我居然有2VIP,我可以拿出来给前辈,礼轻情意重..我不知道论坛怎么操作,到时候版主可以扣了加给前辈


- - 我也好像发现发错区了,请求版主移帖
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2025-2-23 01:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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