Phoenix State

● ARCHIVED · READ-ONLY
Started by Nebu 4 posts View original ↗
  1. Hello all,

    I want to use Yanflys Phoenix Ring, but I dont want to use it as an equipment but as a state.

    Here is the code:

    <Custom Apply Effect>
    if (target.isActor()) {
    var ring = $dataArmors[1541];
    if (target.hasArmor(ring)) {
    target.discardEquip(ring);
    target.startAnimation(42);
    var hp = Math.floor(target.mhp * 0.25);
    target.gainHp(hp);
    target.startDamagePopup();
    }
    }
    </Custom Apply Effect>

    can anyone help me to rewrite it?
    I guess that everything in red need to be changed, but i am not really sure how...
  2. try replacing the .hasArmor and .discardEquip with

    .hasState(state ID)
    .removeState(state ID)
  3. Didn't knew that he has that tip and trick too :)

    Then i will do it that way, is the easiest :)

    Thank both of you