Ir para conteúdo
  • Cadastre-se
  • 0

skill VIP


lFox - L2JFury

Pergunta

boa tarde eu peguei um mod de vip skill , aquele que da uma skill quando ativa o vip e a perde quando acaba ... peguei um mod aqui o forum mas da erro no arquivo l2pcinstance.java segue a imagem e o mod que usei

 

[spoiler]+++++++++++++++++++++++++L2JFrozen/config/head/other.properties


AllowVipMulXpSp = True
VipMulXp = 2
VipMulSp = 2

+ EnableVipSystem = True
+ # List of Vip Skills
+ # Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
+ VipSkills = 395,1

+++++++++++++++++++++++++com/l2jfrozen/Config.java


public static int VIP_XP;
public static int VIP_SP;
+ public static boolean ENABLE_VIP_SYSTEM;
+ public static Map VIP_SKILLS;
public static boolean ANNOUNCE_CASTLE_LORDS;


VIP_XP = Integer.parseInt(otherSettings.getProperty("VipMulXp", "2"));
VIP_SP = Integer.parseInt(otherSettings.getProperty("VipMulSp", "2"));
+ ENABLE_VIP_SYSTEM = Boolean.parseBoolean(otherSettings.getProperty("EnableVipSystem", "True"));
ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(otherSettings.getProperty("AnnounceCastleLords", "False"));



System.out.println("[Aio System]: invalid config property in "+OTHER+" -> AioSkills \"" + skillSplit[0] + "\"" + skillSplit[1]);
}
}
}
}
}
+ //if(ENABLE_VIP_SYSTEM) //create map if system is enabled
+ {
+ String[] VipSkillsSplit = otherSettings.getProperty("VipSkills", "").split(";");
+ VIP_SKILLS = new FastMap(VipSkillsSplit.length);
+ for (String skill : VipSkillsSplit)
+ {
+ String[] skillSplit = skill.split(",");
+ if (skillSplit.length != 2)
+ {
+ System.out.println("[Vip System]: invalid config property in other.properties -> VipSkills \"" + skill + "\"");
+ }
+ else
+ {
+ try
+ {
+ VIP_SKILLS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+ }
+ catch (NumberFormatException nfe)
+ {
+ if (!skill.equals(""))
+ {
+ System.out.println("[Vip System]: invalid config property in other.properties -> VipSkills \"" + skillSplit[0] + "\"" + skillSplit[1]);
+ }
+ }
+ }
+ }
+ }
STARTING_ADENA = Integer.parseInt(otherSettings.getProperty("StartingAdena", "100"));
STARTING_AA = Integer.parseInt(otherSettings.getProperty("StartingAncientAdena", "0"));




+++++++++++++++++++++++++com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminVip.java




public void doVip(L2PcInstance activeChar, L2PcInstance _player, String _playername, String _time)

+ _player.rewardVipSkills();
_player.broadcastUserInfo();
_player.sendPacket(new EtcStatusUpdate(_player));
+ _player.sendSkillList();

public void removeVip(L2PcInstance activeChar, L2PcInstance _player, String _playername)

+ _player.lostVipSkills();
_player.broadcastUserInfo();
_player.sendPacket(new EtcStatusUpdate(_player));
+ _player.sendSkillList();




+++++++++++++++++++++++++com/l2jfrozen/gameserver/model/actors/instance/L2PcInstance.java



public void setVip(boolean val)
{
_isVip = val;
-
+
}
-
+
+ public void rewardVipSkills()
+ {
+ L2Skill skill;
+ for(Integer skillid : Config.VIP_SKILLS.keySet())
+ {
+ int skilllvl = Config.VIP_SKILLS.get(skillid);
+ skill = SkillTable.getInstance().getInfo(skillid,skilllvl);
+ if(skill != null)
+ {
+ addSkill(skill, true);
+ }
+ }
+ sendMessage("GM give to you Vip's skills");
+ }
+
+ public void lostVipSkills()
+ {
+ L2Skill skill;
+ for(Integer skillid : Config.VIP_SKILLS.keySet())
+ {
+ int skilllvl = Config.VIP_SKILLS.get(skillid);
+ skill = SkillTable.getInstance().getInfo(skillid,skilllvl);
+ removeSkill(skill);
+ }
+ }
+[/
spoiler]

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts recomendados

Até agora não há respostas para essa pergunta

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.