Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/net/sf/l2j/gameserver/customskill/CustomItemSkill.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/customskill/CustomItemSkill.java (revision 0)
- +++ java/net/sf/l2j/gameserver/customskill/CustomItemSkill.java (working copy)
- @@ -0,0 +1,44 @@
- +/*
- + * 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.customskill;
- +
- +import net.sf.l2j.gameserver.datatables.SkillTable;
- +import net.sf.l2j.gameserver.model.L2Skill;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author Baggos
- + */
- +public class CustomItemSkill
- +{
- +
- + public void CustomItem(L2PcInstance player)
- + {
- + L2Skill skill = SkillTable.getInstance().getInfo(294, 1);
- + final SystemMessage night = SystemMessage.getSystemMessage(SystemMessageId.NIGHT_EFFECT_APPLIES);
- + final SystemMessage day = SystemMessage.getSystemMessage(SystemMessageId.DAY_EFFECT_DISAPPEARS);
- +
- + if (player.getInventory().getItemByItemId(9819) != null && skill != null)
- + {
- + player.addSkill(skill, true);
- + player.sendPacket(night);
- + }
- + else
- + player.removeSkill(skill, true);
- + player.sendPacket(day);
- + }
- +}
- \ No newline at end of file
Add Comment
Please, Sign In to add comment