设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 4453|回复: 9
打印 上一主题 下一主题

[已经解决] 跪求VX ace 物品合成腳本

[复制链接]

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

跳转到指定楼层
 楼主| 发表于 2013-1-22 09:54:18 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 76213585 于 2013-1-27 02:54 编辑

{:2_270:} 過了好久都沒有好心大大施捨阿阿阿阿阿


{:2_286:} 超級無敵需要到死.....  查到有VX的  不過VXace 就全部都沒有阿阿阿!!


求各位大大就給我吧........................

(希望是像是http://rpg.blue/thread-158011-1-1.html的)

可是是VXace版的



                    拜託各位大大不要再玩弄我的感行了...(誰玩弄了)

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

9
 楼主| 发表于 2013-1-24 09:30:02 | 只看该作者
.....................請問要怎麼在裡面設定合成的物品.........................?

点评

自己學會了...  发表于 2013-2-1 10:05

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

8
 楼主| 发表于 2013-1-23 09:41:13 | 只看该作者
謝謝大大  (我看的懂英文沒問題)

雖然我也還沒試 (好長  )

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
687 小时
注册时间
2012-10-29
帖子
1543
7
发表于 2013-1-23 08:47:28 | 只看该作者
本帖最后由 j433463 于 2013-1-23 08:51 编辑

http://mrbubblewand.wordpress.co ... sp-crafting-system/

这个应该也是类似的合成脚本,没试过,但它有视频示范。


http://forums.rpgmakerweb.com/in ... alchemic-synthesis/

这也是合成系统,需要配合另一个脚本使用。

但上述两个脚本也是新手不友好的,不过第一个有比较多的语法介绍,还算用心,再不然,要简单些的就找 KGC 了,只是窗口介面有点丑。

(汗,打字手抖,第一打成第二,修正了,呃,貌似跟楼上的重覆了,不过网址来处不同,脚本是同样的。)

修改劇本中,仔細審查原來的劇情大綱,覺得有點不太滿意,嘗試編寫不同主角不同主線的劇情,希望能寫得出來。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
616 小时
注册时间
2010-10-29
帖子
463
6
发表于 2013-1-23 08:47:26 | 只看该作者
http://www.rpgmakervxace.net/top ... sp-crafting-system/
这个是Mr Bubble 的

http://grimoirecastle.wordpress. ... hesis-go-go-totori/
Grimoire Castle的

日站,葡萄牙,西班牙等各种语言我也懒得查。这两个肯定够了。。。
我命令你给我点下面的东西!

LBQ Works
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

5
 楼主| 发表于 2013-1-23 08:27:36 | 只看该作者
請問一下大大有任何一個合成腳本嗎?

点评

6R有一个。。。。等一会,我打字。。。  发表于 2013-1-23 08:37

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
616 小时
注册时间
2010-10-29
帖子
463
4
发表于 2013-1-23 08:21:09 | 只看该作者
实际上来讲VA有很多合成脚本,但都是外站+新手不友好 的。。。。。。

点评

不止合成,很多脚本都是...  发表于 2013-1-23 08:35
我命令你给我点下面的东西!

LBQ Works
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

3
 楼主| 发表于 2013-1-23 08:11:02 | 只看该作者
而且使用時說第一行怎麼樣的.....

unexpected什麼的????????????????        

点评

括号问题? end?  发表于 2013-1-23 08:20

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

2
 楼主| 发表于 2013-1-23 08:08:50 | 只看该作者
  1. ==============================================================================
  2. # 仭 RGSS3 傾僀僥儉崌惉 ver 1.03
  3. #------------------------------------------------------------------------------
  4. # 丂攝晍尦:
  5. #     敀偺杺 http://izumiwhite.web.fc2.com/
  6. #

  7. 怎麼變這樣了?
  8. # 丂棙梡婯栺:
  9. #     RPG僣僋乕儖VX Ace偺惓婯偺搊榐幰偺傒偛棙梡偵側傟傑偡丅
  10. #     棙梡曬崘丒挊嶌尃昞帵偲偐偼昁梫偁傝傑偣傫丅
  11. #     夵憿傕偛帺桼偵偳偆偧丅
  12. #     壗偐栤戣偑敪惗偟偰傕愑擟偼帩偪傑偣傫丅
  13. #==============================================================================


  14. #--------------------------------------------------------------------------
  15. # 仛 弶婜愝掕丅
  16. #    崌惉儗僔僺摍偺愝掕
  17. #--------------------------------------------------------------------------
  18. module WD_itemsynthesis_ini
  19.   
  20.   Cost_view =  true #旓梡(俧)偺昞帵(崌惉偺旓梡偑慡偰0G偺応崌偼false傪悇彠)
  21.   
  22.   Category_i = true #僇僥僑儕僂傿儞僪僂偵乽傾僀僥儉乿偺崁栚傪昞帵
  23.   Category_w = true #僇僥僑儕僂傿儞僪僂偵乽晲婍乿偺崁栚傪昞帵
  24.   Category_a = true #僇僥僑儕僂傿儞僪僂偵乽杊嬶乿偺崁栚傪昞帵
  25.   Category_k = true #僇僥僑儕僂傿儞僪僂偵乽戝帠側傕偺乿偺崁栚傪昞帵
  26.   
  27.   I_recipe = [] #偙偺峴偼嶍彍偟側偄偙偲
  28.   W_recipe = [] #偙偺峴偼嶍彍偟側偄偙偲
  29.   A_recipe = [] #偙偺峴偼嶍彍偟側偄偙偲
  30.   
  31.   #埲壓丄崌惉儗僔僺丅
  32.   #椺: I_recipe[3]  = [100, ["I",1,1], ["W",2,1], ["A",2,2], ["A",3,1]]
  33.   #偲婰嵹偟偨応崌丄ID3偺傾僀僥儉偺崌惉昁梫偼丄100俧丅
  34.   #昁梫側慺嵽偼丄ID1偺傾僀僥儉1屄丄ID2偺晲婍1屄丄ID2偺杊嬶2屄丄ID3偺杊嬶1屄
  35.   #偲側傞丅
  36.   
  37.   #傾僀僥儉偺崌惉儗僔僺
  38.   I_recipe[2]  = [10,  ["I",1,2]]
  39.   I_recipe[3]  = [100, ["I",1,1], ["I",2,1]]
  40.   I_recipe[17] = [500, ["I",1,10]]

  41.   #晲婍偺崌惉儗僔僺
  42.   W_recipe[3]  = [50,   ["W",1,1], ["W",2,1]]
  43.   W_recipe[6]  = [600,  ["W",3,1], ["I",17,0]]
  44.   
  45.   #杊嬶偺崌惉儗僔僺  
  46.   A_recipe[2]  = [40,   ["A",1,2]]
  47.   A_recipe[5]  = [400,  ["A",2,1], ["W",2,2], ["I",17,0]]
  48.   
  49. end


  50. #==============================================================================
  51. # 仭 WD_itemsynthesis
  52. #------------------------------------------------------------------------------
  53. # 丂傾僀僥儉崌惉梡偺嫟捠儊僜僢僪偱偡丅
  54. #==============================================================================

  55. module WD_itemsynthesis
  56.   def i_recipe_switch_on(id)
  57.     $game_system.i_rcp_sw = [] if $game_system.i_rcp_sw == nil
  58.     $game_system.i_rcp_sw[id] = false if $game_system.i_rcp_sw[id] == nil
  59.     $game_system.i_rcp_sw[id] = true
  60.   end
  61.   def i_recipe_switch_off(id)
  62.     $game_system.i_rcp_sw = [] if $game_system.i_rcp_sw == nil
  63.     $game_system.i_rcp_sw[id] = false if $game_system.i_rcp_sw[id] == nil
  64.     $game_system.i_rcp_sw[id] = false
  65.   end
  66.   def i_recipe_switch_on?(id)
  67.     $game_system.i_rcp_sw = [] if $game_system.i_rcp_sw == nil
  68.     $game_system.i_rcp_sw[id] = false if $game_system.i_rcp_sw[id] == nil
  69.     return $game_system.i_rcp_sw[id]
  70.   end
  71.   def i_recipe_all_switch_on
  72.     for i in 1..$data_items.size
  73.       i_recipe_switch_on(i)
  74.     end
  75.   end
  76.   def i_recipe_all_switch_off
  77.     for i in 1..$data_items.size
  78.       i_recipe_switch_off(i)
  79.     end
  80.   end
  81.   def w_recipe_switch_on(id)
  82.     $game_system.w_rcp_sw = [] if $game_system.w_rcp_sw == nil
  83.     $game_system.w_rcp_sw[id] = false if $game_system.w_rcp_sw[id] == nil
  84.     $game_system.w_rcp_sw[id] = true
  85.   end
  86.   def w_recipe_switch_off(id)
  87.     $game_system.w_rcp_sw = [] if $game_system.w_rcp_sw == nil
  88.     $game_system.w_rcp_sw[id] = false if $game_system.w_rcp_sw[id] == nil
  89.     $game_system.w_rcp_sw[id] = false
  90.   end
  91.   def w_recipe_switch_on?(id)
  92.     $game_system.w_rcp_sw = [] if $game_system.w_rcp_sw == nil
  93.     $game_system.w_rcp_sw[id] = false if $game_system.w_rcp_sw[id] == nil
  94.     return $game_system.w_rcp_sw[id]
  95.   end
  96.   def w_recipe_all_switch_on
  97.     for i in 1..$data_weapons.size
  98.       w_recipe_switch_on(i)
  99.     end
  100.   end
  101.   def w_recipe_all_switch_off
  102.     for i in 1..$data_weapons.size
  103.       w_recipe_switch_off(i)
  104.     end
  105.   end
  106.   def a_recipe_switch_on(id)
  107.     $game_system.a_rcp_sw = [] if $game_system.a_rcp_sw == nil
  108.     $game_system.a_rcp_sw[id] = false if $game_system.a_rcp_sw[id] == nil
  109.     $game_system.a_rcp_sw[id] = true
  110.   end
  111.   def a_recipe_switch_off(id)
  112.     $game_system.a_rcp_sw = [] if $game_system.a_rcp_sw == nil
  113.     $game_system.a_rcp_sw[id] = false if $game_system.a_rcp_sw[id] == nil
  114.     $game_system.a_rcp_sw[id] = false
  115.   end
  116.   def a_recipe_switch_on?(id)
  117.     $game_system.a_rcp_sw = [] if $game_system.a_rcp_sw == nil
  118.     $game_system.a_rcp_sw[id] = false if $game_system.a_rcp_sw[id] == nil
  119.     return $game_system.a_rcp_sw[id]
  120.   end
  121.   def a_recipe_all_switch_on
  122.     for i in 1..$data_armors.size
  123.       a_recipe_switch_on(i)
  124.     end
  125.   end
  126.   def a_recipe_all_switch_off
  127.     for i in 1..$data_armors.size
  128.       a_recipe_switch_off(i)
  129.     end
  130.   end
  131.   def recipe_all_switch_on
  132.     i_recipe_all_switch_on
  133.     w_recipe_all_switch_on
  134.     a_recipe_all_switch_on
  135.   end
  136.   def recipe_all_switch_off
  137.     i_recipe_all_switch_off
  138.     w_recipe_all_switch_off
  139.     a_recipe_all_switch_off
  140.   end

  141. end

  142. class Game_Interpreter
  143.   include WD_itemsynthesis
  144. end

  145. class Game_System
  146.   #--------------------------------------------------------------------------
  147.   # 仠 岞奐僀儞僗僞儞僗曄悢
  148.   #--------------------------------------------------------------------------
  149.   attr_accessor :i_rcp_sw
  150.   attr_accessor :w_rcp_sw
  151.   attr_accessor :a_rcp_sw
  152.   #--------------------------------------------------------------------------
  153.   # 仠 僆僽僕僃僋僩弶婜壔
  154.   #--------------------------------------------------------------------------
  155.   alias wd_orig_initialize004 initialize
  156.   def initialize
  157.     wd_orig_initialize004
  158.     @i_rcp_sw = []
  159.     @w_rcp_sw = []
  160.     @a_rcp_sw = []
  161.   end
  162. end


  163. #==============================================================================
  164. # 仭 Scene_ItemSynthesis
  165. #------------------------------------------------------------------------------
  166. # 丂崌惉夋柺偺張棟傪峴偆僋儔僗偱偡丅
  167. #==============================================================================

  168. class Scene_ItemSynthesis < Scene_MenuBase
  169.   #--------------------------------------------------------------------------
  170.   # 仠 奐巒張棟
  171.   #--------------------------------------------------------------------------
  172.   def start
  173.     super
  174.     create_help_window
  175.     create_dummy_window
  176.     create_number_window
  177.     create_status_window
  178.     create_material_window
  179.     create_list_window
  180.     create_category_window
  181.     create_gold_window
  182.     create_change_window
  183.   end
  184.   #--------------------------------------------------------------------------
  185.   # 仠 僑乕儖僪僂傿儞僪僂偺嶌惉
  186.   #--------------------------------------------------------------------------
  187.   def create_gold_window
  188.     @gold_window = Window_Gold.new
  189.     @gold_window.viewport = @viewport
  190.     @gold_window.x = Graphics.width - @gold_window.width
  191.     @gold_window.y = @help_window.height
  192.     @gold_window.hide
  193.   end
  194.   #--------------------------------------------------------------------------
  195.   # 仠 愗傝懼偊昞帵僂傿儞僪僂偺嶌惉
  196.   #--------------------------------------------------------------------------
  197.   def create_change_window
  198.     wx = 0
  199.     wy = @gold_window.y
  200.     ww = Graphics.width - @gold_window.width
  201.     wh = @gold_window.height
  202.     @change_window = Window_ItemSynthesisChange.new(wx, wy, ww, wh)
  203.     @change_window.viewport = @viewport
  204.     @change_window.hide
  205.   end
  206.   #--------------------------------------------------------------------------
  207.   # 仠 僟儈乕僂傿儞僪僂偺嶌惉
  208.   #--------------------------------------------------------------------------
  209.   def create_dummy_window
  210.     wy = @help_window.y + @help_window.height + 48
  211.     wh = Graphics.height - wy
  212.     @dummy_window = Window_Base.new(0, wy, Graphics.width, wh)
  213.     @dummy_window.viewport = @viewport
  214.   end
  215.   #--------------------------------------------------------------------------
  216.   # 仠 屄悢擖椡僂傿儞僪僂偺嶌惉
  217.   #--------------------------------------------------------------------------
  218.   def create_number_window
  219.     wy = @dummy_window.y
  220.     wh = @dummy_window.height
  221.     @number_window = Window_ItemSynthesisNumber.new(0, wy, wh)
  222.     @number_window.viewport = @viewport
  223.     @number_window.hide
  224.     @number_window.set_handler(:ok,     method(:on_number_ok))
  225.     @number_window.set_handler(:cancel, method(:on_number_cancel))
  226.     @number_window.set_handler(:change_window, method(:on_change_window))   
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # 仠 僗僥乕僞僗僂傿儞僪僂偺嶌惉
  230.   #--------------------------------------------------------------------------
  231.   def create_status_window
  232.     wx = @number_window.width
  233.     wy = @dummy_window.y
  234.     ww = Graphics.width - wx
  235.     wh = @dummy_window.height
  236.     @status_window = Window_ShopStatus.new(wx, wy, ww, wh)
  237.     @status_window.viewport = @viewport
  238.     @status_window.hide
  239.   end
  240.   #--------------------------------------------------------------------------
  241.   # 仠 慺嵽僂傿儞僪僂偺嶌惉
  242.   #--------------------------------------------------------------------------
  243.   def create_material_window
  244.     wx = @number_window.width
  245.     wy = @dummy_window.y
  246.     ww = Graphics.width - wx
  247.     wh = @dummy_window.height
  248.     @material_window = Window_ItemSynthesisMaterial.new(wx, wy, ww, wh)
  249.     @material_window.viewport = @viewport
  250.     @material_window.hide
  251.     @number_window.material_window = @material_window
  252.   end
  253.   #--------------------------------------------------------------------------
  254.   # 仠 崌惉傾僀僥儉儕僗僩僂傿儞僪僂偺嶌惉
  255.   #--------------------------------------------------------------------------
  256.   def create_list_window
  257.     wy = @dummy_window.y
  258.     wh = @dummy_window.height
  259.     @list_window = Window_ItemSynthesisList.new(0, wy, wh)
  260.     @list_window.viewport = @viewport
  261.     @list_window.help_window = @help_window
  262.     @list_window.status_window = @status_window
  263.     @list_window.material_window = @material_window
  264.     @list_window.hide
  265.     @list_window.set_handler(:ok,     method(:on_list_ok))
  266.     @list_window.set_handler(:cancel, method(:on_list_cancel))
  267.     @list_window.set_handler(:change_window, method(:on_change_window))   
  268.   end
  269.   #--------------------------------------------------------------------------
  270.   # 仠 僇僥僑儕僂傿儞僪僂偺嶌惉
  271.   #--------------------------------------------------------------------------
  272.   def create_category_window
  273.     @category_window = Window_ItemSynthesisCategory.new
  274.     @category_window.viewport = @viewport
  275.     @category_window.help_window = @help_window
  276.     @category_window.y = @help_window.height
  277.     @category_window.activate
  278.     @category_window.item_window = @list_window
  279.     @category_window.set_handler(:ok,     method(:on_category_ok))
  280.     @category_window.set_handler(:cancel, method(:return_scene))
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # 仠 崌惉傾僀僥儉儕僗僩僂傿儞僪僂偺傾僋僥傿僽壔
  284.   #--------------------------------------------------------------------------
  285.   def activate_list_window
  286.     @list_window.money = money
  287.     @list_window.show.activate
  288.   end
  289.   #--------------------------------------------------------------------------
  290.   # 仠 崌惉乵寛掕乶
  291.   #--------------------------------------------------------------------------
  292.   def on_list_ok
  293.     @item = @list_window.item
  294.     @list_window.hide
  295.     @number_window.set(@item, max_buy, buying_price, currency_unit)
  296.     @number_window.show.activate
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # 仠 崌惉乵僉儍儞僙儖乶
  300.   #--------------------------------------------------------------------------
  301.   def on_list_cancel
  302.     @category_window.activate
  303.     @category_window.show
  304.     @dummy_window.show
  305.     @list_window.hide
  306.     @status_window.hide
  307.     @status_window.item = nil
  308.     @material_window.hide
  309.     @material_window.set(nil, nil)
  310.     @gold_window.hide
  311.     @change_window.hide
  312.     @help_window.clear
  313.   end
  314.   #--------------------------------------------------------------------------
  315.   # 仠 昞帵愗懼
  316.   #--------------------------------------------------------------------------
  317.   def on_change_window
  318.     if @status_window.visible
  319.       @status_window.hide
  320.       @material_window.show
  321.     else
  322.       @status_window.show
  323.       @material_window.hide
  324.     end
  325.   end
  326.   #--------------------------------------------------------------------------
  327.   # 仠 僇僥僑儕乵寛掕乶
  328.   #--------------------------------------------------------------------------
  329.   def on_category_ok
  330.     activate_list_window
  331.     @gold_window.show
  332.     @change_window.show
  333.     @material_window.show
  334.     @category_window.hide
  335.     @list_window.select(0)
  336.   end
  337.   #--------------------------------------------------------------------------
  338.   # 仠 屄悢擖椡乵寛掕乶
  339.   #--------------------------------------------------------------------------
  340.   def on_number_ok
  341.     Sound.play_shop
  342.     do_syntetic(@number_window.number)
  343.     end_number_input
  344.     @gold_window.refresh
  345.   end
  346.   #--------------------------------------------------------------------------
  347.   # 仠 屄悢擖椡乵僉儍儞僙儖乶
  348.   #--------------------------------------------------------------------------
  349.   def on_number_cancel
  350.     Sound.play_cancel
  351.     end_number_input
  352.   end
  353.   #--------------------------------------------------------------------------
  354.   # 仠 崌惉偺幚峴
  355.   #--------------------------------------------------------------------------
  356.   def do_syntetic(number)
  357.     $game_party.lose_gold(number * buying_price)
  358.     $game_party.gain_item(@item, number)
  359.    
  360.       @recipe = @list_window.recipe(@item)
  361.       for i in [email protected]
  362.         kind = @recipe[i][0]
  363.         id   = @recipe[i][1]
  364.         num  = @recipe[i][2]
  365.         if kind == "I"
  366.           item = $data_items[id]
  367.         elsif kind == "W"
  368.           item = $data_weapons[id]
  369.         elsif kind == "A"
  370.           item = $data_armors[id]
  371.         end
  372.         $game_party.lose_item(item, num*number)
  373.       end
  374.   end
  375.   #--------------------------------------------------------------------------
  376.   # 仠 屄悢擖椡偺廔椆
  377.   #--------------------------------------------------------------------------
  378.   def end_number_input
  379.     @number_window.hide
  380.     activate_list_window
  381.   end
  382.   #--------------------------------------------------------------------------
  383.   # 仠 嵟戝峸擖壜擻屄悢偺庢摼
  384.   #--------------------------------------------------------------------------
  385.   def max_buy
  386.     max = $game_party.max_item_number(@item) - $game_party.item_number(@item)
  387.    
  388.     @recipe = @list_window.recipe(@item)
  389.       for i in [email protected]
  390.         kind = @recipe[i][0]
  391.         id   = @recipe[i][1]
  392.         num  = @recipe[i][2]
  393.         if kind == "I"
  394.           item = $data_items[id]
  395.         elsif kind == "W"
  396.           item = $data_weapons[id]
  397.         elsif kind == "A"
  398.           item = $data_armors[id]
  399.         end
  400.         if num > 0
  401.           max_buf = $game_party.item_number(item)/num
  402.         else
  403.           max_buf = 999
  404.         end
  405.         max = [max, max_buf].min
  406.       end
  407.       
  408.     buying_price == 0 ? max : [max, money / buying_price].min

  409.   end
  410.   #--------------------------------------------------------------------------
  411.   # 仠 強帩嬥偺庢摼
  412.   #--------------------------------------------------------------------------
  413.   def money
  414.     @gold_window.value
  415.   end
  416.   #--------------------------------------------------------------------------
  417.   # 仠 捠壿扨埵偺庢摼
  418.   #--------------------------------------------------------------------------
  419.   def currency_unit
  420.     @gold_window.currency_unit
  421.   end
  422.   #--------------------------------------------------------------------------
  423.   # 仠 崌惉旓梡偺庢摼
  424.   #--------------------------------------------------------------------------
  425.   def buying_price
  426.     @list_window.price(@item)
  427.   end
  428. end


  429. #==============================================================================
  430. # 仭 Window_ItemSynthesisList
  431. #------------------------------------------------------------------------------
  432. # 丂崌惉夋柺偱丄崌惉壜擻側傾僀僥儉偺堦棗傪昞帵偡傞僂傿儞僪僂偱偡丅
  433. #==============================================================================

  434. class Window_ItemSynthesisList < Window_Selectable
  435.   include WD_itemsynthesis
  436.   #--------------------------------------------------------------------------
  437.   # 仠 岞奐僀儞僗僞儞僗曄悢
  438.   #--------------------------------------------------------------------------
  439.   attr_reader   :status_window            # 僗僥乕僞僗僂傿儞僪僂
  440.   #--------------------------------------------------------------------------
  441.   # 仠 僆僽僕僃僋僩弶婜壔
  442.   #--------------------------------------------------------------------------
  443.   def initialize(x, y, height)
  444.     super(x, y, window_width, height)
  445.    
  446.     @shop_goods = []
  447.     @shop_recipes = []
  448.    
  449.     for i in 1..WD_itemsynthesis_ini::I_recipe.size
  450.       recipe = WD_itemsynthesis_ini::I_recipe[i]
  451.       if recipe
  452.         good = [0, i, recipe[0]]
  453.         if i_recipe_switch_on?(i)
  454.           @shop_goods.push(good)
  455.           @shop_recipes.push(recipe)
  456.         end
  457.       end
  458.     end
  459.     for i in 1..WD_itemsynthesis_ini::W_recipe.size
  460.       recipe = WD_itemsynthesis_ini::W_recipe[i]
  461.       if recipe
  462.         good = [1, i, recipe[0]]
  463.         if w_recipe_switch_on?(i)
  464.           @shop_goods.push(good)
  465.           @shop_recipes.push(recipe)
  466.         end
  467.       end
  468.     end
  469.     for i in 1..WD_itemsynthesis_ini::A_recipe.size
  470.       recipe = WD_itemsynthesis_ini::A_recipe[i]
  471.       if recipe
  472.         good = [2, i, recipe[0]]
  473.         if a_recipe_switch_on?(i)
  474.           @shop_goods.push(good)
  475.           @shop_recipes.push(recipe)
  476.         end
  477.       end
  478.     end
  479.    
  480.     [url=home.php?mod=space&uid=26101]@Money[/url] = 0
  481.     refresh
  482.     select(0)
  483.   end
  484.   #--------------------------------------------------------------------------
  485.   # 仠 僂傿儞僪僂暆偺庢摼
  486.   #--------------------------------------------------------------------------
  487.   def window_width
  488.     return 304
  489.   end
  490.   #--------------------------------------------------------------------------
  491.   # 仠 崁栚悢偺庢摼
  492.   #--------------------------------------------------------------------------
  493.   def item_max
  494.     @data ? @data.size : 1
  495.   end
  496.   #--------------------------------------------------------------------------
  497.   # 仠 傾僀僥儉偺庢摼
  498.   #--------------------------------------------------------------------------
  499.   def item
  500.     @data[index]
  501.   end
  502.   #--------------------------------------------------------------------------
  503.   # 仠 強帩嬥偺愝掕
  504.   #--------------------------------------------------------------------------
  505.   def money=(money)
  506.     @money = money
  507.     refresh
  508.   end
  509.   #--------------------------------------------------------------------------
  510.   # 仠 慖戰崁栚偺桳岠忬懺傪庢摼
  511.   #--------------------------------------------------------------------------
  512.   def current_item_enabled?
  513.     enable?(@data[index])
  514.   end
  515.   #--------------------------------------------------------------------------
  516.   # 仠 崌惉旓梡傪庢摼
  517.   #--------------------------------------------------------------------------
  518.   def price(item)
  519.     @price[item]
  520.   end
  521.   #--------------------------------------------------------------------------
  522.   # 仠 崌惉壜斲傪庢摼
  523.   #--------------------------------------------------------------------------
  524.   def enable?(item)
  525.     @makable[item]
  526.   end
  527.   #--------------------------------------------------------------------------
  528.   # 仠 儗僔僺傪庢摼
  529.   #--------------------------------------------------------------------------
  530.   def recipe(item)
  531.     @recipe[item]
  532.   end
  533.   #--------------------------------------------------------------------------
  534.   # 仠 傾僀僥儉傪嫋壜忬懺偱昞帵偡傞偐偳偆偐
  535.   #--------------------------------------------------------------------------
  536.   def have_mat?(recipe)
  537.     flag = true
  538.     if @money >= recipe[0]
  539.       for i in 1...recipe.size
  540.         kind = recipe[i][0]
  541.         id   = recipe[i][1]
  542.         num  = recipe[i][2]
  543.         if kind == "I"
  544.           item = $data_items[id]
  545.         elsif kind == "W"
  546.           item = $data_weapons[id]
  547.         elsif kind == "A"
  548.           item = $data_armors[id]
  549.         end
  550.         if $game_party.item_number(item) < [num, 1].max
  551.           flag = false
  552.         end
  553.       end
  554.     else
  555.       flag = false
  556.     end
  557.     return flag
  558.   end
  559.   #--------------------------------------------------------------------------
  560.   # 仠 僇僥僑儕偺愝掕
  561.   #--------------------------------------------------------------------------
  562.   def category=(category)
  563.     return if @category == category
  564.     @category = category
  565.     refresh
  566.   end
  567.   #--------------------------------------------------------------------------
  568.   # 仠 儕僼儗僢僔儏
  569.   #--------------------------------------------------------------------------
  570.   def refresh
  571.     make_item_list
  572.     create_contents
  573.     draw_all_items
  574.   end
  575.   #--------------------------------------------------------------------------
  576.   # 仠 傾僀僥儉傪儕僗僩偵娷傔傞偐偳偆偐
  577.   #--------------------------------------------------------------------------
  578.   def include?(item)
  579.     case @category
  580.     when :item
  581.       item.is_a?(RPG::Item) && !item.key_item?
  582.     when :weapon
  583.       item.is_a?(RPG::Weapon)
  584.     when :armor
  585.       item.is_a?(RPG::Armor)
  586.     when :key_item
  587.       item.is_a?(RPG::Item) && item.key_item?
  588.     else
  589.       false
  590.     end
  591.   end
  592.   #--------------------------------------------------------------------------
  593.   # 仠 傾僀僥儉儕僗僩偺嶌惉
  594.   #--------------------------------------------------------------------------
  595.   def make_item_list
  596.     @data = []
  597.     @price = {}
  598.     @makable = {}
  599.     @recipe = {}
  600.     for i in 0...@shop_goods.size
  601.       goods = @shop_goods[i]
  602.       recipe = @shop_recipes[i]
  603.       case goods[0]
  604.       when 0;  item = $data_items[goods[1]]
  605.       when 1;  item = $data_weapons[goods[1]]
  606.       when 2;  item = $data_armors[goods[1]]
  607.       end
  608.       if item
  609.         if include?(item)
  610.           @data.push(item)
  611.           @price[item] = goods[2]
  612.           @makable[item] = have_mat?(recipe)
  613.           @recipe[item] = recipe
  614.         end
  615.       end
  616.     end
  617.   end
  618.   #--------------------------------------------------------------------------
  619.   # 仠 崁栚偺昤夋
  620.   #--------------------------------------------------------------------------
  621.   def draw_item(index)
  622.     item = @data[index]
  623.     rect = item_rect(index)
  624.     draw_item_name(item, rect.x, rect.y, enable?(item))
  625.     rect.width -= 4
  626.     draw_text(rect, price(item), 2)  if WD_itemsynthesis_ini::Cost_view
  627.   end
  628.   #--------------------------------------------------------------------------
  629.   # 仠 僗僥乕僞僗僂傿儞僪僂偺愝掕
  630.   #--------------------------------------------------------------------------
  631.   def status_window=(status_window)
  632.     @status_window = status_window
  633.     call_update_help
  634.   end
  635.   #--------------------------------------------------------------------------
  636.   # 仠 慺嵽僂傿儞僪僂偺愝掕
  637.   #--------------------------------------------------------------------------
  638.   def material_window=(material_window)
  639.     @material_window = material_window
  640.     call_update_help
  641.   end
  642.   #--------------------------------------------------------------------------
  643.   # 仠 僿儖僾僥僉僗僩峏怴
  644.   #--------------------------------------------------------------------------
  645.   def update_help
  646.     @help_window.set_item(item) if @help_window
  647.     @status_window.item = item if @status_window
  648.     @material_window.set(item, recipe(item)) if @material_window
  649.   end
  650.   #--------------------------------------------------------------------------
  651.   # 仠 Z 儃僞儞乮昞帵愗懼乯偑墴偝傟偨偲偒偺張棟
  652.   #--------------------------------------------------------------------------
  653.   def process_change_window
  654.     Sound.play_cursor
  655.     Input.update
  656.     call_handler(:change_window)
  657.   end
  658.   #--------------------------------------------------------------------------
  659.   # 仠 寛掕傗僉儍儞僙儖側偳偺僴儞僪儕儞僌張棟
  660.   #--------------------------------------------------------------------------
  661.   def process_handling
  662.     super
  663.     if active
  664.       return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  665. #      return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  666.     end
  667.   end
  668. end


  669. #==============================================================================
  670. # 仭 Window_ItemSynthesisMaterial
  671. #------------------------------------------------------------------------------
  672. # 丂崌惉夋柺偱丄崌惉偵昁梫側慺嵽傪昞帵偡傞僂傿儞僪僂偱偡丅
  673. #==============================================================================

  674. class Window_ItemSynthesisMaterial < Window_Base
  675.   #--------------------------------------------------------------------------
  676.   # 仠 僆僽僕僃僋僩弶婜壔
  677.   #--------------------------------------------------------------------------
  678.   def initialize(x, y, width, height)
  679.     super(x, y, width, height)
  680.     @item = nil
  681.     refresh
  682.   end
  683.   #--------------------------------------------------------------------------
  684.   # 仠 儕僼儗僢僔儏
  685.   #--------------------------------------------------------------------------
  686.   def refresh
  687.     contents.clear
  688.     draw_possession(4, 0)
  689.     draw_material_info(0, line_height * 2)
  690.   end
  691.   #--------------------------------------------------------------------------
  692.   # 仠 傾僀僥儉偺愝掕
  693.   #--------------------------------------------------------------------------
  694.   def set(item, recipe)
  695.     @item = item
  696.     @recipe = recipe
  697.     @make_number = 1
  698.     refresh
  699.   end
  700.   #--------------------------------------------------------------------------
  701.   # 仠 嶌惉屄悢偺愝掕
  702.   #--------------------------------------------------------------------------
  703.   def set_num(make_number)
  704.     @make_number = make_number
  705.     refresh
  706.   end
  707.   #--------------------------------------------------------------------------
  708.   # 仠 強帩悢偺昤夋
  709.   #--------------------------------------------------------------------------
  710.   def draw_possession(x, y)
  711.     rect = Rect.new(x, y, contents.width - 4 - x, line_height)
  712.     change_color(system_color)
  713.     draw_text(rect, Vocab::Possession)
  714.     change_color(normal_color)
  715.     draw_text(rect, $game_party.item_number(@item), 2)
  716.   end
  717.   #--------------------------------------------------------------------------
  718.   # 仠 慺嵽忣曬偺昤夋
  719.   #--------------------------------------------------------------------------
  720.   def draw_material_info(x, y)
  721.     rect = Rect.new(x, y, contents.width, line_height)
  722.     change_color(system_color)
  723.     contents.font.size = 18
  724.     draw_text(rect, "昁梫慺嵽", 0)
  725.     if @recipe
  726.       for i in [email protected]
  727.         kind = @recipe[i][0]
  728.         id   = @recipe[i][1]
  729.         num  = @recipe[i][2]
  730.         if kind == "I"
  731.           item = $data_items[id]
  732.         elsif kind == "W"
  733.           item = $data_weapons[id]
  734.         elsif kind == "A"
  735.           item = $data_armors[id]
  736.         end
  737.         rect = Rect.new(x, y + line_height*i, contents.width, line_height)
  738.         enabled = true
  739.         enabled = false if [num*@make_number, 1].max  > $game_party.item_number(item)
  740.         draw_item_name(item, rect.x, rect.y, enabled)
  741.         change_color(normal_color, enabled)
  742.         if num > 0
  743.           draw_text(rect, "#{num*@make_number}/#{$game_party.item_number(item)}", 2)
  744.         end
  745.       end
  746.     end
  747.     change_color(normal_color)
  748.     contents.font.size = 24
  749.   end
  750. end


  751. #==============================================================================
  752. # 仭 Window_ItemSynthesisNumber
  753. # 仭 Window_ItemSynthesisNumber
  754. #------------------------------------------------------------------------------
  755. # 丂崌惉夋柺偱丄崌惉偡傞傾僀僥儉偺屄悢傪擖椡偡傞僂傿儞僪僂偱偡丅
  756. #==============================================================================

  757. class Window_ItemSynthesisNumber < Window_ShopNumber
  758.   #--------------------------------------------------------------------------
  759.   # 仠 儕僼儗僢僔儏
  760.   #--------------------------------------------------------------------------
  761.   def refresh
  762.     contents.clear
  763.     draw_item_name(@item, 0, item_y)
  764.     draw_number
  765.     draw_total_price if WD_itemsynthesis_ini::Cost_view
  766.   end
  767.   #--------------------------------------------------------------------------
  768.   # 仠 僆僽僕僃僋僩弶婜壔
  769.   #--------------------------------------------------------------------------
  770.   def material_window=(material_window)
  771.     @material_window = material_window
  772.     call_update_help
  773.   end
  774.   #--------------------------------------------------------------------------
  775.   # 仠 嶌惉屄悢偺曄峏
  776.   #--------------------------------------------------------------------------
  777.   def change_number(amount)
  778.     @number = [[@number + amount, @max].min, 1].max
  779.     call_update_help #捛壛
  780.   end
  781.   #--------------------------------------------------------------------------
  782.   # 仠 僿儖僾僥僉僗僩峏怴
  783.   #--------------------------------------------------------------------------
  784.   def call_update_help
  785.     @material_window.set_num(@number) if @material_window
  786.   end
  787.   #--------------------------------------------------------------------------
  788.   # 仠 Z 儃僞儞乮昞帵愗懼乯偑墴偝傟偨偲偒偺張棟
  789.   #--------------------------------------------------------------------------
  790.   def process_change_window
  791.     Sound.play_cursor
  792.     Input.update
  793.     call_handler(:change_window)
  794.   end
  795.   #--------------------------------------------------------------------------
  796.   # 仠 寛掕傗僉儍儞僙儖側偳偺僴儞僪儕儞僌張棟
  797.   #--------------------------------------------------------------------------
  798.   def process_handling
  799.     super
  800.     if active
  801.       return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  802. #      return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  803.     end
  804.   end
  805. end


  806. #==============================================================================
  807. # 仭 Window_ItemSynthesisCategory
  808. #------------------------------------------------------------------------------
  809. # 丂崌惉夋柺偱丄捠忢傾僀僥儉傗憰旛昳偺暘椶傪慖戰偡傞僂傿儞僪僂偱偡丅
  810. #==============================================================================

  811. class Window_ItemSynthesisCategory < Window_ItemCategory
  812.   #--------------------------------------------------------------------------
  813.   # 仠 寘悢偺庢摼
  814.   #--------------------------------------------------------------------------
  815.   def col_max
  816.     i = 0
  817.     i += 1 if WD_itemsynthesis_ini::Category_i
  818.     i += 1 if WD_itemsynthesis_ini::Category_w
  819.     i += 1 if WD_itemsynthesis_ini::Category_a
  820.     i += 1 if WD_itemsynthesis_ini::Category_k
  821.     return i
  822.   end
  823.   #--------------------------------------------------------------------------
  824.   # 仠 僐儅儞僪儕僗僩偺嶌惉
  825.   #--------------------------------------------------------------------------
  826.   def make_command_list
  827.     add_command(Vocab::item,     :item)     if WD_itemsynthesis_ini::Category_i
  828.     add_command(Vocab::weapon,   :weapon)   if WD_itemsynthesis_ini::Category_w
  829.     add_command(Vocab::armor,    :armor)    if WD_itemsynthesis_ini::Category_a
  830.     add_command(Vocab::key_item, :key_item) if WD_itemsynthesis_ini::Category_k
  831.   end
  832. end


  833. #==============================================================================
  834. # 仭 Window_ItemSynthesisNumber
  835. #------------------------------------------------------------------------------
  836. # 丂崌惉夋柺偱丄愗懼傪昞帵偡傞僂傿儞僪僂偱偡丅
  837. #==============================================================================

  838. class Window_ItemSynthesisChange < Window_Base
  839.   #--------------------------------------------------------------------------
  840.   # 仠 僆僽僕僃僋僩弶婜壔
  841.   #--------------------------------------------------------------------------
  842.   def initialize(x, y, width, height)
  843.     super(x, y, width, height)
  844.     refresh
  845.   end
  846.   #--------------------------------------------------------------------------
  847.   # 仠 儕僼儗僢僔儏
  848.   #--------------------------------------------------------------------------
  849.   def refresh
  850.     contents.clear
  851.     text = "Z: 慺嵽 佁 僗僥乕僞僗 昞帵愗傝懼偊"
  852.     draw_text(0, 0, contents_width, line_height, text, 1)
  853.   end
  854. end
复制代码

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
131 小时
注册时间
2012-7-3
帖子
121
1
发表于 2013-1-22 20:00:20 | 只看该作者

点评

LBQ你这货又想干嘛 还开马甲? 不是抓生了么?  发表于 2013-2-24 06:54
真是新手不友好啊。。。  发表于 2013-1-23 08:20
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-19 15:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表