| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 0 | 
 
| 经验 | 0 | 
 
| 最后登录 | 2012-6-5 | 
 
| 在线时间 | 5 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 350 
 
        - 在线时间
 - 5 小时
 
        - 注册时间
 - 2012-5-12
 
        - 帖子
 - 1
 
 
 
 | 
	
 本帖最后由 天国的嫁衣 于 2012-5-12 20:12 编辑  
 
#==============================================================================  
# ** 自动存档 
#------------------------------------------------------------------------------  
# 
#============================================================================== 
 
module Kernel 
 
alias origin_exit exit unless method_defined? :exit 
 
def exit(*args) 
   case $scene 
   when Scene_Map 
     AutoSave.common_save unless $game_map.interpreter.running? 
   when Scene_Battle 
     AutoSave.common_save unless $game_battle.interpreter.running? 
   else 
     if $scene.type != NilClass and $scene.type != Scene_Title 
       AutoSave.common_save 
     end 
   end 
   origin_exit(*args) 
end 
 
end 
 
 
module AutoSave 
 
if @scene_proc.nil? 
   @last_scene = nil.class 
   @scene_proc = proc do |value| 
     if value.nil? or value.is_a?(Scene_Title) 
       if @last_scene != NilClass and @last_scene != Scene_Title 
         AutoSave.common_save 
       end 
     end 
     @last_scene = value.type 
   end 
   trace_var(:$scene,@scene_proc)  
end 
 
module_function 
 
def common_save 
   filename = "Save#{$game_temp.last_file_index + 1}.rvdata" 
   file = File.open(filename, "wb") 
   write_save_data(file) 
   file.close 
end 
 
  def write_save_data(file) 
    characters = [] 
    for actor in $game_party.members 
      characters.push([actor.character_name, actor.character_index]) 
    end 
    $game_system.save_count += 1 
    $game_system.version_id = $data_system.version_id 
    @last_bgm = RPG::BGM::last 
    @last_bgs = RPG::BGS::last 
    Marshal.dump(characters,           file) 
    Marshal.dump(Graphics.frame_count, file) 
    Marshal.dump(@last_bgm,            file) 
    Marshal.dump(@last_bgs,            file) 
    Marshal.dump($game_system,         file) 
    Marshal.dump($game_message,        file) 
    Marshal.dump($game_switches,       file) 
    Marshal.dump($game_variables,      file) 
    Marshal.dump($game_self_switches,  file) 
    Marshal.dump($game_actors,         file) 
    Marshal.dump($game_party,          file) 
    Marshal.dump($game_troop,          file) 
    Marshal.dump($game_map,            file) 
    Marshal.dump($game_player,         file) 
  end 
 
end 
#============================================================================== 
 
 
#============================================================================== 
# ** MOG_地名提示_VX V1.0             
# 
# 一个窗口显示的地图的名称. 
# 您必须有一个画面内的图形Graphics/System的名称与地图名称。 
#============================================================================== 
 
module MOG 
#字体名称 
MPFONT = "Georgia" 
#淡出的ON / OFF 
MPNMFD = true 
#淡入淡出时间 
MPNMTM = 13 
#窗口的位置。 
# 0 = 左上角。 
# 1 = 左下方。 
# 2 = 右上角。 
# 3 = 右下角。 
MPNMPS = 0 
#禁用开关(ID)。 
WM_SWITCH_VIS_DISABLE = 115 
end 
 
#============================================================================== 
# ** Game_System 
#============================================================================== 
 
class Game_System 
attr_accessor :fdtm 
attr_accessor :mpnm_x 
attr_accessor :mpnm_y 
alias mog_vx06_initialize initialize 
def initialize 
mog_vx06_initialize 
@fdtm = 255 + 40 * MOG::MPNMTM 
if MOG::MPNMPS == 0  
@mpnm_x = -300 
@mpnm_y = 0 
elsif MOG::MPNMPS == 1 
@mpnm_x = -300 
@mpnm_y = 320 
elsif MOG::MPNMPS == 2 
@mpnm_x = 640 
@mpnm_y = 0 
else  
@mpnm_x = 640 
@mpnm_y = 320 
end   
end 
def mpnm_x 
return @mpnm_x 
end 
def mpnm_y 
return @mpnm_y 
end 
def fdtm 
if @fdtm <= 0 
@fdtm = 0  
end 
return @fdtm 
end 
end 
 
