[XP] Cannot Unequip Weapon

Started by lonely_cubone, March 29, 2011, 11:47:22 pm

Previous topic - Next topic

lonely_cubone

I was wondering if someone could please make a really quick script so that none of the actors can unequip their weapons. They can still switch between different weapons, but they always have some weapon equipped.

Thanks!

ForeverZer0

I think that this will work. I didn't actually try it, so let me know.

Spoiler: ShowHide

class Game_Actor
 
  alias no_unequip equip
  def equip(equip_type, id)
    if (equip_type == 0) && [nil, 0].include?(id)
      return
    end
    no_unequip(equip_type, id)
  end
end
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.