Holy Pomander Quest - Skill Transfer

Results 1 to 8 of 8
  1. #1
    Novice l2jades is offline
    MemberRank
    Aug 2012 Join Date
    4Posts

    Holy Pomander Quest - Skill Transfer

    Hello

    I have a problem with my 3rd Holy Pomander Quest

    Holy Pomander are good provided in amount 1,1,4 .... but when you click on the "Learn a Transfer Skill" not Skill windows popup....

    Any fix or solution?


    gameserver, data, html, trainer, skill transfer

    <a action="bypass -h npc_%objectId%_SkillTransfer_Learn">Learn a Transfer Skill.</a><br>




    Thank you


  2. #2
    ~ksemer~ DaRkAnGeL is offline
    MemberRank
    Oct 2006 Join Date
    Java_HomeLocation
    5,115Posts

    Re: Holy Pomander Quest - Skill Transfer

    check the script. which version do you use?

  3. #3
    Novice l2jades is offline
    MemberRank
    Aug 2012 Join Date
    4Posts

    Re: Holy Pomander Quest - Skill Transfer

    Hi, this is the script i am using:

    * Foundation, either version 3 of the License, or (at your option) any later
    * version.
    *
    * This program is distributed in the hope that it will be useful, but WITHOUT
    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    * details.
    *
    * You should have received a copy of the GNU General Public License along with
    * this program. If not, see <http://www.gnu.org/licenses/>.
    */
    package other.Validators;

    import l2.brick.Config;
    import l2.brick.gameserver.datatables.SkillTreesData;
    import l2.brick.gameserver.model.L2Skill;
    import l2.brick.gameserver.model.L2SkillLearn;
    import l2.brick.gameserver.model.actor.instance.L2PcInstance;
    import l2.brick.gameserver.model.quest.Quest;
    import l2.brick.gameserver.model.quest.QuestState;
    import l2.brick.gameserver.util.Util;

    /**
    * @author Zoey76
    */
    public final class SkillTransferValidator extends Quest
    {
    public SkillTransferValidator(int id, String name, String descr)
    {
    super(id, name, descr);
    setOnEnterWorld(true);
    }

    private static final String qn = "SkillTransfer";

    private static final int[][] PORMANDERS =
    {
    { 15307, 1 }, // Cardinal (97)
    { 15308, 1 }, // Eva's Saint (105)
    { 15309, 4 } // Shillen Saint (112)
    };

    @Override
    public String onEnterWorld(L2PcInstance player)
    {
    givePormanders(player);
    return null;
    }

    private void givePormanders(L2PcInstance player)
    {
    final int index = getTransferClassIndex(player);

    if (index >= 0)
    {
    QuestState st = player.getQuestState(qn);
    if (st == null)
    st = newQuestState(player);

    final String name = qn + String.valueOf(player.getClassId().getId());
    if (st.getInt(name) == 0)
    {
    st.setInternal(name, "1");
    if (st.getGlobalQuestVar(name).isEmpty())
    {
    st.saveGlobalQuestVar(name, "1");
    player.addItem(qn, PORMANDERS[index][0], PORMANDERS[index][1], null, true);
    }
    }

    if (Config.SKILL_CHECK_ENABLE && (!player.isGM() || Config.SKILL_CHECK_GM))
    {
    int count = PORMANDERS[index][1] - (int)player.getInventory().getInventoryItemCount(PORMANDERS[index][0], -1, false);
    for (L2Skill sk : player.getAllSkills())
    {
    for (L2SkillLearn s : SkillTreesData.getInstance().getTransferSkillTree(player.getClassId()).values())
    {
    if (s.getSkillId() == sk.getId())
    {
    // Holy Weapon allowed for Shilien Saint/Inquisitor stance
    if (sk.getId() == 1043 && index == 2 && player.isInStance())
    continue;

    count--;
    if (count < 0)
    {
    Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has too many transfered skills or items, skill:" + s.getName() + " ("+sk.getId() + "/" + sk.getLevel() + "), class:" + player.getTemplate().className, 1);
    if (Config.SKILL_CHECK_REMOVE)
    player.removeSkill(sk);
    }
    }
    }
    }
    }
    }
    }

    private int getTransferClassIndex(L2PcInstance player)
    {
    switch (player.getClassId().getId())
    {
    case 97: // Cardinal
    return 0;
    case 105: // Eva's Saint
    return 1;
    case 112: // Shillien Saint
    return 2;
    default:
    return -1;
    }
    }

    public static void main(String[] args)
    {
    new SkillTransferValidator(-1, qn, "other");
    if (Config.ENABLE_LOADING_INFO_FOR_SCRIPTS)
    _log.info("Loaded Other: Skill Transfer Validator");
    }
    }

  4. #4
    ~ksemer~ DaRkAnGeL is offline
    MemberRank
    Oct 2006 Join Date
    Java_HomeLocation
    5,115Posts

    Re: Holy Pomander Quest - Skill Transfer

    are you trying with a gm character?

  5. #5
    Novice l2jades is offline
    MemberRank
    Aug 2012 Join Date
    4Posts

    Re: Holy Pomander Quest - Skill Transfer

    I have tried with both, gm character and normal character...

  6. #6
    ~ksemer~ DaRkAnGeL is offline
    MemberRank
    Oct 2006 Join Date
    Java_HomeLocation
    5,115Posts

    Re: Holy Pomander Quest - Skill Transfer

    do you get any message when you are trying to learn them?

    if (Config.SKILL_CHECK_ENABLE && (!player.isGM() || Config.SKILL_CHECK_GM)) what do you have in these configs ?

    The script seems fine to me. If you want you can copy the l2jserver's script code to yours

  7. #7
    Novice l2jades is offline
    MemberRank
    Aug 2012 Join Date
    4Posts

    Re: Holy Pomander Quest - Skill Transfer

    Hi DaRkAnGeL

    I got the message , but once i click on the "learn skill" nothing appear....

    Could you share other code that could work ? thank you

    Its due to General.properties ??
    SkillCheckEnable = False , that could work setting it at True

  8. #8
    ~ksemer~ DaRkAnGeL is offline
    MemberRank
    Oct 2006 Join Date
    Java_HomeLocation
    5,115Posts

    Re: Holy Pomander Quest - Skill Transfer

    set it to true and check the config Config.SKILL_CHECK_GM



Advertisement