Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   Lineage II (https://forum.zone-game.info/forumdisplay.php?f=34)
-   -   Level up of clan (https://forum.zone-game.info/showthread.php?t=11045)

mego4el 13.11.2010 00:30

Level up of clan
 
доброй ночи, пожалуйста подскажите как сделать нпц функцию поднятия уровня клана, подозреваю что здесь должен быть задействован питон. на подобие как у котов на ОФФ серверах (Mr.Cat, Miss Queen).

что бы как только жмешь на "Level up of clan", то сразу подымался уровень клана.

искал искал и не нашел..(

[STIGMATED] 13.11.2010 00:31

Re: Level up of clan
 
По принципу работы обычного НПЦ, который добавляет уровень клана.
Ковыряйся, ищи...

Munhgauzen 13.11.2010 00:34

Re: Level up of clan
 
Цитата:

Сообщение от mego4el (Сообщение 96175)
доброй ночи, пожалуйста подскажите как сделать нпц функцию поднятия уровня клана, подозреваю что здесь должен быть задействован питон. на подобие как у котов на ОФФ серверах (Mr.Cat, Miss Queen).

что бы как только жмешь на "Level up of clan", то сразу подымался уровень клана.

искал искал и не нашел..(

какая сборка?

mego4el 13.11.2010 01:07

Re: Level up of clan
 
Цитата:

какая сборка?
l2jbrasil 1485

incognito 13.11.2010 11:48

Re: Level up of clan
 
я вижу 2 варианта:
1) побаловаться админ привилегиями...
2) пишем скрипт на увеличение кланлвл...(могу пошаманить и для скории/сеста и выложить скрипт благо время щас есть и он не сложный вообщем то)
вопрос только в том вам нужно? чтобы нахаляву все увеличивалось?
просто есть например L2Clan метод, который меняет уровень клана public void changeLevel(int level)
Код:

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * 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 custom.ClanLvlUpLvlUp;

import org.efi.gameserver.model.actor.instance.L2NpcInstance;
import org.efi.gameserver.model.actor.instance.L2PcInstance;
import org.efi.gameserver.model.L2Clan;
import org.efi.gameserver.model.quest.Quest;
import org.efi.gameserver.model.quest.QuestState;
import org.efi.gameserver.model.quest.State;

public class ClanLvlUpLvlUp extends Quest
{
        private final static int[] NPC =
        {
                //NPC List
        };

        public ClanLvlUpLvlUp(int questId, String name, String descr)
        {
                super(questId, name, descr);
        State CREATED = new State("Start", this);
                this.setInitialState(CREATED);
               
                for(int NPC_ID : NPC)
                {
                        addStartNpc(NPC_ID);
                        addTalkId(NPC_ID);
                }
        }

        public String onTalk(L2NpcInstance npc, L2PcInstance talker)
        {
                String htmltext = "";
                QuestState st = talker.getQuestState(getName());
                int npcId = npc.getNpcId();
                for(int NPC_ID : NPC)
                {
                        if(npcId == NPC_ID)
                        {
                                if(talker.getClan() == null || !talker.isClanLeader())
                                {
                                        talker.sendMessage("You are not a clan leader.");
                                }
                                else
                                {
                                        L2Clan.changeLevel(talker.getClan().getLevel() + 1);
                                }
                        }
                }
                return htmltext;
        }

        public static void main(String[] args)
        {
                new ClanLvlUp(9999, "ClanLvlUpLvlUp", "Custom");           
        }
}

вот что на скорую руку вышло кривовато канечно но должно работать htm уж ссами прикрутите


Текущее время: 06:50. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot