Ir para conteúdo
  • Cadastre-se
  • 0

Mod na Acis erro buffskillholder


VirusBlack S2

Pergunta

7 respostass a esta questão

Posts recomendados

  • 0
1 hora atrás, VirusBlack S2 disse:

gente ja tentei add dos 2 tipos ai SkillHolder e BuffSkillHolder
mais mesmo assim n estar indo ja tentei esse change to buffskillholder mais mesmo assim n vai alguem da uma luz?

npc skill.png

skill.png

Não ta claro  a condição do código, que npc buff ta querendo botar? manda diff e fala pra qual versao da acis vc quer esse npc!

Editado por Christian-SDM
Link para o comentário
Compartilhar em outros sites


  • 0
11 horas atrás, Christian-SDM disse:

Não ta claro  a condição do código, que npc buff ta querendo botar? manda diff e fala pra qual versao da acis vc quer esse npc!

Spoiler

/*
 * Copyright (C) 2004-2014 L2J DataPack
 * 
 * This file is part of L2J DataPack.
 * 
 * L2J DataPack 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 DataPack 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.scripting.scripts.custom;

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

import net.sf.l2j.gameserver.datatables.ItemTable;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
/**
public class NpcRegaloSkills extends Quest
{
    // Npc
    private static final int NPC = 21;
    // Cantidad maxima q un user puede aprender de skills.
    private static final int MAX_SKILLS_ADD = 5;
    // Precio por aprender cada skills....
    private static final int ITEMD_ID = 57; // Adena
    private static final int ITEM_COUNT = 1000; // Cantidad
    // Skills a regalar (SkillId - SkillLvl)
    private static final List<SkillHolder> SKILLS = new ArrayList<>();
    {
        SKILLS.add(new SkillHolder(1085, 113));// Acumen
        SKILLS.add(new SkillHolder(1035, 104));// Mental Shield
        SKILLS.add(new SkillHolder(1036, 112));// Magic Barrier
        SKILLS.add(new SkillHolder(1040, 113));// Shield
        SKILLS.add(new SkillHolder(1045, 116));// Blessed Body
        SKILLS.add(new SkillHolder(1048, 116));// Blessed Soul
        SKILLS.add(new SkillHolder(1059, 103));// Empower
        SKILLS.add(new SkillHolder(1062, 2));// Berserker Spirit
        SKILLS.add(new SkillHolder(1068, 3));// Might
        SKILLS.add(new SkillHolder(1077, 3));// Focus
        SKILLS.add(new SkillHolder(1078, 6));// Concentration
        SKILLS.add(new SkillHolder(1086, 2));// Haste
        SKILLS.add(new SkillHolder(1087, 3));// Agility
        SKILLS.add(new SkillHolder(1204, 2));// Wind Walk
        SKILLS.add(new SkillHolder(1240, 3));// Guidance
        SKILLS.add(new SkillHolder(1242, 3));// Death Whisper
        SKILLS.add(new SkillHolder(1243, 6));// Bless Shield
        SKILLS.add(new SkillHolder(1268, 4));// Vampiric Rage
    }
    
    private NpcRegaloSkills()
    {
        super(-1, NpcRegaloSkills.class.getSimpleName(), "custom");
        addStartNpc(NPC);
        addFirstTalkId(NPC);
        addTalkId(NPC);
    }
    
    @Override
    public String onFirstTalk(L2Npc npc, L2PcInstance activeChar)
    {
        return GenerateHtmlIndex(activeChar);
    }
    
    @Override
    public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
    {
        if (event.equals("verSkills"))
        {
            return GenerateHtmlRegalos(player);
        }
        if (event.startsWith("regalarSkills"))
        {
            QuestState qs = player.getQuestState(getName());
            // Verificamos la cant de skills q ah aprendido el char
            if (qs.getInt("skills") >= MAX_SKILLS_ADD)
            {
                return "maxSkills.htm";
            }
            
            StringTokenizer st = new StringTokenizer(event, " ");
            st.nextToken(); // regalarSkills
            
            try
            {
                player.addSkill(SKILLS.get(Integer.parseInt(st.nextToken())).getSkill(), true);
                qs.takeItems(ITEMD_ID, ITEM_COUNT);
                player.sendMessage("has aprendio un nuevo skills!"); // se podria cambiar por un html no?
                
                qs.set("skills", qs.getInt("skills") + 1); // incrementamos la cant de skills q ah aprendido el char
            }
            catch (Exception e)
            {
                _log.warning("WTF...tenemos un player q intenta aprender un skill fuera de la lista?");
                _log.warning("contactar con fissban por asesoria :P");
            }
            
        }
        return null;
    }
    
    /**
     * Generamos el html inicial
     * @param player
     * @return
     */
    private static String GenerateHtmlIndex(L2PcInstance player)
    {
        StringBuilder sb = new StringBuilder();
        sb.append("<html><body><title>L2jAdmins</title>");
        sb.append("<center>");
        sb.append("<br>");
        sb.append("Bienvenido <font color=\"LEVEL\">" + player.getName() + "</font>");
        sb.append("<br>");
        sb.append("<center>");
        sb.append("Usted podra comprar algunos skills para su char<br>");
        sb.append("pero no seran gratuitos..no no no!<br>");
        sb.append("por la suma de " + ITEM_COUNT + " de " + ItemTable.getInstance().getTemplate(ITEMD_ID).getName() + "<br>");
        sb.append("pasa por nuestra tiendra y ve nuestros skills");
        sb.append("<button value=\"Ver Skills\" action=\"bypass -h Quest NpcRegaloSkills verSkills\" width=120 height=30 back=L2UI_CH3.bigbutton2_down fore=L2UI_CH3.bigbutton2></td>");
        sb.append("</center>");
        sb.append("</body></html>

mano quero para acis 382 add de boa mais o npc da minimum requirements 

Link para o comentário
Compartilhar em outros sites

  • 0
22 minutos atrás, VirusBlack S2 disse:

oi mano eaw?

 

4 horas atrás, VirusBlack S2 disse:

oi mano eaw?

isso que tu enviou não é java e sim script, não funciona em acis, e tambem nem pra adaptar da, pq ta faltando codigo ai

Link para o comentário
Compartilhar em outros sites

  • 0
2 minutos atrás, Christian-SDM disse:

 

isso que tu enviou não é java e sim script, não funciona em acis, e tambem nem pra adaptar da, pq ta faltando codigo ai

mais isso ai e tudo q tenhum do script e tbm tem q criar o NpcRegaloSkills.java e add ele no eclipse tentar arrumar esse codigo ai n sei mais ele ta completo add de boa so qui o npc diss requirements so isso mais vou ficar tentando

Link para o comentário
Compartilhar em outros sites

  • 0
2 minutos atrás, VirusBlack S2 disse:

mais isso ai e tudo q tenhum do script e tbm tem q criar o NpcRegaloSkills.java e add ele no eclipse tentar arrumar esse codigo ai n sei mais ele ta completo add de boa so qui o npc diss requirements so isso mais vou ficar tentando

oque vc me passo n da. Falta coisa, e tem funçoes de script e nao java.

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...




×
×
  • 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.