或者看這個:(最好下載魔塔的模型,裏面的東西都帶著)
#註意:自己按鍵的圖片放在圖標文件夾裏,命名為紅鍵、藍鍵、黃鍵。
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,用於任何遊戲。請保留這些信息。別以為加密就能做到,德爾。
#==========================================================================