Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # ╔══════════════════════════════════╗
- # ║ ▼ Dark's Extra Item ║
- # ║ ▼ Author: Nhat Nguyen (Dark Sky) ║
- # ║ ▼ Release Date: March 18th 2016 ║
- # ║ ▼ Forum: TaoTroChoi.com ║
- # ╚══════════════════════════════════╝
- #-------------------------------------------------------------------------------
- # Version 1.0: Release!
- #-------------------------------------------------------------------------------
- # Yêu cầu: None
- #-------------------------------------------------------------------------------
- # Chức năng: Nhận được các item khác khi sử dụng một item.
- # Notetag (Items): <extra_item: x> : Nhận được item có ID là x trong Database.
- # Lưu ý: Có thể dùng nhiều dòng Note như vậy trong ô Note của Item. Để khi sử
- # dụng có thể cho ra 2,3 item phụ.
- #-------------------------------------------------------------------------------
- # Script call: None
- #===============================================================================
- Extra_ITEM_TOKEN = /<extra_item:\s*(\w+)>/i #Don't Touch!
- #===============================================================================
- class Scene_ItemBase
- #---------------------------------------------------------------------------
- # * Use Item
- #---------------------------------------------------------------------------
- alias :dark_extra_item_scene_itembase_useitem :use_item
- def use_item
- notes = item.note
- extra_is = []
- notes.split(/[\r\n]+/).each do |line|
- if line =~ Extra_ITEM_TOKEN
- extra_is.push($data_items[$1.to_i])
- end
- end
- dark_extra_item_scene_itembase_useitem()
- extra_is.each do |item|
- $game_party.gain_item(item,1)
- end
- extra_is.clear
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment