Тема: Level up of clan
Показать сообщение отдельно
Непрочитано 13.11.2010, 11:48   #5
Герой

По умолчанию 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 уж ссами прикрутите

Последний раз редактировалось incognito; 13.11.2010 в 12:20.
incognito вне форума Ответить с цитированием