赞 | 3 |
VIP | 0 |
好人卡 | 0 |
积分 | 8 |
经验 | 8743 |
最后登录 | 2023-2-18 |
在线时间 | 350 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 780
- 在线时间
- 350 小时
- 注册时间
- 2013-8-5
- 帖子
- 77
|
7楼
楼主 |
发表于 2013-12-15 01:16:46
|
只看该作者
#============================================================================ # 〇 地图显示血条魔条 # ——By.冰舞蝶恋 #---------------------------------------------------------------------------- # 说明:显示的文字可自由更动来达到游戏需要的效果。 #---------------------------------------------------------------------------- # 以下是作者的白痴留言,尽管无视吧! # 啊哈哈!这可是咱第一个独立完成的脚本吖!! # 一时无聊做的……兴许可以用在ARPG之类的地方吧。偶然看到有不少人在拿RM做 # ARPG,又发现似乎没有(除了邪恶的fux2字眼的那个- -||b),做了个比较完善 # 的……排版不是很好看,坐标可以自己调整。 #============================================================================ # ○ACE移植 # ——By.米酒獭酱 #只是把这个脚本移植到了ACE上,因为找不到ACE代表魔攻魔防的系统变量所以舍去了, #若大家找到了也可以加上~ #总之这个脚本就是集显示图片显示头像显示变量显示金钱什么的为一体的脚本~ #(话说本人也是第一次弄脚本竟然就移植成功了) # 坐标可以自由调整+1~ $LBA = 1517 # 当这个开挂开启时,地图状态才显示。 #============================================================================== # ■ Scene_Map #------------------------------------------------------------------------------ # 处理地图划面的类。 #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # ● 开始处理 #-------------------------------------------------------------------------- alias map_windpwz_start start def start map_windpwz_start @mapz_window = Window_MapZ.new(0, 0) @mapz_window.refresh @mapz_window.hide end alias map_windpwz_update update def update map_windpwz_update @mapz_window.visible = $game_switches[$LBA] @mapz_window.refresh if check_update_mapz end def check_update_mapz actor = $game_party.leader # 变量变化时刷新 if @show_actor_var != $game_variables[330] @show_actor_var = $game_variables[330] return true end # 血量变化时刷新 if @show_actor_hp != actor.hp @show_actor_hp = actor.hp return true end # 金钱变化时刷新 if @show_actor_gold != $game_party.gold @show_actor_gold = $game_party.gold return true end # 领队换人时刷新 if @show_actor != actor @show_actor = actor return true end # 等级变化时刷新 if @show_actor_lv != actor.level @show_actor_lv = actor.level return true end # 攻击变化时刷新 if @show_actor_atk != actor.atk @show_actor_atk = actor.atk return true end # 防御变化时刷新 if @show_actor_def != actor.def @show_actor_def = actor.def return true end return false end end class Window_MapZ < Window_Base #-------------------------------------------------------------------------- # ● 初始化对像 #-------------------------------------------------------------------------- def initialize(x,y) super(x-8, y-8, Graphics.width+16 ,Graphics.height+16) self.opacity = 0 update end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear actor = $game_party.leader fw = 100 # 获取角色头像+空格 lh = line_height # 获取行高 gw = Graphics.width # 获取游戏视窗宽度 gh = Graphics.height # 获取游戏视窗高度 # 绘制领队角色头像、体力和魔力 draw_actor_face(actor,0 ,0 ) draw_actor_hp(actor, fw, 4 , 160) draw_actor_mp(actor, fw, lh+4, 160) # 绘制标题 change_color(system_color) contents.draw_text(fw+170, 4 , gw, lh, "攻:") contents.draw_text(fw+170, lh+4 , gw, lh, "防:") gold_text = "所持金钱:" contents.draw_text(fw+170, lh*2+4, gw, lh, gold_text) gdx = text_size(gold_text).width cudx = gdx + text_size($game_party.gold).width contents.draw_text(fw+176+cudx, lh*2+4, gw, lh, Vocab.currency_unit) # 绘制文字 change_color(normal_color) lv_text = "#{actor.name} #{Vocab.level_a} #{actor.level}" contents.draw_text(fw, lh*2+4, gw, lh, lv_text) contents.draw_text(fw+lh*2+170, 4, gw, lh, actor.atk) contents.draw_text(fw+lh*2+170, lh+4, gw, lh, actor.def) contents.draw_text(fw+176+gdx, lh*2+4, gw, lh, $game_party.gold) # 绘制要显示的系统变量 change_color(text_color(30)) #改颜色什么的~ var_id =330 var_text = "#{ $game_variables[330]} #{$data_system.variables[330]}" contents.draw_text(0, gh-lh-8 , 534, lh, var_text) self.contents.draw_text(25,125 , 534, 24, "#{ $game_variables[349]}") self.contents.draw_text(25,157 , 534, 24, "#{ $game_variables[350]}") self.contents.draw_text(25,188 , 534, 24, "#{ $game_variables[351]}") self.contents.draw_text(25,221 , 534, 24, "#{ $game_variables[352]}") # 绘制要显示的系统变量 change_color(text_color(30)) #改颜色什么的~ var_id =341 var_text = "#{$data_system.variables[341]} #{ $game_variables[341]} " contents.draw_text(550, 60 , 534, lh, var_text) self.contents.draw_text(580,0 , 534, 24, "血#{ $game_variables[334]}") self.contents.draw_text(580,20 , 534, 24, "攻#{ $game_variables[332]}") self.contents.draw_text(580,40 , 534, 24, "防#{ $game_variables[333]}") # 绘制要显示的系统变量 change_color(text_color(30)) #改颜色什么的~ var_id =348 var_text = "#{$data_system.variables[348]} #{ $game_variables[348]} " contents.draw_text(550, 160 , 534, lh, var_text) self.contents.draw_text(580,100 , 534, 24, "血#{ $game_variables[344]}") self.contents.draw_text(580,120 , 534, 24, "攻#{ $game_variables[342]}") self.contents.draw_text(580,140 , 534, 24, "防#{ $game_variables[343]}") end end
#============================================================================
# 〇 地图显示血条魔条
# ——By.冰舞蝶恋
#----------------------------------------------------------------------------
# 说明:显示的文字可自由更动来达到游戏需要的效果。
#----------------------------------------------------------------------------
# 以下是作者的白痴留言,尽管无视吧!
# 啊哈哈!这可是咱第一个独立完成的脚本吖!!
# 一时无聊做的……兴许可以用在ARPG之类的地方吧。偶然看到有不少人在拿RM做
# ARPG,又发现似乎没有(除了邪恶的fux2字眼的那个- -||b),做了个比较完善
# 的……排版不是很好看,坐标可以自己调整。
#============================================================================
# ○ACE移植
# ——By.米酒獭酱
#只是把这个脚本移植到了ACE上,因为找不到ACE代表魔攻魔防的系统变量所以舍去了,
#若大家找到了也可以加上~
#总之这个脚本就是集显示图片显示头像显示变量显示金钱什么的为一体的脚本~
#(话说本人也是第一次弄脚本竟然就移植成功了)
# 坐标可以自由调整+1~
$LBA = 1517 # 当这个开挂开启时,地图状态才显示。
#==============================================================================
# ■ Scene_Map
#------------------------------------------------------------------------------
# 处理地图划面的类。
#==============================================================================
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
alias map_windpwz_start start
def start
map_windpwz_start
@mapz_window = Window_MapZ.new(0, 0)
@mapz_window.refresh
@mapz_window.hide
end
alias map_windpwz_update update
def update
map_windpwz_update
@mapz_window.visible = $game_switches[$LBA]
@mapz_window.refresh if check_update_mapz
end
def check_update_mapz
actor = $game_party.leader
# 变量变化时刷新
if @show_actor_var != $game_variables[330]
@show_actor_var = $game_variables[330]
return true
end
# 血量变化时刷新
if @show_actor_hp != actor.hp
@show_actor_hp = actor.hp
return true
end
# 金钱变化时刷新
if @show_actor_gold != $game_party.gold
@show_actor_gold = $game_party.gold
return true
end
# 领队换人时刷新
if @show_actor != actor
@show_actor = actor
return true
end
# 等级变化时刷新
if @show_actor_lv != actor.level
@show_actor_lv = actor.level
return true
end
# 攻击变化时刷新
if @show_actor_atk != actor.atk
@show_actor_atk = actor.atk
return true
end
# 防御变化时刷新
if @show_actor_def != actor.def
@show_actor_def = actor.def
return true
end
return false
end
end
class Window_MapZ < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize(x,y)
super(x-8, y-8, Graphics.width+16 ,Graphics.height+16)
self.opacity = 0
update
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
actor = $game_party.leader
fw = 100 # 获取角色头像+空格
lh = line_height # 获取行高
gw = Graphics.width # 获取游戏视窗宽度
gh = Graphics.height # 获取游戏视窗高度
# 绘制领队角色头像、体力和魔力
draw_actor_face(actor,0 ,0 )
draw_actor_hp(actor, fw, 4 , 160)
draw_actor_mp(actor, fw, lh+4, 160)
# 绘制标题
change_color(system_color)
contents.draw_text(fw+170, 4 , gw, lh, "攻:")
contents.draw_text(fw+170, lh+4 , gw, lh, "防:")
gold_text = "所持金钱:"
contents.draw_text(fw+170, lh*2+4, gw, lh, gold_text)
gdx = text_size(gold_text).width
cudx = gdx + text_size($game_party.gold).width
contents.draw_text(fw+176+cudx, lh*2+4, gw, lh, Vocab.currency_unit)
# 绘制文字
change_color(normal_color)
lv_text = "#{actor.name} #{Vocab.level_a} #{actor.level}"
contents.draw_text(fw, lh*2+4, gw, lh, lv_text)
contents.draw_text(fw+lh*2+170, 4, gw, lh, actor.atk)
contents.draw_text(fw+lh*2+170, lh+4, gw, lh, actor.def)
contents.draw_text(fw+176+gdx, lh*2+4, gw, lh, $game_party.gold)
# 绘制要显示的系统变量
change_color(text_color(30)) #改颜色什么的~
var_id =330
var_text = "#{ $game_variables[330]} #{$data_system.variables[330]}"
contents.draw_text(0, gh-lh-8 , 534, lh, var_text)
self.contents.draw_text(25,125 , 534, 24, "#{ $game_variables[349]}")
self.contents.draw_text(25,157 , 534, 24, "#{ $game_variables[350]}")
self.contents.draw_text(25,188 , 534, 24, "#{ $game_variables[351]}")
self.contents.draw_text(25,221 , 534, 24, "#{ $game_variables[352]}")
# 绘制要显示的系统变量
change_color(text_color(30)) #改颜色什么的~
var_id =341
var_text = "#{$data_system.variables[341]} #{ $game_variables[341]} "
contents.draw_text(550, 60 , 534, lh, var_text)
self.contents.draw_text(580,0 , 534, 24, "血#{ $game_variables[334]}")
self.contents.draw_text(580,20 , 534, 24, "攻#{ $game_variables[332]}")
self.contents.draw_text(580,40 , 534, 24, "防#{ $game_variables[333]}")
# 绘制要显示的系统变量
change_color(text_color(30)) #改颜色什么的~
var_id =348
var_text = "#{$data_system.variables[348]} #{ $game_variables[348]} "
contents.draw_text(550, 160 , 534, lh, var_text)
self.contents.draw_text(580,100 , 534, 24, "血#{ $game_variables[344]}")
self.contents.draw_text(580,120 , 534, 24, "攻#{ $game_variables[342]}")
self.contents.draw_text(580,140 , 534, 24, "防#{ $game_variables[343]}")
end
end
介个是全部的脚本~~
想用开关控制:
# 绘制要显示的系统变量 change_color(text_color(30)) #改颜色什么的~ var_id =330 var_text = "#{ $game_variables[330]} #{$data_system.variables[330]}" contents.draw_text(0, gh-lh-8 , 534, lh, var_text) self.contents.draw_text(25,125 , 534, 24, "#{ $game_variables[349]}") self.contents.draw_text(25,157 , 534, 24, "#{ $game_variables[350]}") self.contents.draw_text(25,188 , 534, 24, "#{ $game_variables[351]}") self.contents.draw_text(25,221 , 534, 24, "#{ $game_variables[352]}")
# 绘制要显示的系统变量
change_color(text_color(30)) #改颜色什么的~
var_id =330
var_text = "#{ $game_variables[330]} #{$data_system.variables[330]}"
contents.draw_text(0, gh-lh-8 , 534, lh, var_text)
self.contents.draw_text(25,125 , 534, 24, "#{ $game_variables[349]}")
self.contents.draw_text(25,157 , 534, 24, "#{ $game_variables[350]}")
self.contents.draw_text(25,188 , 534, 24, "#{ $game_variables[351]}")
self.contents.draw_text(25,221 , 534, 24, "#{ $game_variables[352]}")
# 绘制要显示的系统变量 change_color(text_color(30)) #改颜色什么的~ var_id =341 var_text = "#{$data_system.variables[341]} #{ $game_variables[341]} " contents.draw_text(550, 60 , 534, lh, var_text) self.contents.draw_text(580,0 , 534, 24, "血#{ $game_variables[334]}") self.contents.draw_text(580,20 , 534, 24, "攻#{ $game_variables[332]}") self.contents.draw_text(580,40 , 534, 24, "防#{ $game_variables[333]}")
# 绘制要显示的系统变量
change_color(text_color(30)) #改颜色什么的~
var_id =341
var_text = "#{$data_system.variables[341]} #{ $game_variables[341]} "
contents.draw_text(550, 60 , 534, lh, var_text)
self.contents.draw_text(580,0 , 534, 24, "血#{ $game_variables[334]}")
self.contents.draw_text(580,20 , 534, 24, "攻#{ $game_variables[332]}")
self.contents.draw_text(580,40 , 534, 24, "防#{ $game_variables[333]}")
# 绘制要显示的系统变量 change_color(text_color(30)) #改颜色什么的~ var_id =348 var_text = "#{$data_system.variables[348]} #{ $game_variables[348]} " contents.draw_text(550, 160 , 534, lh, var_text) self.contents.draw_text(580,100 , 534, 24, "血#{ $game_variables[344]}") self.contents.draw_text(580,120 , 534, 24, "攻#{ $game_variables[342]}") self.contents.draw_text(580,140 , 534, 24, "防#{ $game_variables[343]}")
# 绘制要显示的系统变量
change_color(text_color(30)) #改颜色什么的~
var_id =348
var_text = "#{$data_system.variables[348]} #{ $game_variables[348]} "
contents.draw_text(550, 160 , 534, lh, var_text)
self.contents.draw_text(580,100 , 534, 24, "血#{ $game_variables[344]}")
self.contents.draw_text(580,120 , 534, 24, "攻#{ $game_variables[342]}")
self.contents.draw_text(580,140 , 534, 24, "防#{ $game_variables[343]}")
想用3个开关分别 [开启/关闭] 这3个部分在地图上显示
因为之后还会再加上新的内容,所以会需要再加上新的开关
想请问一下~~有办法在上述的脚本直接加上开关,[开启or关闭]各自内容的显示吗?
谢谢~~
是做魔塔类的
所以在地图上显示怪物的数值
怪物同种类消失后,要让这种怪物的数值消失
进入下一层后
会有新的怪物
所以数值要让它消失,换成另一个怪的数值的显示
谢谢了
非常感谢!!
|
|