#============================================================================== 
# ** Game_Map 
#============================================================================== 
 
class Game_Map 
attr_reader   :map_id   
def mpname 
$mpname = load_data("Data/MapInfos.rvdata")  
$mpname[@map_id].name 
end 
end 
 
#============================================================================== 
# ** Window Base 
#============================================================================== 
 
class Window_Base < Window 
def nd_mapic  
mapic = Cache.system("")      
end   
def draw_mpname(x,y) 
mapic = Cache.system("Mpname") rescue nd_mapic    
cw = mapic.width   
ch = mapic.height  
src_rect = Rect.new(0, 0, cw, ch) 
self.contents.blt(x , y - ch + 65, mapic, src_rect) 
self.contents.font.name = MOG::MPFONT 
self.contents.font.size = 22 
self.contents.font.bold = true 
self.contents.font.shadow = true 
self.contents.font.color = Color.new(0,0,0,255) 
self.contents.draw_text(x + 76, y + 27, 110, 32, $game_map.mpname.to_s,1) 
self.contents.font.color = Color.new(255,255,255,255) 
self.contents.draw_text(x + 75, y + 26, 110, 32, $game_map.mpname.to_s,1) 
end 
end 
 
#============================================================================== 
# ** Mpname 
#============================================================================== 
 
class Mpname < Window_Base 
def initialize(x , y) 
super($game_system.mpnm_x, $game_system.mpnm_y, 250, WLH + 70) 
self.opacity = 0 
refresh 
end 
def refresh 
self.contents.clear 
draw_mpname(10,0)     
end 
end 
 
#============================================================================== 
# ** Scene_Map 
#============================================================================== 
 
class Scene_Map 
alias mog_vx06_start start  
def start 
@mpnm = Mpname.new($game_system.mpnm_x, $game_system.mpnm_y) 
@mpnm.contents_opacity = $game_system.fdtm 
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false 
@mpnm.visible = true 
else 
@mpnm.visible = false   
end   
mog_vx06_start   
end   
alias mog_vx06_terminate terminate 
def terminate 
mog_vx06_terminate 
@mpnm.dispose  
end 
alias mog_vx06_update update 
def update  
mog_vx06_update   
location_name_update  
end 
def location_name_update 
$game_system.mpnm_x = @mpnm.x 
$game_system.mpnm_y = @mpnm.y 
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == true or $game_system.fdtm <= 0 
@mpnm.visible = false   
else 
@mpnm.visible = true  
end  
if MOG::MPNMPS == 0 or MOG::MPNMPS == 1  
if @mpnm.x < 0 
@mpnm.x += 5 
elsif @mpnm.x >= 0 
@mpnm.x = 0 
end    
else 
if @mpnm.x > 300 
@mpnm.x -= 5 
elsif @mpnm.x <= 300 
@mpnm.x = 300 
end      
end  
@mpnm.contents_opacity = $game_system.fdtm 
if MOG::MPNMFD == true 
$game_system.fdtm -= 3 
end 
end 
alias mog_vx06_update_transfer_player update_transfer_player 
def update_transfer_player 
return unless $game_player.transfer?  
@mpnm.contents_opacity = 0 
mog_vx06_update_transfer_player 
if MOG::MPNMPS == 0  
$game_system.mpnm_x = -340 
$game_system.mpnm_y = 0 
elsif MOG::MPNMPS == 1 
$game_system.mpnm_x = -340 
$game_system.mpnm_y = 320 
elsif MOG::MPNMPS == 2 
$game_system.mpnm_x = 640 
$game_system.mpnm_y = 0 
else  
$game_system.mpnm_x = 640 
$game_system.mpnm_y = 320 
end   
@mpnm.y = $game_system.mpnm_y 
@mpnm.x = $game_system.mpnm_x 
$game_system.fdtm = 255 + 60 * MOG::MPNMTM 
@mpnm.refresh 
end 
end 
$mogscript = {} if $mogscript == nil 
$mogscript["location_name_vx"] = true 
 
#============================================================================== 
以上是两个脚本,求哪位大大帮忙解决下,谢谢! 
 
提示地名提示中 
#============================================================================== 
# ** Game_Map 
#============================================================================== 
 
class Game_Map 
attr_reader   :map_id   
def mpname 
$mpname = load_data("Data/MapInfos.rvdata")  
$mpname[@map_id].name 这句错误 
end 
end 
 
 |   
 
 
 
 |