MV Confused about nested if conditions

Hello, I am finishing up a script I have been working on for the past few days, but I must be doing something incorrectly here, as the final changeEquip is being run multiple times, even when the conditions are not correct. From my understanding, since the changeEquip function is inside multiple if conditions, it should only run when all of the previous conditions it is found inside match.

So this code is supposed to say:
1> if current class or subclass = last class or subclass (previously defined)
2> and if this current class or subclass = 5
3> and if variable 103 = 141-150
4> and if variable 93 = 1
5> then change Equip based on previously defined variable.
6>then 2-5 again with different conditions.

Clearly I am doing something wrong here. I assume it is my formatting, or perhaps I am misunderstanding how nested if conditions work. The variables are correctly defined too, so it isn't anything like that.

JavaScript:
if (this._currentClass || this._currentSubClass == this._lastClass || this._lastSubClass)
{
    
            if (this._currentClass || this._currentSubClass == 5)
    {
        if ($gameVariables.value(103) == 141 || 142 || 143 || 144 || 145 || 146 || 147 || 148 || 149 || 150)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
    
    
        }
    
    }
    
                if (this._currentClass || this._currentSubClass == 13)
    {
        if ($gameVariables.value(103) == 151 || 152 || 153 || 154 || 155 || 156 || 157 || 158 || 159 || 160 || 161 || 162 || 163 || 164 || 165 || 166 || 167 || 168 || 169 || 170)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
    
    
        }
    
    }
};

Would the correct code be keeping everything inside a single if case, something like this instead?

JavaScript:
if (this._currentClass || this._currentSubClass == this._lastClass || this._lastSubClass && this._currentClass || this._currentSubClass == 5 && $gameVariables.value(103) == 141 || 142 || 143 || 144 || 145 || 146 || 147 || 148 || 149 || 150 && $gameVariables.value(93) == 1)
You have some errors.
if (this._currentClass) and (this._lastSubClass) is checking if those properties exists

You're going to have to type it out
if (this._currentClass == this._lastClass || this._currentSubClass == this._lastClass || this._currentClass==this._lastSubClass || this._currentSubClass == this._lastSubClass)

if ($gameVariables.value(103) == 141 || 142 || 143 || 144 || 145 || 146 || 147 || 148 || 149 || 150)
This could just be
if ($gameVariables.value(103)>=141 && $gameVariables.value(103)<=150)
this line wont work:
JavaScript:
if ($gameVariables.value(103) == 151 || 152 || 153 || 154 || 155 || 156 || 157 || 158 || 159 || 160 || 161 || 162 || 163 || 164 || 165 || 166 || 167 || 168 || 169 || 170)
as its always 151 as the rest has no value.

you can try it make it shorter for a test run:
JavaScript:
let gv = $gameVariables.value(103);
if (gv == 151 || gv ==152 ||gv == 153 || gv ==154 gv == 170)

but there are more mistakes as well to be corrected to make it work the way you want to like the current class and subclass.
Ok, I will try adjusting that. I appreciate the help as well as the additional tips. I am still a novice to all this but I am pretty motivated to learn and understand how this all works.

Outside of those errors, is the logic generally sound? As in the final change equip function should only run when all the conditions are valid, assuming I fix the mistakes with the value logic?

update, just tested the code and it looks like it works as it is supposed to! Thank you again! I have been working on this for half a week now and I feel like I just conquered a boss that has been beating my butt senseless.

The end code is something like 1000 lines(most of it duplicated), but either way this is the most I have done when it comes to writing my own script. I had a feeling I was misunderstanding how if conditions play with || and &&. Now that I have this saved and documented I can always return to it for future things I want to do.

You guys are AWESOME!
I slightly adjusted your code cleaner, but not sure about the current class how it is readed,
as there is no reason if "!== 1" for use as it wont be 1 any way.
JavaScript:
if (this._currentClass || this._currentSubClass == this._lastClass || this._lastSubClass) {
    if (this._currentClass || this._currentSubClass == 5) {
        let gv = $gameVariables.value(103);
        if (gv >= 141 && gv <= 150) {
            if ($gameVariables.value(93) == 1) {
                this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            } else {
                this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
        }
    }

    if (this._currentClass || this._currentSubClass == 13) {
        let gv = $gameVariables.value(103);
        if (gv >= 151 && gv <= 170) {
            if ($gameVariables.value(93) == 1) {
                this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            } else {
                this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
        }
    }
};
Well that is only a part of the whole code, v[93] is defined as 1 for a weapon and 2 for shield, as well as 4 for satchel (increases maximum item capacity in battle). My equipment system is a little unique so I had to make sure the script would apply the right atype or wtype when the changeequip function was called.

slot 1 = main hand weapon
slot 2 = off hand weapon/shield
slot 3 = sidearm = weapon/armor (satchel)
etc.

Seems to be working perfectly right now. I think the only other addition I want to make is to either open the equip scene after class/subclass change, or to do so when exiting a successful class change. Neither feels all that essential atm though, as the important part, which was carrying over previous equip after resetting the class eType list when valid after changing class/subclass has been successfully completed.

I do see how an else case would be more logical or clean of code than a !==1 after the ==1 condition though. Still learning 😅

1710197495447.png


The script is probably not the most efficient way to go about this, but it works and does not cause lag, so I am pretty ecstatic about it right now. I feel a lot more confident altering the rest of the engine as I see fit. Level up, so to speak. And it wouldn't have been possible without your, aquaecho, and robro333's help.

Spoiler: full script (+1000 lines) inserted into yanfly class change core
JavaScript:
Scene_Class.prototype.onItemOk = function() {

this._lastClass = this.actor().currentClass().id;
this._lastSubClass = this.actor().currentClass().id;








if (this.actor().equips()[0])
{
$gameVariables.setValue(81, this.actor().equips()[0].id);
$gameVariables.setValue(91, this.actor().equips()[0].etypeId);
$gameVariables.setValue(101, this.actor().equips()[0].wtypeId);
this.actor().changeEquip(0, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(81, 0);
$gameVariables.setValue(91, 0);
$gameVariables.setValue(101, 0);
}; 
if (this.actor().equips()[1] && this.actor().equips()[1].etypeId == 1)
{
$gameVariables.setValue(82, this.actor().equips()[1].id);
$gameVariables.setValue(92, this.actor().equips()[1].etypeId);
$gameVariables.setValue(102, this.actor().equips()[1].wtypeId);
this.actor().changeEquip(1, $dataWeapons[0]); 
}
else if (this.actor().equips()[1] && this.actor().equips()[1].etypeId == 2)
{
$gameVariables.setValue(82, this.actor().equips()[1].id);
$gameVariables.setValue(92, this.actor().equips()[1].etypeId);
$gameVariables.setValue(102, this.actor().equips()[1].atypeId);
this.actor().changeEquip(1, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(82, 0);
$gameVariables.setValue(92, 0);
$gameVariables.setValue(102, 0);
}; 
if (this.actor().equips()[2] && this.actor().equips()[2].etypeId == 1)
{
$gameVariables.setValue(83, this.actor().equips()[2].id);
$gameVariables.setValue(93, this.actor().equips()[2].etypeId);
$gameVariables.setValue(103, this.actor().equips()[2].wtypeId);
this.actor().changeEquip(2, $dataWeapons[0]);
}
else if (this.actor().equips()[2] && this.actor().equips()[2].etypeId !== 1 )
{
$gameVariables.setValue(83, this.actor().equips()[2].id);
$gameVariables.setValue(93, this.actor().equips()[2].etypeId);
$gameVariables.setValue(103, this.actor().equips()[2].atypeId);
this.actor().changeEquip(2, $dataWeapons[0]);
}
else
{
$gameVariables.setValue(83, 0);
$gameVariables.setValue(93, 0);
$gameVariables.setValue(103, 0);
};     

if (this.actor().equips()[3])
{
$gameVariables.setValue(84, this.actor().equips()[3].id);
$gameVariables.setValue(94, this.actor().equips()[3].etypeId);
$gameVariables.setValue(104, this.actor().equips()[3].atypeId);
this.actor().changeEquip(3, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(84, 0);
$gameVariables.setValue(94, 0);
$gameVariables.setValue(104, 0);
};     
if (this.actor().equips()[4])
{
$gameVariables.setValue(85, this.actor().equips()[4].id);
$gameVariables.setValue(95, this.actor().equips()[4].etypeId);
$gameVariables.setValue(105, this.actor().equips()[4].atypeId);
this.actor().changeEquip(4, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(85, 0);
$gameVariables.setValue(95, 0);
$gameVariables.setValue(105, 0);
};     
if (this.actor().equips()[5])
{
$gameVariables.setValue(86, this.actor().equips()[5].id);
$gameVariables.setValue(96, this.actor().equips()[5].etypeId);
$gameVariables.setValue(106, this.actor().equips()[5].atypeId);
this.actor().changeEquip(5, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(86, 0);
$gameVariables.setValue(96, 0);
$gameVariables.setValue(106, 0);
};     
if (this.actor().equips()[6])
{
$gameVariables.setValue(87, this.actor().equips()[6].id);
$gameVariables.setValue(97, this.actor().equips()[6].etypeId);
$gameVariables.setValue(107, this.actor().equips()[6].atypeId);
this.actor().changeEquip(6, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(87, 0);
$gameVariables.setValue(97, 0);
$gameVariables.setValue(107, 0);
};     
if (this.actor().equips()[7])
{
$gameVariables.setValue(88, this.actor().equips()[7].id);
$gameVariables.setValue(98, this.actor().equips()[7].etypeId);
$gameVariables.setValue(108, this.actor().equips()[7].atypeId);
this.actor().changeEquip(7, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(88, 0);
$gameVariables.setValue(98, 0);
$gameVariables.setValue(108, 0);
};     
if (this.actor().equips()[8])
{
$gameVariables.setValue(89, this.actor().equips()[8].id);
$gameVariables.setValue(99, this.actor().equips()[8].etypeId);
$gameVariables.setValue(109, this.actor().equips()[8].atypeId);
this.actor().changeEquip(8, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(89, 0);
$gameVariables.setValue(99, 0);
$gameVariables.setValue(109, 0);
}; 
if (this.actor().equips()[9])
{
$gameVariables.setValue(90, this.actor().equips()[9].id);
$gameVariables.setValue(100, this.actor().equips()[9].etypeId);
$gameVariables.setValue(110, this.actor().equips()[9].atypeId);
this.actor().changeEquip(9, $dataWeapons[0]); 
}
else
{
$gameVariables.setValue(90, 0);
$gameVariables.setValue(100, 0);
$gameVariables.setValue(110, 0);
}; 

 
    SoundManager.playEquip();
    var classId = this._itemWindow.item();
    var hpRate = this.actor().hp / this.actor().mhp;
    var mpRate = this.actor().mp / Math.max(1, this.actor().mmp);
    this.actor().changeClass(classId, Yanfly.Param.CCCMaintainLv);
    var max = this.actor().isDead() ? 0 : 1;
    var hpAmount = Math.max(max, parseInt(this.actor().mhp * hpRate));
    this.actor().setHp(hpAmount);
    this.actor().setMp(parseInt(this.actor().mmp * mpRate));
    this._itemWindow.activate();

this._currentClass = this.actor().currentClass().id;
this._currentSubClass = this.actor().currentClass().id;

if (
    this.actor().currentClass().id == 34)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(14);
}
else
{
this.actor().addEquipSlot(5);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(20);
}
else
{
this.actor().addEquipSlot(6);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(26);
}
else
{
this.actor().addEquipSlot(8);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(27);
}
else
{
this.actor().addEquipSlot(9);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(28);
}
else
{
this.actor().addEquipSlot(10);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(29);
}
else
{
this.actor().addEquipSlot(11);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(12);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(14);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(20);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(26);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(27);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(28);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(29);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(7);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}



else
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);


if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(5);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(6);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(8);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(9);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(10);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(11);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(12);
}
else
{
this.actor().addEquipSlot(4);
}





this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
};

if (this._currentClass == this._lastClass || this._currentSubClass == this._lastClass || this._currentClass==this._lastSubClass || this._currentSubClass == this._lastSubClass)
{
 
//            if (this._currentClass || this._currentSubClass == 5)
            if (this._currentClass == 5 || this._currentSubClass == 5)
    {
//        if ($gameVariables.value(103) == 141 || 142 || 143 || 144 || 145 || 146 || 147 || 148 || 149 || 150)
        if ($gameVariables.value(103)>=141 && $gameVariables.value(103)<=150)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    }
 
 
//            if (this._currentClass || this._currentSubClass == 13)
            if (this._currentClass == 13 || this._currentSubClass == 13)
    {
        //if ($gameVariables.value(103) == 151 || 152 || 153 || 154 || 155 || 156 || 157 || 158 || 159 || 160 || 161 || 162 || 163 || 164 || 165 || 166 || 167 || 168 || 169 || 170)
        if ($gameVariables.value(103)>=151 && $gameVariables.value(103)<=170) 
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    }
 
            //if (this._currentClass || this._currentSubClass == 14)
            if (this._currentClass == 14 || this._currentSubClass == 14)
    {
        //if ($gameVariables.value(103) == 131 || 132 || 133 || 134 || 135 || 136 || 137 || 138 || 139 || 140)
        if ($gameVariables.value(103)>=131 && $gameVariables.value(103)<=140) 
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    }
 
            //if (this._currentClass || this._currentSubClass == 19)
            if (this._currentClass == 19 || this._currentSubClass == 19)
    {
        //if ($gameVariables.value(103) == 271 || 272 || 273 || 274 || 275 || 276 || 277 || 278 || 279 || 280 || 251 || 252 || 253 || 254 || 255 || 256 || 257 || 258 || 259 || 260)
        if ($gameVariables.value(103)>=271 && $gameVariables.value(103)<=280 || $gameVariables.value(103)>=251 && $gameVariables.value(103)<=260)    //double check me (koda)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    }
 
 
            //if (this._currentClass || this._currentSubClass == 20)
            if (this._currentClass == 20 || this._currentSubClass == 20)
    {
        //if ($gameVariables.value(103) == 181 || 182 || 183 || 184 || 185 || 186 || 187 || 188 || 189 || 190)
        if ($gameVariables.value(103)>=181 && $gameVariables.value(103)<=190) 
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    }
 
            //if (this._currentClass || this._currentSubClass == 24)
            if (this._currentClass == 24 || this._currentSubClass == 24)
    {
        //if ($gameVariables.value(103) == 221 || 222 || 223 || 224 || 225 || 226 || 227 || 228 || 229 || 230 || 261 || 262 || 263 || 264 || 265 || 266 || 267 || 268 || 269 || 270)
        if ($gameVariables.value(103)>=221 && $gameVariables.value(103)<=230 || $gameVariables.value(103)>=261 && $gameVariables.value(103)<=270)    //double check me (koda)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    } 
 
            //if (this._currentClass || this._currentSubClass == 26)
            if (this._currentClass == 26 || this._currentSubClass == 26)
    {
        //if ($gameVariables.value(103) == 31 || 32 || 33 || 34 || 35 || 36 || 37 || 38 || 39 || 40 || 171 || 172 || 173 || 174 || 175 || 176 || 177 || 178 || 179 || 180)
        if ($gameVariables.value(103)>=31 && $gameVariables.value(103)<=40 || $gameVariables.value(103)>=171 && $gameVariables.value(103)<=180)    //double check me (koda)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    }             
 

            //if (this._currentClass || this._currentSubClass == 34)
            if (this._currentClass == 34 || this._currentSubClass == 34) 
    {
        //if ($gameVariables.value(103) == 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10)
        if ($gameVariables.value(103)>=1 && $gameVariables.value(103)<=10) 
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
 
 
        }
 
    } 
 
 
 
 
         
 
 
 
 
};

if ($gameVariables.value(81) !== 0)
{
this.actor().changeEquip(0, $dataWeapons[$gameVariables.value(81)]);
};
if ($gameVariables.value(82) !== 0 && $gameVariables.value(92) == 1)
{
this.actor().changeEquip(1, $dataWeapons[$gameVariables.value(82)]);
} 
else if ($gameVariables.value(82) !== 0 && $gameVariables.value(92) == 2)
{
this.actor().changeEquip(1, $dataArmors[$gameVariables.value(82)]);
};
if ($gameVariables.value(84) !== 0)
{
this.actor().changeEquip(3, $dataArmors[$gameVariables.value(84)]);
};
if ($gameVariables.value(85) !== 0)
{
this.actor().changeEquip(4, $dataArmors[$gameVariables.value(85)]);
};
if ($gameVariables.value(86) !== 0)
{
this.actor().changeEquip(5, $dataArmors[$gameVariables.value(86)]);
};
if ($gameVariables.value(87) !== 0)
{
this.actor().changeEquip(6, $dataArmors[$gameVariables.value(87)]);
};
if ($gameVariables.value(88) !== 0)
{
this.actor().changeEquip(7, $dataArmors[$gameVariables.value(88)]);
};
if ($gameVariables.value(89) !== 0)
{
this.actor().changeEquip(8, $dataArmors[$gameVariables.value(89)]);
};





if (this.actor().equips()[0] == null)
{
this.actor().changeEquip(0, this.actor().bestEquipItem(0));
};
if (this.actor().equips()[1] == null)
{
this.actor().changeEquip(1, this.actor().bestEquipItem(1));
};
if (this.actor().equips()[2] == null)
{
this.actor().changeEquip(2, this.actor().bestEquipItem(2));
};
if (this.actor().equips()[3] == null)
{
this.actor().changeEquip(3, this.actor().bestEquipItem(3));
};
if (this.actor().equips()[4] == null)
{
this.actor().changeEquip(4, this.actor().bestEquipItem(4));
};
if (this.actor().equips()[5] == null)
{
this.actor().changeEquip(5, this.actor().bestEquipItem(5));
};
if (this.actor().equips()[6] == null)
{
this.actor().changeEquip(6, this.actor().bestEquipItem(6));
};
if (this.actor().equips()[7] == null)
{
this.actor().changeEquip(7, this.actor().bestEquipItem(7));
};
if (this.actor().equips()[8] == null)
{
this.actor().changeEquip(8, this.actor().bestEquipItem(8));
};

if (this.actor().isEquipTypeSealed(2))
{
this.actor().changeEquip(1, 0);
}; 


    this.refreshWindows();
};

Same script but slightly modified placed in the same spot in yanfly subclass core. Maybe I will learn enough to change the static values into numbers entered through the plugin manager, and clean it up in the future to make it into a script that could be utilized for all. Still a long ways to go until I get to that point however.
I slightly adjusted your code cleaner, but not sure about the current class how it is readed,
as there is no reason if "!== 1" for use as it wont be 1 any way.
JavaScript:
if (this._currentClass || this._currentSubClass == this._lastClass || this._lastSubClass) {
    if (this._currentClass || this._currentSubClass == 5) {
        let gv = $gameVariables.value(103);
        if (gv >= 141 && gv <= 150) {
            if ($gameVariables.value(93) == 1) {
                this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            } else {
                this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
        }
    }

    if (this._currentClass || this._currentSubClass == 13) {
        let gv = $gameVariables.value(103);
        if (gv >= 151 && gv <= 170) {
            if ($gameVariables.value(93) == 1) {
                this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            } else {
                this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
        }
    }
};
That code still has some of the issues @AquaEcho pointed out, e.g. each comparison must be made explicitly, we can't do "if a || b equals c", we have to do "if a equals c || b equals c" (though there are some ways to reduce the repetition there with collection variables, but for more beginner-friendly code, we'll avoid them for now).

JavaScript:
if (this._currentClass === this._lastClass || this._currentSubClass === this._lastClass || this._currentClass === this._lastSubClass || this._currentSubClass === this._lastSubClass) {
    const value103 = $gameVariables.value(103);
    if (this._currentClass === 5 || this._currentSubClass === 5) {
        if (value103 >= 141 && value103 <= 150) {
            if ($gameVariables.value(93) === 1) {
                this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            } else {
                this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
        }
    } else if (this._currentClass === 13 || this._currentSubClass === 13) {
        if (value103 >= 151 && value103 <= 170) {
            if ($gameVariables.value(93) === 1) {
                this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            } else {
                this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
        }
    }
}

There's quite a bit of repetition that could be reduced, though, if you're up for using some more advanced constructs (possible refactor needed if using an older version of MV that doesn't support ES6):
JavaScript:
const currentClassIds = [this._currentClass, this._currentSubClass];
const previousClassIds = [this._lastClass, this._lastSubClass];
if (currentClassIds.every(currentClassId => !previousClassIds.includes(currentClassId))) { return; }

const changeEquipment = () => {
    this.actor().changeEquip(2, ($gameVariables.value(93) === 1 ? $dataWeapons : $dataArmors)[$gameVariables.value(83)]);
}

const value103 = $gameVariables.value(103);
if ([
    [5, [141, 150]],
    [13, [151, 170]]
].some(([classId, [lowerBound, upperBound]]) => {
    return currentClassIds.includes(classId) &&
        value103 >= lowerBound && value103 <= upperBound;
})) {
    changeEquipment();
}

Effectively:
  • If currentClass or currentSubClass is not the previous class or subClass, there's nothing to do, so bail
  • If class or subClass is 5 and variable 103 is between 141 and 150 OR
  • If class or subClass is 13 and variable 103 is between 151 and 170
    • If variable 93 is 1, change actor's equip slot 2 to be the weapon associated with variable 83
    • Otherwise, change actor's equip slot 2 to be the armor associated with variable 83
That is way above my head at this point, but it is becoming more and more obvious that if I wish to customize the engine to my liking, learning those advanced functions is something that will be an eventual requirement. For now I am just happy I can do it longhand style.
this line wont work:
JavaScript:
if ($gameVariables.value(103) == 151 || 152 || 153 || 154 || 155 || 156 || 157 || 158 || 159 || 160 || 161 || 162 || 163 || 164 || 165 || 166 || 167 || 168 || 169 || 170)
as its always 151 as the rest has no value.
That's not quite right. Boolean operators compare expressions - whatever is on either side of it is evaluated as an expression.

Thus, the above will always be true. Even if the first expression $gameVariables.value(103) == 151 is false, the next expression is 152 which will always be true because 152 is a value, therefore not false.

I slightly adjusted your code cleaner
JavaScript:
if (this._currentClass || this._currentSubClass == this._lastClass || this._lastSubClass)
This also won't work, because it will always be true. An actor can't not have a class, therefore the first expression this._currentClass will always be true.

Incidentally, @Gilgameshed, good coding practices say you should always use getter functions when they're provided, so it's more correct to say this.currentClass()
this._currentClass probably wasn't needed but I wasn't completely sure if I would need to call this outside of the current onItemOk function so I felt it good practice to do it this way just in case.

Not sure what you mean about this._currentClass always returning true, I use both subclasses + classes and the script seems to be working perfectly. Those changes were the final touch that got everything working smooth as butter.

LastClass is defined before the class swap, currentClass afterwards. If an actor does not have a subclass equipped and changes from class 1 to class 2, it should return false, no? As mentioned everything is working perfectly now, but I am curious about what you mean by that.
Not sure what you mean about this._currentClass always returning true
Where are you putting this code? What data type is this?
Here is the full script. It is inside Yanfly_ClassChangeCore and Yanfly_SubClassChange plugins nested within the OnItemOk function. The subclass version is slightly modified but essentially the same script.

Please be gentle, this is my first major edit. It is quite large, so don't say I didn't warn you. But yes it appears to be working 100% correctly. Before this final bit I was experiencing items being deleted due to being autoequipped on actors who did not have the right eType slot. The weapon in slot 2 would just disappear everytime I swapped classes. But this is fixed and I can't think of much more to add to this really. Even FFT and Tactics Ogre auto-equipped your characters when swapping classes. My script passes the previous classes gear and requips it, only using the optimize function when a saved item cannot be equipped due to slot differences between classes.

Spoiler: this is your last chance to turn back
JavaScript:
Scene_Class.prototype.onItemOk = function() {
///////////////////////////////////////////////////
//// on class change confirm - koda
///////////////////////////////////////////////////   

this._lastClass = this.actor().currentClass().id;
this._lastSubClass = this.actor().currentClass().id;








if (this.actor().equips()[0])
{
$gameVariables.setValue(81, this.actor().equips()[0].id);
$gameVariables.setValue(91, this.actor().equips()[0].etypeId);
$gameVariables.setValue(101, this.actor().equips()[0].wtypeId);
this.actor().changeEquip(0, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(81, 0);
$gameVariables.setValue(91, 0);
$gameVariables.setValue(101, 0);
};   
if (this.actor().equips()[1] && this.actor().equips()[1].etypeId == 1)
{
$gameVariables.setValue(82, this.actor().equips()[1].id);
$gameVariables.setValue(92, this.actor().equips()[1].etypeId);
$gameVariables.setValue(102, this.actor().equips()[1].wtypeId);
this.actor().changeEquip(1, $dataWeapons[0]);   
}
else if (this.actor().equips()[1] && this.actor().equips()[1].etypeId == 2)
{
$gameVariables.setValue(82, this.actor().equips()[1].id);
$gameVariables.setValue(92, this.actor().equips()[1].etypeId);
$gameVariables.setValue(102, this.actor().equips()[1].atypeId);
this.actor().changeEquip(1, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(82, 0);
$gameVariables.setValue(92, 0);
$gameVariables.setValue(102, 0);
};   
if (this.actor().equips()[2] && this.actor().equips()[2].etypeId == 1)
{
$gameVariables.setValue(83, this.actor().equips()[2].id);
$gameVariables.setValue(93, this.actor().equips()[2].etypeId);
$gameVariables.setValue(103, this.actor().equips()[2].wtypeId);
this.actor().changeEquip(2, $dataWeapons[0]);
}
else if (this.actor().equips()[2] && this.actor().equips()[2].etypeId !== 1 )
{
$gameVariables.setValue(83, this.actor().equips()[2].id);
$gameVariables.setValue(93, this.actor().equips()[2].etypeId);
$gameVariables.setValue(103, this.actor().equips()[2].atypeId);
this.actor().changeEquip(2, $dataWeapons[0]);
}
else
{
$gameVariables.setValue(83, 0);
$gameVariables.setValue(93, 0);
$gameVariables.setValue(103, 0);

if (this.actor().equips()[3])
{
$gameVariables.setValue(84, this.actor().equips()[3].id);
$gameVariables.setValue(94, this.actor().equips()[3].etypeId);
$gameVariables.setValue(104, this.actor().equips()[3].atypeId);
this.actor().changeEquip(3, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(84, 0);
$gameVariables.setValue(94, 0);
$gameVariables.setValue(104, 0);
};       
if (this.actor().equips()[4])
{
$gameVariables.setValue(85, this.actor().equips()[4].id);
$gameVariables.setValue(95, this.actor().equips()[4].etypeId);
$gameVariables.setValue(105, this.actor().equips()[4].atypeId);
this.actor().changeEquip(4, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(85, 0);
$gameVariables.setValue(95, 0);
$gameVariables.setValue(105, 0);
};       
if (this.actor().equips()[5])
{
$gameVariables.setValue(86, this.actor().equips()[5].id);
$gameVariables.setValue(96, this.actor().equips()[5].etypeId);
$gameVariables.setValue(106, this.actor().equips()[5].atypeId);
this.actor().changeEquip(5, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(86, 0);
$gameVariables.setValue(96, 0);
$gameVariables.setValue(106, 0);
};       
if (this.actor().equips()[6])
{
$gameVariables.setValue(87, this.actor().equips()[6].id);
$gameVariables.setValue(97, this.actor().equips()[6].etypeId);
$gameVariables.setValue(107, this.actor().equips()[6].atypeId);
this.actor().changeEquip(6, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(87, 0);
$gameVariables.setValue(97, 0);
$gameVariables.setValue(107, 0);
};       
if (this.actor().equips()[7])
{
$gameVariables.setValue(88, this.actor().equips()[7].id);
$gameVariables.setValue(98, this.actor().equips()[7].etypeId);
$gameVariables.setValue(108, this.actor().equips()[7].atypeId);
this.actor().changeEquip(7, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(88, 0);
$gameVariables.setValue(98, 0);
$gameVariables.setValue(108, 0);
};       
if (this.actor().equips()[8])
{
$gameVariables.setValue(89, this.actor().equips()[8].id);
$gameVariables.setValue(99, this.actor().equips()[8].etypeId);
$gameVariables.setValue(109, this.actor().equips()[8].atypeId);
this.actor().changeEquip(8, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(89, 0);
$gameVariables.setValue(99, 0);
$gameVariables.setValue(109, 0);
};   
if (this.actor().equips()[9])
{
$gameVariables.setValue(90, this.actor().equips()[9].id);
$gameVariables.setValue(100, this.actor().equips()[9].etypeId);
$gameVariables.setValue(110, this.actor().equips()[9].atypeId);
this.actor().changeEquip(9, $dataWeapons[0]);   
}
else
{
$gameVariables.setValue(90, 0);
$gameVariables.setValue(100, 0);
$gameVariables.setValue(110, 0);
};   


/////////////////////////////////////////
//// end set var to old equip + remove equip
/////////////////////////////////////////   




   
    SoundManager.playEquip();
    var classId = this._itemWindow.item();
    var hpRate = this.actor().hp / this.actor().mhp;
    var mpRate = this.actor().mp / Math.max(1, this.actor().mmp);
    this.actor().changeClass(classId, Yanfly.Param.CCCMaintainLv);
    var max = this.actor().isDead() ? 0 : 1;
    var hpAmount = Math.max(max, parseInt(this.actor().mhp * hpRate));
    this.actor().setHp(hpAmount);
    this.actor().setMp(parseInt(this.actor().mmp * mpRate));
    this._itemWindow.activate();
   
   



this._currentClass = this.actor().currentClass().id;
this._currentSubClass = this.actor().currentClass().id;







/////////////////////////////////////////   
//// start remove old eTypes, add new eTypes - koda
/////////////////////////////////////////   
   

   
if (
    this.actor().currentClass().id == 34)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);

if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(14);
}
else
{
this.actor().addEquipSlot(5);
}
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(20);
}
else
{
this.actor().addEquipSlot(6);
}
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(26);
}
else
{
this.actor().addEquipSlot(8);
}
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(27);
}
else
{
this.actor().addEquipSlot(9);
}
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(28);
}
else
{
this.actor().addEquipSlot(10);
}
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(29);
}
else
{
this.actor().addEquipSlot(11);
}
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(12);
}
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(14);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(20);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(26);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(27);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(28);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(29);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(7);
}
}



else
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);

if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(5);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(6);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(8);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(9);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(10);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(11);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(12);
}
else
{
this.actor().addEquipSlot(4);
}
};
   

/////////////////////////////////////////   
//// start remove old eTypes, add new eTypes - koda
/////////////////////////////////////////   

if (
    this.actor().currentClass().id == 34)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(14);
}
else
{
this.actor().addEquipSlot(5);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(20);
}
else
{
this.actor().addEquipSlot(6);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(26);
}
else
{
this.actor().addEquipSlot(8);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(27);
}
else
{
this.actor().addEquipSlot(9);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(28);
}
else
{
this.actor().addEquipSlot(10);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(29);
}
else
{
this.actor().addEquipSlot(11);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(12);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(14);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(20);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(26);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(27);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(28);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(29);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(7);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 5)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(14);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(20);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(26);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(27);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(28);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(29);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(7);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(30);
}
else
{
this.actor().addEquipSlot(12);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(40);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(29);
}
else
{
this.actor().addEquipSlot(11);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(38);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(39);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(28);
}
else
{
this.actor().addEquipSlot(10);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(36);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(35);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(37);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(27);
}
else
{
this.actor().addEquipSlot(9);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(31);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(33);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(32);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(34);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(26);
}
else
{
this.actor().addEquipSlot(8);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 34)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(21);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(22);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(24);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(23);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(25);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(20);
}
else
{
this.actor().addEquipSlot(6);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);
if (
    this.actor().currentClass().id == 14)
{
this.actor().addEquipSlot(13);
}
else if (
    this.actor().currentClass().id == 13)
{
this.actor().addEquipSlot(15);
}
else if (
    this.actor().currentClass().id == 20)
{
this.actor().addEquipSlot(16);
}
else if (
    this.actor().currentClass().id == 26)
{
this.actor().addEquipSlot(18);
}
else if (
    this.actor().currentClass().id == 24)
{
this.actor().addEquipSlot(17);
}
else if (
    this.actor().currentClass().id == 19)
{
this.actor().addEquipSlot(19);
}
else if (
    this.actor().currentClass().id == 5)
{
this.actor().addEquipSlot(14);
}
else
{
this.actor().addEquipSlot(5);
}
this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
}













else
{
this.actor().removeEquipSlot(1);
this.actor().removeEquipSlot(2);
this.actor().removeEquipSlot(3);
this.actor().removeEquipSlot(4);
this.actor().removeEquipSlot(5);
this.actor().removeEquipSlot(6);
this.actor().removeEquipSlot(7);
this.actor().removeEquipSlot(8);
this.actor().removeEquipSlot(9);
this.actor().removeEquipSlot(10);
this.actor().removeEquipSlot(11);
this.actor().removeEquipSlot(12);
this.actor().removeEquipSlot(13);
this.actor().removeEquipSlot(14);
this.actor().removeEquipSlot(15);
this.actor().removeEquipSlot(16);
this.actor().removeEquipSlot(17);
this.actor().removeEquipSlot(18);
this.actor().removeEquipSlot(19);
this.actor().removeEquipSlot(20);
this.actor().removeEquipSlot(21);
this.actor().removeEquipSlot(22);
this.actor().removeEquipSlot(23);
this.actor().removeEquipSlot(24);
this.actor().removeEquipSlot(25);
this.actor().removeEquipSlot(26);
this.actor().removeEquipSlot(27);
this.actor().removeEquipSlot(28);
this.actor().removeEquipSlot(29);
this.actor().removeEquipSlot(30);
this.actor().removeEquipSlot(31);
this.actor().removeEquipSlot(32);
this.actor().removeEquipSlot(33);
this.actor().removeEquipSlot(34);
this.actor().removeEquipSlot(35);
this.actor().removeEquipSlot(36);
this.actor().removeEquipSlot(37);
this.actor().removeEquipSlot(38);
this.actor().removeEquipSlot(39);
this.actor().removeEquipSlot(40);
this.actor().removeEquipSlot(41);
this.actor().removeEquipSlot(42);
this.actor().removeEquipSlot(43);
this.actor().removeEquipSlot(44);
this.actor().removeEquipSlot(45);
this.actor().removeEquipSlot(46);
this.actor().removeEquipSlot(47);
this.actor().removeEquipSlot(48);
this.actor().removeEquipSlot(49);
this.actor().removeEquipSlot(50);
this.actor().addEquipSlot(1);
this.actor().addEquipSlot(3);


if (
    this.actor().subclass() !== null && this.actor().subclass().id == 34)
{
this.actor().addEquipSlot(5);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 14)
{
this.actor().addEquipSlot(6);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 13)
{
this.actor().addEquipSlot(8);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 20)
{
this.actor().addEquipSlot(9);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 24)
{
this.actor().addEquipSlot(10);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 26)
{
this.actor().addEquipSlot(11);
}
else if (
    this.actor().subclass() !== null && this.actor().subclass().id == 19)
{
this.actor().addEquipSlot(12);
}
else
{
this.actor().addEquipSlot(4);
}





this.actor().addEquipSlot(41);
this.actor().addEquipSlot(42);
this.actor().addEquipSlot(43);
this.actor().addEquipSlot(44);
this.actor().addEquipSlot(45);
this.actor().addEquipSlot(46);
};
   
//////////////////////////////////////////////////   
//// begin re-equip old gear & optimize unequipped slots    - koda 
//////////////////////////////////////////////////   

if (this._currentClass == this._lastClass || this._currentSubClass == this._lastClass || this._currentClass==this._lastSubClass || this._currentSubClass == this._lastSubClass)
{
   
//            if (this._currentClass || this._currentSubClass == 5)
            if (this._currentClass == 5 || this._currentSubClass == 5)
    {
//        if ($gameVariables.value(103) == 141 || 142 || 143 || 144 || 145 || 146 || 147 || 148 || 149 || 150)
        if ($gameVariables.value(103)>=141 && $gameVariables.value(103)<=150)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }
   
   
//            if (this._currentClass || this._currentSubClass == 13)
            if (this._currentClass == 13 || this._currentSubClass == 13)
    {
        //if ($gameVariables.value(103) == 151 || 152 || 153 || 154 || 155 || 156 || 157 || 158 || 159 || 160 || 161 || 162 || 163 || 164 || 165 || 166 || 167 || 168 || 169 || 170)
        if ($gameVariables.value(103)>=151 && $gameVariables.value(103)<=170)   
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }
   
            //if (this._currentClass || this._currentSubClass == 14)
            if (this._currentClass == 14 || this._currentSubClass == 14)
    {
        //if ($gameVariables.value(103) == 131 || 132 || 133 || 134 || 135 || 136 || 137 || 138 || 139 || 140)
        if ($gameVariables.value(103)>=131 && $gameVariables.value(103)<=140)   
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }
   
            //if (this._currentClass || this._currentSubClass == 19)
            if (this._currentClass == 19 || this._currentSubClass == 19)
    {
        //if ($gameVariables.value(103) == 271 || 272 || 273 || 274 || 275 || 276 || 277 || 278 || 279 || 280 || 251 || 252 || 253 || 254 || 255 || 256 || 257 || 258 || 259 || 260)
        if ($gameVariables.value(103)>=271 && $gameVariables.value(103)<=280 || $gameVariables.value(103)>=251 && $gameVariables.value(103)<=260)    //double check me (koda)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }
   
   
            //if (this._currentClass || this._currentSubClass == 20)
            if (this._currentClass == 20 || this._currentSubClass == 20)
    {
        //if ($gameVariables.value(103) == 181 || 182 || 183 || 184 || 185 || 186 || 187 || 188 || 189 || 190)
        if ($gameVariables.value(103)>=181 && $gameVariables.value(103)<=190)   
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }
   
            //if (this._currentClass || this._currentSubClass == 24)
            if (this._currentClass == 24 || this._currentSubClass == 24)
    {
        //if ($gameVariables.value(103) == 221 || 222 || 223 || 224 || 225 || 226 || 227 || 228 || 229 || 230 || 261 || 262 || 263 || 264 || 265 || 266 || 267 || 268 || 269 || 270)
        if ($gameVariables.value(103)>=221 && $gameVariables.value(103)<=230 || $gameVariables.value(103)>=261 && $gameVariables.value(103)<=270)    //double check me (koda)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }   
   
            //if (this._currentClass || this._currentSubClass == 26)
            if (this._currentClass == 26 || this._currentSubClass == 26)
    {
        //if ($gameVariables.value(103) == 31 || 32 || 33 || 34 || 35 || 36 || 37 || 38 || 39 || 40 || 171 || 172 || 173 || 174 || 175 || 176 || 177 || 178 || 179 || 180)
        if ($gameVariables.value(103)>=31 && $gameVariables.value(103)<=40 || $gameVariables.value(103)>=171 && $gameVariables.value(103)<=180)    //double check me (koda)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }               
   

            //if (this._currentClass || this._currentSubClass == 34)
            if (this._currentClass == 34 || this._currentSubClass == 34)   
    {
        //if ($gameVariables.value(103) == 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10)
        if ($gameVariables.value(103)>=1 && $gameVariables.value(103)<=10)   
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
   
        }
   
    }   
   
   
};

    if ($gameVariables.value(103)>=91 && $gameVariables.value(103)<=100 || $gameVariables.value(103)>=121 && $gameVariables.value(103)<=130 || $gameVariables.value(103)>=191 && $gameVariables.value(103)<=220 || $gameVariables.value(103)>=281 && $gameVariables.value(103)<=310 || $gameVariables.value(103)>=321 && $gameVariables.value(103)<=330 || $gameVariables.value(103)==20)
        {
            if ($gameVariables.value(93) == 1)
            {
            this.actor().changeEquip(2, $dataWeapons[$gameVariables.value(83)]);
            }
            else if ($gameVariables.value(93) !== 1)
            {
            this.actor().changeEquip(2, $dataArmors[$gameVariables.value(83)]);
            }
   
        };







if ($gameVariables.value(81) !== 0)
{
this.actor().changeEquip(0, $dataWeapons[$gameVariables.value(81)]);
};
if ($gameVariables.value(82) !== 0 && $gameVariables.value(92) == 1)
{
this.actor().changeEquip(1, $dataWeapons[$gameVariables.value(82)]);
}   
else if ($gameVariables.value(82) !== 0 && $gameVariables.value(92) == 2)
{
this.actor().changeEquip(1, $dataArmors[$gameVariables.value(82)]);
};
if ($gameVariables.value(84) !== 0)
{
this.actor().changeEquip(3, $dataArmors[$gameVariables.value(84)]);
};
if ($gameVariables.value(85) !== 0)
{
this.actor().changeEquip(4, $dataArmors[$gameVariables.value(85)]);
};
if ($gameVariables.value(86) !== 0)
{
this.actor().changeEquip(5, $dataArmors[$gameVariables.value(86)]);
};
if ($gameVariables.value(87) !== 0)
{
this.actor().changeEquip(6, $dataArmors[$gameVariables.value(87)]);
};
if ($gameVariables.value(88) !== 0)
{
this.actor().changeEquip(7, $dataArmors[$gameVariables.value(88)]);
};
if ($gameVariables.value(89) !== 0)
{
this.actor().changeEquip(8, $dataArmors[$gameVariables.value(89)]);
};





if (this.actor().equips()[0] == null)
{
this.actor().changeEquip(0, this.actor().bestEquipItem(0));
};
if (this.actor().equips()[1] == null)
{
this.actor().changeEquip(1, this.actor().bestEquipItem(1));
};
if (this.actor().equips()[2] == null)
{
this.actor().changeEquip(2, this.actor().bestEquipItem(2));
};
if (this.actor().equips()[3] == null)
{
this.actor().changeEquip(3, this.actor().bestEquipItem(3));
};
if (this.actor().equips()[4] == null)
{
this.actor().changeEquip(4, this.actor().bestEquipItem(4));
};
if (this.actor().equips()[5] == null)
{
this.actor().changeEquip(5, this.actor().bestEquipItem(5));
};
if (this.actor().equips()[6] == null)
{
this.actor().changeEquip(6, this.actor().bestEquipItem(6));
};
if (this.actor().equips()[7] == null)
{
this.actor().changeEquip(7, this.actor().bestEquipItem(7));
};
if (this.actor().equips()[8] == null)
{
this.actor().changeEquip(8, this.actor().bestEquipItem(8));
};

if (this.actor().isEquipTypeSealed(2))
{
this.actor().changeEquip(1, 0);
};   


IAVRA.POPUP.popup("Unequipped Slots Optimized", {xPosition:600, yPosition:20, width:400, lineHeight:30});   
   
   
   
    this.refreshWindows();
I didn't need the whole thing, just what I asked. The answer is "this is a Scene_Class." 😉

But, since you posted it - the very first time your function references it is this._currentClass = this.actor().currentClass().id;

Since it's impossible for an actor to not have a class, it is therefore impossible for this._currentClass to not have a value.

Therefore, as I said above,
the first expression this._currentClass will always be true.

Aside from that, I strongly urge you that if you want to make stuff like this, you should take some time to do proper JavaScript tutorials/classes/stuff.

What you posted up there is really inefficient. I mean that not just in terms of number of processor flops, but in readability and stylistic formatting and such. Your goal could be achieved with a fraction of that amount of code that's much easier to read and understand.
That is what I figure, but one step at a time and all that. I am fortunate because most of the heavy lifting has already been done already. Either through the awesome plugins available for MV, or through my own grit and determination. But I do see your point and agree completely. There are a few plugins I want to modify and the way they are written is just outside my scope of understanding at this point. I feel pretty accomplished getting this done, so I will likely work on less mentally exhaustive stuff for the time being. But I do feel that when I return to this type of work, I will have a much easier time understanding what exactly I am looking at. One level at a time will eventually get you to 99 after all. Assuming I am not capped at 50 😅
also, if you use this one:
JavaScript:
this.actor().removeEquipSlot(1);
//....
this.actor().removeEquipSlot(50);

// you could do

for(let i = 1; i <= 50; i++) {
    this.actor().removeEquipSlot(i);
}

this makes the code far lower in the code if it removes them anyway.



There's quite a bit of repetition that could be reduced, though, if you're up for using some more advanced constructs (possible refactor needed if using an older version of MV that doesn't support ES6):
ES does know ES6 above 1.6.x, but your code on that advance part is also a bit above my way how to read them.
especially if you need to modify it, but it's also a lot cleaner as well.

Have to learn a lot more, but I like the easy way for now, but I try to improve for that way to get better.


if (currentClassIds.every(currentClassId => !previousClassIds.includes(classId))) { return; }
is classId not to be "currentClassId" here? as it wouldn't be readed?
Hey thanks, yea that looks more like the sort of substitution I could use and is logically easy to understand if I need to go back to it to edit later on. Will update my .js file so it cuts down on some space.
is classId not to be "currentClassId" here? as it wouldn't be readed?
Yeah, good catch. I had originally named that parameter classId and didn't change it when I renamed some other variables.

Original thread: https://forums.rpgmakerweb.com/threads/confused-about-nested-if-conditions.166704/