Project1

标题: 问高手告诉我这脚本里面的自定以背景图放的坐标在哪改 [打印本页]

作者: 水の都    时间: 2008-5-18 16:42
标题: 问高手告诉我这脚本里面的自定以背景图放的坐标在哪改
  1. #==========================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #
  4. # 作者:KKME,联系QQ:6690474
  5. #==========================================================
  6. # 开关定义:
  7. SYSTEM_不显示金钱窗口 = 41
  8. SYSTEM_不显示物品窗口 = 42
  9. SYSTEM_不显示武器窗口 = 43
  10. SYSTEM_不显示防具窗口 = 44
  11. # 以上开关,当打开的时候,获得物品将不会提示
  12. # 比如默认打开41号开关,获得金钱不再提示

  13. # 描绘文字的位置偏移:
  14. SYSTEM_X偏移 = 0
  15. SYSTEM_Y偏移 = 0
  16. #以上变量用于把文字整体挪动一段距离,一般用不上,除非你做了获得物品的图片

  17. #---------------------------------------------------------------------
  18. # 高级说明:
  19. #---------------------------------------------------------------------
  20. # 1、获得物品的背景图片:放在Graphics/Titles文件夹下,GET_ITEM.png
  21. # 2、失去物品的背景图片:放在Graphics/Titles文件夹下,LOST_ITEM.png
  22. # 3、获得金钱的背景图片:放在Graphics/Titles文件夹下,GET_MONEY.png
  23. # 4、失去金钱的背景图片:放在Graphics/Titles文件夹下,LOST_MONEY.png
  24. #
  25. # 当这几张图片不存在的时候,会用深蓝色填充。此功能为高级功能,如果图片
  26. # 做不好可能还不如不做。
  27. #---------------------------------------------------------------------
  28. # 5、获得时候的声效:Audio/SE/文件夹下的“006-System06”
  29. # 6、获得时候的声效:Audio/SE/文件夹下的“005-System05”
  30. #
  31. # 这个如果你想替换,可以搜索脚本中的自己改。注意这两个文件可能不会被提
  32. # 取器提取,请手动放到文件夹下。
  33. #---------------------------------------------------------------------
  34. # 7、特殊物品的大图:放在icon文件夹下,后面用_big即可。
  35. #    比如原来的图标是001-Weapon,则大图为001-Weapon_big,即可显示。
  36. #    金钱图:icon下的SYSTEM_MONEY_big.png。不过不推荐使用金钱大图,
  37. #            要用不如画在GET_MONEY.png和LOST_MONEY.png上。参考说明3、4
  38. # ——————————————————————————————————
  39. # 8、注意在对话后得到物品,请在对话后先用事件等待3帧。
  40. # ——————————————————————————————————

  41. class Interpreter  
  42. #--------------------------------------------------------------------------
  43. # ● 增减金钱
  44. #--------------------------------------------------------------------------
  45. def command_125
  46.    value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  47.    $game_party.gain_gold(value)
  48.    if $game_switches[SYSTEM_不显示金钱窗口]==false

  49.      kkme_66RPG_item = $data_items[@parameters[0]]
  50.      kkme_66RPG = Sprite.new
  51.      kkme_66RPG.bitmap = Bitmap.new(640,480)
  52.      kkme_66RPG.x = 0
  53.      kkme_66RPG.y = 0
  54.      kkme_66RPG.opacity = 0
  55.      pic = false
  56.      if value >= 0
  57.        begin
  58.          #====================================
  59.          # 这里可以自定义背景图片和声效,如果你需要的话
  60.          #====================================
  61.          Audio.se_play("Audio/SE/"+"006-System06",80,100)
  62.          kkme_66RPG.bitmap = RPG::Cache.title("GET_MONEY.png")
  63.          pic = true
  64.        rescue        
  65.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  66.        end        
  67.        kkme_66RPG_line1 = Sprite.new
  68.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  69.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得金钱:")
  70.        kkme_66RPG_line1.opacity = 0
  71.      else
  72.        begin
  73.          #====================================
  74.          # 这里可以自定义背景图片和声效,如果你需要的话
  75.          #====================================
  76.          Audio.se_play("Audio/SE/"+"005-System05",80,100)
  77.          kkme_66RPG.bitmap = RPG::Cache.title("LOST_MONEY.png")
  78.          pic = true
  79.        rescue        
  80.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  81.        end               
  82.        kkme_66RPG_line1 = Sprite.new
  83.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  84.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去金钱:")
  85.        kkme_66RPG_line1.opacity = 0
  86.      end
  87.       
  88.      kkme_66RPG_line2 = Sprite.new
  89.      kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
  90.      kkme_66RPG_line2.opacity = 0      

  91.      kkme_66RPG_bigicon = Sprite.new
  92.      
  93.      begin
  94.        kkme_66RPG_bigicon.bitmap = RPG::Cache.icon("SYSTEM_MONEY_big")
  95.        kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
  96.        kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
  97.        kkme_66RPG_bigicon.opacity = 0
  98.        kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  99.        kkme_66RPG_line1.y = 200
  100.        kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  101.        kkme_66RPG_line2.y = 240
  102.        kkme_66RPG_line1.x += SYSTEM_X偏移
  103.        kkme_66RPG_line2.x += SYSTEM_X偏移
  104.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  105.        kkme_66RPG_line2.y += SYSTEM_Y偏移        
  106.        kkme_66RPG_line2.bitmap.draw_text(0,0,240,32,value.abs.to_s)
  107.        kkme_66RPG_line2.bitmap.draw_text(0,0,140,32, $data_system.words.gold,2)
  108.        for i in 0..5
  109.          kkme_66RPG.opacity += 36
  110.          Graphics.update
  111.        end
  112.        kkme_66RPG.opacity = 255 if pic
  113.        for i in 0..10
  114.          kkme_66RPG_bigicon.opacity += 30
  115.          Graphics.update
  116.        end
  117.        for i in 0..10
  118.          kkme_66RPG_line1.opacity += 30
  119.          Graphics.update
  120.        end
  121.        for i in 0..50
  122.          kkme_66RPG_line2.opacity += 8
  123.          Graphics.update
  124.        end
  125.      rescue
  126.        kkme_66RPG_line2.bitmap.draw_text(0,0,240,32,value.abs.to_s)
  127.        kkme_66RPG_line2.bitmap.draw_text(0,0,140,32, $data_system.words.gold,2)   
  128.        kkme_66RPG_line1.x = 176
  129.        kkme_66RPG_line1.y = 200
  130.        kkme_66RPG_line2.x = 176
  131.        kkme_66RPG_line2.y = 240
  132.        kkme_66RPG_line1.x += SYSTEM_X偏移
  133.        kkme_66RPG_line2.x += SYSTEM_X偏移
  134.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  135.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  136.        for i in 0..5
  137.          kkme_66RPG.opacity += 36
  138.          Graphics.update
  139.        end
  140.        kkme_66RPG.opacity = 255 if pic
  141.        for i in 0..10
  142.          kkme_66RPG_line1.opacity += 30
  143.          Graphics.update
  144.        end
  145.        for i in 0..50
  146.          kkme_66RPG_line2.opacity += 16
  147.          Graphics.update
  148.        end
  149.      end
  150.       
  151.      for i in 0..10
  152.        kkme_66RPG.opacity -= 30
  153.        kkme_66RPG_bigicon.opacity -= 30
  154.        kkme_66RPG_line1.opacity -= 30
  155.        kkme_66RPG_line2.opacity -= 30
  156.        Graphics.update
  157.      end
  158.      kkme_66RPG.dispose
  159.      kkme_66RPG_bigicon.dispose
  160.      kkme_66RPG_line1.dispose
  161.      kkme_66RPG_line2.dispose
  162.       
  163.      
  164.    end
  165.    return true
  166. end
  167. #--------------------------------------------------------------------------
  168. # ● 增减物品
  169. #--------------------------------------------------------------------------
  170. def command_126
  171.    value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  172.    $game_party.gain_item(@parameters[0], value)
  173.    if $game_switches[SYSTEM_不显示物品窗口]==false
  174.      kkme_66RPG_item = $data_items[@parameters[0]]
  175.      kkme_66RPG = Sprite.new
  176.      kkme_66RPG.bitmap = Bitmap.new(640,480)
  177.      kkme_66RPG.x = 0
  178.      kkme_66RPG.y = 0
  179.      kkme_66RPG.opacity = 0

  180.      pic = false
  181.      if value >= 0
  182.        begin
  183.          #====================================
  184.          # 这里可以自定义背景图片和声效,如果你需要的话
  185.          #====================================
  186.          Audio.se_play("Audio/SE/"+"006-System06",80,100)
  187.          kkme_66RPG.bitmap = RPG::Cache.title("GET_ITEM.png")
  188.          pic = true
  189.        rescue        
  190.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  191.        end        
  192.        kkme_66RPG_line1 = Sprite.new
  193.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  194.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得物品:")
  195.        kkme_66RPG_line1.opacity = 0
  196.      else
  197.        begin
  198.          #====================================
  199.          # 这里可以自定义背景图片和声效,如果你需要的话
  200.          #====================================
  201.          Audio.se_play("Audio/SE/"+"005-System05",80,100)
  202.          kkme_66RPG.bitmap = RPG::Cache.title("\Graphics\Pictures\LOST_ITEM.png")
  203.          pic = true
  204.        rescue        
  205.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  206.        end               
  207.        kkme_66RPG_line1 = Sprite.new
  208.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  209.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去物品:")
  210.        kkme_66RPG_line1.opacity = 0
  211.      end
  212.       
  213.      kkme_66RPG_line2 = Sprite.new
  214.      kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
  215.      kkme_66RPG_line2.opacity = 0      

  216.      kkme_66RPG_bigicon = Sprite.new
  217.      
  218.      begin
  219.        kkme_66RPG_bigicon.bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name + "_big")
  220.        kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
  221.        kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
  222.        kkme_66RPG_bigicon.opacity = 0
  223.        kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  224.        kkme_66RPG_line1.y = 200
  225.        kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  226.        kkme_66RPG_line2.y = 240
  227.        kkme_66RPG_line1.x += SYSTEM_X偏移
  228.        kkme_66RPG_line2.x += SYSTEM_X偏移
  229.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  230.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  231.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 212, 32, kkme_66RPG_item.name, 0)
  232.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)
  233.        for i in 0..5
  234.          kkme_66RPG.opacity += 36
  235.          Graphics.update
  236.        end
  237.        kkme_66RPG.opacity = 255 if pic
  238.        for i in 0..10
  239.          kkme_66RPG_bigicon.opacity += 30
  240.          Graphics.update
  241.        end
  242.        for i in 0..10
  243.          kkme_66RPG_line1.opacity += 30
  244.          Graphics.update
  245.        end
  246.        for i in 0..50
  247.          kkme_66RPG_line2.opacity += 8
  248.          Graphics.update
  249.        end
  250.      rescue
  251.        kkme_66RPG_smallicon_bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name)
  252.        kkme_66RPG_line2.bitmap.blt(0, 0, kkme_66RPG_smallicon_bitmap, Rect.new(0, 0, 24, 24), 255)
  253.        kkme_66RPG_line2.bitmap.draw_text(0 + 28, 0, 212, 32, kkme_66RPG_item.name, 0)
  254.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)      
  255.        kkme_66RPG_line1.x = 176
  256.        kkme_66RPG_line1.y = 200
  257.        kkme_66RPG_line2.x = 176
  258.        kkme_66RPG_line2.y = 240
  259.        kkme_66RPG_line1.x += SYSTEM_X偏移
  260.        kkme_66RPG_line2.x += SYSTEM_X偏移
  261.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  262.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  263.        for i in 0..5
  264.          kkme_66RPG.opacity += 36
  265.          Graphics.update
  266.        end
  267.        kkme_66RPG.opacity = 255 if pic
  268.        for i in 0..10
  269.          kkme_66RPG_line1.opacity += 30
  270.          Graphics.update
  271.        end
  272.        for i in 0..50
  273.          kkme_66RPG_line2.opacity += 16
  274.          Graphics.update
  275.        end      
  276.        kkme_66RPG_smallicon_bitmap.dispose
  277.      end
  278.       
  279.      for i in 0..10
  280.        kkme_66RPG.opacity -= 30
  281.        kkme_66RPG_bigicon.opacity -= 30
  282.        kkme_66RPG_line1.opacity -= 30
  283.        kkme_66RPG_line2.opacity -= 30
  284.        Graphics.update
  285.      end
  286.      kkme_66RPG.dispose
  287.      kkme_66RPG_bigicon.dispose
  288.      kkme_66RPG_line1.dispose
  289.      kkme_66RPG_line2.dispose
  290.    end
  291.    return true
  292. end
  293. #--------------------------------------------------------------------------
  294. # ● 增减武器
  295. #--------------------------------------------------------------------------
  296. def command_127
  297.    value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  298.    $game_party.gain_weapon(@parameters[0], value)
  299.    if $game_switches[SYSTEM_不显示武器窗口]==false
  300.      
  301.      kkme_66RPG_item = $data_weapons[@parameters[0]]
  302.      kkme_66RPG = Sprite.new
  303.      kkme_66RPG.bitmap = Bitmap.new(640,480)
  304.      kkme_66RPG.x = 0
  305.      kkme_66RPG.y = 0
  306.      kkme_66RPG.opacity = 0

  307.      pic = false
  308.      if value >= 0
  309.        begin
  310.          #====================================
  311.          # 这里可以自定义背景图片和声效,如果你需要的话
  312.          #====================================
  313.          Audio.se_play("Audio/SE/"+"006-System06",80,100)
  314.          kkme_66RPG.bitmap = RPG::Cache.title("GET_ITEM.png")
  315.          pic = true
  316.        rescue        
  317.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  318.        end        
  319.        kkme_66RPG_line1 = Sprite.new
  320.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  321.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得武器:")
  322.        kkme_66RPG_line1.opacity = 0
  323.      else
  324.        begin
  325.          #====================================
  326.          # 这里可以自定义背景图片和声效,如果你需要的话
  327.          #====================================
  328.          Audio.se_play("Audio/SE/"+"005-System05",80,100)
  329.          kkme_66RPG.bitmap = RPG::Cache.title("LOST_ITEM.png")
  330.          pic = true
  331.        rescue        
  332.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  333.        end               
  334.        kkme_66RPG_line1 = Sprite.new
  335.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  336.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去武器:")
  337.        kkme_66RPG_line1.opacity = 0
  338.      end
  339.       
  340.      kkme_66RPG_line2 = Sprite.new
  341.      kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
  342.      kkme_66RPG_line2.opacity = 0      

  343.      kkme_66RPG_bigicon = Sprite.new
  344.      
  345.      begin
  346.        kkme_66RPG_bigicon.bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name + "_big")
  347.        kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
  348.        kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
  349.        kkme_66RPG_bigicon.opacity = 0
  350.        kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  351.        kkme_66RPG_line1.y = 200
  352.        kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  353.        kkme_66RPG_line2.y = 245
  354.        kkme_66RPG_line1.x += SYSTEM_X偏移
  355.        kkme_66RPG_line2.x += SYSTEM_X偏移
  356.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  357.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  358.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 212, 32, kkme_66RPG_item.name, 0)
  359.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)
  360.        for i in 0..5
  361.          kkme_66RPG.opacity += 36
  362.          Graphics.update
  363.        end
  364.        kkme_66RPG.opacity = 255 if pic
  365.        for i in 0..10
  366.          kkme_66RPG_bigicon.opacity += 30
  367.          Graphics.update
  368.        end
  369.        for i in 0..10
  370.          kkme_66RPG_line1.opacity += 30
  371.          Graphics.update
  372.        end
  373.        for i in 0..50
  374.          kkme_66RPG_line2.opacity += 8
  375.          Graphics.update
  376.        end
  377.      rescue
  378.        kkme_66RPG_smallicon_bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name)
  379.        kkme_66RPG_line2.bitmap.blt(0, 0, kkme_66RPG_smallicon_bitmap, Rect.new(0, 0, 24, 24), 255)
  380.        kkme_66RPG_line2.bitmap.draw_text(0 + 28, 0, 212, 32, kkme_66RPG_item.name, 0)
  381.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)      
  382.        kkme_66RPG_line1.x = 176
  383.        kkme_66RPG_line1.y = 200
  384.        kkme_66RPG_line2.x = 176
  385.        kkme_66RPG_line2.y = 240
  386.        kkme_66RPG_line1.x += SYSTEM_X偏移
  387.        kkme_66RPG_line2.x += SYSTEM_X偏移
  388.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  389.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  390.        for i in 0..5
  391.          kkme_66RPG.opacity += 36
  392.          Graphics.update
  393.        end        
  394.        kkme_66RPG.opacity = 255 if pic
  395.        for i in 0..10
  396.          kkme_66RPG_line1.opacity += 30
  397.          Graphics.update
  398.        end
  399.        for i in 0..50
  400.          kkme_66RPG_line2.opacity += 16
  401.          Graphics.update
  402.        end
  403.        kkme_66RPG_smallicon_bitmap.dispose
  404.      end
  405.       
  406.      for i in 0..10
  407.        kkme_66RPG.opacity -= 30
  408.        kkme_66RPG_bigicon.opacity -= 30
  409.        kkme_66RPG_line1.opacity -= 30
  410.        kkme_66RPG_line2.opacity -= 30
  411.        Graphics.update
  412.      end
  413.      kkme_66RPG.dispose
  414.      kkme_66RPG_bigicon.dispose
  415.      kkme_66RPG_line1.dispose
  416.      kkme_66RPG_line2.dispose
  417.      
  418.    end
  419.    return true
  420. end
  421. #--------------------------------------------------------------------------
  422. # ● 增减防具
  423. #--------------------------------------------------------------------------
  424. def command_128
  425.    value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  426.    $game_party.gain_armor(@parameters[0], value)
  427.    if $game_switches[SYSTEM_不显示防具窗口]==false
  428.      kkme_66RPG_item = $data_armors[@parameters[0]]
  429.      
  430.      kkme_66RPG = Sprite.new
  431.      kkme_66RPG.bitmap = Bitmap.new(640,480)
  432.      kkme_66RPG.x = 0
  433.      kkme_66RPG.y = 0
  434.      kkme_66RPG.opacity = 0

  435.      pic = false
  436.      if value >= 0
  437.        begin
  438.          #====================================
  439.          # 这里可以自定义背景图片和声效,如果你需要的话
  440.          #====================================
  441.          Audio.se_play("Audio/SE/"+"006-System06",80,100)
  442.          kkme_66RPG.bitmap = RPG::Cache.title("GET_ITEM.png")
  443.          pic = true
  444.        rescue        
  445.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  446.        end        
  447.        kkme_66RPG_line1 = Sprite.new
  448.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  449.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得装备:")
  450.        kkme_66RPG_line1.opacity = 0
  451.      else
  452.        begin
  453.          #====================================
  454.          # 这里可以自定义背景图片和声效,如果你需要的话
  455.          #====================================
  456.          Audio.se_play("Audio/SE/"+"005-System05",80,100)
  457.          kkme_66RPG.bitmap = RPG::Cache.title("LOST_ITEM.png")
  458.          pic = true
  459.        rescue        
  460.          kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
  461.        end               
  462.        kkme_66RPG_line1 = Sprite.new
  463.        kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
  464.        kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去装备:")
  465.        kkme_66RPG_line1.opacity = 0
  466.      end
  467.       
  468.      kkme_66RPG_line2 = Sprite.new
  469.      kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
  470.      kkme_66RPG_line2.opacity = 0      

  471.      kkme_66RPG_bigicon = Sprite.new
  472.      
  473.      begin
  474.        kkme_66RPG_bigicon.bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name + "_big")
  475.        kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
  476.        kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
  477.        kkme_66RPG_bigicon.opacity = 0
  478.        kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  479.        kkme_66RPG_line1.y = 200
  480.        kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
  481.        kkme_66RPG_line2.y = 240
  482.        kkme_66RPG_line1.x += SYSTEM_X偏移
  483.        kkme_66RPG_line2.x += SYSTEM_X偏移
  484.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  485.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  486.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 212, 32, kkme_66RPG_item.name, 0)
  487.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)
  488.        for i in 0..5
  489.          kkme_66RPG.opacity += 36
  490.          Graphics.update
  491.        end
  492.        kkme_66RPG.opacity = 255 if pic
  493.        for i in 0..10
  494.          kkme_66RPG_bigicon.opacity += 30
  495.          Graphics.update
  496.        end
  497.        for i in 0..10
  498.          kkme_66RPG_line1.opacity += 30
  499.          Graphics.update
  500.        end
  501.        for i in 0..50
  502.          kkme_66RPG_line2.opacity += 8
  503.          Graphics.update
  504.        end
  505.      rescue
  506.        kkme_66RPG_smallicon_bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name)
  507.        kkme_66RPG_line2.bitmap.blt(0, 0, kkme_66RPG_smallicon_bitmap, Rect.new(0, 0, 24, 24), 255)
  508.        kkme_66RPG_line2.bitmap.draw_text(0 + 28, 0, 212, 32, kkme_66RPG_item.name, 0)
  509.        kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)      
  510.        kkme_66RPG_line1.x = 176
  511.        kkme_66RPG_line1.y = 200
  512.        kkme_66RPG_line2.x = 176
  513.        kkme_66RPG_line2.y = 240
  514.        kkme_66RPG_line1.x += SYSTEM_X偏移
  515.        kkme_66RPG_line2.x += SYSTEM_X偏移
  516.        kkme_66RPG_line1.y += SYSTEM_Y偏移
  517.        kkme_66RPG_line2.y += SYSTEM_Y偏移   
  518.        for i in 0..5
  519.          kkme_66RPG.opacity += 36
  520.          Graphics.update
  521.        end
  522.        kkme_66RPG.opacity = 255 if pic
  523.        for i in 0..10
  524.          kkme_66RPG_line1.opacity += 30
  525.          Graphics.update
  526.        end
  527.        for i in 0..50
  528.          kkme_66RPG_line2.opacity += 16
  529.          Graphics.update
  530.        end
  531.        kkme_66RPG_smallicon_bitmap.dispose
  532.      end
  533.       
  534.      for i in 0..10
  535.        kkme_66RPG.opacity -= 30
  536.        kkme_66RPG_bigicon.opacity -= 30
  537.        kkme_66RPG_line1.opacity -= 30
  538.        kkme_66RPG_line2.opacity -= 30
  539.        Graphics.update
  540.      end
  541.      kkme_66RPG.dispose
  542.      kkme_66RPG_bigicon.dispose
  543.      kkme_66RPG_line1.dispose
  544.      kkme_66RPG_line2.dispose
  545.    end
  546.    return true
  547. end
  548. end
  549. #==========================================================
  550. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  551. #==========================================================
