Project1
标题: 求懂脚本前辈帮个小忙,谢谢 [打印本页]
作者: summerxud 时间: 2014-8-25 10:33
标题: 求懂脚本前辈帮个小忙,谢谢
效果如图- -,我搞了好久搞不定.
-.- 接触RPG MARKER断断续续也有好几年了,可是脚本还是不会写,求好心人帮助,我是学生 ,可能掏不出什么悬赏,不过我真的是真心求,如果有人能解决我真的感谢前辈,好人一生平安
作者: summerxud 时间: 2014-8-25 10:35
本帖最后由 summerxud 于 2014-8-25 10:38 编辑
发现我居然有2VIP,我可以拿出来给前辈,礼轻情意重..我不知道论坛怎么操作,到时候版主可以扣了加给前辈
- - 我也好像发现发错区了,请求版主移帖
作者: 永燃的狂炎 时间: 2014-8-25 11:00
本帖最后由 永燃的狂炎 于 2014-8-25 11:04 编辑
[box=LightBlue]回复 Reply[/box]
是否是要这样的
下面 #1 #2 中选出你想要的 功能
[box=LightBlue]#1[/box]

[box=LightBlue]#2[/box]

[box=LightBlue]#1脚本[/box]
- #==============================================================================
- # ** Window_MapStatus
- #==============================================================================
- class Window_MapStatus < Window_Base
- #----------------------------------------------------------------------------
- # * 初始化
- #----------------------------------------------------------------------------
- def initialize
- super(0, 0, 273, 144)
- refresh
- end
- #----------------------------------------------------------------------------
- # * 刷新画面
- #----------------------------------------------------------------------------
- def update
- super
- refresh
- end
- #----------------------------------------------------------------------------
- # * 更新内容
- #----------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_face($game_party.members[0], 0, 0)
- draw_actor_name($game_party.members[0], 0, 0)
- draw_actor_level($game_party.members[0], 101, 0)
- draw_actor_icons($game_party.members[0], 0, 72)
- draw_actor_hp($game_party.members[0], 101, 24, self.contents.width - 101)
- draw_actor_mp($game_party.members[0], 101, 48, self.contents.width - 101)
- draw_actor_tp($game_party.members[0], 101, 72, self.contents.width - 101)
- end
- #----------------------------------------------------------------------------
- # * 描绘值槽
- #----------------------------------------------------------------------------
- def draw_gauge(x, y, width, rate, color1, color2)
- fill_w = (width * rate).to_i
- self.contents.gradient_fill_rect(x, y+12, fill_w, 6, color1, color2, true)
- self.contents.gradient_fill_rect(x, y+18, fill_w, 6, color2, color1, true)
- self.contents.fill_rect(x, y+12, width, 2, Color.new(255, 255, 255))
- self.contents.fill_rect(x, y+22, width, 2, Color.new(255, 255, 255))
- self.contents.fill_rect(x, y+14, 2, 8, Color.new(255, 255, 255))
- self.contents.fill_rect(x+width-2, y+14, 2, 8, Color.new(255, 255, 255))
- end
- end
复制代码[box=LightBlue]#2脚本[/box]
- class Game_Actor < Game_Battler
- #----------------------------------------------------------------------------
- # * 重命名方法
- #----------------------------------------------------------------------------
- alias ms_refresh refresh
- alias ms_tp tp=
- alias ms_add_state add_state
- #--------------------------------------------------------------------------
- # * 刷新
- #--------------------------------------------------------------------------
- def refresh
- ms_refresh
- $refresh = true
- end
- #----------------------------------------------------------------------------
- # * 更改 TP
- #----------------------------------------------------------------------------
- def tp=(tp)
- ms_tp(tp)
- $refresh = true
- end
- #----------------------------------------------------------------------------
- # * 附加状态
- #----------------------------------------------------------------------------
- def add_state(state_id)
- ms_add_state(state_id)
- $refresh = true
- end
- end
- class Game_Party
- #----------------------------------------------------------------------------
- # * 重命名方法
- #----------------------------------------------------------------------------
- alias ms_swap_order swap_order
- #----------------------------------------------------------------------------
- # * 交换顺序
- #----------------------------------------------------------------------------
- def swap_order(index1, index2)
- ms_swap_order(index1, index2)
- $refresh = true
- end
- end
- #==============================================================================
- # ** Window_MapStatus
- #==============================================================================
- class Window_MapStatus < Window_Base
- #----------------------------------------------------------------------------
- # * 初始化
- #----------------------------------------------------------------------------
- def initialize
- super(0, 0, 273, 144)
- self.opacity = 0
- refresh
- end
- #----------------------------------------------------------------------------
- # * 刷新画面
- #----------------------------------------------------------------------------
- def update
- super
- refresh if $refresh
- $refresh = false
- if $game_player.screen_x >= 0 and $game_player.screen_x <= self.width and
- $game_player.screen_y >= 0 and $game_player.screen_y <= self.height
- self.contents_opacity = 75
- else self.contents_opacity = 255
- end
- end
- #----------------------------------------------------------------------------
- # * 更新内容
- #----------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_face($game_party.members[0], 0, 0)
- draw_actor_name($game_party.members[0], 0, 0)
- draw_actor_level($game_party.members[0], 101, 0)
- draw_actor_icons($game_party.members[0], 0, 72)
- draw_actor_hp($game_party.members[0], 101, 24, self.contents.width - 101)
- draw_actor_mp($game_party.members[0], 101, 48, self.contents.width - 101)
- draw_actor_tp($game_party.members[0], 101, 72, self.contents.width - 101)
- draw_actor_exp($game_party.members[0], 0, 96, self.contents.width)
- end
- #----------------------------------------------------------------------------
- # * 描绘EXP槽
- #----------------------------------------------------------------------------
- def draw_actor_exp(actor, x, y, width=124)
- rate = actor.exp.to_f / actor.next_level_exp.to_f
- draw_gauge(x, y, width, rate, Color.new(0, 255, 0), Color.new(100, 255, 100))
- self.contents.font.color = text_color(16)
- self.contents.draw_text(x, y, 56, 24, "EXP")
- self.contents.font.color = Color.new(255, 255, 255)
- en = "#{actor.exp}/#{actor.next_level_exp}"
- self.contents.draw_text(x, y, width, 24, en, 2)
- end
- #----------------------------------------------------------------------------
- # * 描绘值槽
- #----------------------------------------------------------------------------
- def draw_gauge(x, y, width, rate, color1, color2)
- fill_w = (width * rate).to_i
- self.contents.gradient_fill_rect(x, y+12, fill_w, 6, color1, color2, true)
- self.contents.gradient_fill_rect(x, y+18, fill_w, 6, color2, color1, true)
- self.contents.fill_rect(x, y+12, width, 2, Color.new(255, 255, 255))
- self.contents.fill_rect(x, y+22, width, 2, Color.new(255, 255, 255))
- self.contents.fill_rect(x, y+14, 2, 8, Color.new(255, 255, 255))
- self.contents.fill_rect(x+width-2, y+14, 2, 8, Color.new(255, 255, 255))
- end
- end
- class Scene_Map < Scene_Base
- #----------------------------------------------------------------------------
- # * 重命名方法
- #----------------------------------------------------------------------------
- alias ms_sta start
- #----------------------------------------------------------------------------
- # * 开始处理
- #----------------------------------------------------------------------------
- def start
- ms_sta
- @mapstatus_window = Window_MapStatus.new
- end
- 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]
作者: summerxud 时间: 2014-8-25 18:36
永燃的狂炎 发表于 2014-8-25 11:00 
回复 Reply[/box]
是否是要这样的
下面 #1 #2 中选出你想要的 功能
你好,只需要1个头像 旁边那槽是显示变量50的值,我不会修改脚本..(。◕∀◕。)
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |