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

Project1

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

人物仓库—_—#

 关闭 [复制链接]

Lv1.梦旅人

幻想

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-23
帖子
1016
跳转到指定楼层
1
发表于 2008-1-12 22:21:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
呵呵~~~~~以下是  无冲突版人物仓库 (另一种思路)脚本
  1. #party转换
  2. #这是简易的party转换的脚本。

  3. #召唤界面:$scene = Scene_Party_in.new
  4. #可以用开关的on off来决定转换的操作可能与否。
  5. #此外,也可以设定不想要离开的角色。
  6. #不过由于毕竟只有角色的加入和退出的功能,使用起来可能不是很方便。
  7. #可以适应简单的身份表示。
  8. #用键盘a来做身份表示与否的变更。
  9. #设定方法
  10. #可加入party的最高人数
  11. #变更下面的@party_max = 4部分,通常用4。
  12. #可参加party的最少人数(必须选择的最低人数)
  13. #变更下面的@party_min = 1部分,初期姑且设定为1。
  14. #强制加入的角色(必须要加入到party中的角色)
  15. #变更下面的@must_actors = [$game_actors[1]]部分
  16. #在初级阶段,姑且将其设定为ID1号的角色(アルシェス)
  17. #设定的例子
  18. #@must_actors = [1, 2]
  19. #这样,1号和2号ID的角色就被设定为强制加入的角色了。
  20. #顺便一提,用事件指示的剧本,也就是
  21. #$game_party.must_actors = [1]
  22. #等,可以在游戏进行中设定。(最高最低人数等也同样是可能的。)
  23. #判断可否加入party
  24. #用 class Window_Party_Select 的 party_in_menber 来设定。
  25. #设定例子
  26. # menber.push($game_actors[1])  
  27. # menber.push($game_actors[2])  if $game_switches[1]
  28. #这样,就使1号ID的角色(アルシェス)的经常加入变为可能。
  29. #2号ID的角色(是谁来着?)在游戏开关的1号是on状态下将可能加入。
  30. #在初期设定阶段,1号ID是经常加入可能状态、
  31. #2-8号ID则被设定为各自在游戏开关的1-7号是on状态下方可加入。
  32. #
  33. #  2005.9.24 バグ修正
  34. #  強制加入アクターがセーブに反映されないバグを修正。
  35. #  強制加入アクターの指定方法が変更されたので注意。
  36. #
  37. # 2006.2.5 柳柳修正
  38. #  直接放入了add_actor
  39. #  如果需要把战斗图改为行走图,本脚本找到draw_actor_battler(actor,x,y)替换为:draw_actor_graphic(actor, x+40, y + 80)
  40. #  增加exp描绘

  41. class Game_Party
  42. attr_accessor :party_max
  43. attr_accessor :party_min
  44. attr_accessor :must_actors
  45. alias party_select_initialize initialize
  46. def initialize
  47.    party_select_initialize
  48.    @party_max = 5
  49.    @party_min = 1
  50.    @must_actors = [1]
  51. end
  52. def must_actor_include?(actor)
  53.    return @must_actors.include?(actor.id)
  54. end
  55. def add_actor(actor_id)
  56.    # 获取角色
  57.    actor = $game_actors[actor_id]
  58.    # 同伴人数未满 4 人、本角色不在队伍中的情况下
  59.    if @actors.size < @party_max and not @actors.include?(actor)
  60.      # 添加角色
  61.      @actors.push(actor)
  62.      # 还原主角
  63.      $game_player.refresh
  64.    end
  65. end
  66. end

  67. class Window_Party_Select < Window_Selectable
  68. #--------------------------------------------------------------------------
  69. # ● オブジェクト初期化
  70. #--------------------------------------------------------------------------
  71. def initialize
  72.    super(0, 96, 640, 384)
  73.    @party_in_ok_menber = party_in_menber
  74.    @item_max = party_in_menber.size
  75.    @column_max = 4
  76.    self.contents = Bitmap.new(width - 32, row_max * 176)
  77.    self.index = 0
  78.    refresh
  79. end
  80. #--------------------------------------------------------------------------
  81. # ● アクターの取得
  82. #--------------------------------------------------------------------------
  83. def menber
  84.    return @party_in_ok_menber[self.index]
  85. end
  86. #--------------------------------------------------------------------------
  87. # ● パーティーin可能なメンバー取得
  88. #--------------------------------------------------------------------------
  89. def party_in_menber
  90.    menber = []
  91.    menber.push($game_actors[1])  
  92.    menber.push($game_actors[2])
  93.    menber.push($game_actors[3])
  94.    menber.push($game_actors[4])
  95.    menber.push($game_actors[5])
  96.    menber.push($game_actors[6])  if $game_switches[39]
  97.    menber.push($game_actors[9])  if $game_switches[42]
  98.    menber.push($game_actors[10])  if $game_switches[43]
  99.    menber.push($game_actors[11])  if $game_switches[44]
  100.    menber.push($game_actors[12])  if $game_switches[45]
  101.    return menber
  102. end
  103. #--------------------------------------------------------------------------
  104. # ● リフレッシュ
  105. #--------------------------------------------------------------------------
  106. def refresh
  107.    self.contents.clear
  108.    for i in 0...@party_in_ok_menber.size
  109.      draw_menber(i)
  110.    end
  111. end
  112. #--------------------------------------------------------------------------
  113. # ● アクター描画
  114. #--------------------------------------------------------------------------
  115. def draw_menber(index)
  116.    actor = @party_in_ok_menber[index]
  117.    x = 4 + index % @column_max * (640 / @column_max)
  118.    y = index / @column_max * 88
  119.    if $game_party.must_actor_include?(actor)
  120.      color = text_color(3)
  121.      opacity = 255
  122.    elsif $game_party.actors.include?(actor)
  123.      color = normal_color
  124.      opacity = 255
  125.    else
  126.      color = disabled_color
  127.      opacity = 128
  128.    end
  129.    self.contents.font.color = color
  130.    draw_actor_battler(actor,x,y)
  131.    #draw_actor_graphic(actor, x+40, y + 80)
  132.    self.contents.draw_text(x, y, 120, 32, actor.name)
  133. end
  134. def draw_actor_battler(act,x,y)
  135.    bitmap = RPG::Cache.battler(act.battler_name, act.battler_hue)
  136.    cw = bitmap.width
  137.    ch = bitmap.height
  138.    src_rect = Rect.new(0, 0, cw, ch)
  139.    self.contents.blt(x, y, bitmap, src_rect, opacity)
  140. end
  141. #--------------------------------------------------------------------------
  142. # ● 行数の取得
  143. #--------------------------------------------------------------------------
  144. def row_max
  145.    # 項目数と列数から行数を算出
  146.    return (@item_max + @column_max - 1) / @column_max
  147. end
  148. #--------------------------------------------------------------------------
  149. # ● 先頭の行の取得
  150. #--------------------------------------------------------------------------
  151. def top_row
  152.    # ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
  153.    return self.oy / 88
  154. end
  155. #--------------------------------------------------------------------------
  156. # ● 先頭の行の設定
  157. #     row : 先頭に表示する行
  158. #--------------------------------------------------------------------------
  159. def top_row=(row)
  160.    # row が 0 未満の場合は 0 に修正
  161.    if row < 0
  162.      row = 0
  163.    end
  164.    # row が row_max - 1 超の場合は row_max - 1 に修正
  165.    if row > row_max - 1
  166.      row = row_max - 1
  167.      if row < 0
  168.        row = 0
  169.      end
  170.    end
  171.    # row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
  172.    self.oy = row * 88
  173. end
  174. #--------------------------------------------------------------------------
  175. # ● 1 ページに表示できる行数の取得
  176. #--------------------------------------------------------------------------
  177. def page_row_max
  178.    # ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
  179.    return (self.height - 32) / 88
  180. end
  181. #--------------------------------------------------------------------------
  182. # ● カーソルの矩形更新
  183. #--------------------------------------------------------------------------
  184. def update_cursor_rect
  185.    if @index < 0
  186.      self.cursor_rect.empty
  187.      return
  188.    end
  189.    # 現在の行を取得
  190.    row = @index / @column_max
  191.    # 現在の行が、表示されている先頭の行より前の場合
  192.    if row < self.top_row
  193.      # 現在の行が先頭になるようにスクロール
  194.      self.top_row = row
  195.    end
  196.    # 現在の行が、表示されている最後尾の行より後ろの場合
  197.    if row > self.top_row + (self.page_row_max - 1)
  198.      # 現在の行が最後尾になるようにスクロール
  199.      self.top_row = row - (self.page_row_max - 1)
  200.    end
  201.    # カーソルの幅を計算
  202.    cursor_width = 512 / @column_max
  203.    # カーソルの座標を計算
  204.    x = @index % @column_max * (cursor_width + 32)#(640 / @column_max)
  205.    y = @index / @column_max * 88 - self.oy
  206.    # カーソルの矩形を更新
  207.    self.cursor_rect.set(x, y, cursor_width, 32)
  208. end
  209. end

  210. class Window_Party_Select_Menber < Window_Base
  211. #--------------------------------------------------------------------------
  212. # ● オブジェクト初期化
  213. #--------------------------------------------------------------------------
  214. def initialize
  215.    super(0, 0, 640, 96)
  216.    self.contents = Bitmap.new(width - 32, height - 32)
  217.    refresh
  218. end
  219. #--------------------------------------------------------------------------
  220. # ● リフレッシュ
  221. #--------------------------------------------------------------------------
  222. def refresh
  223.    self.contents.clear
  224.    for i in 0...$game_party.actors.size
  225.      draw_menber(i)
  226.    end
  227. end
  228. #--------------------------------------------------------------------------
  229. # ● アクター描画
  230. #--------------------------------------------------------------------------
  231. def draw_menber(index)
  232.    actor = $game_party.actors[index]
  233.    x = 4 + index * (640 / $game_party.party_max)
  234.    y = 0
  235.    draw_actor_graphic(actor, x+32, y+48+8)
  236. end
  237. end

  238. class Window_Party_Select_Menber_Status < Window_Base
  239. #--------------------------------------------------------------------------
  240. # ● オブジェクト初期化
  241. #--------------------------------------------------------------------------
  242. def initialize
  243.    super(0, 288, 640, 192)
  244.    self.contents = Bitmap.new(width - 32, height - 32)
  245. end
  246. #--------------------------------------------------------------------------
  247. # ● リフレッシュ
  248. #--------------------------------------------------------------------------
  249. def refresh(actor)
  250.    self.contents.clear
  251.    draw_actor_name(actor, 4, 0)
  252.    draw_actor_class(actor, 4 + 144, 0)
  253.    draw_actor_level(actor, 4, 32)
  254.    draw_actor_state(actor, 4 + 72, 32)
  255.    draw_actor_hp(actor, 4, 64, 172)
  256.    draw_actor_sp(actor, 4, 96, 172)
  257.    draw_actor_exp(actor, 4, 128)
  258.    draw_actor_parameter(actor, 218, 32, 0)
  259.    draw_actor_parameter(actor, 218, 64, 1)
  260.    draw_actor_parameter(actor, 218, 96, 2)
  261.    draw_actor_parameter(actor, 430, 32, 3)
  262.    draw_actor_parameter(actor, 430, 64, 4)
  263.    draw_actor_parameter(actor, 430, 96, 5)
  264.    draw_actor_parameter(actor, 430, 128, 6)
  265.    
  266. end
  267. end

  268. class Scene_Party_in
  269. #--------------------------------------------------------------------------
  270. # ● メイン処理
  271. #--------------------------------------------------------------------------
  272. def main
  273.    @main_window = Window_Party_Select.new
  274.    @menber_window = Window_Party_Select_Menber.new
  275.    @status_window = Window_Party_Select_Menber_Status.new
  276.    @status_window.opacity = 192
  277.    @status_window.z += 10
  278.    @show_index = 0
  279.    status_window_position
  280.    @status_window.refresh(@main_window.menber)
  281.    @status_window.visible = true
  282.    @show_index = @main_window.index
  283.    # トランジション実行
  284.    Graphics.transition
  285.    # メインループ
  286.    loop do
  287.      # ゲーム画面を更新
  288.      Graphics.update
  289.      # 入力情報を更新
  290.      Input.update
  291.      # フレーム更新
  292.      update
  293.      # 画面が切り替わったらループを中断
  294.      if $scene != self
  295.        break
  296.      end
  297.    end
  298.    # トランジション準備
  299.    Graphics.freeze
  300.    # ウィンドウを解放
  301.    @main_window.dispose
  302.    @menber_window.dispose
  303.    @status_window.dispose
  304. end
  305. #--------------------------------------------------------------------------
  306. # ● フレーム更新
  307. #--------------------------------------------------------------------------
  308. def update
  309.    # コマンドウィンドウを更新
  310.    @main_window.update
  311.    if @status_window.visible and @show_index != @main_window.index
  312.      status_window_position
  313.      @status_window.refresh(@main_window.menber)
  314.      @show_index = @main_window.index
  315.    end
  316.    # B ボタンが押された場合
  317.    if Input.trigger?(Input::B)
  318.      if $game_party.actors.size < $game_party.party_min
  319.        # ブザー SE を演奏
  320.        $game_system.se_play($data_system.buzzer_se)
  321.        return
  322.      end
  323.      # キャンセル SE を演奏
  324.      $game_system.se_play($data_system.cancel_se)
  325.      # メニュー画面に切り替え
  326.      $scene = Scene_Map.new
  327.      return
  328.    end
  329.    # C ボタンが押された場合
  330.    if Input.trigger?(Input::C)
  331.      # 選択したアクターが強制加入アクターの場合入れ替え不可
  332.      if $game_party.must_actor_include?(@main_window.menber)
  333.        # ブザー SE を演奏
  334.        $game_system.se_play($data_system.buzzer_se)
  335.        return
  336.      end
  337.      if $game_party.actors.include?(@main_window.menber)
  338.        $game_party.remove_actor(@main_window.menber.id)
  339.      else
  340.        if $game_party.actors.size == $game_party.party_max
  341.          # ブザー SE を演奏
  342.          $game_system.se_play($data_system.buzzer_se)
  343.          return
  344.        end
  345.        $game_party.add_actor(@main_window.menber.id)
  346.      end
  347.      # 決定 SE を演奏
  348.      $game_system.se_play($data_system.decision_se)
  349.      @main_window.refresh
  350.      @menber_window.refresh
  351.      return
  352.    end
  353.    # A ボタンが押された場合
  354.    #if Input.trigger?(Input::A)
  355.      # 決定 SE を演奏
  356.      #$game_system.se_play($data_system.decision_se)
  357.      #if @status_window.visible
  358.         #@status_window.visible = false

  359.      #else
  360.         #status_window_position
  361.         #@status_window.refresh(@main_window.menber)
  362.         #@status_window.visible = true
  363.         #@show_index = @main_window.index
  364.      #end
  365.      #return
  366.    #end
  367. end
  368. def status_window_position
  369.    if @main_window.cursor_rect.y < 176
  370.      @status_window.y = 288
  371.    else
  372.      @status_window.y = 96
  373.    end
  374. end
  375. end
复制代码
呵呵~~~~~~~说是没BUG~~~但是请看呵呵谁能解决下(某人最近研究人物仓库发了狂{/hx})
[url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg]http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg[/url][FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png[/url][/FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png[/url]

Lv1.梦旅人

幻想

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-23
帖子
1016
2
 楼主| 发表于 2008-1-12 22:21:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
呵呵~~~~~以下是  无冲突版人物仓库 (另一种思路)脚本
  1. #party转换
  2. #这是简易的party转换的脚本。

  3. #召唤界面:$scene = Scene_Party_in.new
  4. #可以用开关的on off来决定转换的操作可能与否。
  5. #此外,也可以设定不想要离开的角色。
  6. #不过由于毕竟只有角色的加入和退出的功能,使用起来可能不是很方便。
  7. #可以适应简单的身份表示。
  8. #用键盘a来做身份表示与否的变更。
  9. #设定方法
  10. #可加入party的最高人数
  11. #变更下面的@party_max = 4部分,通常用4。
  12. #可参加party的最少人数(必须选择的最低人数)
  13. #变更下面的@party_min = 1部分,初期姑且设定为1。
  14. #强制加入的角色(必须要加入到party中的角色)
  15. #变更下面的@must_actors = [$game_actors[1]]部分
  16. #在初级阶段,姑且将其设定为ID1号的角色(アルシェス)
  17. #设定的例子
  18. #@must_actors = [1, 2]
  19. #这样,1号和2号ID的角色就被设定为强制加入的角色了。
  20. #顺便一提,用事件指示的剧本,也就是
  21. #$game_party.must_actors = [1]
  22. #等,可以在游戏进行中设定。(最高最低人数等也同样是可能的。)
  23. #判断可否加入party
  24. #用 class Window_Party_Select 的 party_in_menber 来设定。
  25. #设定例子
  26. # menber.push($game_actors[1])  
  27. # menber.push($game_actors[2])  if $game_switches[1]
  28. #这样,就使1号ID的角色(アルシェス)的经常加入变为可能。
  29. #2号ID的角色(是谁来着?)在游戏开关的1号是on状态下将可能加入。
  30. #在初期设定阶段,1号ID是经常加入可能状态、
  31. #2-8号ID则被设定为各自在游戏开关的1-7号是on状态下方可加入。
  32. #
  33. #  2005.9.24 バグ修正
  34. #  強制加入アクターがセーブに反映されないバグを修正。
  35. #  強制加入アクターの指定方法が変更されたので注意。
  36. #
  37. # 2006.2.5 柳柳修正
  38. #  直接放入了add_actor
  39. #  如果需要把战斗图改为行走图,本脚本找到draw_actor_battler(actor,x,y)替换为:draw_actor_graphic(actor, x+40, y + 80)
  40. #  增加exp描绘

  41. class Game_Party
  42. attr_accessor :party_max
  43. attr_accessor :party_min
  44. attr_accessor :must_actors
  45. alias party_select_initialize initialize
  46. def initialize
  47.    party_select_initialize
  48.    @party_max = 5
  49.    @party_min = 1
  50.    @must_actors = [1]
  51. end
  52. def must_actor_include?(actor)
  53.    return @must_actors.include?(actor.id)
  54. end
  55. def add_actor(actor_id)
  56.    # 获取角色
  57.    actor = $game_actors[actor_id]
  58.    # 同伴人数未满 4 人、本角色不在队伍中的情况下
  59.    if @actors.size < @party_max and not @actors.include?(actor)
  60.      # 添加角色
  61.      @actors.push(actor)
  62.      # 还原主角
  63.      $game_player.refresh
  64.    end
  65. end
  66. end

  67. class Window_Party_Select < Window_Selectable
  68. #--------------------------------------------------------------------------
  69. # ● オブジェクト初期化
  70. #--------------------------------------------------------------------------
  71. def initialize
  72.    super(0, 96, 640, 384)
  73.    @party_in_ok_menber = party_in_menber
  74.    @item_max = party_in_menber.size
  75.    @column_max = 4
  76.    self.contents = Bitmap.new(width - 32, row_max * 176)
  77.    self.index = 0
  78.    refresh
  79. end
  80. #--------------------------------------------------------------------------
  81. # ● アクターの取得
  82. #--------------------------------------------------------------------------
  83. def menber
  84.    return @party_in_ok_menber[self.index]
  85. end
  86. #--------------------------------------------------------------------------
  87. # ● パーティーin可能なメンバー取得
  88. #--------------------------------------------------------------------------
  89. def party_in_menber
  90.    menber = []
  91.    menber.push($game_actors[1])  
  92.    menber.push($game_actors[2])
  93.    menber.push($game_actors[3])
  94.    menber.push($game_actors[4])
  95.    menber.push($game_actors[5])
  96.    menber.push($game_actors[6])  if $game_switches[39]
  97.    menber.push($game_actors[9])  if $game_switches[42]
  98.    menber.push($game_actors[10])  if $game_switches[43]
  99.    menber.push($game_actors[11])  if $game_switches[44]
  100.    menber.push($game_actors[12])  if $game_switches[45]
  101.    return menber
  102. end
  103. #--------------------------------------------------------------------------
  104. # ● リフレッシュ
  105. #--------------------------------------------------------------------------
  106. def refresh
  107.    self.contents.clear
  108.    for i in 0...@party_in_ok_menber.size
  109.      draw_menber(i)
  110.    end
  111. end
  112. #--------------------------------------------------------------------------
  113. # ● アクター描画
  114. #--------------------------------------------------------------------------
  115. def draw_menber(index)
  116.    actor = @party_in_ok_menber[index]
  117.    x = 4 + index % @column_max * (640 / @column_max)
  118.    y = index / @column_max * 88
  119.    if $game_party.must_actor_include?(actor)
  120.      color = text_color(3)
  121.      opacity = 255
  122.    elsif $game_party.actors.include?(actor)
  123.      color = normal_color
  124.      opacity = 255
  125.    else
  126.      color = disabled_color
  127.      opacity = 128
  128.    end
  129.    self.contents.font.color = color
  130.    draw_actor_battler(actor,x,y)
  131.    #draw_actor_graphic(actor, x+40, y + 80)
  132.    self.contents.draw_text(x, y, 120, 32, actor.name)
  133. end
  134. def draw_actor_battler(act,x,y)
  135.    bitmap = RPG::Cache.battler(act.battler_name, act.battler_hue)
  136.    cw = bitmap.width
  137.    ch = bitmap.height
  138.    src_rect = Rect.new(0, 0, cw, ch)
  139.    self.contents.blt(x, y, bitmap, src_rect, opacity)
  140. end
  141. #--------------------------------------------------------------------------
  142. # ● 行数の取得
  143. #--------------------------------------------------------------------------
  144. def row_max
  145.    # 項目数と列数から行数を算出
  146.    return (@item_max + @column_max - 1) / @column_max
  147. end
  148. #--------------------------------------------------------------------------
  149. # ● 先頭の行の取得
  150. #--------------------------------------------------------------------------
  151. def top_row
  152.    # ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
  153.    return self.oy / 88
  154. end
  155. #--------------------------------------------------------------------------
  156. # ● 先頭の行の設定
  157. #     row : 先頭に表示する行
  158. #--------------------------------------------------------------------------
  159. def top_row=(row)
  160.    # row が 0 未満の場合は 0 に修正
  161.    if row < 0
  162.      row = 0
  163.    end
  164.    # row が row_max - 1 超の場合は row_max - 1 に修正
  165.    if row > row_max - 1
  166.      row = row_max - 1
  167.      if row < 0
  168.        row = 0
  169.      end
  170.    end
  171.    # row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
  172.    self.oy = row * 88
  173. end
  174. #--------------------------------------------------------------------------
  175. # ● 1 ページに表示できる行数の取得
  176. #--------------------------------------------------------------------------
  177. def page_row_max
  178.    # ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
  179.    return (self.height - 32) / 88
  180. end
  181. #--------------------------------------------------------------------------
  182. # ● カーソルの矩形更新
  183. #--------------------------------------------------------------------------
  184. def update_cursor_rect
  185.    if @index < 0
  186.      self.cursor_rect.empty
  187.      return
  188.    end
  189.    # 現在の行を取得
  190.    row = @index / @column_max
  191.    # 現在の行が、表示されている先頭の行より前の場合
  192.    if row < self.top_row
  193.      # 現在の行が先頭になるようにスクロール
  194.      self.top_row = row
  195.    end
  196.    # 現在の行が、表示されている最後尾の行より後ろの場合
  197.    if row > self.top_row + (self.page_row_max - 1)
  198.      # 現在の行が最後尾になるようにスクロール
  199.      self.top_row = row - (self.page_row_max - 1)
  200.    end
  201.    # カーソルの幅を計算
  202.    cursor_width = 512 / @column_max
  203.    # カーソルの座標を計算
  204.    x = @index % @column_max * (cursor_width + 32)#(640 / @column_max)
  205.    y = @index / @column_max * 88 - self.oy
  206.    # カーソルの矩形を更新
  207.    self.cursor_rect.set(x, y, cursor_width, 32)
  208. end
  209. end

  210. class Window_Party_Select_Menber < Window_Base
  211. #--------------------------------------------------------------------------
  212. # ● オブジェクト初期化
  213. #--------------------------------------------------------------------------
  214. def initialize
  215.    super(0, 0, 640, 96)
  216.    self.contents = Bitmap.new(width - 32, height - 32)
  217.    refresh
  218. end
  219. #--------------------------------------------------------------------------
  220. # ● リフレッシュ
  221. #--------------------------------------------------------------------------
  222. def refresh
  223.    self.contents.clear
  224.    for i in 0...$game_party.actors.size
  225.      draw_menber(i)
  226.    end
  227. end
  228. #--------------------------------------------------------------------------
  229. # ● アクター描画
  230. #--------------------------------------------------------------------------
  231. def draw_menber(index)
  232.    actor = $game_party.actors[index]
  233.    x = 4 + index * (640 / $game_party.party_max)
  234.    y = 0
  235.    draw_actor_graphic(actor, x+32, y+48+8)
  236. end
  237. end

  238. class Window_Party_Select_Menber_Status < Window_Base
  239. #--------------------------------------------------------------------------
  240. # ● オブジェクト初期化
  241. #--------------------------------------------------------------------------
  242. def initialize
  243.    super(0, 288, 640, 192)
  244.    self.contents = Bitmap.new(width - 32, height - 32)
  245. end
  246. #--------------------------------------------------------------------------
  247. # ● リフレッシュ
  248. #--------------------------------------------------------------------------
  249. def refresh(actor)
  250.    self.contents.clear
  251.    draw_actor_name(actor, 4, 0)
  252.    draw_actor_class(actor, 4 + 144, 0)
  253.    draw_actor_level(actor, 4, 32)
  254.    draw_actor_state(actor, 4 + 72, 32)
  255.    draw_actor_hp(actor, 4, 64, 172)
  256.    draw_actor_sp(actor, 4, 96, 172)
  257.    draw_actor_exp(actor, 4, 128)
  258.    draw_actor_parameter(actor, 218, 32, 0)
  259.    draw_actor_parameter(actor, 218, 64, 1)
  260.    draw_actor_parameter(actor, 218, 96, 2)
  261.    draw_actor_parameter(actor, 430, 32, 3)
  262.    draw_actor_parameter(actor, 430, 64, 4)
  263.    draw_actor_parameter(actor, 430, 96, 5)
  264.    draw_actor_parameter(actor, 430, 128, 6)
  265.    
  266. end
  267. end

  268. class Scene_Party_in
  269. #--------------------------------------------------------------------------
  270. # ● メイン処理
  271. #--------------------------------------------------------------------------
  272. def main
  273.    @main_window = Window_Party_Select.new
  274.    @menber_window = Window_Party_Select_Menber.new
  275.    @status_window = Window_Party_Select_Menber_Status.new
  276.    @status_window.opacity = 192
  277.    @status_window.z += 10
  278.    @show_index = 0
  279.    status_window_position
  280.    @status_window.refresh(@main_window.menber)
  281.    @status_window.visible = true
  282.    @show_index = @main_window.index
  283.    # トランジション実行
  284.    Graphics.transition
  285.    # メインループ
  286.    loop do
  287.      # ゲーム画面を更新
  288.      Graphics.update
  289.      # 入力情報を更新
  290.      Input.update
  291.      # フレーム更新
  292.      update
  293.      # 画面が切り替わったらループを中断
  294.      if $scene != self
  295.        break
  296.      end
  297.    end
  298.    # トランジション準備
  299.    Graphics.freeze
  300.    # ウィンドウを解放
  301.    @main_window.dispose
  302.    @menber_window.dispose
  303.    @status_window.dispose
  304. end
  305. #--------------------------------------------------------------------------
  306. # ● フレーム更新
  307. #--------------------------------------------------------------------------
  308. def update
  309.    # コマンドウィンドウを更新
  310.    @main_window.update
  311.    if @status_window.visible and @show_index != @main_window.index
  312.      status_window_position
  313.      @status_window.refresh(@main_window.menber)
  314.      @show_index = @main_window.index
  315.    end
  316.    # B ボタンが押された場合
  317.    if Input.trigger?(Input::B)
  318.      if $game_party.actors.size < $game_party.party_min
  319.        # ブザー SE を演奏
  320.        $game_system.se_play($data_system.buzzer_se)
  321.        return
  322.      end
  323.      # キャンセル SE を演奏
  324.      $game_system.se_play($data_system.cancel_se)
  325.      # メニュー画面に切り替え
  326.      $scene = Scene_Map.new
  327.      return
  328.    end
  329.    # C ボタンが押された場合
  330.    if Input.trigger?(Input::C)
  331.      # 選択したアクターが強制加入アクターの場合入れ替え不可
  332.      if $game_party.must_actor_include?(@main_window.menber)
  333.        # ブザー SE を演奏
  334.        $game_system.se_play($data_system.buzzer_se)
  335.        return
  336.      end
  337.      if $game_party.actors.include?(@main_window.menber)
  338.        $game_party.remove_actor(@main_window.menber.id)
  339.      else
  340.        if $game_party.actors.size == $game_party.party_max
  341.          # ブザー SE を演奏
  342.          $game_system.se_play($data_system.buzzer_se)
  343.          return
  344.        end
  345.        $game_party.add_actor(@main_window.menber.id)
  346.      end
  347.      # 決定 SE を演奏
  348.      $game_system.se_play($data_system.decision_se)
  349.      @main_window.refresh
  350.      @menber_window.refresh
  351.      return
  352.    end
  353.    # A ボタンが押された場合
  354.    #if Input.trigger?(Input::A)
  355.      # 決定 SE を演奏
  356.      #$game_system.se_play($data_system.decision_se)
  357.      #if @status_window.visible
  358.         #@status_window.visible = false

  359.      #else
  360.         #status_window_position
  361.         #@status_window.refresh(@main_window.menber)
  362.         #@status_window.visible = true
  363.         #@show_index = @main_window.index
  364.      #end
  365.      #return
  366.    #end
  367. end
  368. def status_window_position
  369.    if @main_window.cursor_rect.y < 176
  370.      @status_window.y = 288
  371.    else
  372.      @status_window.y = 96
  373.    end
  374. end
  375. end
复制代码
呵呵~~~~~~~说是没BUG~~~但是请看呵呵谁能解决下(某人最近研究人物仓库发了狂{/hx})
[url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg]http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg[/url][FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png[/url][/FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png[/url]

Lv1.梦旅人

幻想

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-23
帖子
1016
3
 楼主| 发表于 2008-1-12 22:26:50 | 只看该作者
呵呵~~~我放到自己的工程冲突后就放到了个全新的工程~~~~~~但是一样的结果(某人最近研究人物仓库发了狂{/hx})
[url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg]http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg[/url][FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png[/url][/FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png[/url]
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
9
星屑
785
在线时间
291 小时
注册时间
2007-12-15
帖子
256
4
发表于 2008-1-12 22:31:20 | 只看该作者
用全新的工程测试了  
无问题
残念无念
回复 支持 反对

使用道具 举报

Lv1.梦旅人

幻想

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-23
帖子
1016
5
 楼主| 发表于 2008-1-12 22:35:31 | 只看该作者
{/jy}是罗~~~~~~~~那我放到我的工程为什么有问题我用了 截图存取档 和 图片标题流星 是不是这2脚本个惹的祸 (某人最近研究人物仓库发了狂{/hx})
[url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg]http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg[/url][FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png[/url][/FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png[/url]
回复 支持 反对

使用道具 举报

Lv2.观梦者

龙骑

梦石
0
星屑
545
在线时间
10 小时
注册时间
2007-12-31
帖子
2030
6
发表于 2008-1-12 23:28:40 | 只看该作者
应该不是,主站上所有的仓库我都试过了,放到我的游戏里也有问题,把其它脚本都删了也是有问题的...
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
9
星屑
785
在线时间
291 小时
注册时间
2007-12-15
帖子
256
7
发表于 2008-1-13 01:08:45 | 只看该作者
我用了66RPG整合系统试了  使用正常

截图存取档和图片标题加入也没冲突


我用的RMXP版本1.02   其他版本没试
残念无念
回复 支持 反对

使用道具 举报

Lv1.梦旅人

幻想

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-23
帖子
1016
8
 楼主| 发表于 2008-1-13 02:03:35 | 只看该作者
{/gg}{/gg}不会吧可能是我的用法不对我的用法是:建立事件—(无视脚本开头的注释)插入脚本$scene = Scene_Party_in.new——游戏测试——跟那事件对话——
就是这样
[url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg]http://rpg.blue/upload_program/d/菜鸟飞呀飞_love_111006892.jpg[/url][FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yz_tb_111008420.png[/url][/FLY][url=http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png]http://rpg.blue/upload_program/d/菜鸟飞呀飞_yzs_111008459.png[/url]
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-27 23:13

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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