复制代码



[LINE]1,#dddddd[/LINE]此贴于 2008-5-25 14:10:06 被版主禾西提醒,请楼主看到后对本贴做出回应。
作者: joshua    时间: 2008-5-18 17:11
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)



kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
      kkme_66RPG_bigicon.bitmap = RPG::Cache.icon("SYSTEM_MONEY_big")
       kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
       kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
       kkme_66RPG_bigicon.opacity = 0
       kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
       kkme_66RPG_line1.y = 200
       kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
       kkme_66RPG_line2.y = 240
       kkme_66RPG_line1.x += SYSTEM_X偏移
       kkme_66RPG_line2.x += SYSTEM_X偏移
       kkme_66RPG_line1.y += SYSTEM_Y偏移
       kkme_66RPG_line2.y += SYSTEM_Y偏移      
  kkme_66RPG_line1.x = 176
       kkme_66RPG_line1.y = 200
       kkme_66RPG_line2.x = 176
       kkme_66RPG_line2.y = 240
       kkme_66RPG_line1.x += SYSTEM_X偏移
       kkme_66RPG_line2.x += SYSTEM_X偏移
       kkme_66RPG_line1.y += SYSTEM_Y偏移
       kkme_66RPG_line2.y += SYSTEM_Y偏移   

好像有很多啊,大概这几行,以下还有,和BITMAP有关的 都是图片吧
作者: 水の都    时间: 2008-5-18 17:56
什么意思....
作者: 水の都    时间: 2008-5-18 17:57
比如
  1. kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
