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

    • Added: Promo Code System An admin can add promo codes from the admin panel. Promo code example: VIPBONUS777 Item ID and quantity, multiple gifts can be added Total number of promo codes issued (0 = unlimited) Promo code start date Promo code expiration date User verification and IP check   View demo: Demo  
    • SocNet is looking for new suppliers! — Snapchat accounts  — Reddit accounts with karma  — LinkedIn accounts with real connections Message us or contact support — let’s discuss terms! We’re also open to other partnership opportunities. Our Online Store Offers: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers SMM Panel Services: ➡ Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off) Get $1 trial balance for the SMM Panel: Submit a ticket titled “Get Trial Bonus” via our website (Support) ➡ Go to the SMM Panel (clickable) or contact us through the bot Our Key Products: ➡ Online Store: Click ➡ Telegram Shop Bot: Click ➡ SMM Panel: Click Payments accepted: Bank cards · Crypto · Other popular methods Returning buyers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss bulk orders — Form partnerships (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your digital goods & subscription store
    • SocNet is looking for new suppliers! — Snapchat accounts  — Reddit accounts with karma  — LinkedIn accounts with real connections Message us or contact support — let’s discuss terms! We’re also open to other partnership opportunities. Our Online Store Offers: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers SMM Panel Services: ➡ Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off) Get $1 trial balance for the SMM Panel: Submit a ticket titled “Get Trial Bonus” via our website (Support) ➡ Go to the SMM Panel (clickable) or contact us through the bot Our Key Products: ➡ Online Store: Click ➡ Telegram Shop Bot: Click ➡ SMM Panel: Click Payments accepted: Bank cards · Crypto · Other popular methods Returning buyers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss bulk orders — Form partnerships (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your digital goods & subscription store
    • SocNet is looking for new suppliers! — Snapchat accounts  — Reddit accounts with karma  — LinkedIn accounts with real connections Message us or contact support — let’s discuss terms! We’re also open to other partnership opportunities. Our Online Store Offers: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers SMM Panel Services: ➡ Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off) Get $1 trial balance for the SMM Panel: Submit a ticket titled “Get Trial Bonus” via our website (Support) ➡ Go to the SMM Panel (clickable) or contact us through the bot Our Key Products: ➡ Online Store: Click ➡ Telegram Shop Bot: Click ➡ SMM Panel: Click Payments accepted: Bank cards · Crypto · Other popular methods Returning buyers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss bulk orders — Form partnerships (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your digital goods & subscription store
  • 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