赞 | 1 |
VIP | 0 |
好人卡 | 0 |
积分 | 14 |
经验 | 190 |
最后登录 | 2025-2-23 |
在线时间 | 84 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1402
- 在线时间
- 84 小时
- 注册时间
- 2017-9-5
- 帖子
- 123
|
2楼

楼主 |
发表于 2025-2-2 10:12:26
|
只看该作者
上边那是盗窃技能的技能,下边是删除技能的按键,但还是之前的问题,下边的脚本只能删除正常升级和学习来的技能,盗窃来的技能无法删除
#==============================================================================
# ■
#==============================================================================
class Scene_Skill < Scene_ItemBase
#--------------------------------------------------------------------------
# ● アイテムウィンドウの作成
#--------------------------------------------------------------------------
def create_item_window
wx = 0
wy = @status_window.y + @status_window.height
ww = Graphics.width
wh = Graphics.height - wy
@item_window = Window_SkillList.new(wx, wy, ww, wh)
@item_window.actor = @actor
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:on_item_cancel))
@item_window.set_handler(:CTRL, method(:on_item_del))
@command_window.skill_window = @item_window
end
#--------------------------------------------------------------------------
# ● スキルを忘れる
#--------------------------------------------------------------------------
def on_item_del
if !item.nil?
skill_id = item.id
@actor.forget_skill(skill_id)
@item_window.refresh
end
end
end
#==============================================================================
# ■
#==============================================================================
class Window_Selectable < Window_Base
#--------------------------------------------------------------------------
# ● 決定やキャンセルなどのハンドリング処理
#--------------------------------------------------------------------------
def process_handling
return unless open? && active
return process_ok if ok_enabled? && Input.trigger?(:C)
return process_cancel if cancel_enabled? && Input.trigger?(:B)
return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
return process_pageup if handle?(:pageup) && Input.trigger?(:L)
return process_ctrl if Input.trigger?(:CTRL)
end
#--------------------------------------------------------------------------
# ● CTRL ボタン(CTRL)が押されたときの処理
#--------------------------------------------------------------------------
def process_ctrl
Sound.play_ok
Input.update
call_handler(:CTRL)
end
end |
|