mikb89

[Ace] Party Limit v1.2

Jan 6th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.88 KB | None | 0 0
  1. #===============================================================================
  2. # * Limite_Party v. 1.2
  3. # ▼ Tool: VX Ace
  4. # ▼ Autore: Ally, mikb89
  5. # ▼ Sito Web: rpgmkr.net
  6. #===============================================================================
  7. # ▼ Lo script dà la possibilità di impostare il limite del party, cosa non
  8. # fattibile direttamente dal Tool.
  9. # In più, è possibile inserire nel chiama script della Condizione SE la voce:
  10. #   party_pieno?
  11. # Per controllare se il gruppo ha raggiunto o no il limite stabilito.
  12. #-------------------------------------------------------------------------------
  13. # Richiesto da Poison
  14. #===============================================================================
  15. # ▼ Configurazioni:
  16. #===============================================================================
  17. module PARTY_LIM
  18.   MAX_PARTY = 4
  19.    # Modificando il 4 con quello a vostra scelta, potrete limitare
  20.    #  o aumentare il Party a vostro piacimento.
  21. end
  22. #===============================================================================
  23. # ▼ Importazione script:
  24. #===============================================================================
  25. ($imported ||= {})[:ally_mikb89_party_lim] = true
  26. #===============================================================================
  27. # ▼ Inizio codice:
  28. #===============================================================================
  29. #===============================================================================
  30. # ** Window_MenuStatus
  31. #-------------------------------------------------------------------------------
  32. # This window displays party member status on the menu screen.
  33. #===============================================================================
  34. class Window_MenuStatus < Window_Selectable
  35. #-----------------------------------------------------------------------------
  36. # * Get Number of Items
  37. #-----------------------------------------------------------------------------
  38.   def item_max
  39.     [PARTY_LIM::MAX_PARTY, $game_party.members.size].min
  40.   end
  41. end
  42. #===============================================================================
  43. # ** Game_Interpreter
  44. #-------------------------------------------------------------------------------
  45. #  An interpreter for executing event commands. This class is used within the
  46. # Game_Map, Game_Troop, and Game_Event classes.
  47. #===============================================================================
  48. class Game_Interpreter
  49. #-----------------------------------------------------------------------------
  50. # * Is Limit Reached?
  51. #-----------------------------------------------------------------------------
  52.   def party_pieno?
  53.     $game_party.all_members.size >= PARTY_LIM::MAX_PARTY
  54.   end
  55. end
  56. #===============================================================================
  57. # ▼ Fine Script
  58. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment