赞 | 1 |
VIP | 337 |
好人卡 | 3 |
积分 | 1 |
经验 | 37815 |
最后登录 | 2024-11-25 |
在线时间 | 380 小时 |
Lv1.梦旅人 魔王 ⑨
- 梦石
- 0
- 星屑
- 95
- 在线时间
- 380 小时
- 注册时间
- 2006-10-16
- 帖子
- 4299
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 玄月 于 2009-11-30 21:41 编辑
钱赚够了,这东西转为免费发布吧……下次更新的时候另开贴骗钱,已下载会员到时候可以PM本人更新。就是如此了……说来这样赚分可比去提问区晃悠轻松 = =
然后做下广告,有脚本要写的请直接PM,报酬面议。经验,VIP,RMB?均可。
以下是界面
炼妖壶 ver.0.75.rar
(1.51 MB, 下载次数: 2780)
- #==============================================================================
- # ■ 炼妖壶系统 ver.0.75(2009.10.1-2009.10.30)
- #------------------------------------------------------------------------------
- # 作者:玄月
- #
- # 声明:本脚本所涉及素材来自于网络以及个人处理,仅供圈内人士学习交流之用,请勿
- # 用于商业用途,若因私自传播所造成的法律责任,本人概不负责。
- #
- # 责权说明:1、本人仅对正确渠道获得此脚本的人负责整合,修改
- # 2、本版本为不完整版本,但基本功能已齐全,更新时间未定
- # 3、脚本使用、转载者请保留此信息,尊重作者劳动成果
- # 4、最终解释权归本人所有
- #
- # 版本说明:1、本版本拥有炼妖壶的主体功能,包括正向和逆向合成,成品预览功能
- # 2、未整合装备栏拓展,有兴趣的人请自行整合或等待更新版本
- # 3、未整合轩辕剑美化菜单,同有兴趣的人请自行整合或等待更新版本
- # 4、未添加合成过度动画,下一版本添加
- # 5、未添加合成等级限制,同下一版本添加
- #
- # 使用方法:[材料种类(0:物品 1:武器 2:防具 ),材料ID]
- # 另模板已给出。
- #==============================================================================
- class Game_Alchemy
- attr_accessor :recipe_list
- attr_accessor :fail_id
- def initialize
- @recipe_list = []
- # 大眼蛙ID
- @fail_id = 8
- # 预处理
- go_main
- # 主处理
- main
- end
- def go_main
- for i in 1...$data_items.size
- $data_items[i].hp = 0
- $data_items[i].sp = 0
- $data_items[i].atk = 0
- $data_items[i].pdef = 0
- $data_items[i].dex = 0
- end
- for i in 1...$data_weapons.size
- $data_weapons[i].hp = 0
- $data_weapons[i].sp = 0
- $data_weapons[i].dex = $data_weapons[i].dex_plus
- end
- for i in 1...$data_armors.size
- $data_armors[i].hp = 0
- $data_armors[i].sp = 0
- $data_armors[i].dex = $data_armors[i].dex_plus
- end
- for i in 1...$data_armors.size
- if $data_armors[i].name.split(/,/)[1] == "5"
- for j in 1...$data_enemies.size
- if $data_enemies[j].name == $data_armors[i].name.split(/,/)[0]
- $data_armors[i].hp = $data_enemies[j].maxhp
- $data_armors[i].sp = $data_enemies[j].maxsp
- $data_armors[i].atk = $data_enemies[j].atk
- $data_armors[i].pdef = $data_enemies[j].pdef
- $data_armors[i].dex = $data_enemies[j].dex
- break
- end
- end
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 主处理——输入可炼化材料信息:[材料种类(0:物品 1:武器 2:防具 ),材料ID]
- # 已经给出模板,请各位自行测试以理解设置方法。
- #--------------------------------------------------------------------------
- def main
- #------------------------------------------------------------------------
- # 测试用配方1
- #------------------------------------------------------------------------
- 材料A = [0,1]
- 材料B = [0,1]
- 成品 = [0,2]
- @recipe_list[0] = [材料A,材料B,成品]
- #------------------------------------------------------------------------
- # 测试用配方2
- #------------------------------------------------------------------------
- 材料A = [0,3]
- 材料B = [0,4]
- 成品 = [0,2]
- @recipe_list[1] = [材料A,材料B,成品]
- #------------------------------------------------------------------------
- # 测试用配方3
- #------------------------------------------------------------------------
- 材料A = [1,4]
- 材料B = [1,5]
- 成品 = [2,5]
- @recipe_list[1] = [材料A,材料B,成品]
- end
- end
- class Window_Alchemy < Window_Selectable
- attr_accessor :stuff
- def initialize
- super(238,48, 384, 320)
- self.contents = Bitmap.new(width - 32,height - 32)
- self.index = 0
- self.active = true
- @stuff = []
- refresh
- self.opacity = 0
- end
- def refresh
- self.contents.clear
- @item_max = 2
- @column_max = 2
- self.contents = Bitmap.new(width - 32,height - 32)
- for i in 0...2
- if @stuff[i] != nil
- draw_item(i)
- end
- end
- end
- def draw_item(index)
- item = @stuff[index]
- x = index * 212 + 9
- y = 22
- bitmap = RPG::Cache.picture("item_bitmap/空白")
- opacity = self.contents.font.color == normal_color ? 255 : 128
- self.contents.blt(x, y, bitmap, Rect.new(0, 0, 120, 220), opacity)
- bitmap = RPG::Cache.picture("item_bitmap/" + item.name.split(/,/)[0])
- opacity = self.contents.font.color == normal_color ? 255 : 128
- self.contents.blt(x, y, bitmap, Rect.new(0, 0, 120, 220), opacity)
- end
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.set(0,0,0,0)
- else
- self.cursor_rect.set(@index*32,0,0,0)
- end
- end
- end
- class Window_Alchemy_Item < Window_Selectable
- attr_accessor :type
- def initialize(type)
- @top_row = 0
- @type = type
- super(-12, 60, 216, 420)
- self.index = 0
- self.opacity = 0
- self.windowskin = RPG::Cache.windowskin("menu_selet.png")
- refresh
- end
- def item
- return @data[self.index]
- end
- def c_kind(type)
- @type = type
- refresh
- end
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @data = []
- if @type == 0
- for i in 1...$data_items.size
- if $game_party.item_number(i) > 0
- @data.push($data_items[i])
- end
- end
- elsif @type == 1
- for i in 1...$data_weapons.size
- if $game_party.weapon_number(i) > 0
- @data.push($data_weapons[i])
- end
- end
- for i in 1...$data_armors.size
- if $game_party.armor_number(i) > 0 && $data_armors[i].name.split(/,/)[1] == nil
- @data.push($data_armors[i])
- end
- end
- elsif @type == 2
- for i in 1...$data_armors.size
- if $game_party.armor_number(i) > 0 && $data_armors[i].name.split(/,/)[1] == "5"
- @data.push($data_armors[i])
- end
- end
- end
- @data.push(nil)
- @item_max = @data.size
- self.contents = Bitmap.new(width - 32, row_max * 32)
- if @item_max > 0
- for i in 0...@item_max-1
- draw_item(i)
- end
- end
- self.contents.draw_text(16, (@data.size-1)*24, 100, 32, "取下材料")
- end
- def refresh2
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- self.contents = Bitmap.new(width - 32, row_max * 32)
- for i in 0...@item_max-1
- draw_item(i)
- end
- self.contents.draw_text(16, (@data.size-1)*24, 100, 32, "取下材料")
- end
- def draw_item(index)
- item = @data[index]
- case item
- when RPG::Item
- number = $game_party.item_number(item.id)
- when RPG::Weapon
- number = $game_party.weapon_number(item.id)
- when RPG::Armor
- number = $game_party.armor_number(item.id)
- end
- x = 16
- y = index * 24
- self.contents.draw_text(x, y, 212, 32, item.name.split(/,/)[0], 0)
- self.contents.draw_text(x + 144, y, 24, 32, number.to_s, 2)
- end
- def update_help
- @help_window.set_text(self.item == nil ? "" : self.item.description)
- end
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.set(0,0,0,0)
- else
- tpy = @index * 24 - self.oy
- self.cursor_rect.set(0, tpy+4, self.width - 28, 24)
- if @index < @top_row
- @top_row = @index
- self.oy = @top_row *24 + 2
- end
- if @index > @top_row+15
- @top_row = @index-14
- self.oy = @top_row *24 + 2
- end
- end
- end
- end
- class Window_Alchemy_Help < Window_Base
- def initialize
- super(0, 0, 142+32, 52+32)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0
- self.visible = false
- end
- def set_stuff(type,name,lv)
- self.contents.clear
- bitmap = Bitmap.new("Graphics/Pictures/物品名称底框")
- src_rect = Rect.new(0, 0, bitmap.width,bitmap.height)
- self.contents.blt(0, 0, bitmap, src_rect)
- x = 7
- y = 7
- size = 18
- self.contents.font.size = size
- self.contents.font.color = normal_color
- cx = contents.text_size(type).width
- self.contents.draw_text(x,y,cx,size,type,0)
- cx = contents.text_size(name).width
- self.contents.draw_text(x,y+size+2,cx,size,name,0)
- cx = contents.text_size(lv).width
- self.contents.draw_text(self.width-cx-x-32-size-2 ,y,cx,size,lv,2)
- cx = contents.text_size("级").width
- self.contents.draw_text(self.width-cx-x-32 ,y,cx,size,"级",0)
- end
- end
- class Window_Result < Window_Base
- def initialize
- super(150,15, 328,299)
- self.contents = Bitmap.new(width - 32,height - 32)
- self.opacity = 0
- end
- def draw_result(result)
- @result = result
- x = 4
- y = 32
- step_y = 24
- plus_x = 64
- if @result.is_a?(RPG::Item)
- type = "物品"
- elsif @result.is_a?(RPG::Weapon)
- type = "武器"
- elsif @result.is_a?(RPG::Armor)
- if @result.name.split(/,/)[1] == "5"
- type = "活物"
- else
- type = "防具"
- end
- end
- size = 20
- self.contents.font.size = size
- cx = self.contents.text_size(type).width
- self.contents.draw_text(x+144,y+0*step_y,cx,size,type,0)
- text = @result.name.split(/,/)[0]
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+144,y+1*step_y,cx,size,text,0)
- text = @result.description.split(/@/)[2]
- text = "0" if text == nil
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+144,y+2*step_y,cx,size,text,0)
- cx = self.contents.text_size("级").width
- self.contents.draw_text(x+144+32,y+2*step_y,cx,size,"级",0)
- text = "生命"
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160,y+3*step_y,cx,size,text,0)
- text = @result.hp.to_s
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160+plus_x,y+3*step_y,cx,size,text,2)
- text = "灵力"
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160,y+4*step_y,cx,size,text,0)
- text = @result.sp.to_s
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160+plus_x,y+4*step_y,cx,size,text,2)
- text = "攻击"
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160,y+5*step_y,cx,size,text,0)
- text = @result.atk.to_s
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160+plus_x,y+5*step_y,cx,size,text,2)
- text = "防御"
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160,y+6*step_y,cx,size,text,0)
- text = @result.pdef.to_s
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160+plus_x,y+6*step_y,cx,size,text,2)
- text = "敏捷"
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160,y+7*step_y,cx,size,text,0)
- text = @result.dex.to_s
- cx = self.contents.text_size(text).width
- self.contents.draw_text(x+160+plus_x,y+7*step_y,cx,size,text,2)
- bitmap = RPG::Cache.picture("item_bitmap/" + @result.name.split(/,/)[0])
- self.contents.blt(16, 16, bitmap, Rect.new(0,0,120,220), 255)
- end
- end
- class Window_Result_Help < Window_Base
- def initialize
- super(108, 300, 424,188)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0
- end
- def set_text(text)
- if text != @last_text
- self.contents.clear
- self.contents.font.color = normal_color
- x = y = 0
- @last_text = text.clone
- text = text.clone
- text.gsub!(/\\\\/) { "\000" }
- text.gsub!(/\\[Nn]/){ "\100" }
- text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
- while ((c = text.slice!(/./m)) != nil)
- if c == "\000"
- c = "\\"
- end
- if c == "\001"
- text.sub!(/\[([0-9]+)\]/, "")
- color = $1.to_i
- if color >= 0 and color <= 7
- self.contents.font.color = text_color(color)
- end
- next
- end
- if c == "\100"
- y += 1
- x = 0
- next
- end
- self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
- cx = self.contents.text_size(c).width
- x += cx
- if (self.width-x-32) < 22
- x = 0
- y += 1
- end
- end
- self.visible = true
- end
- end
- end
- class Scene_Alchemy
- def initialize(alchemy_index = 0)
- @alchemy_index = alchemy_index
- @change = []
- $game_alchemy = Game_Alchemy.new
- end
- def main
- @alchemy_window = Window_Alchemy.new
- @item_window = Window_Alchemy_Item.new(type = 0)
- @item_window.active = false
- @item_window.index = -1
- @change = [0,0]
- @back_bitmap = Sprite.new
- @back_bitmap.bitmap = RPG::Cache.picture("炼妖壶底图.png")
- @tag = Sprite.new
- @tag.bitmap = RPG::Cache.picture("炼妖壶_0.png")
- @tag.x = 7
- @tag.y = 52
- @corser = Sprite.new
- @corser.bitmap = RPG::Cache.picture("炼妖壶游标.png")
- @corser.x = 306
- @corser.y = 48
- @mov_y = 0
- @botton = Sprite.new
- @botton.bitmap = RPG::Cache.picture("炼妖壶预览选项激活.png")
- @botton.x = 408
- @botton.y = 336
- @botton.visible = false
- @result_setup = false
- @l_help_window = Window_Alchemy_Help.new
- @r_help_window = Window_Alchemy_Help.new
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @l_help_window.dispose
- @r_help_window.dispose
- @back_bitmap.dispose
- @tag.dispose
- @item_window.dispose
- @alchemy_window.dispose
- @botton.dispose
- end
- def update
- @corser.x = @alchemy_window.index * 214 + 306
- @mov_y += 1
- @mov_y %= 20
- @corser.y += 1 if @mov_y < 10
- @corser.y -= 1 if @mov_y >= 10 && @mov_y < 20
- @l_help_window.visible = false if @alchemy_window.stuff[0] == nil
- @r_help_window.visible = false if @alchemy_window.stuff[1] == nil
- @alchemy_window.update
- @item_window.update
- if @alchemy_window.active
- update_alchemy
- return
- end
- if @item_window.active
- update_item
- return
- end
- if @botton.visible
- update_command
- return
- end
- if @result_setup
- update_result
- return
- end
- end
- def update_alchemy
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- for i in 0...2
- if @alchemy_window.stuff[i] != nil
- case @alchemy_window.stuff[i]
- when RPG::Item
- $game_party.gain_item(@alchemy_window.stuff[i].id,1)
- when RPG::Weapon
- $game_party.gain_weapon(@alchemy_window.stuff[i].id,1)
- when RPG::Armor
- $game_party.gain_armor(@alchemy_window.stuff[i].id,1)
- end
- end
- end
- $scene = Scene_Menu.new(5)
- return
- end
- if Input.trigger?(Input::C)
- $game_system.se_play($data_system.decision_se)
- @alchemy_window.active = false
- @item_window.active = true
- @item_window.index = 0
- return
- end
- if Input.trigger?(Input::DOWN)
- $game_system.se_play($data_system.decision_se)
- @alchemy_window.active = false
- @botton.visible = true
- #@command_window.active = true
- return
- end
- end
- def update_item
- tag_index = @item_window.type
- @tag.bitmap = RPG::Cache.picture("炼妖壶_#{tag_index}.png")
- @tag.x = 32 * tag_index + 7
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- @alchemy_window.active = true
- @item_window.active = false
- @item_window.index = -1
- return
- end
- if Input.trigger?(Input::LEFT)
- $game_system.se_play($data_system.decision_se)
- type = @item_window.type
- type -= 1
- type = 0 if type == -1
- @item_window.c_kind(type)
- @item_window.index = 0
- return
- end
- if Input.trigger?(Input::RIGHT)
- $game_system.se_play($data_system.decision_se)
- type = @item_window.type
- type += 1
- type = 2 if type == 3
- @item_window.c_kind(type)
- @item_window.index = 0
- return
- end
- if Input.trigger?(Input::C)
- case @item_window.item
- when RPG::Item
- number = $game_party.item_number(@item_window.item.id)
- when RPG::Weapon
- number = $game_party.weapon_number(@item_window.item.id)
- when RPG::Armor
- number = $game_party.armor_number(@item_window.item.id)
- end
- $game_system.se_play($data_system.decision_se)
- @a_index = @alchemy_window.index
- if @item_window.item == nil
- if @change[@a_index] != 0
- case @change[@a_index]
- when RPG::Item
- $game_party.gain_item(@change[@a_index].id,1)
- when RPG::Weapon
- $game_party.gain_weapon(@change[@a_index].id,1)
- when RPG::Armor
- $game_party.gain_armor(@change[@a_index].id,1)
- end
- end
- @alchemy_window.stuff[@a_index] = nil
- @change[@a_index] = 0
- @alchemy_window.refresh
- @item_window.refresh
- elsif @alchemy_window.stuff[@a_index] == nil && @change[@a_index] == 0 && number != 0
- case @item_window.item
- when RPG::Item
- $game_party.gain_item(@item_window.item.id,-1)
- when RPG::Weapon
- $game_party.gain_weapon(@item_window.item.id,-1)
- when RPG::Armor
- $game_party.gain_armor(@item_window.item.id,-1)
- end
- @alchemy_window.stuff[@a_index] = @item_window.item
- @change[@a_index] = @item_window.item
- @alchemy_window.refresh
- @item_window.refresh
- elsif @change[@a_index] != @item_window.item && @change[@a_index] != 0 && number != 0
- if @change[@a_index] != @item_window.item
- case @change[@a_index]
- when RPG::Item
- $game_party.gain_item(@change[@a_index].id,1)
- when RPG::Weapon
- $game_party.gain_weapon(@change[@a_index].id,1)
- when RPG::Armor
- $game_party.gain_armor(@change[@a_index].id,1)
- end
- end
- case @item_window.item
- when RPG::Item
- $game_party.gain_item(@item_window.item.id,-1)
- when RPG::Weapon
- $game_party.gain_weapon(@item_window.item.id,-1)
- when RPG::Armor
- $game_party.gain_armor(@item_window.item.id,-1)
- end
- @alchemy_window.stuff[@a_index] = @item_window.item
- @change[@a_index] = @item_window.item
- @alchemy_window.refresh
- @item_window.refresh
- end
- stuff_help
- end
- end
- def update_command
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- @alchemy_window.active = true
- @botton.visible = false
- return
- end
- if Input.trigger?(Input::UP)
- $game_system.se_play($data_system.decision_se)
- @alchemy_window.active = true
- @botton.visible = false
- return
- end
- if Input.trigger?(Input::C)
- @botton.bitmap = RPG::Cache.picture("炼妖壶预览选项按下.png")
- if @alchemy_window.stuff[0] != nil and @alchemy_window.stuff[1] != nil
- $game_system.se_play($data_system.decision_se)
- make_result
- @back = Sprite.new
- @back.bitmap = Bitmap.new("Graphics/Pictures/练妖壶预览背景.png")
- @back.z = 300
- @result_window = Window_Result.new
- @result_window.z = 300
- @result_window.draw_result(@result)
- @help_window = Window_Result_Help.new
- @help_window.set_text(@result.description.split(/@/)[1])
- @help_window.z = 300
- @result_setup = true
- @botton.visible = false
- @alchemy_window.active = false
- return
- else
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- @alchemy_window.active = true
- @botton.visible = false
- @botton.bitmap = RPG::Cache.picture("炼妖壶预览选项激活.png")
- return
- end
- end
- def stuff_help
- case @alchemy_window.index
- when 0
- if @alchemy_window.stuff[0] != nil
- if @alchemy_window.stuff[0].is_a?(RPG::Item)
- type = "物品"
- elsif @alchemy_window.stuff[0].is_a?(RPG::Weapon)
- type = "武器"
- elsif @alchemy_window.stuff[0].is_a?(RPG::Armor)
- if @alchemy_window.stuff[0].name.split(/,/)[1] == "5"
- type = "活物"
- else
- type = "防具"
- end
- end
- name = @alchemy_window.stuff[0].name.split(/,/)[0]
- if @alchemy_window.stuff[0].description.split(/@/)[2] != nil
- lv = @alchemy_window.stuff[0].description.split(/@/)[2]
- else
- lv = 0
- end
- @l_help_window.set_stuff(type,name,lv.to_s)
- @l_help_window.x = 224
- @l_help_window.y = 330
- @l_help_window.visible = true
- end
- when 1
- if @alchemy_window.stuff[1] != nil
- if @alchemy_window.stuff[1].is_a?(RPG::Item)
- type = "物品"
- elsif @alchemy_window.stuff[1].is_a?(RPG::Weapon)
- type = "武器"
- elsif @alchemy_window.stuff[1].is_a?(RPG::Armor)
- if @alchemy_window.stuff[1].name.split(/,/)[1] == "5"
- type = "活物"
- else
- type = "防具"
- end
- end
- name = @alchemy_window.stuff[1].name.split(/,/)[0]
- if @alchemy_window.stuff[1].description.split(/@/)[2] != nil
- lv = @alchemy_window.stuff[1].description.split(/@/)[2]
- else
- lv = 0
- end
- @r_help_window.set_stuff(type,name,lv.to_s)
- @r_help_window.x = 460
- @r_help_window.y = 330
- @r_help_window.visible = true
- end
- end
- end
- def make_result
- @alchemy = []
- for i in 0...2
- case @alchemy_window.stuff[i]
- when RPG::Item
- kind = 0
- when RPG::Weapon
- kind = 1
- when RPG::Armor
- kind = 2
- end
- @alchemy[i] = [kind,@alchemy_window.stuff[i].id]
- end
- @list = $game_alchemy.recipe_list
- for i in [email protected]
- if @alchemy[0] == @list[i][0] and @alchemy[1] == @list[i][1]
- case @list[i][2][0]
- when 0
- @result = $data_items[@list[i][2][1]]
- when 1
- @result = $data_weapons[@list[i][2][1]]
- when 2
- @result = $data_armors[@list[i][2][1]]
- end
- @succed = true
- break
- elsif @alchemy[0] == @list[i][1] and @alchemy[1] == @list[i][0]
- case @list[i][2][0]
- when 0
- @result = $data_items[@list[i][2][1]]
- when 1
- @result = $data_weapons[@list[i][2][1]]
- when 2
- @result = $data_armors[@list[i][2][1]]
- end
- @succed = true
- break
- end
- end
- unless @succed
- @result = $data_armors[$game_alchemy.fail_id]
- end
- end
- def update_result
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- for i in 0...2
- if @alchemy_window.stuff[i] != nil
- case @alchemy_window.stuff[i]
- when RPG::Item
- $game_party.gain_item(@alchemy_window.stuff[i].id,1)
- when RPG::Weapon
- $game_party.gain_weapon(@alchemy_window.stuff[i].id,1)
- when RPG::Armor
- $game_party.gain_armor(@alchemy_window.stuff[i].id,1)
- end
- end
- end
- @succed = false
- @alchemy_window.stuff = []
- for i in 0..2
- @change[i] = 0
- end
- @alchemy_window.refresh
- @item_window.refresh
- @back.dispose
- @result_window.dispose
- @help_window.dispose
- @result_setup = false
- @botton.visible = false
- @alchemy_window.active = true
- return
- end
- if Input.trigger?(Input::C)
- $game_system.se_play($data_system.decision_se)
- if @result != nil
- case @result
- when RPG::Item
- $game_party.gain_item(@result.id,1)
- when RPG::Weapon
- $game_party.gain_weapon(@result.id,1)
- when RPG::Armor
- $game_party.gain_armor(@result.id,1)
- end
- end
- @succed = false
- @alchemy_window.stuff = []
- for i in 0..2
- @change[i] = 0
- end
- @alchemy_window.refresh
- @item_window.refresh
- @back.dispose
- @result_window.dispose
- @help_window.dispose
- @result_setup = false
- @botton.visible = false
- @alchemy_window.active = true
- return
- end
- end
- end
- module RPG
- class Item
- def initialize
- @id = 0
- @name = ""
- @icon_name = ""
- @description = ""
- @scope = 0
- @occasion = 0
- @animation1_id = 0
- @animation2_id = 0
- @menu_se = RPG::AudioFile.new("", 80)
- @common_event_id = 0
- @price = 0
- @consumable = true
- @parameter_type = 0
- @parameter_points = 0
- @recover_hp_rate = 0
- @recover_hp = 0
- @recover_sp_rate = 0
- @recover_sp = 0
- @hit = 100
- @pdef_f = 0
- @mdef_f = 0
- @variance = 0
- @element_set = []
- @plus_state_set = []
- @minus_state_set = []
- @hp = 0
- @sp = 0
- @atk = 0
- @pdef = 0
- @dex = 0
- end
- attr_accessor :id
- attr_accessor :name
- attr_accessor :icon_name
- attr_accessor :description
- attr_accessor :scope
- attr_accessor :occasion
- attr_accessor :animation1_id
- attr_accessor :animation2_id
- attr_accessor :menu_se
- attr_accessor :common_event_id
- attr_accessor :price
- attr_accessor :consumable
- attr_accessor :parameter_type
- attr_accessor :parameter_points
- attr_accessor :recover_hp_rate
- attr_accessor :recover_hp
- attr_accessor :recover_sp_rate
- attr_accessor :recover_sp
- attr_accessor :hit
- attr_accessor :pdef_f
- attr_accessor :mdef_f
- attr_accessor :variance
- attr_accessor :element_set
- attr_accessor :plus_state_set
- attr_accessor :minus_state_set
- attr_accessor :hp
- attr_accessor :sp
- attr_accessor :atk
- attr_accessor :pdef
- attr_accessor :dex
- end
- class Weapon
- def initialize
- @id = 0
- @name = ""
- @icon_name = ""
- @description = ""
- @animation1_id = 0
- @animation2_id = 0
- @price = 0
- @atk = 0
- @pdef = 0
- @mdef = 0
- @str_plus = 0
- @dex_plus = 0
- @agi_plus = 0
- @int_plus = 0
- @element_set = []
- @plus_state_set = []
- @minus_state_set = []
- @hp = 0
- @sp = 0
- @atk = 0
- @pdef = 0
- @dex = 0
- end
- attr_accessor :id
- attr_accessor :name
- attr_accessor :icon_name
- attr_accessor :description
- attr_accessor :animation1_id
- attr_accessor :animation2_id
- attr_accessor :price
- attr_accessor :atk
- attr_accessor :pdef
- attr_accessor :mdef
- attr_accessor :str_plus
- attr_accessor :dex_plus
- attr_accessor :agi_plus
- attr_accessor :int_plus
- attr_accessor :element_set
- attr_accessor :plus_state_set
- attr_accessor :minus_state_set
- attr_accessor :hp
- attr_accessor :sp
- attr_accessor :atk
- attr_accessor :pdef
- attr_accessor :dex
- end
- class Armor
- def initialize
- @id = 0
- @name = ""
- @icon_name = ""
- @description = ""
- @kind = 0
- @auto_state_id = 0
- @price = 0
- @pdef = 0
- @mdef = 0
- @eva = 0
- @str_plus = 0
- @dex_plus = 0
- @agi_plus = 0
- @int_plus = 0
- @guard_element_set = []
- @guard_state_set = []
- @hp = 0
- @sp = 0
- @atk = 0
- @pdef = 0
- @dex = 0
- end
- attr_accessor :id
- attr_accessor :name
- attr_accessor :icon_name
- attr_accessor :description
- attr_accessor :kind
- attr_accessor :auto_state_id
- attr_accessor :price
- attr_accessor :pdef
- attr_accessor :mdef
- attr_accessor :eva
- attr_accessor :str_plus
- attr_accessor :dex_plus
- attr_accessor :agi_plus
- attr_accessor :int_plus
- attr_accessor :guard_element_set
- attr_accessor :guard_state_set
- attr_accessor :hp
- attr_accessor :sp
- attr_accessor :atk
- attr_accessor :pdef
- attr_accessor :dex
- end
- end
复制代码 |
|