neonblack

William Scripts

Jun 10th, 2014
289
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## First script "variable level[55]" uses variable 55 as max level.
  2. class RPG::Actor < RPG::BaseItem
  3. def level_var
  4. make_level_vars unless @level_variable
  5. return @level_variable
  6. end
  7.  
  8. def make_level_vars
  9. @level_variable = 0
  10. note.split(/[\n\r]+/).each do |line|
  11. case line
  12. when /variable level\[\d+\]/i
  13. @level_variable = $1.to_i
  14. end
  15. end
  16. end
  17. end
  18.  
  19. class Game_Actor < Game_Battler
  20. def max_level
  21. if actor.level_var > 0
  22. $game_variables[actor.level_var]
  23. else
  24. actor.max_level
  25. end
  26. end
  27. end
  28.  
  29.  
  30. ## Sector script "item actor[55]" uses actor 55 in the party.
  31. class RPG::EquipItem < RPG::BaseItem
  32. def item_actor
  33. make_actor_items unless @item_actor
  34. return @item_actor
  35. end
  36.  
  37. def make_actor_items
  38. @item_actor = 0
  39. note.split(/[\n\r]+/).each do |line|
  40. case line
  41. when /item actor\[(\d+)\]/i
  42. @item_actor = $1.to_i
  43. end
  44. end
  45. end
  46. end
  47.  
  48. class Game_Party < Game_Unit
  49. alias old_battle_members_method battle_members
  50. def battle_members
  51. group = []
  52. actor = $game_actors[1] ## Change the number on this line
  53. for equip in actor.equips
  54. group.push($game_actors[equip.item_actor]) if equip && equip.item_actor > 0
  55. end
  56. return group.empty? ? group : old_battle_members_method
  57. end
  58. end
RAW Paste Data