Jump to content

Question

Posted

So , hello.
As the title says , i would like to know how can i create some new skills.

 

Infos
I want each character to have the right to "buy" 3 unique skills(max) from a custom npc only in level 80 and only in main class.
Ofc, they will have to pay with an item or something else in order to take the skills.

Also i would like to know how i will connect the core side of the skill with the client side.

Restictions

In order to be able to buy a skill , player should be noblesse and hero at least one time.
This skill won't be able to buyed by subclasses.

These skills can be used only from a player to each self (only for buff skills).
Players won't be able to use these skills in olympiad and events.

 

Regards,

`iAndre.

3 answers to this question

Recommended Posts

  • 0
Posted

So , hello.

As the title says , i would like to know how can i create some new skills.

 

Infos

I want each character to have the right to "buy" 3 unique skills(max) from a custom npc only in level 80 and only in main class.

Ofc, they will have to pay with an item or something else in order to take the skills.

Also i would like to know how i will connect the core side of the skill with the client side.

 

Restictions

In order to be able to buy a skill , player should be noblesse and hero at least one time.

This skill won't be able to buyed by subclasses.

These skills can be used only from a player to each self (only for buff skills).

Players won't be able to use these skills in olympiad and events.

 

Regards,

`iAndre.

 

The connection between core and client side is made by ID, the one and only.

 

Let's start...

 

About client, you got 2 files, skillname-e.dat & skillgrp.dat. You create a new id, let's say 500, I like to work with small numbers, 500-600 are not used and you'll avoid database errors.

 

skillname-e.dat

 

500 1 a,Trance\0 a,This is my freaking description.\0 a,none\0 a,none\0

 

500 = id, 1 = level, "This is my freaking description" is obviously, 1st "none" is used for enchantable skills (e.g: +1 Power), or you can use it for another purpose, for example "GM Skill". 2nd "none" is the brother of the first, for example you can write "The power is increased."

 

skillgrp.dat

 

500 1 2 0 -1 0 0.00000000 0 icon.XD 0 0 0 0 -1 -1

level, id, type, mp consume, cast range, cast style, hit time, if it's magic and so on. You better look at the existing ones to understand, it's very easy.

My example is a little empty, because it's a passive, you don't need these options.

p.s. In case you create an active skill, you need to add skill animation too, not only the icon.

 

---

 

Let's move to the other side, xml.

 

 

<skill id="500" levels="1" name="Trance">
<set name="target" val="TARGET_SELF"/>
<set name="skillType" val="BUFF"/>
<set name="operateType" val="OP_PASSIVE"/>
<for>
<mul order="0x30" stat="runSpd" val="2" /> <!-- +100% speed because you're a GM, blah. -->
</for>
</skill>

This is quite easy, you probably have edited at least one skill in your life. This is a passive, if you want it to make ACTIVE, just add reuseDelay, hitTime and effect for buff time, stack order & type. As about debuffs and other, look at other existing skills.

 

---

 

3rd chapter is about your custom request, adding it as "learn skill".

You can take a look at my rebirth manager.

You gotta touch RequestAcquireSkillInfo, RequestAcquireSkill, L2NpcInstance and SkillTreeTable. Also to create a new class for the xml parser, just like my L2RebirthSkillLearn. And of course the xml for it, as my example: rebirth_skills_tree.xml

  • 0
Posted

Sorry to inject into this post. Could you please tell me how to enable "Toggle Skill Animation" for skill icon? The same animation that you can see when turning 'Soul Cry' (ID 1001) skill on. Its icon gets special effect.

 

Does it have to be enabled client or server side?

 

Thanks

  • 0
Posted

well i am your man 

 

 

You can create some books ( in etcitems)

 

and now here is the code 

 

 

/*
 * 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 com.l2jfrozen.gameserver.handler.itemhandlers;
 
import com.l2jfrozen.gameserver.datatables.SkillTable;
import com.l2jfrozen.gameserver.handler.IItemHandler;
import com.l2jfrozen.gameserver.model.L2Skill;
import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
 
/**
 * @author Kelrzhel
 *
 */
public class CustomBooks implements IItemHandler
{
@Override
public void useItem(L2PlayableInstance playable, L2ItemInstance item)
{
if(!(playable instanceof L2PcInstance))
return;
 
L2PcInstance p = (L2PcInstance) playable;
int itemId = item.getItemId();
 
L2Skill bookLv1 = SkillTable.getInstance().getInfo(skillidhere, level);
        L2Skill bookLv2 = SkillTable.getInstance().getInfo(skillidhere, level);
        L2Skill bookLv3 = SkillTable.getInstance().getInfo(skillidhere, level);
 
switch (itemId)
{
case 1: //setbookid
if(p.isNoble())
if (p.getSkillLevel(bookLv1.getId()) == 1)
                    return;
                p.addSkill(bookLv1, true);
                p.broadcastPacket(new SocialAction(p.getObjectId(), 15));
                p.destroyItem("Destroy.", item.getObjectId(), 1, p, true);
                p.sendMessage("give me message");
break;
case 2: //setbookid
if(p.isNoble())
if (p.getSkillLevel(bookLv2.getId()) == 1)
                    return;
                p.addSkill(bookLv2, true);
                p.broadcastPacket(new SocialAction(p.getObjectId(), 15));
                p.destroyItem("Destroy.", item.getObjectId(), 1, p, true);
                p.sendMessage("give me message.");
break;
case 3: //setbookid
if(p.isNoble())
if (p.getSkillLevel(bookLv3.getId()) == 1)
                    return;
                p.addSkill(bookLv3, true);
                p.broadcastPacket(new SocialAction(p.getObjectId(), 15));
                p.destroyItem("Destroy.", item.getObjectId(), 1, p, true);
                p.sendMessage("give me message.");
break;
}
}
 
@Override
public int[] getItemIds()
{
return new int[] { bookid, bookid, bookid };
}
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Hello everyone, we are one of the top gaming currency stores. We work exclusively with top projects. If you are interested in anything like Adena, Coins, Equip, write to us Discord - pchelacoin Telegram - https://t.me/ipchelacoin BOHPTS, KETRAWARS, EURO-PVP, L2REBORN, E-GLOBAL, LA2DREAM TOP PRICE !!!!!!!
    • L2Elixir – Patch 4 Is Live!   We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.    ⚙️ General Enabled Class Change service (same class type only) ALT + B → Services → Character Development Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!    🎒 Items Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior) Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item) Added Dualsword Craft Stamp into Milestone Exchange list    🧙 Skills Fixed Banish Undead lethal chance Hot Springs Malaria and similar effects now level up faster while being attacked
    • thats new SEO level tricks you know nothing of noob - bottom line: exposed.
  • 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