Jump to content
  • 0

Trying to learn clan skills


Question

13 answers to this question

Recommended Posts

  • 0
Posted (edited)
2 minutes ago, 0flee said:

@melronofc. Just tell me what class and i will upload to pastebin

The files that are responsible for your trainer manager probably

Edited by melron
  • 0
Posted

This it's edited: 
 

public L2SkillLearn getClassSkill(int id, int lvl, ClassId classId, L2PcInstance player)
	{
		L2SkillLearn skillLearn = null;
		if (player.isPremium())
		{
			for (ClassId classx : ClassId.values())
			{
				L2SkillLearn s = getCompleteClassSkillTree(classx).get(SkillData.getSkillHashCode(id, lvl));
				if (s != null)
				{
					skillLearn = s;
					break;
				}
			}
		}
		else
		{
			skillLearn = getCompleteClassSkillTree(classId).get(SkillData.getSkillHashCode(id, lvl));
		}
		return skillLearn;


And this retail

 

public L2SkillLearn getClassSkill(int id, int lvl, ClassId classId)
     {
   return getCompleteClassSkillTree(classId).get(SkillData.getSkillHashCode(id, lvl));
    }


But nothing here to say something about pledgeSkillTree.

It's L2ServiceManagerInstance.java
The method to display skilllist it's this
 

else if (actualCommand.equalsIgnoreCase("learnclanskills"))
		{
			if (!checkLeaderConditions(player))
			{
				return;
			}
			L2VillageMasterInstance.showPledgeSkillList(player);
		}

 

  • 0
Posted
public static final void showPledgeSkillList(L2PcInstance player)
	{
		if (!player.isClanLeader())
		{
			final NpcHtmlMessage html = new NpcHtmlMessage();
			html.setFile(player, player.getHtmlPrefix(), "data/html/villagemaster/NotClanLeader.htm");
			player.sendPacket(html);
			player.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		
		final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailablePledgeSkills(player.getClan());
		final AcquireSkillList asl = new AcquireSkillList(AcquireSkillType.PLEDGE);
		int counts = 0;
		
		for (L2SkillLearn s : skills)
		{
			asl.addSkill(s.getSkillId(), s.getSkillLevel(), s.getSkillLevel(), s.getLevelUpSp(), s.getSocialClass().ordinal());
			counts++;
		}
		
		if (counts == 0)
		{
			if (player.getClan().getLevel() < 8)
			{
				SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN_S1);
				if (player.getClan().getLevel() < 5)
				{
					sm.addInt(5);
				}
				else
				{
					sm.addInt(player.getClan().getLevel() + 1);
				}
				player.sendPacket(sm);
			}
			else
			{
				final NpcHtmlMessage html = new NpcHtmlMessage();
				html.setFile(player, player.getHtmlPrefix(), "data/html/villagemaster/NoMoreSkills.htm");
				player.sendPacket(html);
			}
		}
		else
		{
			player.sendPacket(asl);
		}
		player.sendPacket(ActionFailed.STATIC_PACKET);
	}
  • 0
Posted
/*
 * Copyright (C) 2004-2015 L2J Server
 * 
 * This file is part of L2J Server.
 * 
 * L2J Server 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.
 * 
 * L2J Server 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 l2r.gameserver.network.serverpackets;

import java.util.ArrayList;
import java.util.List;

import l2r.gameserver.model.base.AcquireSkillType;

/**
 * Acquire Skill List server packet implementation.
 */
public final class AcquireSkillList extends L2GameServerPacket
{
	private final List<Skill> _skills;
	private final AcquireSkillType _skillType;
	
	/**
	 * Private class containing learning skill information.
	 */
	private static class Skill
	{
		public int id;
		public int nextLevel;
		public int maxLevel;
		public int spCost;
		public int requirements;
		
		public Skill(int pId, int pNextLevel, int pMaxLevel, int pSpCost, int pRequirements)
		{
			id = pId;
			nextLevel = pNextLevel;
			maxLevel = pMaxLevel;
			spCost = pSpCost;
			requirements = pRequirements;
		}
	}
	
	public AcquireSkillList(AcquireSkillType type)
	{
		_skillType = type;
		_skills = new ArrayList<>();
	}
	
	public void addSkill(int id, int nextLevel, int maxLevel, int spCost, int requirements)
	{
		_skills.add(new Skill(id, nextLevel, maxLevel, spCost, requirements));
	}
	
	@Override
	protected void writeImpl()
	{
		if (_skills.isEmpty())
		{
			return;
		}
		
		writeC(0x90);
		writeD(_skillType.ordinal());
		writeD(_skills.size());
		
		for (Skill temp : _skills)
		{
			writeD(temp.id);
			writeD(temp.nextLevel);
			writeD(temp.maxLevel);
			writeD(temp.spCost);
			writeD(temp.requirements);
			if (_skillType == AcquireSkillType.SUBPLEDGE)
			{
				writeD(0); // TODO: ?
			}
		}
	}
}

 

Fixed.  ( thank's to @Psygrammator ) Close topic !

Guest
This topic is now closed to further replies.


  • Posts

    • wtf is your website lol ai slop
    • who have this files? or info about cached packets?
    • Hi maxcheaters, i am trying to bring back an old server ( L2Revenge) but with my own ideas, i only liked how it was and made the gameplay based on that just putting my own ideas.   So practicly is a PTS C6 with an extender that i work lately    Exp / SP is x45 adena is x200 and drops x5  so safe is +3 , max is unlimited and rate is 65% for both mage and fighter weapons I created a system that you can get on the levels the gear you need based on farm but for S grade theres a little farm to get some armor Tokens to unseal them. As you remember L2Revenge had olympiad / Tournament gear. So people abused them and had S grades that way just couldnt enchant them. So i made to be wearable only if u are nobless. That way i cancel this "exploit".  The server gives opportunity to solo and clans , epic gear ( epic weapons) or armors can be bought with raid tokens and you can craft them or get them with various ways Regarding Buffs: 24 buff slots no changes asked. Cov/Pony/Cat , siren - renewal - champion out of buffer , if u make the char as main roll u can use them or use the offline buffer system to sell them and get adenas. their time is 20 mins so that way we see again the " 1kk for rene/siren" or rec = song  Regarding armors: they are dropped ( parts ) from 3 only raids , rest lvl 76+ raids drop recipes , so crafting takes place (so if u are solo u can craft them )  there are 3 armors each armor have its purpose: Revenge Armors - Example for light ( its a glass cannon , high damage , less atk speed and less pdef ) - they mostly modify your base stats, so useable on sieges or off tank chars Titanium Armors - A little bit of balanced of all  Epic Armor - Daggers/Enchanters/Healers mostly but u can always combine your build    Regarding weapons: can be dropped from Monastery of Silence monsters or get them from NPC with Raid Tokens its like a 5% better than S grades and the S/A Activates at +4  Regarding retail gear: you need to unseal only S grades for a great amount of armor tokens all weapons on any grade need Soul crystals that are sold for adenas  stage 13 crystals are expensive or dropped from raids Regarding fun: There is a squash event a Fortress vs Fortress pvp event an RB Event at weekends and from Monday - Wednesday Tournament ( Olympiad is closed monday/tuesday/wednesday)  at tournament you can practice 1vs1 like olympiad but pots/ss allowed , gear allowed is only olympiad or tournament , each win of match gives u 5 glits at 100 glits u can be hero till restart Olympiad works the same way regarding gear allowance but works only thursday to friday and you win monthly hero Auction with Raid Tokens is activated Event medals from events can be exchanged for various items i try to make the oldschool with a little bit of new school systems Not planing to open it anytime soon as i still develop and make corrections to extender , looking forward to meet people that actually played this and are hyped to help on testing / development   P.S is c5 into interlude ( theres no akamanah / nor PI aswell , no lifestones) forgot to mention
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock