查看: 1701|回复: 2

[已经解决] VA有人物仓库脚本吗?求链接

[复制链接]
梦石
0
星屑
3348
在线时间
1120 小时
注册时间
2009-4-15
回帖
761
发表于 2013-9-9 10:22:30 | 显示全部楼层 |阅读模式

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

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

×
如题,在弄个类似去酒馆招英雄的游戏,可是没找到VA的任务仓库,有人有这东西或见过吗?求个链接或脚本,不胜感激。

梦石
0
星屑
407
在线时间
1291 小时
注册时间
2013-1-12
回帖
3349

贵宾

发表于 2013-9-9 11:07:47 | 显示全部楼层
Galv是神.... 他寫的腳本都不錯  不过要翻牆...
http://galvs-scripts.com/2013/06/15/army-manager/
這个剛剛好就是你需要的...  英文沒問題就行了....
  1. #------------------------------------------------------------------------------#
  2. #  Galv's Army Manager
  3. #------------------------------------------------------------------------------#
  4. #  For: RPGMAKER VX ACE
  5. #  Version 1.0
  6. #  Requested by Rue
  7. #-------------------------------------------------------------------------------
  8. #  This script was designed for tactical battle system games to manager party
  9. #  members (your army). You can arrange, dismiss, equip, etc. your units from
  10. #  this scene as well as display some army and game related information.
  11. #-------------------------------------------------------------------------------

  12. #-------------------------------------------------------------------------------
  13. #  NOTE TAG - ACTORS OR CLASSES
  14. #-------------------------------------------------------------------------------
  15. #  <a_icon: x>    # icon displayed left of actor in the army manager. This icon
  16. #                 # will only appear if you set the ICONTYPES accordingly
  17. #-------------------------------------------------------------------------------

  18. #-------------------------------------------------------------------------------
  19. #  SCRIPT CALLS
  20. #-------------------------------------------------------------------------------
  21. #  manage_army         # Calls the army manager scene
  22. #
  23. #  a_icon(id,icon_id)  # Change an actor's icon during game.
  24. #  a_access(id,x)      # if x is false cannot access actor at all. Default true
  25. #  a_cmd(id,:cmd,x)    # used to enable/disable commands for certain actors
  26. #                      # :cmd is the CMD ID of the command (further down)
  27. #                      # x can be true or false to disable/enable commands
  28. #
  29. #  armyname("Name")    # Changes the name of your army
  30. #-------------------------------------------------------------------------------
  31. #  EXAMPLES
  32. #  a_cmd(1,:dismiss,false) # Disable the "DISMISS" command for actor 1
  33. #  a_cmd(4,:order,true)    # Enable the "ORDER" command for actor 4.
  34. #                          # All commands are true (enabled) by default
  35. #-------------------------------------------------------------------------------

  36. ($imported ||= {})["Galv_ArmyManager"] = true
  37. module GARMY

  38. #-------------------------------------------------------------------------------
  39. #
  40. #  * SETTINGS
  41. #
  42. #-------------------------------------------------------------------------------

  43.   # Some Default Settings
  44.    
  45.   NO_ACTOR_ICON = 186   # Icon ID used if you don't tag actor with <a_icon: x>
  46.   NO_CLASS_ICON = 162   # Icon ID used if you don't tag class with <a_icon: x>
  47.   NO_WEAPON_ICON = 186  # Icon ID used if nothing is equipped
  48.    
  49.   ICONTYPE1 = :actor    # these ICONTYPES can be :actor, :class or :weapon
  50.   ICONTYPE2 = :weapon   # This will show either the class icon, actor icon (if
  51.                         # ou note tagged them) or the equipped weapon icon to
  52.                         # the left of the actor's sprite.
  53.    
  54.   SPRITE_X_POS = 1.6    # width of box divided by this number to position the
  55.                         # character sprite. (2 is central). Default 1.6

  56.   B_MEMBERS = false     # highlight members in party that are 'battle members'
  57.                         # true or false
  58.   B_MEMBER_COLOR = 16   # windowskin color for battle member highlight box that
  59.                         # appears if B_MEMBERS = true

  60.   # Army Info
  61.    
  62.   UNIT_COUNT = "Units: "           # Party member count text
  63.   HIGH_LEVEL = "Highest Level: "   # Highest level text
  64.   TIME = "Time: "                  # Time text
  65.   FUNDS = "Funds: "                # Gold amount text
  66.   INFOVAR1 = 1                     # Variable id used to display in info window
  67.   INFOVAR2 = 2                     # Variable id used to display in info window
  68.                                    # Displays the variable name beside these.

  69.   # Sounds
  70.    
  71.   DISMISS_SE = ["Blow8",100,100]     # ["SE_Name",volume,pitch] for dimiss SE
  72.   ORDER_SE = ["Wind7",100,100]       # ["SE_Name",volume,pitch] for order SE
  73.    

  74.   #  Command Setup
  75.   #  (Command list appears when you select a unit from your army)
  76.    
  77.   CMDS = {
  78.    
  79. # CMD ID => ["NAME",    :Scene_Class, switch, icon],
  80.   :equip   => ["EQUIP",   :Scene_Equip, 1,      161],
  81.   :status  => ["STATUS",  :Scene_Status,0,      236],
  82.   :order   => ["ORDER",   :order,       0,      12],  # Change only "NAME"
  83.   :dismiss => ["DISMISS", :dismiss,     0,      187], # Change only "NAME"
  84.    
  85.   #:class   => ["JOB",     :Scene_Class, 0,      121],  # Example yanfly class  
  86.   #:item    => ["USE ITEM", :Scene_Item, 0,      261],
  87.    
  88.   } # don't touch

  89. #-------------------------------------------------------------------------------
  90. #  EXPLANATION:
  91. #-------------------------------------------------------------------------------
  92. #  CMD ID = unique identifier for the menu command (scripting purposes). Use
  93. #           anything here but do not change :order or :dismiss or those options
  94. #           will no longer function. You can, however, remove them.
  95. #  "NAME" = Menu command text
  96. #  :Scene_Class = The name of the scene class as a symbol
  97. #  switch = a swith ID. Turn this switch ON to disable the menu command
  98. #  icon = the icon ID to go with the menu command
  99. #-------------------------------------------------------------------------------

  100. #-------------------------------------------------------------------------------
  101. #
  102. #  * END OF SETTINGS
  103. #
  104. #-------------------------------------------------------------------------------

  105. end # GARMY


  106.     #----------------------#
  107. #---|   Game_Interpreter   |----------------------------------------------------
  108.     #----------------------#

  109. class Game_Interpreter
  110.   def manage_army; SceneManager.call(Scene_Army); end
  111.   def a_access(id,status); $game_actors[id].a_accessible = status; end
  112.   def a_cmd(id,cmd_name,status)
  113.     $game_actors[id].a_cmds[cmd_name] = status
  114.   end
  115.   def a_icon(id,icon_id); $game_actor[id].a_icon = icon_id; end
  116.   def armyname(name); $game_party.armyname = name; end
  117. end # Game_Interpreter


  118.     #----------------#
  119. #---|   Game_Party   |----------------------------------------------------------
  120.     #----------------#

  121. class Game_Party
  122.   attr_accessor :last_atroop
  123.   attr_accessor :armyname
  124.    
  125.   alias galv_garmy_gp_initialize initialize
  126.   def initialize
  127.     @armyname = "Unnamed Army"
  128.     galv_garmy_gp_initialize
  129.   end
  130. end # Game_Party


  131.     #------------------#
  132. #---|   SceneManager   |--------------------------------------------------------
  133.     #------------------#

  134. module SceneManager
  135.   def self.gcall(scene_class)
  136.     @stack.push(@scene)
  137.     [url=home.php?mod=space&uid=420706]@Scene[/url] = Kernel.const_get(scene_class).new
  138.   end
  139. end # SceneManager


  140.     #----------------------#
  141. #---|   RPG::CLASS/ACTOR   |----------------------------------------------------
  142.     #----------------------#

  143. class RPG::Class
  144.   def a_icon
  145.     if @a_icon.nil?
  146.       if @note =~ /<a_icon: (.*)>/i
  147.         @a_icon = $1.to_i
  148.       else
  149.         @a_icon = GARMY::NO_CLASS_ICON
  150.       end
  151.     end
  152.     @a_icon
  153.   end
  154. end # RPG::Class
  155. class RPG::Actor
  156.   def a_icon
  157.     if @a_icon.nil?
  158.       if @note =~ /<a_icon: (.*)>/i
  159.         @a_icon = $1.to_i
  160.       else
  161.         @a_icon = GARMY::NO_ACTOR_ICON
  162.       end
  163.     end
  164.     @a_icon
  165.   end
  166. end # RPG::Class


  167.     #----------------#
  168. #---|   Game_Actor   |----------------------------------------------------------
  169.     #----------------#

  170. class Game_Actor
  171.   attr_accessor :a_accessible
  172.   attr_accessor :a_cmds
  173.   attr_accessor :a_icon
  174.    
  175.   alias galv_garmy_ga_setup setup
  176.   def setup(actor_id)
  177.     @a_accessible = true
  178.     @a_icon = $data_actors[actor_id].a_icon
  179.     @a_cmds = {}
  180.     GARMY::CMDS.each { |cmd| @a_cmds[cmd[0]] = true }
  181.     galv_garmy_ga_setup(actor_id)
  182.   end
  183. end # Game_Actor


  184.     #-----------------#
  185. #---|   Scene_Army    |---------------------------------------------------------
  186.     #-----------------#

  187. class Scene_Army < Scene_MenuBase
  188.   def start
  189.     super
  190.     create_help_window
  191.     create_info_window
  192.     create_troop_window
  193.     create_command_window
  194.     create_face_window
  195.   end

  196. #-----| CREATE STUFF |

  197.   def create_help_window
  198.     @help_window = Window_ArmyHelp.new
  199.     @help_window.viewport = @viewport
  200.   end
  201.    
  202.   def create_info_window
  203.     @info_window = Window_ArmyInfo.new
  204.     @info_window.viewport = @viewport
  205.   end
  206.    
  207.   def create_troop_window
  208.     wy = @help_window.height
  209.     ww = Graphics.width
  210.     wh = Graphics.height - @help_window.height - @info_window.height
  211.     @troop_window = Window_Troops.new(0,wy,ww,wh)
  212.     @troop_window.help_window = @help_window
  213.     @troop_window.viewport = @viewport
  214.     @troop_window.activate
  215.     @troop_window.set_handler(:ok, method(:on_troop_ok))
  216.     @troop_window.set_handler(:cancel, method(:return_scene))
  217.   end

  218.   def create_command_window
  219.     wx = Graphics.width / 2
  220.     wy = (Graphics.height - @info_window.height - @help_window.height) / 2
  221.     @command_window = Window_ArmyCommand.new(wx,wy)
  222.     @command_window.viewport = @viewport
  223.     GARMY::CMDS.each { |cmd|
  224.       handle = cmd[1][0].delete(' ').downcase.to_sym
  225.       @command_window.set_handler(handle, method(:cmd))
  226.     }
  227.     @command_window.set_handler(:cancel, method(:back_to_troop))
  228.     @command_window.y -= @command_window.height / 2 - @help_window.height
  229.     @command_window.hide.deactivate
  230.   end
  231.    
  232.   def create_face_window
  233.     ww = @command_window.width
  234.     wh = @command_window.height
  235.     wx = @command_window.x
  236.     wy = @command_window.y
  237.     @face_window = Window_ArmyFace.new(wx,wy,ww,wh)
  238.     @face_window.viewport = @viewport
  239.     @face_window.hide
  240.   end
  241.    
  242. #-----| HANDLERS |

  243.   def cmd
  244.     list = GARMY::CMDS.to_a
  245.     cmd = @command_window.index
  246.     symbol = list[cmd][1][1]
  247.     if custom_action(symbol)
  248.       custom_on_command_ok(symbol)
  249.     else
  250.       SceneManager.gcall(list[cmd][1][1])
  251.     end
  252.   end
  253.    
  254.   def custom_action(symbol)
  255.     case symbol
  256.     when :dismiss, :order
  257.       return true
  258.     else
  259.       return false
  260.     end
  261.   end
  262.    
  263.   def custom_on_command_ok(symbol)
  264.     case symbol
  265.     when :dismiss
  266.       do_dismiss
  267.     when :order
  268.       start_ordering
  269.     end
  270.   end
  271.    
  272.   def start_ordering
  273.     if $game_party.last_atroop.a_cmds[:order]
  274.       @troop_window.order_on
  275.       @ordering = true
  276.       @troop_window.psound = GARMY::ORDER_SE
  277.     else
  278.       Sound.play_buzzer
  279.     end
  280.     back_to_troop
  281.   end
  282.    
  283.   def do_dismiss
  284.     @troop_window.dismiss
  285.     back_to_troop
  286.   end

  287.   def on_troop_ok
  288.     if @ordering
  289.       @troop_window.swap_actor
  290.       @ordering = false
  291.       back_to_troop
  292.     else
  293.       $game_party.last_atroop = actor
  294.       $game_party.menu_actor = actor
  295.       @command_window.refresh
  296.       @face_window.refresh
  297.       @command_window.show.activate
  298.       @face_window.show.activate
  299.     end
  300.   end
  301.    
  302.   def back_to_troop
  303.     @command_window.hide.deactivate
  304.     @face_window.hide
  305.     @troop_window.activate
  306.   end
  307.    
  308.   def return_scene
  309.     if @troop_window.ordering_on
  310.       @ordering = false
  311.       @troop_window.cancel_ordering
  312.       @troop_window.activate
  313.     else
  314.       $game_party.last_atroop = nil
  315.       SceneManager.return
  316.     end
  317.   end

  318. #-----| OTHER STUFF |

  319.   def actor; @troop_window.actor; end

  320.   def terminate
  321.     super
  322.   end
  323.    
  324.   def update
  325.     super
  326.   end
  327. end # Scene_Army < Scene_MenuBase


  328.     #----------------------#
  329. #---|   Window_ArmyHelp    |----------------------------------------------------
  330.     #----------------------#

  331. class Window_ArmyHelp < Window_Help
  332.   def initialize
  333.     super(1)
  334.     @icons = []
  335.   end

  336.   def set_text(text)
  337.     if text != @text
  338.       @text = text
  339.       refresh
  340.     end
  341.   end

  342.   def clear
  343.     set_text("")
  344.     @icons = []
  345.     [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  346.   end

  347.   def set_item(actor)
  348.     @actor = actor
  349.     @icons = [get_icon(GARMY::ICONTYPE1,actor),get_icon(GARMY::ICONTYPE2,actor)]
  350.     set_text(actor ? create_text(actor) : "")
  351.   end
  352.    
  353.   def create_text(actor)
  354.     n = actor.name
  355.     c = actor.class.name
  356.     l = Vocab::level_a + actor.level.to_s
  357.     text = n + " - " + l + " " + c
  358.     return text
  359.   end
  360.    
  361.   def get_icon(icontype,actor)
  362.     return 0 if !actor
  363.     case icontype
  364.     when :actor
  365.       return actor.a_icon
  366.     when :class
  367.       return $data_classes[actor.class_id].a_icon
  368.     when :weapon
  369.       if actor.equips[0].nil?
  370.         return GARMY::NO_WEAPON_ICON
  371.       else
  372.         return actor.equips[0].icon_index
  373.       end
  374.     else
  375.       return 0
  376.     end
  377.   end

  378.   def refresh
  379.     contents.clear
  380.     contents.font.size = 21 if Graphics.height < 480
  381.     if !@icons.empty?
  382.       draw_icon(@icons[0], 0, 0)
  383.       draw_icon(@icons[1], 28, 0)
  384.     end
  385.     if @actor
  386.       offset = Graphics.width >= 640 ? 0 : -100
  387.       draw_actor_hp(@actor, 355 + offset, 0)
  388.       draw_actor_mp(@actor, 490 + offset, 0)
  389.       draw_text(62, 0, 280 + offset, line_height, @text)
  390.     end
  391.   end
  392. end # Window_ArmyHelp < Window_Help


  393.     #--------------------#
  394. #---|   Window_Troops    |------------------------------------------------------
  395.     #--------------------#

  396. class Window_Troops < Window_Selectable
  397.   attr_accessor :pending_index
  398.   attr_accessor :ordering_on
  399.   attr_accessor :psound
  400.    
  401.   def initialize(x, y, width, height)
  402.     super
  403.     @data = []
  404.     @last_index ||= 0
  405.     @animtime = 0
  406.     [url=home.php?mod=space&uid=348285]@walk[/url] = 0
  407.     @pending_index = -1
  408.     refresh
  409.     select_last
  410.   end

  411. #------| Sizes and Stuff |
  412.    
  413.   def item_width
  414.     (width - standard_padding * 2 + spacing) / col_max - spacing
  415.   end
  416.   def item_height; item_width; end
  417.   def spacing; return 10; end
  418.   def col_max; return 6; end
  419.   def item_max; @data ? @data.size : 1; end
  420.   def actor; @data && index >= 0 ? @data[index] : nil; end

  421.   def current_item_enabled?
  422.     enable?(@data[index])
  423.   end

  424.   def include?(actor)
  425.     return false if actor.nil?
  426.     return true
  427.   end

  428.   def enable?(actor)
  429.     return false if !actor
  430.     return false if !actor.a_accessible
  431.     return false if @ordering_on && !actor.a_cmds[:order]
  432.     return true
  433.   end

  434.   def make_item_list
  435.     @data = $game_party.members.select {|actor| include?(actor) }
  436.     @data.push(nil) if include?(nil)
  437.   end

  438.   def select_last
  439.     select(@data.index($game_party.last_atroop) || 0)
  440.   end
  441.    
  442.   def swap_actor
  443.     $game_party.swap_order($game_party.last_atroop.index,index)
  444.     @pending_index = -1
  445.     @ordering_on = nil
  446.     refresh
  447.   end
  448.    
  449.   def actor_rect(index)
  450.     rect = Rect.new
  451.     rect.width = item_width
  452.     rect.height = item_height
  453.     rect.x = index % col_max * (item_width + spacing)
  454.     rect.y = index / col_max * item_height
  455.     rect
  456.   end

  457.   def offset
  458.     Graphics.height < 480 ? 0 : 10
  459.   end
  460.    
  461.   def draw_item(index)
  462.     actor = @data[index]
  463.     if actor
  464.       rect = actor_rect(index)
  465.       rect.width -= 4
  466.       draw_in_battle_party(index) if GARMY::B_MEMBERS
  467.       draw_selected(index)
  468.       draw_actor_text(actor,rect.x + 2,rect.y + 38 + offset, enable?(actor),
  469.         rect.width)
  470.       draw_character(actor.character_name, actor.character_index,
  471.         rect.x + item_width / GARMY::SPRITE_X_POS - 1, rect.y + 38 + offset,
  472.         enable?(actor),index)
  473.     end
  474.   end
  475.    
  476.   def draw_selected(index)
  477.     if index == @pending_index
  478.       pendrect = item_rect(index)
  479.       pendrect.x += 1
  480.       pendrect.y += 1
  481.       pendrect.width -= 2
  482.       pendrect.height -= 2
  483.       contents.fill_rect(pendrect, pending_color)
  484.     end
  485.   end
  486.    
  487.   def draw_in_battle_party(index)
  488.     if index < $game_party.max_battle_members
  489.       rect = item_rect(index)
  490.       w = 1
  491.       c = text_color(GARMY::B_MEMBER_COLOR)
  492.       trect = Rect.new(rect.x,rect.y,rect.width,w)
  493.       lrect = Rect.new(rect.x,rect.y,w,rect.height)
  494.       rrect = Rect.new(rect.x + rect.width - w,rect.y,w,rect.height)
  495.       brect = Rect.new(rect.x,rect.y + rect.height - w,rect.width,w)
  496.       contents.fill_rect(trect,c)
  497.       contents.fill_rect(lrect,c)
  498.       contents.fill_rect(rrect,c)
  499.       contents.fill_rect(brect,c)
  500.     end
  501.   end
  502.    
  503.   def square_color
  504.      
  505.   end

  506.   def draw_actor_text(actor, x, y, enabled = true, w)
  507.     return unless actor
  508.     icon1 = get_icon(GARMY::ICONTYPE1,actor)
  509.     icon2 = get_icon(GARMY::ICONTYPE2,actor)
  510.     draw_icon(icon1, x + 6, y - 20, enabled)
  511.     draw_icon(icon2, x + 18, y - 20, enabled)
  512.     change_color(normal_color, enabled)
  513.     contents.font.size = 18
  514.     draw_text(x, y, w, line_height, actor.name,1)
  515.     contents.font.size = 16
  516.     lvl = Vocab::level_a + actor.level.to_s
  517.     cname = actor.class.name
  518.     draw_text(x + 10, y - 40, w, line_height, lvl,0)
  519.     draw_text(x, y + 16, w, line_height, cname,1)
  520.   end
  521.    
  522.   def get_icon(icontype,actor)
  523.     case icontype
  524.     when :actor
  525.       return actor.a_icon
  526.     when :class
  527.       return $data_classes[actor.class_id].a_icon
  528.     when :weapon
  529.       if actor.equips[0].nil?
  530.         return GARMY::NO_WEAPON_ICON
  531.       else
  532.         return actor.equips[0].icon_index
  533.       end
  534.     else
  535.       return 0
  536.     end
  537.   end

  538.   def draw_character(character_name, character_index, x, y,enabled,i)
  539.     return unless character_name
  540.     bitmap = Cache.character(character_name)
  541.     sign = character_name[/^[\!\$]./]
  542.     if sign && sign.include?('$')
  543.       cw = bitmap.width / 3
  544.       ch = bitmap.height / 4
  545.     else
  546.       cw = bitmap.width / 12
  547.       ch = bitmap.height / 8
  548.     end
  549.     n = character_index
  550.     step = 0
  551.     step = @walk if enabled && i == index
  552.     src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
  553.     contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 150)
  554.   end

  555.   def update_help
  556.     @help_window.set_item(actor)
  557.   end

  558.   def refresh
  559.     make_item_list
  560.     create_contents
  561.     draw_all_items
  562.   end
  563.    
  564.   def order_on
  565.     @ordering_on = true
  566.     @pending_index = index
  567.     refresh
  568.   end
  569.    
  570.   def cancel_ordering
  571.     @ordering_on = nil
  572.     @pending_index = -1
  573.     refresh
  574.   end
  575.    
  576.   def dismiss
  577.     $game_party.remove_actor(actor.id)
  578.     refresh
  579.   end
  580.    
  581.   def update
  582.     super
  583.     update_walk
  584.     redraw_item(index)
  585.   end
  586.    
  587.   def update_walk
  588.     @animtime += 1
  589.     if @animtime == 10
  590.       case @walk
  591.       when 1; @walk -= 1
  592.       when -1; @walk += 1
  593.       when 0
  594.         if @step == 1
  595.           @walk = -1; @step = 0
  596.         else
  597.           @walk = 1; @step = 1
  598.         end
  599.       end
  600.       @animtime = 0
  601.     end
  602.   end
  603.    
  604.   def cursor_down(wrap = false); super; cursor_move_extras; end
  605.   def cursor_up(wrap = false); super; cursor_move_extras; end
  606.   def cursor_left(wrap = false); super; cursor_move_extras; end
  607.   def cursor_right(wrap = false); super; cursor_move_extras; end
  608.      
  609.   def cursor_move_extras
  610.     @walk = 0
  611.     @animtime = 0
  612.     redraw_item(@last_index)
  613.     @last_index = index
  614.   end
  615.    
  616.   def process_ok
  617.     if current_item_enabled?
  618.       psound
  619.       Input.update
  620.       deactivate
  621.       call_ok_handler
  622.     else
  623.       Sound.play_buzzer
  624.     end
  625.   end
  626.    
  627.   def psound
  628.     if @psound.nil?
  629.       Sound.play_ok
  630.     else
  631.       name,vol,pitch = @psound
  632.       RPG::SE.new(name,vol,pitch).play
  633.       @psound = nil
  634.     end
  635.   end
  636. end # Window_Troops < Window_Selectable


  637.     #------------------------#
  638. #---|   Window_ArmyCommand   |--------------------------------------------------
  639.     #------------------------#

  640. class Window_ArmyCommand < Window_Command
  641.   def initialize(x,y)
  642.     super(x,y)
  643.     self.opacity = 255
  644.     self.back_opacity = 255
  645.   end

  646.   def window_width; return 160; end
  647.   def visible_line_number; item_max; end

  648.   def make_command_list
  649.     @cmd_index = []
  650.     GARMY::CMDS.each { |cmd|
  651.       text = cmd[1][0]
  652.       handle = text.delete(' ').downcase.to_sym
  653.       add_command(text,handle,check_enabled($game_switches[cmd[1][2]],cmd[0],text))
  654.       @cmd_index << cmd[0]
  655.     }
  656.   end
  657.    
  658.   def check_enabled(switch,cmd,text)
  659.     return false if switch
  660.     return false if cmd == :dismiss && $game_party.members.count <= 1
  661.     if $game_party.last_atroop
  662.       return false if !$game_party.last_atroop.a_cmds[cmd]
  663.     end
  664.     return true
  665.   end

  666.   def draw_item(index)
  667.     change_color(normal_color, command_enabled?(index))
  668.     recti = item_rect_for_text(index)
  669.     recti.x += 26
  670.     draw_text(recti, command_name(index), alignment)
  671.     draw_icon(GARMY::CMDS[@cmd_index[index]][3],0,recti.y)
  672.   end
  673.    
  674.   def process_ok
  675.     if current_item_enabled?
  676.       psound
  677.       Input.update
  678.       deactivate
  679.       call_ok_handler
  680.     else
  681.       Sound.play_buzzer
  682.     end
  683.   end
  684.    
  685.   def psound
  686.     if current_symbol == :dismiss
  687.       name,vol,pitch = GARMY::DISMISS_SE
  688.       RPG::SE.new(name,vol,pitch).play
  689.       @psound = nil
  690.     else
  691.       Sound.play_ok
  692.     end
  693.   end
  694. end # Window_ArmyCommand < Window_Command


  695.     #---------------------#
  696. #---|   Window_ArmyInfo   |-----------------------------------------------------
  697.     #---------------------#

  698. class Window_ArmyInfo < Window_Base
  699.   def initialize(line_number = 2)
  700.     super(0, Graphics.height - window_height, Graphics.width, window_height)
  701.     refresh
  702.   end
  703.    
  704.   def window_height
  705.     h = h480? ? 30 : 0
  706.     fitting_height(3) + h
  707.   end
  708.    
  709.   def h480?; Graphics.height >= 480; end

  710.   def setup_info
  711.     w = contents.width
  712.     o = h480? ? 18 : 0
  713.     h = line_height
  714.     y = line_height + o
  715.     y2 = h * 2 + o * 1.4
  716.     contents.font.size = 21 if !h480?
  717.     change_color(system_color)
  718.     draw_text(0,0,contents.width,line_height,$game_party.armyname,1)
  719.     change_color(normal_color)
  720.     draw_horz_line(h - 4) if h480?
  721.     draw_text(0,y,w,h,GARMY::UNIT_COUNT + $game_party.members.count.to_s,0)
  722.     draw_text(0,y,w,h,GARMY::HIGH_LEVEL + highlevel,1)
  723.     draw_text(0,y,w,h,GARMY::TIME + time_text,2)
  724.     draw_text(0,y2,w,h,GARMY::FUNDS + $game_party.gold.to_s + currency,0)
  725.     if GARMY::INFOVAR1 > 0
  726.       v = GARMY::INFOVAR1
  727.       n = $data_system.variables[v]
  728.       draw_text(0,y2,w,h,n + $game_variables[v].to_s,1)
  729.     end
  730.     if GARMY::INFOVAR2 > 0
  731.       v = GARMY::INFOVAR2
  732.       n = $data_system.variables[v]
  733.       draw_text(0,y2,w,h,n + $game_variables[v].to_s,2)
  734.     end
  735.   end

  736.   def currency; Vocab::currency_unit; end
  737.    
  738.   def highlevel
  739.     ($game_party.members.max_by { |k,v| k.level }).level.to_s
  740.   end
  741.    
  742.   def time_text
  743.     sprintf("%02d:%02d:%02d", (Graphics.frame_count / 60**2) / 60,
  744.       Graphics.frame_count / 60**2 % 60,
  745.       Graphics.frame_count / 60 % 60)
  746.   end
  747.      
  748.   def draw_horz_line(y)
  749.     line_y = y + line_height / 2 - 1
  750.     contents.fill_rect(0, line_y, contents_width, 2, line_color)
  751.   end
  752.    
  753.   def line_color
  754.     color = normal_color
  755.     color.alpha = 48
  756.     color
  757.   end
  758.    
  759.   def update
  760.     refresh
  761.   end

  762.   def refresh
  763.     contents.clear
  764.     setup_info
  765.   end
  766. end # Window_ArmyInfo < Window_Base


  767.     #---------------------#
  768. #---|   Window_ArmyFace   |-----------------------------------------------------
  769.     #---------------------#

  770. class Window_ArmyFace < Window_Base
  771.   def initialize(x,y,w,h)
  772.     super(x - w,y,w,h)
  773.     self.opacity = 255
  774.     self.back_opacity = 255
  775.   end

  776.   def draw_cont
  777.     fy = (contents.height - 96) / 2
  778.     fx = (contents.width - 96) / 2
  779.     draw_actor_face($game_party.last_atroop, fx, fy)
  780.   end

  781.   def refresh
  782.     contents.clear
  783.     draw_cont
  784.   end
  785. end # Window_ArmyFace < Window_Base
复制代码

改一下vocab為中文就行了  然後他也有Demo的...(範例)

点评

求下范例下载地址,那个地址上我没看到范例连接,只看到了脚本连接  发表于 2013-9-9 16:19

评分

参与人数 1梦石 +1 收起 理由
Sion + 1 认可答案

查看全部评分


回复

使用道具 举报

梦石
0
星屑
3348
在线时间
1120 小时
注册时间
2009-4-15
回帖
761
 楼主| 发表于 2013-9-9 16:17:53 | 显示全部楼层
76213585 发表于 2013-9-9 11:07
Galv是神.... 他寫的腳本都不錯  不过要翻牆...
http://galvs-scripts.com/2013/06/15/army-manager/
這个 ...

如何认可你这个楼为认可答案?

点评

Demo下載 http://www.mediafire.com/?6mczyzwm8dye9sx (是英文的)  发表于 2013-9-10 06:44
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部