赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 340 |
最后登录 | 2012-3-5 |
在线时间 | 11 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 11 小时
- 注册时间
- 2009-12-28
- 帖子
- 8
|
即时战斗脚本提示
342@actor_command_window.add_command("逃跑")
343if !$game_temp.battle_can_escape
344@actor_command_window.disable_item(@cp_esc
提示342 344 出现错误 两行注释后进去就是:
战斗脚本还有:
还有个问题是 使用了显示地图名与坐标
画面没注标图片
#-----------------------------------------------------------------------------
# ■class map_XY
#-----------------------------------------------------------------------------
#--------------------------------------#
# 大话西游单机论坛 rpg520.5d6d.com #
#--------------------------------------#
class Window_xy < Window_Base
def initialize
super(0, 0, 680, 560) #175, 100
self.contents = Bitmap.new(width - 32, height - 22)
self.opacity = 0
self.back_opacity = 0
self.contents_opacity = 255
self.visible = false
refresh
@x = $game_player.x
@y = $game_player.y
@id = $game_map.map_id
end
def refresh
@x = $game_player.x
@y = $game_player.y
@id = $game_map.map_id
self.contents.clear
a = "xy"
bitmap=Bitmap.new("Graphics/Pictures/#{a}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect)
$mapnames = load_data("Data/MapInfos.rxdata")
if map_name = nil
map_name = "测试"
else
map_name = $mapnames[@id].name
end
self.contents.font.bold = true
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 15
self.contents.draw_text(2, 4, 80, 18, map_name,2)
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 15
self.contents.draw_text(2, 4, 80, 18, map_name,2)
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 15
self.contents.draw_text(2, 4, 80, 18, map_name,2)
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 12
self.contents.draw_text(10, 24, 120, 15, "X:")
self.contents.font.color = normal_color
self.contents.font.size = 12
self.contents.draw_text(0, 15, 45, 32, @x.to_s,2)
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 12
self.contents.draw_text(60, 15, 90, 32, "Y:")
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.font.size = 12
self.contents.draw_text(0, 15, 95, 32, @y.to_s,2)
end
def judge
return true if @x != $game_player.x
return true if @y != $game_player.y
return true if @id != $game_map.map_id
return false
end
end
class Scene_Map
alias xy_66rpg_main main
def main
@xy_window = Window_xy.new
@xy_window.x = - 16
@xy_window.y = - 16
xy_66rpg_main
@xy_window.dispose
end
alias xy_66rpg_update update
def update
xy_66rpg_update
@xy_window.visible = false
@xy_window.refresh if @xy_window.judge
else
if $game_switches[41]
@xy_window.visible = true
else
@xy_window.visible = false
end
end
end |
|