复制代码

这是改320.32还是在
  1.       kkme_66RPG_line1.x += SYSTEM_X偏移
  2.       kkme_66RPG_line2.x += SYSTEM_X偏移
  3.       kkme_66RPG_line1.y += SYSTEM_Y偏移
  4.       kkme_66RPG_line2.y += SYSTEM_Y偏移  
复制代码


一点点的增加
作者: joshua    时间: 2008-5-18 18:05
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
改这个吧
作者: 水の都    时间: 2008-5-18 18:07
改这没用啊.......
作者: joshua    时间: 2008-5-18 18:14
kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
      kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
      kkme_66RPG_bigicon.opacity = 0
      kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
      kkme_66RPG_line1.y = 200
      kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
      kkme_66RPG_line2.y = 240
这个?奇怪这坐标和我改的不一样
作者: 水の都    时间: 2008-5-18 18:18
我晕了....!不可以啊
作者: joshua    时间: 2008-5-18 18:20
我也晕了,怎么会这样,和我学的完全不一样
作者: 水の都    时间: 2008-5-18 18:29
在哪有脚本学?
作者: 水の都    时间: 2008-5-18 18:31
请问和这脚本
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. #==============================================================================
  5. # ■ Harts_Window_ItemTitle
  6. #==============================================================================

  7. class Harts_Window_ItemTitle < Window_Base
  8.   def initialize
  9.     super(0, 0, 160, 64)
  10.     self.contents = Bitmap.new(width - 32, height - 32)
  11.     self.contents.clear
  12.     self.contents.font.color = normal_color
  13.     self.contents.draw_text(4, 0, 120, 32, $data_system.words.item, 1)
  14.   end
  15. end

  16. #==============================================================================
  17. # ■ Harts_Window_ItemCommand
  18. #==============================================================================

  19. class Harts_Window_ItemCommand < Window_Selectable
  20.   attr_accessor :commands
  21.   #--------------------------------------------------------------------------
  22.   # ● 初始化,生成commands窗口
  23.   #--------------------------------------------------------------------------
  24.   def initialize
  25.     super(0, 64, 160, 352)
  26.     @commands = []
  27.     #————————生成commands窗口
  28.     for i in 1...$data_items.size
  29.       if $game_party.item_number(i) > 0
  30.         push = true
  31.         for com in @commands
  32.           if com == $data_items[i].desc
  33.             push = false
  34.           end
  35.         end
  36.         if push == true
  37.           @commands.push($data_items[i].desc)
  38.         end
  39.       end
  40.     end
  41.     for i in 1...$data_weapons.size
  42.       if $game_party.weapon_number(i) > 0
  43.         push = true
  44.         for com in @commands
  45.           if com == $data_weapons[i].desc
  46.             push = false
  47.           end
  48.         end
  49.         if push == true
  50.           @commands.push($data_weapons[i].desc)
  51.         end
  52.       end
  53.     end
  54.     for i in 1...$data_armors.size
  55.       if $game_party.armor_number(i) > 0
  56.         push = true
  57.         for com in @commands
  58.           if com == $data_armors[i].desc
  59.             push = false
  60.           end
  61.         end
  62.         if push == true
  63.           @commands.push($data_armors[i].desc)
  64.         end
  65.       end
  66.     end
  67.     if @commands == []
  68.       @commands.push("普通物品")
  69.     end      
  70.     @item_max = @commands.size
  71.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  72.     refresh
  73.     self.index = 0
  74.   end
  75.   #--------------------------------------------------------------------------
  76.   #--------------------------------------------------------------------------
  77.   def refresh
  78.     self.contents.clear
  79.     for i in 0...@item_max
  80.       draw_item(i, normal_color)
  81.     end
  82.   end
  83.   #--------------------------------------------------------------------------
  84.   #--------------------------------------------------------------------------
  85.   def draw_item(index, color)
  86.     self.contents.font.color = color
  87.     y = index * 32
  88.     self.contents.draw_text(4, y, 128, 32, @commands[index])
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # 只描绘原文字
  92.   #--------------------------------------------------------------------------
  93.   def update_help
  94.     @help_window.set_text(@commands[self.index])
  95.   end
  96. end

  97. #==============================================================================
  98. # ■ Window_Item
  99. #==============================================================================

  100. class Harts_Window_ItemList < Window_Selectable
  101.   #--------------------------------------------------------------------------
  102.   #--------------------------------------------------------------------------
  103.   def initialize
  104.     super(160, 0, 480, 416)
  105.     refresh
  106.     self.index = 0
  107.   end
  108.   #--------------------------------------------------------------------------
  109.   #--------------------------------------------------------------------------
  110.   def item
  111.     return @data[self.index]
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   #--------------------------------------------------------------------------
  115.   def refresh
  116.     if self.contents != nil
  117.       self.contents.dispose
  118.       self.contents = nil
  119.     end
  120.     @data = []
  121.   end
  122.   #--------------------------------------------------------------------------
  123.   #--------------------------------------------------------------------------
  124.   def set_item(command)
  125.     refresh
  126.     for i in 1...$data_items.size
  127.       if $game_party.item_number(i) > 0 and $data_items[i].desc == command
  128.         @data.push($data_items[i])
  129.       end
  130.     end
  131.     for i in 1...$data_weapons.size
  132.       if $game_party.weapon_number(i) > 0 and $data_weapons[i].desc == command
  133.         @data.push($data_weapons[i])
  134.       end
  135.     end
  136.     for i in 1...$data_armors.size
  137.       if $game_party.armor_number(i) > 0 and $data_armors[i].desc == command
  138.         @data.push($data_armors[i])
  139.       end
  140.     end
  141.     @item_max = @data.size
  142.     if @item_max > 0
  143.       self.contents = Bitmap.new(width - 32, row_max * 32)
  144.       self.contents.clear
  145.       for i in 0...@item_max
  146.         draw_item(i)
  147.       end
  148.     end
  149.   end
  150.   #--------------------------------------------------------------------------
  151.   #--------------------------------------------------------------------------
  152.   def item_number
  153.     return @item_max
  154.   end
  155.   #--------------------------------------------------------------------------
  156.   #--------------------------------------------------------------------------
  157.   def draw_item(index)
  158.     item = @data[index]
  159.     case item
  160.     when RPG::Item
  161.       number = $game_party.item_number(item.id)
  162.     when RPG::Weapon
  163.       number = $game_party.weapon_number(item.id)
  164.     when RPG::Armor
  165.       number = $game_party.armor_number(item.id)
  166.     end
  167.     if item.is_a?(RPG::Item) and
  168.       $game_party.item_can_use?(item.id)
  169.       self.contents.font.color = normal_color
  170.     else
  171.       self.contents.font.color = disabled_color
  172.     end
  173.     x = 4
  174.     y = index * 32
  175.     bitmap = RPG::Cache.icon(item.icon_name)
  176.     opacity = self.contents.font.color == normal_color ? 255 : 128
  177.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  178.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  179.     self.contents.draw_text(x + 400, y, 16, 32, ":", 1)
  180.     self.contents.draw_text(x + 416, y, 24, 32, number.to_s, 2)
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   #--------------------------------------------------------------------------
  184.   def update_help
  185.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  186.   end
  187. end

  188. #==============================================================================
  189. # ■ Harts_Scene_Item
  190. #==============================================================================

  191. class Scene_Item
  192.   #--------------------------------------------------------------------------
  193.   #--------------------------------------------------------------------------
  194.   def main
  195.     @itemtitle_window = Harts_Window_ItemTitle.new
  196.     @itemcommand_window = Harts_Window_ItemCommand.new
  197.     @command_index = @itemcommand_window.index
  198.     @itemlist_window = Harts_Window_ItemList.new
  199.     @itemlist_window.active = false
  200.     @help_window = Window_Help.new
  201.     @help_window.x = 0
  202.     @help_window.y = 416
  203.     @itemcommand_window.help_window = @help_window
  204.     @itemlist_window.help_window = @help_window
  205.     @target_window = Window_Target.new
  206.     @target_window.visible = false
  207.     @target_window.active = false
  208.     @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  209.     Graphics.transition
  210.     loop do
  211.       Graphics.update
  212.       Input.update
  213.       update
  214.       if $scene != self
  215.         break
  216.       end
  217.     end
  218.     Graphics.freeze
  219.     @itemtitle_window.dispose
  220.     @itemcommand_window.dispose
  221.     @itemlist_window.dispose
  222.     @help_window.dispose
  223.     @target_window.dispose
  224.   end
  225.   #--------------------------------------------------------------------------
  226.   #--------------------------------------------------------------------------
  227.   def update
  228.     @itemtitle_window.update
  229.     @itemcommand_window.update
  230.     @itemlist_window.update
  231.     @help_window.update
  232.     @target_window.update
  233.     if @command_index != @itemcommand_window.index
  234.       @command_index = @itemcommand_window.index
  235.       @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  236.     end
  237.     if @itemcommand_window.active
  238.       update_itemcommand
  239.       return
  240.     end
  241.     if @itemlist_window.active
  242.       update_itemlist
  243.       return
  244.     end
  245.     if @target_window.active
  246.       update_target
  247.       return
  248.     end
  249.   end
  250.   #--------------------------------------------------------------------------
  251.   #--------------------------------------------------------------------------
  252.   def update_itemcommand
  253.     if Input.trigger?(Input::B)
  254.       $game_system.se_play($data_system.cancel_se)
  255.       $scene = Scene_Menu.new(0)
  256.       return
  257.     end
  258.     if Input.trigger?(Input::C)
  259.       if @itemlist_window.item_number == 0
  260.         $game_system.se_play($data_system.buzzer_se)
  261.         return
  262.       end
  263.       $game_system.se_play($data_system.decision_se)
  264.       @itemcommand_window.active = false
  265.       @itemlist_window.active = true
  266.       @itemlist_window.index = 0
  267.       return
  268.     end
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   #--------------------------------------------------------------------------
  272.   def update_itemlist
  273.     if Input.trigger?(Input::B)
  274.       $game_system.se_play($data_system.cancel_se)
  275.       @itemcommand_window.active = true
  276.       @itemlist_window.active = false
  277.       @itemlist_window.index = 0
  278.       @itemcommand_window.index = @command_index
  279.       return
  280.     end
  281.     if Input.trigger?(Input::C)
  282.       @item = @itemlist_window.item
  283.       unless @item.is_a?(RPG::Item)
  284.         $game_system.se_play($data_system.buzzer_se)
  285.         return
  286.       end
  287.       unless $game_party.item_can_use?(@item.id)
  288.         $game_system.se_play($data_system.buzzer_se)
  289.         return
  290.       end
  291.       $game_system.se_play($data_system.decision_se)
  292.       if @item.scope >= 3
  293.         @itemlist_window.active = false
  294.         @target_window.x = 304
  295.         @target_window.visible = true
  296.         @target_window.active = true
  297.         if @item.scope == 4 || @item.scope == 6
  298.           @target_window.index = -1
  299.         else
  300.           @target_window.index = 0
  301.         end
  302.       else
  303.         if @item.common_event_id > 0
  304.           $game_temp.common_event_id = @item.common_event_id
  305.           $game_system.se_play(@item.menu_se)
  306.             if @item.consumable
  307.               $game_party.lose_item(@item.id, 1)
  308.               @itemlist_window.draw_item(@itemlist_window.index)
  309.             end
  310.           $scene = Scene_Map.new
  311.           return
  312.         end
  313.       end
  314.       return
  315.     end
  316.   end
  317.   #--------------------------------------------------------------------------
  318.   #--------------------------------------------------------------------------
  319.   def update_target
  320.     if Input.trigger?(Input::B)
  321.       $game_system.se_play($data_system.cancel_se)
  322.       unless $game_party.item_can_use?(@item.id)
  323.         @itemlist_window.refresh
  324.       end
  325.       @itemlist_window.active = true
  326.       @target_window.visible = false
  327.       @target_window.active = false
  328.       @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  329.       return
  330.     end
  331.     if Input.trigger?(Input::C)
  332.       if $game_party.item_number(@item.id) == 0
  333.         $game_system.se_play($data_system.buzzer_se)
  334.         return
  335.       end
  336.       if @target_window.index == -1
  337.         used = false
  338.         for i in $game_party.actors
  339.           used |= i.item_effect(@item)
  340.         end
  341.       end
  342.       if @target_window.index >= 0
  343.         target = $game_party.actors[@target_window.index]
  344.         used = target.item_effect(@item)
  345.       end
  346.       if used
  347.         $game_system.se_play(@item.menu_se)
  348.         if @item.consumable
  349.           $game_party.lose_item(@item.id, 1)
  350.           @itemlist_window.draw_item(@itemlist_window.index)
  351.           @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  352.         end
  353.         @target_window.refresh
  354.         if $game_party.all_dead?
  355.           $scene = Scene_Gameover.new
  356.           return
  357.         end
  358.         if @item.common_event_id > 0
  359.           $game_temp.common_event_id = @item.common_event_id
  360.           $scene = Scene_Map.new
  361.           return
  362.         end
  363.       end
  364.       unless used
  365.         $game_system.se_play($data_system.buzzer_se)
  366.       end
  367.     return
  368.     end
  369.   end
  370. end

  371. #==============================================================================
  372. # ■ RPG追加定义,使用@符号分类
  373. #==============================================================================

  374. module RPG
  375.   class Weapon
  376.     def description
  377.       description = @description.split(/@/)[0]
  378.       return description != nil ? description : ''
  379.     end
  380.     def desc
  381.       desc = @description.split(/@/)[1]
  382.       return desc != nil ? desc : "普通物品"
  383.     end
  384.   end
  385.   class Item
  386.     def description
  387.       description = @description.split(/@/)[0]
  388.       return description != nil ? description : ''
  389.     end
  390.     def desc
  391.       desc = @description.split(/@/)[1]
  392.       return desc != nil ? desc : "普通物品"
  393.     end
  394.   end
  395.   class Armor
  396.     def description
  397.       description = @description.split(/@/)[0]
  398.       return description != nil ? description : ''
  399.     end
  400.     def desc
  401.       desc = @description.split(/@/)[1]
  402.       return desc != nil ? desc : "普通物品"
  403.     end
  404.   end
  405. end

  406. #==============================================================================
  407. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  408. #==============================================================================

复制代码


有关系吗?
作者: joshua    时间: 2008-5-18 18:31
ruby教程,我是学那个,看来功夫还没到家{/dk}
作者: 水の都    时间: 2008-5-18 18:59
ruby教程?
在哪有的{/gg}




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1