魔塔战士状态栏怎么做?
或者看这个:(最好下载魔塔的模型,里面的东西都带着)
#注意:自己按键的图片放在图标文件夹里,命名为红键、蓝键、黄键。
Playerdate_SWITCH = 1 #当开关1打开时,这个脚本就会开始工作。
Playerdate_magicdef =19
Yellowkey_itemid=1
Bluekey_itemid=2
Redkey_itemid=3
#==============================================================================
# ■ Window_PlayerDate
# -
#显示玩家状态的窗口。
#==============================================================================
class Window _ PlayerDate & lt窗口_基础
# -
# ●初始化窗口
# -
定义初始化
超级(0,0,170,460)#395)#192,416
self.contents = Bitmap.new(宽度- 32,高度- 32)
self.z = 1
self.opacity=0
# self.back_opacity =255
# self.contents_opacity = 0
self.visible = false
# self.contents .清除
恢复精神
# if $game_switches[XY_SWITCH]
# self.contents_opacity = 0
#否则
# self.contents_opacity = 5
#结束
结束
定义刷新
自我内容.清除
x=25
x=30如果!$game_switches[27]
y=75
y=40如果!$game_switches[27]
# actor = $ game _ party . actors[1]
draw _ actor _ graphic($ game _ party . actors[0],20,35)
self . contents . font . color = text _ color(3)
# self.contents.draw _ text (4,0,70,45,"第一",2)
self . contents . draw _ text(100,11,25,20,"图层",0)
Self.contents.draw _ text (0,55,50,20," grade ",0)
Self.contents.draw _ text (4,65+x,40,20,"生活",0)
Self.contents.draw _ text (4,65+x * 2,40,20,"攻击",0)
Self.contents.draw _ text (4,65+x * 3,40,20," defense ",0)
Self.contents.draw _ text (4,65+x * 4,40,20,"魔防",0)if $ game _ switches[player date _ magic def]
自我。contents.draw _ text (4,65+x * 5,40,20," speed ",0) if $game_switches[27]
Self.contents.draw _ text (4,y+x * 6,40,20," experience ",0)
Self.contents.draw _ text (4,y+x * 7,40,20,"金币",0)
if $game_switches[26]
Bitmap = RPG::Cache.icon("黄键")#item.icon_name)
self.contents.blt(10,280,bitmap,Rect.new(0,0,32,32))
bitmap = RPG::cache . icon(" blue key ")# item . icon _ name)
self.contents.blt(10,307,bitmap,Rect.new(0,0,32,32))
bitmap = RPG::cache . icon(" red key ")# item . icon _ name)
self.contents.blt(10,334,bitmap,Rect.new(0,0,32,32))
其他
self . contents . font . color = text _ color(6)
Self.contents.draw _ text (8,285,50,20,"黄钥匙",0)
self . contents . font . color = text _ color(4)
Self.contents.draw _ text (8,365,438+03,50,20,"蓝色钥匙",0)
self . contents . font . color = text _ color(2)
Self.contents.draw _ text (8,341,50,20,"红钥匙",0)
结束
# @ x graphic = $ game _ party . actors[0]。战斗者姓名
@xfloor=$game_variables[2]
@ XL level = $ game _ actors[$ game _ variables[1]+1]。水平
@ xlife = $ game _ actors[$ game _ variables[1]+1]。惠普
@ x attact = $ game _ actors[$ game _ variables[1]+1]。潜艇用热中子反应堆(submarine thermal reactor的缩写)
@ x defense = $ game _ actors[$ game _ variables[1]+1]。DEXEDRINE的简称
@ xmagicdef = $ game _ actors[$ game _ variables[1]+1]。int if $ game _ switches[player date _ magic def]
@ x speed = $ game _ actors[$ game _ variables[1]+1]。agi if $game_switches[27]
@ xexp = $ game _ actors[$ game _ variables[1]+1]。经历
@xgold=$game_party.gold
@ xyellowkey = $ game _ party . item _ number(yellow key _ itemid)
@ xbluekey = $ game _ party . item _ number(Bluekey _ itemid)
@ xred key = $ game _ party . item _ number(red key _ itemid)
@ xpoison = $ game _ switches[13]
@ xpoor = $ game _ switches[15]
@ xslow = $ game _ switches[12]
self . contents . font . color = normal _ color
self.contents.draw_text(55,0,45,45,@xfloor.to_s,1)
self.contents.draw_text(50,50,65,30,@xlevel.to_s,2)
self.contents.draw_text(50,65+x,65,20,@xlife。to_s,2)
self.contents.draw_text(50,65+x*2,65,20,@xattact。to_s,2)
self.contents.draw_text(50,65+x*3,65,20,@ xdefence。to_s,2)
self.contents.draw_text(50,65+x*4,65,20,@xmagicdef。to_s,2)if $ game _ switches[player date _ magic def]
self.contents.draw_text(50,65+x*5,65,20,@xspeed。to_s,2) if $game_switches[27]
self.contents.draw_text(50,y+x*6,65,20,@xexp.to_s,2)
self.contents.draw_text(50,y+x*7,65,20,@xgold.to_s,2)
self . contents . font . color = text _ color(6)
self.contents.draw_text(75,285,25,20,@xyellowkey.to_s,2)
self . contents . font . color = text _ color(4)
self.contents.draw_text(75,313,25,20,@xbluekey。to_s,2)
self . contents . font . color = text _ color(2)
self.contents.draw_text(75,341,25,20,@xredkey.to_s,2)
self . contents . font . color = text _ color(3)
自我。contents.draw _ text (15,370,30,"毒"。to _ s,0) if $ game _ switches [13]。
self . contents . font . color = text _ color(5)
自我。contents.draw _ text (50,370,30,30,"谢绝"。to _ s,0) if $ game _ switches [15]
self . contents . font . color = text _ color(1)
Self.contents.draw _ text (85,370,30,30,"慢"。to _ s,0) if $ game _ switches [12]
结束
Def judge#用于判断数据是否有变化,节省内存。
#如果@ xgraphic = $ game _ party . actors[0],则返回true。战斗者姓名
if @xfloor返回true!=$game_variables[2]
if @xlevel返回true!= $ game _ actors[$ game _ variables[1]+1]。水平
返回true if @xlife!= $ game _ actors[$ game _ variables[1]+1]。惠普
if @xattact返回true!= $ game _ actors[$ game _ variables[1]+1]。潜艇用热中子反应堆(submarine thermal reactor的缩写)
还真if @ xdefence!= $ game _ actors[$ game _ variables[1]+1]。DEXEDRINE的简称
if @xmagicdef返回true!= $ game _ actors[$ game _ variables[1]+1]。int if $ game _ switches[player date _ magic def]
如果@xspeed返回true!= $ game _ actors[$ game _ variables[1]+1]。agi if $game_switches[27]
if @xexp返回true!= $ game _ actors[$ game _ variables[1]+1]。经历
返回true if @xgold!=$game_party.gold
if @xyellowkey返回true!= $ game _ party . item _ number(yellow key _ itemid)
if @xbluekey返回true!= $ game _ party . item _ number(blue key _ itemid)
if @xredkey返回true!= $ game _ party . item _ number(red key _ itemid)
if @xpoison返回true!=$game_switches[13]
if @xpoor返回true!=$game_switches[15]
if @xslow返回true!=$game_switches[12]
返回false
结束
结束
###########################################################################
#以下的东西不需要掌握~ #
###########################################################################
班级场景_地图
别名xy_66rpg_main main
def总管
@ player date _ Window = Window _ player date . new
# @xy_window.x = 640 - 160
# @xy_window.y = 480 - 96
# @xy_window.opacity = 0
xy_66rpg_main
@Playerdate_window。处理
结束
# -
# ●刷新屏幕
# -
别名xy_66rpg_update更新
定义更新
xy _ 66rpg _更新
if $ game _ switches[player date _ SWITCH]
@Playerdate_window。可见=真
@Playerdate_window。刷新if @Playerdate_window.judge
其他
@Playerdate_window。可见=假
结束
结束
结束
#==========================================================================
#这个脚本来自www.66rpg.com,用于任何游戏。请保留这些信息。别以为加密就能做到,德尔。
#==========================================================================