View difference between Paste ID: PDU8fW4X and H5k04FLF
SHOW: | | - or go back to the newest paste.
1
class Scene_Equip
2
  def bond_armor(item)
3
    # Duplicate Object
4
    new_item = item.dup
5
    # Set the id to the last armor index + 1
6
    new_item.id = $data_armors.size
7
    # Bond the item
8
    new_item.bonded_actor_id = @actor.id
9
    # Change the name if you want
10
    if item.name
11
    new_item.name = @actor.name + "'s " + item.name
12
    $data_armors[new_item.id] = new_item
13
    return new_item
14
  end
15
  
16
  def bond_weapon(item)
17
    new_item = item.dup
18
    new_item.id = $data_weapons.size
19
    new_item.bonded_actor_id = @actor.id
20
    new_item.name = @actor.name + "'s " + item.name
21
    $data_weapons[new_item.id] = new_item
22
    return new_item
23
  end
24-
end
24+
end
25
26
# create a new piece for this script
27
28
module RPG
29
  class Weapon
30
    attr_accessor :bonded_actor_id
31
  end
32
  class Armor
33
    attr_accessor :bonded_actor_id
34
  end
35
end
36
37
38
#add these to the scene_title script
39
$data_armors[1000] = nil
40
$data_weapons[1000] = nil