View difference between Paste ID: WtmrWE5i and PDU8fW4X
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
10+
11
    $data_armors[new_item.id] = new_item
12
    return new_item
13
  end
14
  
15
  def bond_weapon(item)
16
    new_item = item.dup
17
    new_item.id = $data_weapons.size
18
    new_item.bonded_actor_id = @actor.id
19
    new_item.name = @actor.name + "'s " + item.name
20
    $data_weapons[new_item.id] = new_item
21
    return new_item
22
  end
23
end
24
25
# create a new piece for this script
26
27
module RPG
28
  class Weapon
29
    attr_accessor :bonded_actor_id
30
  end
31
  class Armor
32
    attr_accessor :bonded_actor_id
33
  end
34
end
35
36
37
#add these to the scene_title script
38
$data_armors[1000] = nil
39
$data_weapons[1000] = nil