Ir para conteúdo
  • Cadastre-se
  • 0

GIVE_EXP


Dartz

Pergunta

Pessoal, boas, estou usando a acis 360, interlude, etc.

Bom, eu gostaria que alguém pudesse me ajudar a criar uma função de give_exp, assim como ja temos por padrão o give_sp.

com base no próprio scroll de SP eu tentei criar um igual, porem adicionando exp ao char mas não esta funcionando, podem dar uma olhada, obrigado.

aqui esta a classe do give_exp, com base no give_sp

net.sf.l2j.gameserver.handler.skillhandlers.GiveExp

<spoil>

/*
 * 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 net.sf.l2j.gameserver.handler.skillhandlers;

import net.sf.l2j.gameserver.handler.ISkillHandler;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.templates.skills.L2SkillType;


public class GiveExp implements ISkillHandler
{
	private static final L2SkillType[] SKILL_IDS =
	{
		L2SkillType.GIVE_EXP
	};
	
	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		for (L2Object obj : targets)
		{
			L2Character target = (L2Character) obj;
			if (target != null)
			{
				int expToAdd = (int) skill.getPower();
				target.addExpAndSp(0, expToAdd);
			}
		}
	}
	
	@Override
	public L2SkillType[] getSkillIds()
	{
		return SKILL_IDS;
	}
}

</spoil>

e aqui o l2skilltype do give_exp

net.sf.l2j.gameserver.templates.skills.L2SkillType

    CPHEAL_PERCENT,
    MANAHEAL_PERCENT,
    
    GIVE_SP,
    GIVE_EXP,
    
    // Aggro
    AGGDAMAGE,
    AGGREDUCE,

=======================================

 

nao apresenta nenhum erro depois da compilação, mas quando vou testar in game, diz q a skill não esta implementada

Editado por Dartz
Link para o comentário
Compartilhar em outros sites

8 respostass a esta questão

Posts recomendados


  • 0
net.sf.l2j.gameserver.handler.SkillHandler;

+import net.sf.l2j.gameserver.handler.skillhandlers.GiveExp;
import net.sf.l2j.gameserver.handler.skillhandlers.GiveSp;

+registerSkillHandler(new GiveExp());
registerSkillHandler(new GiveSp());


net.sf.l2j.gameserver.templates.skills.L2SkillType

+GIVE_EXP,
GIVE_SP,


datapack
data/xml/itens/9200-9299.xml

    <item id="9210" type="EtcItem" name="EXP Scroll: High Grade">
        <set name="default_action" val="skill_reduce" />
        <set name="etcitem_type" val="scroll" />
        <set name="material" val="PAPER" />
        <set name="weight" val="30" />
        <set name="price" val="480000" />
        <set name="is_stackable" val="true" />
        <set name="is_oly_restricted" val="true" />
        <set name="handler" val="ItemSkills" />
        <set name="item_skill" val="2167-3" />
    </item
data/xml/skill/8100-8199.xml

    <skill id="8100" levels="4" name="Scroll of Exp">
        <table name="#power"> 500 5000 100000 500000 </table>
        <set name="hitTime" val="200" />
        <set name="staticHitTime" val="true" />
        <set name="magicLvl" val="1" />
        <set name="operateType" val="OP_ACTIVE" />
        <set name="power" val="#power" />
        <set name="reuseDelay" val="3000" />
        <set name="skillType" val="GIVE_SP" />
        <set name="target" val="TARGET_SELF" />
        <cond msgId="113" addName="1">
            <player flying="False" />
        </cond>
    </skill>

Amigo não sou profissional nisso e nem tive tempo de testa aqui. mais vc pode tenda desse add isso e ver si funcionar.

CRMjmY4.jpg

Link para o comentário
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.