Project1
标题:
关于进入副本的菜单
[打印本页]
作者:
HTTP404
时间:
2011-8-26 10:04
标题:
关于进入副本的菜单
我想要一个菜单脚本,进入后就像这样
左边栏选择后,再按一下空格(决定键),就能传送至某个场景,有这样的脚本吗? dsu_plus_rewardpost_czw
作者:
2578699
时间:
2011-8-26 10:11
图片看不到
作者:
癫狂侠客
时间:
2011-8-26 11:09
本帖最后由 癫狂侠客 于 2011-8-26 11:10 编辑
可以,直接在在Scene_Menu里添加选项,然后引导一个Scene类,
在Scene类里选择去的地方,执行跳转地图的脚本就可以了
PS:由于图片看不到所以只能大概说下,有问题可以QQ联系某侠,在线解决
QQ:361621602
作者:
HTTP404
时间:
2011-8-27 10:13
就这样,有这样的菜单吗?
!123.jpg
(43.56 KB, 下载次数: 2)
下载附件
保存到相册
2011-8-27 10:12 上传
作者:
Wind2010
时间:
2011-8-27 10:15
貌似这个可以用叶子的任务脚本做到?
作者:
HTTP404
时间:
2011-8-27 10:18
选定后,再按一下决定建就能换场景,有吗?
作者:
47731089
时间:
2011-8-27 10:36
用这个传送脚本怎么样,只是简陋了点。
因为不知到你是什么菜单,调用可以通过物品,公共事件。
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
# 自定义内容解释:
# TOWNS[编号]=["地名,可以随便写",开关编号,[传送去的地图id,传送去的地图x,
# 传送去的地图y],角色朝向]
#
# 编号请按照0、1、2、3……顺序往下排布
# 当编号的开关打开的时候,才可以选择这个传送地点
# 角色朝向,2为下,4为左,6为右,8为上,具体可以参考自己数字小键盘的方向和数字关系
# 如果是其他方向请自己改。
#
# 需要制作脚本,请点击66rpg.com最底部的QQ交谈
#
# 使用方法:在需要传送的传送门、传送石、传送羽毛、传送旅店一类的地方使用公共事件:
# 呼叫脚本:$scene = Scene_Teleport.new
#
# 制作者:柳柳
#==============================================================================
TOWNS=[]
TOWNS[0]=["古德城堡东门",11,[1,2,3],2]
TOWNS[1]=["古德城堡西门",12,[1,2,5],4]
TOWNS[2]=["修道院门口",13,[3,3,6],4]
TOWNS[3]=["女神遗迹南口",14,[4,2,6],4]
TOWNS[4]=["圣天城骑士团练兵场",15,[5,2,6],4]
TOWNS[5]=["许愿之塔",16,[6,9,6],4]
#==============================================================================
# ■ Window_Teleport
#------------------------------------------------------------------------------
# 处理传送的窗口
#==============================================================================
class Window_Teleport < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(640,640,64,64)
self.contents = Bitmap.new(width, height)
self.opacity = 180
get_towns
draw_towns
@column_max = 1
end
#--------------------------------------------------------------------------
# ● 获取可到达的城镇和窗口大小
#--------------------------------------------------------------------------
def get_towns
@carol3_towns = []
@width_temp = 0
@cont_use = false
for town in TOWNS
if $game_switches[town[1]]==true
@carol3_towns.push(town)
if contents.text_size(town[0]).width >= @width_temp
@width_temp = contents.text_size(town[0]).width
end
end
end
@item_max = @carol3_towns.size
if @item_max == 0
@carol3_towns[0] = ["没有可以传送的地方",1,[1,1,1]]
@width_temp = contents.text_size(@carol3_towns[0][0]).width
@item_max = 1
@cont_use = true
end
self.width = [@width_temp+32,480].min
self.height = [(@item_max+1)*32,360].min
self.x = (640-self.width)/2
self.y = (480-self.height)/2
self.contents = Bitmap.new(width-32,row_max*32)
end
#--------------------------------------------------------------------------
# ● 描绘城镇名称
#--------------------------------------------------------------------------
def draw_towns
for i in 0...@carol3_towns.size
self.contents.draw_text(0,i*32,@width_temp,32,@carol3_towns[i][0],1)
end
end
#--------------------------------------------------------------------------
# ● 返回的内容
#========================================================================
# ● 地图编号
#--------------------------------------------------------------------------
def map_id
return @carol3_towns[self.index][2][0]
end
#--------------------------------------------------------------------------
# ● 地图x坐标
#--------------------------------------------------------------------------
def map_x
return @carol3_towns[self.index][2][1]
end
#--------------------------------------------------------------------------
# ● 地图y坐标
#--------------------------------------------------------------------------
def map_y
return @carol3_towns[self.index][2][2]
end
#--------------------------------------------------------------------------
# ● 角色朝向
#--------------------------------------------------------------------------
def map_direction
return @carol3_towns[self.index][2][3]
end
#--------------------------------------------------------------------------
# ● 判断是否一个城市都没有
#--------------------------------------------------------------------------
def cant_use?
return @cont_use
end
end
#==============================================================================
# ■ Scene_Teleport
#------------------------------------------------------------------------------
# 处理传送执行的类
#==============================================================================
class Scene_Teleport
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
$game_system.se_play($data_system.decision_se)
@carol3_trans_white = false
@carol3_map_sprite = Spriteset_Map.new
@carol3_teleport_window = Window_Teleport.new
if @carol3_teleport_window.cant_use?
@carol3_teleport_window.index = -1
else
@carol3_teleport_window.index = 0
end
@carol3_teleport_window.active = true
Graphics.transition
loop do
Graphics.update
Input.update
carol3_update
if $scene != self
break
end
end
if @carol3_trans_white==true
@carol3_white_sprite = Sprite.new
@carol3_white_sprite.bitmap = Bitmap.new(640,480)
@carol3_white_sprite.opacity = 0
@carol3_white_sprite.bitmap.fill_rect(0, 0, 640, 480, Color.new(255,255,255,255))
for i in 0..20
@carol3_white_sprite.opacity += 15
@carol3_teleport_window.opacity -= 12
@carol3_teleport_window.contents_opacity -= 12
Graphics.update
end
Graphics.freeze
Graphics.transition(0)
Graphics.update
@carol3_map_sprite.dispose
$game_map.setup($game_temp.player_new_map_id)
$game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
$game_player.turn_down
$game_player.straighten
$game_map.autoplay
Graphics.frame_reset
for i in 0..20
@carol3_white_sprite.opacity -= 15
Graphics.update
end
@carol3_white_sprite.dispose
@carol3_teleport_window.dispose
Graphics.freeze
else
Graphics.freeze
@carol3_teleport_window.dispose
@carol3_map_sprite.dispose
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def carol3_update
@carol3_teleport_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if @carol3_teleport_window.index == -1
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
else
$game_temp.player_new_map_id = @carol3_teleport_window.map_id
$game_temp.player_new_x = @carol3_teleport_window.map_x
$game_temp.player_new_y = @carol3_teleport_window.map_y
$game_temp.player_new_direction = @carol3_teleport_window.map_direction
$game_temp.player_transferring = true
$game_temp.transition_processing = true
$game_temp.transition_name = ""
$scene = Scene_Map.new
@carol3_trans_white = true
Audio.se_play("Audio/SE/" + "018-Teleport01",100,100)
return
end
end
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
作者:
HTTP404
时间:
2011-8-29 13:58
急急急!有人会吗????????????????!!!!!!!!!!!!!!
作者:
zphyp120
时间:
2011-8-29 14:22
楼上上正解
zphyp120于2011-8-29 14:43补充以下内容:
[quote]那个太简单……[/quote]
你说黑暗圣剑的脚本简单?那你做一个黑暗圣剑传说出来?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1