A Project for Chronicle 4 based on L2JServer.

    SearchingMaster AI


    Posts : 462
    Join date : 2013-10-04

    SearchingMaster AI

    Post  Karakan on 31st August 2017, 13:44

    Certain group monsters will attack the summoner instead of the summon. (ex. under giants cave)
    Here is a the script.
    Tested and working.  Cool


    2 * This program is free software: you can redistribute it and/or modify it under
    3 * the terms of the GNU General Public License as published by the Free Software
    4 * Foundation, either version 3 of the License, or (at your option) any later
    5 * version.
    6 *
    7 * This program is distributed in the hope that it will be useful, but WITHOUT
    8 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    9 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    10 * details.
    11 *
    12 * You should have received a copy of the GNU General Public License along with
    13 * this program. If not, see <http://www.gnu.org/licenses/>.
    // By Karakan for L2jLisvus
    package ai.group_template;

    import net.sf.l2j.gameserver.ai.CtrlIntention;
    import net.sf.l2j.gameserver.model.L2Attackable;
    import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
    import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    import net.sf.l2j.gameserver.model.quest.Quest;

    public class SearchingMaster extends Quest
            private static final int[] MOBS =
            public SearchingMaster(int questId, String name, String descr)
                    super(questId, name, descr);
            public String onAttack(L2NpcInstance npc, L2PcInstance player, int damage, boolean isPet)
                    if (player == null)
                            return null;
                    ((L2Attackable) npc).addDamageHate(player, 0, 100);
                    npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
                    return super.onAttack(npc, player, damage, isPet);
            public static void main(String[] args)
                    new SearchingMaster(-1, "SearchingMaster", "ai/group_template");


    Posts : 1048
    Join date : 2012-12-03

    Re: SearchingMaster AI

    Post  DnR on 4th September 2017, 11:04

    Added to project. Thanks for sharing. Wink

      Current date/time is 22nd March 2018, 12:01