Project1
标题:
【悬赏】请问这段脚本如何在对话中调用?
[打印本页]
作者:
月下耶鲁夫
时间:
2011-5-28 23:10
标题:
【悬赏】请问这段脚本如何在对话中调用?
本帖最后由 月下耶鲁夫 于 2011-5-29 15:59 编辑
#==============================================================================
# ■ 本?本源自[url]www.66rpg.com[/url],??与使用?保留此信息
#==============================================================================
#==============================================================================
# 菜?快捷? by Claimh
#------------------------------------------------------------------------------
# [url]http://www.k3.dion.ne.jp/~claimh/[/url]
#==============================================================================
module SHORTCUT
USE_ITEM_SHORT = true #——??物品菜?快捷?
USE_SKILL_SHORT = true #——??特技菜?快捷?
USE_EQUIP_SHORT = true #——????菜?快捷?
USE_SAVE_SHORT = false #——???存菜?快捷?
CHANGE_ITEM = Input::X #——物品快捷?的?位
CHANGE_SKILL = Input::Y #——特技快捷?的?位
CHANGE_EQUIP = Input::Z #——??快捷?的?位
CHANGE_SAVE = Input::A #——?存快捷?的?位
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
include SHORTCUT
alias update_short update
def update
update_short
menu_shortcut
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def menu_shortcut
if Input.trigger?(CHANGE_ITEM) and USE_ITEM_SHORT
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$item_short = true
call_item
end
end
if Input.trigger?(CHANGE_SKILL) and USE_SKILL_SHORT
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$skill_short = true
call_skill
end
end
if Input.trigger?(CHANGE_EQUIP) and USE_EQUIP_SHORT
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$equip_short = true
call_equip
end
end
if Input.trigger?(CHANGE_SAVE) and USE_SAVE_SHORT
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$save_short = true
call_save
end
end
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_item
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Item.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_skill
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Skill.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_equip
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Equip.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_save
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Save.new
end
end
#==============================================================================
# Scene_Item
#==============================================================================
class Scene_Item
alias update_item_short update_item
def update_item
if Input.trigger?(Input::B) and $item_short
$item_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_item_short
end
end
#==============================================================================
# Scene_Skill
#==============================================================================
class Scene_Skill
alias update_skill_short update_skill
def update_skill
if Input.trigger?(Input::B) and $skill_short
$skill_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_skill_short
end
end
#==============================================================================
# Scene_Equip
#==============================================================================
class Scene_Equip
alias update_equip_short update_right
def update_right
if Input.trigger?(Input::B) and $equip_short
$equip_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_equip_short
end
end
#==============================================================================
# Scene_Save
#==============================================================================
class Scene_Save
alias update_save_short on_cancel
def on_cancel
if $save_short
$save_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_save_short
end
alias save_decision on_decision
def on_decision(filename)
if $save_short
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
$save_short
$scene = Scene_Map.new
end
save_decision
end
end
复制代码
主要是想在 对话时 通过某个按键 可以调出 物品菜单。
如果这个脚本不行,哪位大大能写个?有偿劳动,奖励您说了算……只要我付得起。
http://ftp.66rpg.com/user/
月下耶鲁夫/134.rar
把工程补上了,希望帮看看,里面已经打上了 二楼修改后的 脚本
作者:
Wind2010
时间:
2011-5-28 23:16
#==============================================================================
# ■ 本脚本源自www.66rpg.com,转载与使用请保留此信息
#==============================================================================
#==============================================================================
# 菜单快捷键 by Claimh
#------------------------------------------------------------------------------
# http://www.k3.dion.ne.jp/~claimh/
#==============================================================================
module SHORTCUT
USE_ITEM_SHORT = true #——开启物品菜单快捷键
USE_SKILL_SHORT = true #——开启特技菜单快捷键
USE_EQUIP_SHORT = true #——开启装备菜单快捷键
USE_SAVE_SHORT = true #——开启储存菜单快捷键
CHANGE_ITEM = Input::X #——物品快捷键的键位
CHANGE_SKILL = Input::Y #——特技快捷键的键位
CHANGE_EQUIP = Input::Z #——装备快捷键的键位
CHANGE_SAVE = Input::A #——储存快捷键的键位
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
include SHORTCUT
alias update_short update
def update
update_short
menu_shortcut
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def menu_shortcut
if Input.trigger?(CHANGE_ITEM) and USE_ITEM_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$item_short = true
call_item
end
end
if Input.trigger?(CHANGE_SKILL) and USE_SKILL_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$skill_short = true
call_skill
end
end
if Input.trigger?(CHANGE_EQUIP) and USE_EQUIP_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$equip_short = true
call_equip
end
end
if Input.trigger?(CHANGE_SAVE) and USE_SAVE_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$save_short = true
call_save
end
end
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_item
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Item.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_skill
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Skill.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_equip
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Equip.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_save
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Save.new
end
end
#==============================================================================
# Scene_Item
#==============================================================================
class Scene_Item
alias update_item_short update_item
def update_item
if Input.trigger?(Input::B) and $item_short
$item_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_item_short
end
end
#==============================================================================
# Scene_Skill
#==============================================================================
class Scene_Skill
alias update_skill_short update_skill
def update_skill
if Input.trigger?(Input::B) and $skill_short
$skill_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_skill_short
end
end
#==============================================================================
# Scene_Equip
#==============================================================================
class Scene_Equip
alias update_equip_short update_right
def update_right
if Input.trigger?(Input::B) and $equip_short
$equip_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_equip_short
end
end
#==============================================================================
# Scene_Save
#==============================================================================
class Scene_Save
alias update_save_short on_cancel
def on_cancel
if $save_short
$save_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_save_short
end
alias save_decision on_decision
def on_decision(filename)
if $save_short
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
$save_short
$scene = Scene_Map.new
end
save_decision
end
end
复制代码
作者:
月下耶鲁夫
时间:
2011-5-29 15:36
Wind2010 发表于 2011-5-28 23:16
第一次来这个区发帖子,不太懂操作,我刚刚补上 code了……
很不好意思,另外谢谢您帮我把这个脚本改好了,
对于一般的工程这个脚本可以调用,但是我现在用的一个工程会和这段脚本冲突
原因是存档界面的冲突,但是其实我并不需要存档界面的快捷键,只需要 呼出道具的快捷键
请问要如何解决,我是 脚本小白…… 不好意思……
作者:
Wind2010
时间:
2011-5-29 17:19
#==============================================================================
# ■ 本脚本源自www.66rpg.com,转载与使用请保留此信息
#==============================================================================
#==============================================================================
# 菜单快捷键 by Claimh
#------------------------------------------------------------------------------
# http://www.k3.dion.ne.jp/~claimh/
#==============================================================================
module SHORTCUT
USE_ITEM_SHORT = true #——开启物品菜单快捷键
USE_SKILL_SHORT = true #——开启特技菜单快捷键
USE_EQUIP_SHORT = true #——开启装备菜单快捷键
CHANGE_ITEM = Input::X #——物品快捷键的键位
CHANGE_SKILL = Input::Y #——特技快捷键的键位
CHANGE_EQUIP = Input::Z #——装备快捷键的键位
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
include SHORTCUT
alias update_short update
def update
update_short
menu_shortcut
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def menu_shortcut
if Input.trigger?(CHANGE_ITEM) and USE_ITEM_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$item_short = true
call_item
end
end
if Input.trigger?(CHANGE_SKILL) and USE_SKILL_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$skill_short = true
call_skill
end
end
if Input.trigger?(CHANGE_EQUIP) and USE_EQUIP_SHORT
unless $game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$equip_short = true
call_equip
end
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_item
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Item.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_skill
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Skill.new
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def call_equip
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Equip.new
end
end
#==============================================================================
# Scene_Item
#==============================================================================
class Scene_Item
alias update_item_short update_item
def update_item
if Input.trigger?(Input::B) and $item_short
$item_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_item_short
end
end
#==============================================================================
# Scene_Skill
#==============================================================================
class Scene_Skill
alias update_skill_short update_skill
def update_skill
if Input.trigger?(Input::B) and $skill_short
$skill_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_skill_short
end
end
#==============================================================================
# Scene_Equip
#==============================================================================
class Scene_Equip
alias update_equip_short update_right
def update_right
if Input.trigger?(Input::B) and $equip_short
$equip_short = false
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
update_equip_short
end
end
复制代码
删掉了快捷存档
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1