轩辕剑3炼妖壶系统ver 0.75发布(已美化&免费)
钱赚够了,这东西转为免费发布吧……下次更新的时候另开贴骗钱,已下载会员到时候可以PM本人更新。就是如此了……说来这样赚分可比去提问区晃悠轻松 = =然后做下广告,有脚本要写的请直接PM,报酬面议。经验,VIP,RMB?均可。
以下是界面
#==============================================================================# ■ 炼妖壶系统 ver.0.75(2009.10.1-2009.10.30)#------------------------------------------------------------------------------#作者:玄月##声明:本脚本所涉及素材来自于网络以及个人处理,仅供圈内人士学习交流之用,请勿# 用于商业用途,若因私自传播所造成的法律责任,本人概不负责。##责权说明:1、本人仅对正确渠道获得此脚本的人负责整合,修改# 2、本版本为不完整版本,但基本功能已齐全,更新时间未定# 3、脚本使用、转载者请保留此信息,尊重作者劳动成果# 4、最终解释权归本人所有##版本说明:1、本版本拥有炼妖壶的主体功能,包括正向和逆向合成,成品预览功能# 2、未整合装备栏拓展,有兴趣的人请自行整合或等待更新版本# 3、未整合轩辕剑美化菜单,同有兴趣的人请自行整合或等待更新版本# 4、未添加合成过度动画,下一版本添加# 5、未添加合成等级限制,同下一版本添加##使用方法:[材料种类(0:物品 1:武器 2:防具 ),材料ID]# 另模板已给出。#==============================================================================class Game_Alchemyattr_accessor :recipe_list attr_accessor :fail_iddef initialize @recipe_list = [] # 大眼蛙ID @fail_id = 8 # 预处理 go_main # 主处理 mainenddef go_main for i in 1...$data_items.size $data_items.hp = 0 $data_items.sp = 0 $data_items.atk = 0 $data_items.pdef = 0 $data_items.dex = 0 end for i in 1...$data_weapons.size $data_weapons.hp = 0 $data_weapons.sp = 0 $data_weapons.dex = $data_weapons.dex_plus end for i in 1...$data_armors.size $data_armors.hp = 0 $data_armors.sp = 0 $data_armors.dex = $data_armors.dex_plus end for i in 1...$data_armors.size if $data_armors.name.split(/,/) == "5" for j in 1...$data_enemies.size if $data_enemies.name == $data_armors.name.split(/,/) $data_armors.hp = $data_enemies.maxhp $data_armors.sp = $data_enemies.maxsp $data_armors.atk = $data_enemies.atk $data_armors.pdef = $data_enemies.pdef $data_armors.dex = $data_enemies.dex break end end end end end #--------------------------------------------------------------------------# ● 主处理——输入可炼化材料信息:[材料种类(0:物品 1:武器 2:防具 ),材料ID]# 已经给出模板,请各位自行测试以理解设置方法。#--------------------------------------------------------------------------def main #------------------------------------------------------------------------ # 测试用配方1 #------------------------------------------------------------------------ 材料A = 材料B = 成品= @recipe_list = [材料A,材料B,成品] #------------------------------------------------------------------------ # 测试用配方2 #------------------------------------------------------------------------ 材料A = 材料B = 成品= @recipe_list = [材料A,材料B,成品] #------------------------------------------------------------------------ # 测试用配方3 #------------------------------------------------------------------------ 材料A = 材料B = 成品= @recipe_list = [材料A,材料B,成品]endendclass Window_Alchemy < Window_Selectableattr_accessor :stuffdef initialize super(238,48, 384, 320) self.contents = Bitmap.new(width - 32,height - 32) self.index = 0 self.active = true @stuff = [] refresh self.opacity = 0enddef 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 != nil draw_item(i) end endenddef draw_item(index) item = @stuff 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(/,/)) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y, bitmap, Rect.new(0, 0, 120, 220), opacity)enddef update_cursor_rect if @index < 0 self.cursor_rect.set(0,0,0,0) else self.cursor_rect.set(@index*32,0,0,0) endendendclass Window_Alchemy_Item < Window_Selectableattr_accessor :typedef 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") refreshenddef item return @dataenddef c_kind(type) @type = type refreshenddef 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) end end elsif @type == 1 for i in 1...$data_weapons.size if $game_party.weapon_number(i) > 0 @data.push($data_weapons) end end for i in 1...$data_armors.size if $game_party.armor_number(i) > 0 && $data_armors.name.split(/,/) == nil @data.push($data_armors) end end elsif @type == 2 for i in 1...$data_armors.size if $game_party.armor_number(i) > 0 && $data_armors.name.split(/,/) == "5" @data.push($data_armors) 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, "取下材料")enddef 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, "取下材料")enddef draw_item(index) item = @data 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) self.contents.draw_text(x + 144, y, 24, 32, number.to_s, 2)enddef update_help @help_window.set_text(self.item == nil ? "" : self.item.description)enddef 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 endendendclass Window_Alchemy_Help < Window_Basedef initialize super(0, 0, 142+32, 52+32) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 self.visible = falseenddef 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)endendclass Window_Result < Window_Basedef initialize super(150,15, 328,299) self.contents = Bitmap.new(width - 32,height - 32) self.opacity = 0enddef 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(/,/) == "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(/,/) 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(/@/) 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(/,/)) self.contents.blt(16, 16, bitmap, Rect.new(0,0,120,220), 255)endendclass Window_Result_Help < Window_Basedef initialize super(108, 300, 424,188) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0enddef 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!(/\\/){ "\100" } text.gsub!(/\\\[(+)\]/) { "\001[#{$1}]" } while ((c = text.slice!(/./m)) != nil) if c == "\000" c = "\\" end if c == "\001" text.sub!(/\[(+)\]/, "") color = $1.to_i if color >= 0 and color = 10 && @mov_y < 20 @l_help_window.visible = false if @alchemy_window.stuff == nil @r_help_window.visible = false if @alchemy_window.stuff == 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 enddef update_alchemy if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) for i in 0...2 if @alchemy_window.stuff != nil case @alchemy_window.stuff when RPG::Item $game_party.gain_item(@alchemy_window.stuff.id,1) when RPG::Weapon $game_party.gain_weapon(@alchemy_window.stuff.id,1) when RPG::Armor $game_party.gain_armor(@alchemy_window.stuff.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 endenddef 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 enddef 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 != nil and @alchemy_window.stuff != 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(/@/)) @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 endenddef stuff_help case @alchemy_window.index when 0 if @alchemy_window.stuff != nil if @alchemy_window.stuff.is_a?(RPG::Item) type = "物品" elsif @alchemy_window.stuff.is_a?(RPG::Weapon) type = "武器" elsif @alchemy_window.stuff.is_a?(RPG::Armor) if @alchemy_window.stuff.name.split(/,/) == "5" type = "活物" else type = "防具" end end name = @alchemy_window.stuff.name.split(/,/) if @alchemy_window.stuff.description.split(/@/) != nil lv = @alchemy_window.stuff.description.split(/@/) 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 != nil if @alchemy_window.stuff.is_a?(RPG::Item) type = "物品" elsif @alchemy_window.stuff.is_a?(RPG::Weapon) type = "武器" elsif @alchemy_window.stuff.is_a?(RPG::Armor) if @alchemy_window.stuff.name.split(/,/) == "5" type = "活物" else type = "防具" end end name = @alchemy_window.stuff.name.split(/,/) if @alchemy_window.stuff.description.split(/@/) != nil lv = @alchemy_window.stuff.description.split(/@/) 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 when RPG::Item kind = 0 when RPG::Weapon kind = 1 when RPG::Armor kind = 2 end @alchemy = .id] end @list = $game_alchemy.recipe_list for i in if @alchemy == @list and @alchemy == @list case @list when 0 @result = $data_items[@list] when 1 @result = $data_weapons[@list] when 2 @result = $data_armors[@list] end @succed = true break elsif @alchemy == @list and @alchemy == @list case @list when 0 @result = $data_items[@list] when 1 @result = $data_weapons[@list] when 2 @result = $data_armors[@list] end @succed = true break end end unless @succed @result = $data_armors[$game_alchemy.fail_id] endend 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 != nil case @alchemy_window.stuff when RPG::Item $game_party.gain_item(@alchemy_window.stuff.id,1) when RPG::Weapon $game_party.gain_weapon(@alchemy_window.stuff.id,1) when RPG::Armor $game_party.gain_armor(@alchemy_window.stuff.id,1) end end end @succed = false @alchemy_window.stuff = [] for i in 0..2 @change = 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 = 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 endendmodule RPGclass 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 :dexendclass 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 :dexendclass 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 :dexendend复制代码
本帖来自P1论坛作者玄月,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=136088若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
页:
[1]