Hellow im triying to equip weapons and armors from the Item menu, the problems is: How can i know the type id from the item when you use it, to know in wich armor slot you will equip the item ?, for weapons is (0), well i got the code for do it from a plugin but in that plugin dont let you equip the Armors, only the weapons:
(plugin OCS Menu - Link)
the code what im using for equip weapons, and try for armors:
The "this.Actor().changeEquip(1...3, this._itemWindow.item());" is where i dont know how to set the armor id for the item you are selecting to use/equip.
Edit: In Scene Equip it uses this:
If is hard to make i will use the Scene_Equip like normal works xD
(plugin OCS Menu - Link)
the code what im using for equip weapons, and try for armors:
The "this.Actor().changeEquip(1...3, this._itemWindow.item());" is where i dont know how to set the armor id for the item you are selecting to use/equip.
Code:
Scene_Menu.prototype.onItemOk = function() {
if(DataManager.isWeapon(this._itemWindow.item())){
this.Actor().changeEquip(0, this._itemWindow.item());
SoundManager.playEquip();
}else
if(DataManager.isArmor(this._itemWindow.item())){
this.Actor().changeEquip(1...3, this._itemWindow.item());
SoundManager.playEquip();
}else{
if(this.isItemEffectsValid()){
this.Actor().useItem(this._itemWindow.item());
this.applyItem();
if ($gameTemp.isCommonEventReserved()) {
SceneManager.goto(Scene_Map);
}
SoundManager.playUseItem();
}else{
SoundManager.playBuzzer();
}
}
this._itemWindow.refresh();
// this._statusWindow.refresh();
this._itemWindow.activate();
};
Edit: In Scene Equip it uses this:
Code:
this.actor().changeEquip(this._slotWindow.index(), this._itemWindow.item());
If is hard to make i will use the Scene_Equip like normal works xD