zl245479821 发表于 2013-6-18 20:42 ![]()  
15,16,17的Y坐标还应该是0.测试了老久。。哎,大大,还有个问题,如果我想只在某张地图里开启这个脚本的 ...  
#============================================================================== # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息 #============================================================================== #显示金钱 by 小夏 #经superufo的帮助一个脚本菜鸟做的不太完美将就着用吧 Var_switch = 1 class Window_goldWindow < Window_Base def initialize  super(0,0,200,60)  self.opacity = 150  self.visible = false  refresh end def refresh  self.contents.clear  if $game_switches[Var_switch]  self.contents.draw_text(0, 0, 80, WLH, "金钱:")  self.contents.draw_text(80, 0, 40, WLH, $game_party.gold)  self.contents.draw_text(100,0, 40, WLH, Vocab::gold, 2)  end end end class Scene_Map < Scene_Base alias goldWindow_start start alias goldWindow_update  update alias goldWindow_terminate terminate def start  goldWindow_start  @goldWindow = Window_goldWindow.new end def update  @goldWindow.update  @goldWindow.refresh  if $game_switches[Var_switch]  @goldWindow.visible = true  end  goldWindow_update end def terminate  goldWindow_terminate  @goldWindow.dispose end end  #小夏作品 #转载者注明这个是superufo和小夏的作品谢谢合作 #============================================================================== # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息 #============================================================================== 
 
 #==============================================================================  
# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息  
#==============================================================================  
#显示金钱 by 小夏  
#经superufo的帮助一个脚本菜鸟做的不太完美将就着用吧  
Var_switch = 1  
class Window_goldWindow < Window_Base  
def initialize  
 super(0,0,200,60)  
 self.opacity = 150  
 self.visible = false  
 refresh  
end  
def refresh  
 self.contents.clear  
 if $game_switches[Var_switch]  
 self.contents.draw_text(0, 0, 80, WLH, "金钱:")  
 self.contents.draw_text(80, 0, 40, WLH, $game_party.gold)  
 self.contents.draw_text(100,0, 40, WLH, Vocab::gold, 2)  
 end  
end  
end  
class Scene_Map < Scene_Base  
alias goldWindow_start start  
alias goldWindow_update   
update  
alias goldWindow_terminate terminate  
def start  
 goldWindow_start  
 @goldWindow = Window_goldWindow.new  
end  
def update  
 @goldWindow.update  
 @goldWindow.refresh  
 if $game_switches[Var_switch]  
 @goldWindow.visible = true  
 end  
 goldWindow_update  
end  
def terminate  
 goldWindow_terminate  
 @goldWindow.dispose  
end  
end   
#小夏作品  
#转载者注明这个是superufo和小夏的作品谢谢合作  
#==============================================================================  
# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息  
#==============================================================================  
 
  
 
当1号开关打开时,这个脚本就工作,否则不工作 
你可以把Var_switch = 1改成等于N,那么就是N号开关打开时这个脚本才工作 
PS 金钱窗口位置我没改,LZ可以自行修改 |