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

Project1

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

[已经过期] 这个脚本如何用事件设置呼出?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
89 小时
注册时间
2012-1-9
帖子
40
跳转到指定楼层
1
发表于 2012-4-4 13:34:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 iisnow 于 2012-4-4 17:06 编辑
  1. #=========================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. # 欢迎访问www.66RPG.com
  4. # 梦想世界,在你手中
  5. #=========================================================  
  6. #
  7. # Sample master list for crafting script (物品分类增强版) v1.1
  8. # written by Deke
  9. # 增强:叶子
  10. #
  11. # 12-30-2005 v1.0
  12. # 8-17-2006 v1.1
  13. # 修正了返回界面时不显示成品的BUG
  14. # 修正了材料大于8个不显示的BUG
  15. # 描绘物品美化
  16. # 自动检测能否合成
  17. #=========================================================
  18. # 简介:
  19. # 这是一个很不错的合成物品系统,可以通过游戏的过程,不断学习可以合成的
  20. # 物品方法。
  21. # ------
  22. # 增强版补充说明:
  23. # 在这个增强版中,可以对成品进行手动分类。
  24. # 成品增加了一个分类属性。
  25. # 这个分类纯粹是按自己的意愿,没有规定第几类必须是什么。
  26. # 召唤特定分类的界面,就只会看到特定分类的成品。
  27. #
  28. # 例如:
  29. # 使用脚本$scene = Scene_Craft.new(1),
  30. # 出来的界面就只会显示成品分类为1的东西
  31. # 同样道理,使用脚本$scene = Scene_Craft.new(2),
  32. # 出来的界面就只会显示成品分类为2的东西
  33. #
  34. # 如果使用脚本$scene = Scene_Craft.new或$scene = Scene_Craft.new(0)来召唤界面
  35. # 就可以看到所有成品。
  36. #
  37. # 注意:不要弄混淆“成品种类”和“成品分类”
  38. # 成品种类是指成品是普通物品(0),防具(1)或武器(2)
  39. # 成品分类是指此物品的自定义分类
  40. #
  41. #
  42. # 使用方法:
  43. # 1、召唤界面:使用脚本$scene = Scene_Craft.new(分类的数字)
  44. # 例如:使用脚本$scene = Scene_Craft.new(1),出来分类1的界面
  45. #
  46. # 2、学习合成:$game_party.learn_recipe(合成项目)
  47. #
  48. #  2.1、其实这个脚本可以使同一成品有不同配方
  49. #
  50. #    就这样说可能解释得不清楚,先来解释一下脚本学习配方的原理:
  51. #    $game_party.learn_recipe(合成项目)的处理过程并不是直接学习这个配方,
  52. #    而是在配方库中找到和合成项目成品相同的配方。
  53. #
  54. #    如果配方库中有两个配方成品相同的话,配方版本就变得重要。
  55. #    $game_party.learn_recipe(合成项目,配方版本)
  56. #    配方版本为1的话,学到的配方就是@recipe_list[xx]中与合成项目成品相同且数字最小的配方
  57. #    配方版本为2的话,学到的配方就是数字第二小的配方
  58. #    在上面这个脚本语句中,不填配方版本的话就默认为1
  59. #
  60. #  2.2、忘记配方:$game_party.forget_recipe(合成项目)
  61. #   2.21、同样道理,这个语句也可以写配方版本
  62. #    $game_party.forget_recipe(合成项目,配方版本)
  63. #    配方版本定义见2.1
  64. #
  65. #  2.3、配方版本不能乱填!例如游戏中某一个配方的成品是唯一的,与所有其它配方的成品都不相同
  66. #   那么学习的时候就不用填配方版本。
  67. #   如果这时在配方版本填了2的话,就有可能学不到或者忘不了(-_-||)
  68. #   
  69. #
  70. # 3、合成定义:
  71. # 这个合成脚本可以定义两种合成物品。一种是预先定义好了的,就像下面这样,
  72. # 直接写在这里就可以,另一种是在学习之前现场定义。
  73. #
  74. # 4、举例
  75. #  4.1、学会recipe_list[1]定义的合成:$game_party.learn_recipe($game_temp.recipe_list[1])
  76. #       注意,一行如果输入不下,在(的后面或[的后面按回车换行,否则可能出错
  77. #
  78. #  4.2、在游戏中临时定义一种合成,让玩家学会。使用事件中的脚本如下,   
  79. #  脚本:
  80. #    材料 = [$game_variables[1],$game_variables[2]]  #——材料编号是变量1、2的编号
  81. #    材料种类 = [0,0]                                #——材料是物品
  82. #    材料数量 = [$game_variables[3],$game_variables[4]]  #——需要材料数量是变量3、4的编号
  83. #    成品 = $game_variables[5]                       #——获得结果编号是5
  84. #    成品种类 = 1                                    #——成品是防具类
  85. #    成品分类 = 1                                    #——这一项不写的话默认为0
  86. #    $game_party.learn_recipe(Game_Recipe.new(材料,材料种类,材料数量,成品,成品种类,成品分类))
  87. #    上面这条语句的成品分类这一项不写也行,这样它就默认为0了。
  88. #    (也就是此物品没有分类,不会在分类菜单中出现)
  89. #    省略成品分类的脚本语句可以像下面这样写:
  90. #    $game_party.learn_recipe(Game_Recipe.new(材料,材料种类,材料数量,成品,成品种类))
  91. #
  92. #================================================================
  93. class Game_Temp
  94.   attr_reader :recipe_list  
  95.   alias crafting_temp_initialize initialize
  96.   def initialize
  97.     crafting_temp_initialize
  98.     @recipe_list=[]
  99.     get_recipe_list
  100.   end  
  101.   def get_recipe_list   
  102.     ################################################################
  103.     # 1 号合成物品设定 (续命膏*5+青玉萝卜*5+小蛋糕*3=琼浆之露) 成品分类:1
  104.     ##############################################################
  105.     材料 = [5, 64,65]             # 需要材料的数据库编号
  106.     材料种类 = [0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  107.     材料数量 = [5,5,3]         # 需要材料的数量
  108.     成品 = 27                # 获得物品编号
  109.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  110.     成品分类 = 1              # 获得成品分类
  111.     @recipe_list[1] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  112.    
  113.     ###############################################################
  114.     # 2 号合成物品设定 (魔女泪*5+肥肥菇*5+朝天椒*3=魔龙之血) 成品分类:1
  115.     ##########################################################
  116.     材料 = [10, 66, 68]          # 需要材料的数据库编号
  117.     材料种类 = [0, 0, 0]      # 需要材料的种类,0是普通物品,1是防具,2是武器
  118.     材料数量 = [5, 5, 3]      # 需要材料的数量
  119.     成品 = 28                  # 获得物品编号
  120.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  121.     物品分类 = 1              # 获得成品分类
  122.     @recipe_list[2] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  123.    
  124.     ##############################################################
  125.     # 3 号合成物品设定 (玉琼之露*3+魔龙之血*3+小金果*5=女神之吻) 成品分类:1
  126.     ###########################################################
  127.     材料 = [27,28,73]            # 需要材料的数据库编号
  128.     材料种类 = [0, 0, 0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  129.     材料数量 = [5, 5, 3]         # 需要材料的数量
  130.     成品 = 29                  # 获得物品编号
  131.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  132.     成品分类 = 1              # 获得成品分类
  133.     @recipe_list[3] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  134.    
  135.     ##############################################################
  136.     # 4 号合成物品设定 (回魂之泉*5+明酒*5+不明药丸*1=冥王恩典) 成品种类: 1
  137.     ##############################################################
  138.     材料 = [12,71,77]            # 需要材料的数据库编号
  139.     材料种类 = [0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  140.     材料数量 = [5,5,1]         # 需要材料的数量
  141.     成品 = 30                  # 获得物品编号
  142.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  143.     成品分类 = 1              # 获得成品分类
  144.     @recipe_list[4] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  145.   
  146.    #############################################################
  147.     # 5 号合成物品设定 (女神之吻*1+冥王恩典*1+万灵圣水*9+达克樱果*9=远古之心) 成品种类: 1
  148.     ##############################################################
  149.     材料 = [29,30,26,70]            # 需要材料的数据库编号
  150.     材料种类 = [0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  151.     材料数量 = [1,1,9,9]         # 需要材料的数量
  152.     成品 = 31                  # 获得物品编号
  153.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  154.     成品分类 = 1              # 获得成品分类
  155.     @recipe_list[5] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  156.    
  157.     #############################################################
  158.     # 6 号合成物品设定 (续命膏*8+野兽肉*5+小蛋糕*3+毒海螺*2=梦幻饮料) 成品种类: 1
  159.     ##############################################################
  160.     材料 = [5,67,65,72]            # 需要材料的数据库编号
  161.     材料种类 = [0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  162.     材料数量 = [8,5,3,2]         # 需要材料的数量
  163.     成品 = 55                  # 获得物品编号
  164.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  165.     成品分类 = 1              # 获得成品分类
  166.     @recipe_list[6] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  167.    
  168.      #############################################################
  169.     # 7 号合成物品设定 (玉琼之露*4+地皇水*5+青玉萝卜*9+野兽肉*9+???叶*1=天堂彩虹) 成品种类: 1
  170.     ##############################################################
  171.     材料 = [27,75,64,67,79]            # 需要材料的数据库编号
  172.     材料种类 = [0,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  173.     材料数量 = [4,5,9,9,1]         # 需要材料的数量
  174.     成品 = 56                  # 获得物品编号
  175.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  176.     成品分类 = 1              # 获得成品分类
  177.     @recipe_list[7] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  178.    
  179.       #############################################################
  180.     # 8 号合成物品设定 (魔女泪*7+蜂浆酒*4+肥肥菇*7+薄荷叶*3=极乐雪莲子) 成品种类: 1
  181.     ##############################################################
  182.     材料 = [10,74,66,69]            # 需要材料的数据库编号
  183.     材料种类 = [0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  184.     材料数量 = [5,4,7,3]         # 需要材料的数量
  185.     成品 = 57                  # 获得物品编号
  186.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  187.     成品分类 = 1              # 获得成品分类
  188.     @recipe_list[8] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  189.    
  190.        #############################################################
  191.     # 9 号合成物品设定 (魔龙之血*4+天麻星实*6+朝天椒*4+达克樱果*4+光明草*2=太古人参王) 成品种类: 1
  192.     ##############################################################
  193.     材料 = [28,76,68,70,78]            # 需要材料的数据库编号
  194.     材料种类 = [0,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  195.     材料数量 = [4,6,4,4,2]         # 需要材料的数量
  196.     成品 = 58                  # 获得物品编号
  197.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  198.     成品分类 = 1              # 获得成品分类
  199.     @recipe_list[9] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  200.    
  201.        #############################################################
  202.     # 10 号合成物品设定 (冥王恩典*4+鬼婆婆的汤药*3+不金果*6+明酒*2+玲珑珍菇*1=如来之花) 成品种类: 1
  203.     ##############################################################
  204.     材料 = [30,80,73,71,81]            # 需要材料的数据库编号
  205.     材料种类 = [0,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  206.     材料数量 = [4,3,6,2,1]         # 需要材料的数量
  207.     成品 = 59                  # 获得物品编号
  208.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  209.     成品分类 = 1              # 获得成品分类
  210.     @recipe_list[10] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  211.    
  212.        #############################################################
  213.     # 11 号合成物品设定 (万灵圣药*9+毒海螺*4+蜂浆酒*3+地皇水*2+天麻星实*3+光明草*2=上帝之血) 成品种类: 1
  214.     ##############################################################
  215.     材料 = [26,72,74,75,76,78]            # 需要材料的数据库编号
  216.     材料种类 = [0,0,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  217.     材料数量 = [9,4,3,2,3,2]         # 需要材料的数量
  218.     成品 = 60                  # 获得物品编号
  219.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  220.     成品分类 = 1              # 获得成品分类
  221.     @recipe_list[11] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  222.    
  223.       #############################################################
  224.     # 12 号合成物品设定 (远古之心*2+冰龙草*1+爱神的呵护*1+玲珑珍菇*3+鬼婆婆的汤药*3+???叶*3=永无终点的生命) 成品种类: 1
  225.     ##############################################################
  226.     材料 = [31,82,83,81,80,79]            # 需要材料的数据库编号
  227.     材料种类 = [0,0,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  228.     材料数量 = [2,1,1,3,3,3]         # 需要材料的数量
  229.     成品 = 61                  # 获得物品编号
  230.     成品种类 = 0              # 获得物品种类,0是普通物品,1是防具,2是武器
  231.     成品分类 = 1              # 获得成品分类
  232.     @recipe_list[12] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  233.    
  234.        #############################################################
  235.     # 13 号合成物品设定 (长法袍*1+水晶兰*1+黑硝石*3=术士影子) 成品种类: 2
  236.     ##############################################################
  237.     材料 = [1,110,86]            # 需要材料的数据库编号
  238.     材料种类 = [1,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  239.     材料数量 = [1,1,3]         # 需要材料的数量
  240.     成品 = 2                  # 获得物品编号
  241.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  242.     成品分类 = 2              # 获得成品分类
  243.     @recipe_list[13] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  244.    
  245.         #############################################################
  246.     # 14 号合成物品设定 (轻披风*1+风羽*1+大毒牙*3=隐叶) 成品种类: 2
  247.     ##############################################################
  248.     材料 = [7,88,87]            # 需要材料的数据库编号
  249.     材料种类 = [1,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  250.     材料数量 = [1,1,3]         # 需要材料的数量
  251.     成品 = 8                  # 获得物品编号
  252.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  253.     成品分类 = 2              # 获得成品分类
  254.     @recipe_list[14] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  255.    
  256.         #############################################################
  257.     # 15 号合成物品设定 (便身衣*1+水晶兰*1+冰晶石*2=通行者) 成品种类: 2
  258.     ##############################################################
  259.     材料 = [13,110,89]            # 需要材料的数据库编号
  260.     材料种类 = [1,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  261.     材料数量 = [1,1,2]         # 需要材料的数量
  262.     成品 = 14                  # 获得物品编号
  263.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  264.     成品分类 = 2              # 获得成品分类
  265.     @recipe_list[15] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  266.    
  267.          #############################################################
  268.     # 16 号合成物品设定 (皮胸甲*1+大毒牙*2+黑硝石*9=牛角尖) 成品种类: 2
  269.     ##############################################################
  270.     材料 = [19,87,86]            # 需要材料的数据库编号
  271.     材料种类 = [1,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  272.     材料数量 = [1,2,9]         # 需要材料的数量
  273.     成品 = 20                  # 获得物品编号
  274.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  275.     成品分类 = 2              # 获得成品分类
  276.     @recipe_list[16] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  277.    
  278.          #############################################################
  279.     # 17 号合成物品设定 (钢铁铠*1+迷志铃声*3+紫魄石=钢骨) 成品种类: 2
  280.     ##############################################################
  281.     材料 = [25,90,111]            # 需要材料的数据库编号
  282.     材料种类 = [1,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  283.     材料数量 = [1,3,1]         # 需要材料的数量
  284.     成品 = 26                  # 获得物品编号
  285.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  286.     成品分类 = 2              # 获得成品分类
  287.     @recipe_list[17] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  288.    
  289.     #############################################################
  290.     # 18 号合成物品设定 (丝绸罗袍*1+紫魄石*5+雷音海星*2+山石之卵*3=长言羽) 成品种类: 2
  291.     ##############################################################
  292.     材料 = [3,111,91,92]            # 需要材料的数据库编号
  293.     材料种类 = [1,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  294.     材料数量 = [1,5,2,3]         # 需要材料的数量
  295.     成品 = 4                  # 获得物品编号
  296.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  297.     成品分类 = 2              # 获得成品分类
  298.     @recipe_list[18] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  299.    
  300.      #############################################################
  301.     # 19 号合成物品设定 (云皮披风*1+蓝海之瞳*2+风羽*4+冰晶石*6=云兽碎魂) 成品种类: 2
  302.     ##############################################################
  303.     材料 = [9,112,88,89]            # 需要材料的数据库编号
  304.     材料种类 = [1,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  305.     材料数量 = [1,1,4,3]         # 需要材料的数量
  306.     成品 = 10                  # 获得物品编号
  307.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  308.     成品分类 = 2              # 获得成品分类
  309.     @recipe_list[19] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  310.    
  311.      #############################################################
  312.     # 20 号合成物品设定 (武行之衣*1+紫魄石*1+水晶兰*7+山石之卵*2=修行的游士) 成品种类: 2
  313.     ##############################################################
  314.     材料 = [15,111,110,92]            # 需要材料的数据库编号
  315.     材料种类 = [1,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  316.     材料数量 = [1,1,7,2]         # 需要材料的数量
  317.     成品 = 16                  # 获得物品编号
  318.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  319.     成品分类 = 2              # 获得成品分类
  320.     @recipe_list[20] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  321.    
  322.      #############################################################
  323.     # 21 号合成物品设定 (决战之甲*1+恶灵之羽*2+妖卵*3+紫魄石*3=不灭的战意) 成品种类: 2
  324.     ##############################################################
  325.     材料 = [21,97,95,111]            # 需要材料的数据库编号
  326.     材料种类 = [1,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  327.     材料数量 = [1,2,3,3]         # 需要材料的数量
  328.     成品 = 22                  # 获得物品编号
  329.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  330.     成品分类 = 2              # 获得成品分类
  331.     @recipe_list[21] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  332.    
  333.      #############################################################
  334.     # 22 号合成物品设定 (荣耀重铠*1+天竺绿水*1+冰虎之牙*3+鬼灵炎*4=荣耀的牺牲品) 成品种类: 2
  335.     ##############################################################
  336.     材料 = [27,113,94,93]            # 需要材料的数据库编号
  337.     材料种类 = [1,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  338.     材料数量 = [1,1,3,4]         # 需要材料的数量
  339.     成品 = 28                  # 获得物品编号
  340.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  341.     成品分类 = 2              # 获得成品分类
  342.     @recipe_list[22] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  343.    
  344.       #############################################################
  345.     # 23 号合成物品设定 (纹章咒袍*1+神之卵*1+金色梦幻*3+夺命珊瑚*2+魔蜥尾*6=被诅咒的灵魂) 成品种类: 2
  346.     ##############################################################
  347.     材料 = [5,105,114,98,96]            # 需要材料的数据库编号
  348.     材料种类 = [1,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  349.     材料数量 = [1,1,3,2,6]         # 需要材料的数量
  350.     成品 = 6                  # 获得物品编号
  351.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  352.     成品分类 = 2              # 获得成品分类
  353.     @recipe_list[23] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  354.    
  355.        #############################################################
  356.     # 24 号合成物品设定 (梦幻披风*1+太阳鸟之灵*4+金色梦幻*7+战争号角*5+飞龙空翼*5=水晶的理想) 成品种类: 2
  357.     ##############################################################
  358.     材料 = [11,104,114,102,101]            # 需要材料的数据库编号
  359.     材料种类 = [1,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  360.     材料数量 = [1,4,7,5,5]         # 需要材料的数量
  361.     成品 = 12                  # 获得物品编号
  362.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  363.     成品分类 = 2              # 获得成品分类
  364.     @recipe_list[24] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  365.    
  366.         #############################################################
  367.     # 25 号合成物品设定 (王者战衣*1+天竺绿水*9+彩虹之石*8+破灭神像*6+蓝海之瞳*9=战神的佐证) 成品种类: 2
  368.     ##############################################################
  369.     材料 = [17,113,100,103,112]            # 需要材料的数据库编号
  370.     材料种类 = [1,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  371.     材料数量 = [1,9,8,6,9]         # 需要材料的数量
  372.     成品 = 18                  # 获得物品编号
  373.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  374.     成品分类 = 2              # 获得成品分类
  375.     @recipe_list[25] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  376.    
  377.         #############################################################
  378.     # 26 号合成物品设定 (神圣战甲*1+永恒的纯洁*1+太阳鸟之灵*1+破灭神像*2+美杜莎的恶灵*8=众神的愿望) 成品种类: 2
  379.     ##############################################################
  380.     材料 = [23,115,104,103,99]            # 需要材料的数据库编号
  381.     材料种类 = [1,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  382.     材料数量 = [1,1,1,2,8]         # 需要材料的数量
  383.     成品 = 24                  # 获得物品编号
  384.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  385.     成品分类 = 2              # 获得成品分类
  386.     @recipe_list[26] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  387.    
  388.        #############################################################
  389.     # 27 号合成物品设定 (玄武真铠*1+神之卵*1+永恒纯洁*1+美杜莎的灵魂*2+天竺绿水*3=世界最强) 成品种类: 2
  390.     ##############################################################
  391.     材料 = [29,105,115,99,113]            # 需要材料的数据库编号
  392.     材料种类 = [1,0,0,0,0]         # 需要材料的种类,0是普通物品,1是防具,2是武器
  393.     材料数量 = [1,1,1,2,3]         # 需要材料的数量
  394.     成品 = 30                  # 获得物品编号
  395.     成品种类 = 1              # 获得物品种类,0是普通物品,1是防具,2是武器
  396.     成品分类 = 2              # 获得成品分类
  397.     @recipe_list[27] = Game_Recipe.new(材料,材料种类, 材料数量,成品,成品种类,成品分类)
  398.    
  399.      
  400.   end # of get_recipe_list method
  401. end # of updates to Game_Temp Class

  402. #================================
  403. # CRAFTING PROGRAM
  404. #-----------------------------------------------------
  405. #-written by Deke
  406. #-yes_no window code created by Phsylomortis
  407. #-----------------------------------------------------
  408. #================================

  409. #updates to Game_Party class

  410. class Game_Party
  411.   
  412.   attr_accessor       :recipes
  413.   
  414.   alias crafting_party_initialize initialize
  415.   
  416.   def initialize
  417.     crafting_party_initialize
  418.     @recipes=[]
  419.   end
  420.   
  421.   #------------------------------------------------------
  422.   def know?(recipe, version = 1)
  423.     unless recipe.is_a?(Game_Recipe)
  424.       recipe = get_recipe_from_master_list(recipe, version)
  425.     end
  426.     return $game_party.recipes.include?(recipe)
  427.   end
  428.   
  429. #----------------------------------------------------
  430.   def learn_recipe(recipe , version = 1)
  431.     unless recipe.is_a?(Game_Recipe)
  432.       recipe = get_recipe_from_master_list(recipe, version)
  433.     end
  434.     if recipe.is_a?(Game_Recipe)
  435.       unless know?(recipe)
  436.         @recipes.push(recipe)
  437.       end
  438.     end
  439.   end
  440.   
  441. #------------------------------------------------------
  442.   def forget_recipe(recipe , version = 1)
  443.     if !recipe.is_a?(Game_Recipe)
  444.       recipe = get_recipe_from_master_list(recipe, version)
  445.     end
  446.     if recipe.is_a?(Game_Recipe)
  447.       for i in [email protected]
  448.         if recipe == @recipes
  449.           index = i
  450.           break
  451.         end
  452.       end
  453.       if index != nil
  454.         @recipes.delete(@recipes[index])
  455.       end
  456.     end
  457.   end
  458.   
  459. #---------------------------------------------------------
  460.   def get_recipe_from_master_list(item, version)
  461.     index = nil
  462.     for i in 0...$game_temp.recipe_list.size
  463.       if item[0] == $game_temp.recipe_list.result and item[1] ==$game_temp.recipe_list.result_type
  464.         version -= 1
  465.         if version == 0
  466.           index = i
  467.           break
  468.         end
  469.       end
  470.     end
  471.     if index.is_a?(Integer)
  472.       return ($game_temp.recipe_list[index])
  473.     else
  474.       return false
  475.     end
  476.   end
  477.   
  478. end # of Game_Party updates

  479. #================================
  480. class Game_Recipe

  481.   attr_reader :ingredients
  482.   attr_reader :quantities
  483.   attr_reader :result
  484.   attr_reader :result_type
  485.   attr_reader :ingredient_types
  486.   attr_reader :craft_type  #物品分类
  487.   
  488. #---------------------------------------------------
  489.   def initialize( ingredients, ingredient_types, quantities, result, result_type, craft_type=0)
  490.     @ingredients = ingredients
  491.     @ingredient_types = ingredient_types
  492.     @quantities = quantities
  493.     @result = result
  494.     @result_type = result_type
  495.     @craft_type = craft_type
  496.   end
  497.   
  498. #---------------------------------------------------------
  499.   def name
  500.     case @result_type
  501.       when 0
  502.         name = $data_items[@result].name
  503.       when 1
  504.         name = $data_armors[@result].name
  505.       when 2
  506.         name = $data_weapons[@result].name
  507.     end
  508.     return name
  509.   end
  510.   
  511. #--------------------------------------------------------

  512.   def item
  513.     case @result_type
  514.       when 0
  515.         item = $data_items[@result]
  516.       when 1
  517.         item = $data_armors[@result]
  518.       when 2
  519.         item = $data_weapons[@result]
  520.     end
  521.     return item
  522.   end

  523. #-----------------------------------------------------
  524.   def have
  525.     have_all = true
  526.     for i in [email protected]
  527.       case @ingredient_types
  528.         when 0
  529.           if $game_party.item_number(@ingredients) < @quantities
  530.             have_all=false
  531.           end
  532.         when 1
  533.           if $game_party.armor_number(@ingredients) < @quantities
  534.             have_all=false
  535.           end
  536.         when 2
  537.           if $game_party.weapon_number(@ingredients) < @quantities
  538.             have_all=false
  539.           end
  540.       end
  541.     end
  542.     return have_all
  543.   end

  544. #---------------------------------------------------------
  545.   def decrement
  546.     for i in [email protected]
  547.       case @ingredient_types
  548.       when 0
  549.         $game_party.lose_item(@ingredients, @quantities)
  550.       when 1
  551.         $game_party.lose_armor(@ingredients, @quantities)
  552.       when 2
  553.         $game_party.lose_weapon(@ingredients, @quantities)
  554.       end
  555.     end
  556.   end

  557. #-------------------------------------------------------
  558.   def make
  559.     if have
  560.       case @result_type
  561.       when 0
  562.         $game_party.gain_item(@result, 1)
  563.       when 1
  564.         $game_party.gain_armor(@result, 1)
  565.       when 2
  566.         $game_party.gain_weapon(@result, 1)
  567.       end
  568.       decrement
  569.     end
  570.   end
  571.   
  572. #---------------------------------------------------------
  573.   def == (recipe)
  574.     if recipe.is_a?(Game_Recipe)
  575.       equal = true
  576.       if recipe.ingredients != self.ingredients
  577.         equal = false
  578.       end
  579.       if recipe.ingredient_types != self.ingredient_types
  580.         equal = false
  581.       end
  582.       if recipe.quantities != self.quantities
  583.         equal = false
  584.       end
  585.       if recipe.result != self.result
  586.         equal=false
  587.       end
  588.       if recipe.result_type != self.result_type
  589.         equal = false
  590.       end
  591.     else
  592.       equal = false
  593.     end
  594.     return equal
  595.   end
  596.   
  597. end # of Game_Recipe class

  598. #===================================

  599. class Window_Craft < Window_Selectable
  600.   attr_reader :data #声明数据
  601.   #-------------------------------------------------------
  602.   def initialize(craft_type=0)
  603.     @craft_type = craft_type
  604.     super(0, 64, 240, 416)
  605.     @column_max = 1
  606.     refresh
  607.     self.index = 0
  608.   end

  609.   #----------------------------------------------------------
  610.   def recipe
  611.     return @data[self.index]
  612.   end

  613.   #----------------------------------------------------------
  614.   def refresh
  615.     if self.contents != nil
  616.       self.contents.dispose
  617.       self.contents = nil
  618.     end
  619.     @data = []
  620.     for i in 0...$game_party.recipes.size
  621.        #@craft_type为0时就显示全部物品
  622.        #不为0时就显示对应物品
  623.       if @craft_type == 0
  624.         @data.push($game_party.recipes)
  625.       elsif $game_party.recipes.craft_type == @craft_type
  626.         @data.push($game_party.recipes)
  627.       end
  628.     end
  629.     @item_max = @data.size
  630.     if @item_max > 0
  631.       self.contents = Bitmap.new(width - 32, row_max * 32)
  632.       self.contents.font.name = "黑体" # = "黑体"
  633.       self.contents.font.size = 18 # = 18
  634.       for i in 0...@item_max
  635.         x = 16
  636.         y = i * 32
  637.         able = true
  638.         for ingredient in [email protected]
  639.           case @data.ingredient_types[ingredient]
  640.           when 0
  641.             count = $game_party.item_number(@data.ingredients[ingredient])
  642.           when 1
  643.             count = $game_party.armor_number(@data.ingredients[ingredient])
  644.           when 2
  645.             count = $game_party.weapon_number(@data.ingredients[ingredient])
  646.           end
  647.           if count < @data.quantities[ingredient]
  648.             able = false
  649.             break
  650.           end
  651.         end
  652.         draw_item_name(@data.item, x, y, able)
  653.       end
  654.     end
  655.   end

  656.   #------------------------------------------------------------
  657.   #def draw_item(index)
  658.   #  recipe = @data[index]
  659.   #  self.contents.font.color = recipe.have ? normal_color : disabled_color
  660.   #  x = 16
  661.   #  y = index * 32
  662.   #  self.contents.draw_text(x , y, self.width-32, 32, recipe.name, 0)
  663.   #end
  664.   
  665.   #--------------------------------------------------------------
  666.   # ● 描绘物品名
  667.   #     item : 物品
  668.   #     x    : 描画目标 X 坐标
  669.   #     y    : 描画目标 Y 坐标
  670.   #--------------------------------------------------------------
  671.   def draw_item_name(item, x, y, able = true)
  672.     if item == nil
  673.       return
  674.     end
  675.     if !able
  676.       self.contents.font.color = disabled_color
  677.     end
  678.     bitmap = RPG::Cache.icon(item.icon_name)
  679.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  680.     self.contents.draw_text(x + 28, y, 212, 32, item.name)
  681.     self.contents.font.color = normal_color
  682.   end
  683.   
  684.   #--------------------------------------------------------------
  685.   def update_help
  686.     current_recipe = recipe
  687.     if current_recipe.is_a?(Game_Recipe)
  688.     case current_recipe.result_type
  689.       when 0
  690.         description = $data_items[current_recipe.result].description
  691.       when 1
  692.         description = $data_armors[current_recipe.result].description
  693.       when 2
  694.         description = $data_weapons[current_recipe.result].description
  695.       end
  696.     else
  697.       description = ""
  698.     end
  699.     @help_window.set_text(description)
  700.     @help_window.update
  701.   end
  702.   
  703. end # of Window_Craft

  704. #=======================================
  705. class Window_CraftResult < Window_Base

  706.   #---------------------------------------------------------
  707.   def initialize
  708.     super(240, 64, 400, 184)
  709.     self.contents = Bitmap.new(width - 32, height - 32)
  710.     self.contents.font.name = "黑体" # = $fontface.is_a?(String) ? $fontface : $defaultfonttype
  711.     self.contents.font.size = 18 # = 20
  712.     @result = nil
  713.     @type = nil
  714.   end

  715.   #------------------------------------------------------------
  716.   def refresh
  717.     self.contents.clear
  718.     case @type
  719.       when 0
  720.         item = $data_items[@result]
  721.         if item.recover_hp_rate > item.recover_hp
  722.           hp_string = "HP回复率:"
  723.           hp_stat = item.recover_hp_rate
  724.         else
  725.           hp_string = "HP回复量:"
  726.           hp_stat = item.recover_hp
  727.         end
  728.         if item.recover_sp_rate > item.recover_sp
  729.           sp_string = "SP回复率:"
  730.           sp_stat = item.recover_sp_rate
  731.         else
  732.           sp_string = "SP回复量:"
  733.           sp_stat = item.recover_sp
  734.         end
  735.         @strings = [hp_string, sp_string, "物理防御:" , "魔法防御:", "命中率:", "分散度:"]
  736.         @stats = [hp_stat, sp_stat, item. pdef_f, item.mdef_f, item.hit, item.variance,
  737.                        $game_party.item_number(@result)]
  738.         @bitmap = RPG::Cache.icon(item.icon_name)
  739.       when 1
  740.         item = $data_armors[@result]
  741.         @strings = ["物理防御:", "魔法防御:", "回避修正:", "力量增加:", "灵巧增加:",
  742.                        "速度增加:", "魔力增加:"]
  743.         @stats = [item.pdef, item.mdef, item.eva, item.str_plus, item.dex_plus,
  744.                     item.agi_plus, item.int_plus, $game_party.armor_number(@result) ]
  745.         @bitmap = RPG::Cache.icon(item.icon_name)
  746.       when 2
  747.         item = $data_weapons[@result]
  748.         @strings =["攻击力:", "物理防御:", "魔法防御:", "力量增加:", "灵巧增加:",
  749.                     "速度增加:", "魔力增加:"]
  750.         @stats = [item.atk, item.pdef, item.mdef, item.str_plus, item.dex_plus,
  751.                     item.agi_plus, item.int_plus, $game_party.weapon_number(@result) ]
  752.         @bitmap = RPG::Cache.icon(item.icon_name)
  753.     end
  754.     for i in [email protected]
  755.       x = i%2 * 184
  756.       y = i /2 *28 +32
  757.       self.contents.font.color = normal_color
  758.       self.contents.draw_text(x,y,100, 28,@strings)
  759.       self.contents.font.color = system_color
  760.       self.contents.draw_text(x + 110, y, 45, 28, @stats.to_s)
  761.     end
  762.     self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, 24, 24), 255)
  763.     self.contents.font.color= normal_color
  764.     self.contents.draw_text(40, 0, 300, 28, "待合成物品的现有数量:")
  765.     self.contents.font.color = system_color
  766.     count = @stats[@stats.size - 1].to_s
  767.     self.contents.draw_text(294, 0, 45, 28, count )
  768.   end
  769.    
  770. #-------------------------------------------------------------
  771.   def set_result(result , type)
  772.     @result = result
  773.     @type = type
  774.     refresh
  775.   end

  776. end #of Window_CraftResult

  777. #=======================================
  778. class Window_CraftIngredients < Window_Base

  779.   #----------------------------------------------------------------
  780.   def initialize
  781.     super(240, 248, 400, 232)
  782.     self.contents = Bitmap.new(width - 32, height - 32)
  783.     self.contents.font.name = "黑体" # = $fontface.is_a?(String) ? $fontface : $defaultfonttype
  784.     self.contents.font.size = 18 # = 20
  785.     @ingredients = []
  786.     @types = []
  787.     @quantities = []
  788.     @item = nil
  789.     @count = 0
  790.     @counter = 0
  791.     @real_oy = 0
  792.   end

  793.   #-----------------------------------------------------------------
  794.   def refresh
  795.     @counter = 0
  796.     self.contents.clear
  797.     self.contents = Bitmap.new(width - 32, @ingredients.size * 26)
  798.     for i in [email protected]
  799.       case @types
  800.       when 0
  801.         @item = $data_items[@ingredients]
  802.         @count = $game_party.item_number(@ingredients)
  803.       when 1
  804.         @item = $data_armors[@ingredients]
  805.         @count = $game_party.armor_number(@ingredients)
  806.       when 2
  807.         @item = $data_weapons[@ingredients]
  808.         @count = $game_party.weapon_number(@ingredients)
  809.       end
  810.       y = i *26
  811.       self.contents.blt(0, y, RPG::Cache.icon(@item.icon_name), Rect.new(0, 0, 24, 24), 255)
  812.       self.contents.font.color = @count >= @quantities ? normal_color : disabled_color
  813.       self.contents.draw_text(30, y, 280, 28, @item.name)
  814.       self.contents.draw_text(300, y, 45, 28, @quantities.to_s)
  815.       self.contents.font.color = system_color
  816.       self.contents.draw_text(245, y, 45, 28, @count.to_s )     
  817.     end
  818.   end
  819.       
  820.   #-------------------------------------------------------------
  821.   def set_ingredients(ingredients , types, quantities)
  822.     @ingredients = ingredients
  823.     @types = types
  824.     @quantities = quantities
  825.     refresh
  826.     if @ingredients.size > 7
  827.       self.oy = -52
  828.       @real_oy = 0
  829.     else
  830.       self.oy = 0
  831.     end
  832.   end

  833.   def update
  834.     super
  835.     @counter += 1
  836.     if @ingredients.size > 7 and @counter > 30
  837.       @real_oy = (@real_oy + 1) % ((@ingredients.size - 3) * 26)
  838.       self.oy = @real_oy - 52
  839.     end
  840.   end
  841.    
  842. end # of Window_CraftIngredients

  843. #======================================
  844. class Scene_Craft

  845.   #--------------------------------------------------------------------
  846.   # @craft_type:物品种类,0就是全部
  847.   def initialize(craft_type=0,craft_index=0)
  848.     @craft_index=craft_index
  849.     @craft_type = craft_type
  850.   end
  851.   
  852.   #--------------------------------------------------------------------
  853.   def main
  854.     @craft_window = Window_Craft.new(@craft_type)
  855.     @craft_window.index=@craft_index
  856.     @confirm_window = Window_Base.new(120, 188, 400, 64)
  857.     @confirm_window.contents = Bitmap.new(368, 32)
  858.     @confirm_window.contents.font.name = "黑体"
  859.     @confirm_window.contents.font.size = 20
  860.     @help_window = Window_Help.new
  861.     @craft_window.help_window = @help_window
  862.     @result_window=Window_CraftResult.new
  863.     @ingredients_window=Window_CraftIngredients.new
  864.     if @craft_window.data.size > 0 #本类窗口物品大于0的话
  865.       @result_window.set_result(@craft_window.recipe.result, @craft_window.recipe.result_type)
  866.       @ingredients_window.set_ingredients(@craft_window.recipe.ingredients,
  867.                                                           @craft_window.recipe.ingredient_types,
  868.                                                           @craft_window.recipe.quantities)
  869.     end
  870.     @yes_no_window = Window_Command.new(100, ["确定", "放弃"])
  871.     @confirm_window.visible = false
  872.     @confirm_window.z = 1500
  873.     @yes_no_window.visible = false
  874.     @yes_no_window.active = false
  875.     @yes_no_window.index = 1
  876.     @yes_no_window.x = 270
  877.     @yes_no_window.y = 252
  878.     @yes_no_window.z = 1500
  879.     @label_window = Window_Base.new(450,200,190,52)
  880.     @label_window.contents=Bitmap.new(@label_window.width - 32,@label_window.height - 32)
  881.     @label_window.contents.font.size=20
  882.     @label_window.contents.font.color = @label_window.normal_color
  883.     @label_window.contents.font.name = "黑体"
  884.     @label_window.contents.draw_text(0, 0, @label_window.contents.width, 20, "  现有   需要")
  885.     Graphics.transition
  886.     loop do
  887.       Graphics.update
  888.       Input.update
  889.       update
  890.       if $scene != self
  891.         break
  892.       end
  893.     end
  894.     Graphics.freeze
  895.     @help_window.dispose
  896.     @craft_window.dispose
  897.     @result_window.dispose
  898.     @ingredients_window.dispose
  899.     @confirm_window.dispose
  900.     @yes_no_window.dispose
  901.     @label_window.dispose
  902.   end

  903.   #--------------------------------------------------------------------
  904.   def update
  905.     @craft_window.update
  906.     @ingredients_window.update
  907.     if @craft_window.active
  908.       update_craft
  909.       return
  910.     end
  911.     if @yes_no_window.active
  912.       confirm_update
  913.       return
  914.     end
  915.   end

  916.   #-------------------------------------------------------------------
  917.   def update_craft
  918.     if Input.dir4 != 0
  919.       if @craft_window.data.size > 0 #本类窗口物品大于0的话
  920.         @result_window.set_result(@craft_window.recipe.result, @craft_window.recipe.result_type)
  921.         @ingredients_window.set_ingredients(@craft_window.recipe.ingredients,
  922.                                                            @craft_window.recipe.ingredient_types,
  923.                                                            @craft_window.recipe.quantities)
  924.       end
  925.     end
  926.     if Input.trigger?(Input::B)
  927.       $game_system.se_play($data_system.cancel_se)
  928.       $scene = Scene_Map.new
  929.       return
  930.     end
  931.     if Input.trigger?(Input::C) and $game_party.recipes.size != 0
  932.       @recipe = @craft_window.recipe
  933.       if @recipe != nil
  934.         if @recipe.have
  935.           @yes_no_window.active = true
  936.           @craft_window.active = false
  937.         else
  938.           $game_system.se_play($data_system.buzzer_se)
  939.           return
  940.         end
  941.       else
  942.         $game_system.se_play($data_system.buzzer_se)
  943.         return
  944.       end
  945.     end
  946.   end

  947.   #-------------------------------------------------------------------
  948.   def confirm_update
  949.     @craft_index = @craft_window.index
  950.     @confirm_window.visible = true
  951.     @confirm_window.z = 1500
  952.     @yes_no_window.visible = true
  953.     @yes_no_window.active = true
  954.     @yes_no_window.z = 1500
  955.     @yes_no_window.update
  956.     string = "合成 " + @recipe.name + "?"
  957.     cw = @confirm_window.contents.text_size(string).width
  958.     center = @confirm_window.contents.width/2 - cw /2
  959.     unless @drawn
  960.       @confirm_window.contents.draw_text(center, 0, cw, 30, string)
  961.       @drawn = true
  962.     end
  963.     if Input.trigger?(Input::C)
  964.       if @yes_no_window.index == 0
  965.         $game_system.se_play($data_system.decision_se)
  966.         @recipe.make
  967.         $game_system.se_play($data_system.save_se)
  968.         $scene=Scene_Craft.new(@craft_type,@craft_index)
  969.       else
  970.         $game_system.se_play($data_system.cancel_se)
  971.         $scene=Scene_Craft.new(@craft_type,@craft_index)
  972.       end
  973.     end
  974.     if Input.trigger?(Input::B)
  975.       $game_system.se_play($data_system.cancel_se)
  976.       $scene=Scene_Craft.new(@craft_type,@craft_index)
  977.     end
  978.   end

  979. end # of Scene_Craft

  980. #=============================================================
  981. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  982. # 欢迎访问www.66RPG.com
  983. # 梦想世界,在你手中
  984. #=============================================================
复制代码

Lv2.观梦者

梦石
0
星屑
681
在线时间
791 小时
注册时间
2011-10-20
帖子
2394

开拓者

2
发表于 2012-4-4 17:31:33 | 只看该作者
原文中找的,
在事件里写个脚本$scene = Scene_Craft.new就行了吧
欢迎点此进入我的egames.wink.ws,有RMQQ堂等

[url=http://rpg.blue/thread-317273-1-1.html]短篇八-赶选

http://yun.baidu.com/share/link?shareid=2158225779&uk=169642147&third=0


历险ARPG赢回你的疆域新的战斗模式?…………点击这里:[宋乱贼狂 for QQ堂]
http://rpg.blue/group-368-1.html
programing ....?
[url=http://rpg.blue/thrd-234658-1-1.html]
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
89 小时
注册时间
2012-1-9
帖子
40
3
 楼主| 发表于 2012-4-4 18:41:54 | 只看该作者
end55rpg 发表于 2012-4-4 17:31
原文中找的,
在事件里写个脚本$scene = Scene_Craft.new就行了吧

无效啊!怎么办


‘‘──1163833985于2012-4-4 19:02补充以下内容

不是地图中呼出有问题,主要是不知道怎样呼出
’’

点评

可能是在地图中呼出有问题吧,最好在ScenceMAP中修改添加按下XX键呼出这个  发表于 2012-4-4 18:55
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
503
在线时间
1478 小时
注册时间
2011-9-17
帖子
1316

开拓者贵宾

4
发表于 2012-4-8 12:11:51 | 只看该作者
1163833985 发表于 2012-4-4 18:41
无效啊!怎么办

请说明“无效”是什么意思,是没有反应还是会会报错;

脚本说明中:$scene = Scene_Craft.new(分类的数字)
我试过,是会报错的,脚本本身存在着一定的问题:
将628-631行去掉,改为:
  1. self.contents.clear
复制代码
的话是可以显示的……(请修改分辨率为640X480,否则显示不全)
但是完成物品合成好像还需要学习配方的=。=


我帖子中要有是不HX的空白,请Ctrl + A
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
89 小时
注册时间
2012-1-9
帖子
40
5
 楼主| 发表于 2012-4-10 20:18:15 | 只看该作者
iisnow 发表于 2012-4-8 12:11
请说明“无效”是什么意思,是没有反应还是会会报错;

脚本说明中:$scene = Scene_Craft.new(分类的数 ...

主要的是呼不出和不知道怎么学习配方,用了$game_party.learn_recipe(合成项目)就显示错误

点评

你有没有定义recipe_list,其实脚本的说明都在脚本注释里面,仔细阅读后试试吧  发表于 2012-4-10 21:11
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-30 01:03

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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