Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: config/frozen/frozen.properties
- ===================================================================
- --- config/frozen/frozen.properties (revision 1118)
- +++ config/frozen/frozen.properties (working copy)
- @@ -22,4 +22,87 @@
- # New players get fireworks the first time they log in
- # Default: False
- -NewPlayerEffect = False
- \ No newline at end of file
- +NewPlayerEffect = False
- +
- +# New players Starting Items ( Human )
- +# Default: False
- +EnableHumanReward = False
- +# Human Fighter
- +HumanFighterHelmID =
- +HumanFighterChestID =
- +HumanFighterLegsID =
- +HumanFighterBootsID =
- +HumanFighterGlovesID =
- +HumanFighterWeaponID =
- +# Human Mage
- +HumanMageHelmID =
- +HumanMageChestID =
- +HumanMageLegsID =
- +HumanMageBootsID =
- +HumanMageGlovesID =
- +HumanMageWeaponID =
- +
- +# New players Starting Items ( Elf )
- +# Default: False
- +EnableElfReward = False
- +# Elf Fighter
- +ElfFighterHelmID =
- +ElfFighterChestID =
- +ElfFighterLegsID =
- +ElfFighterBootsID =
- +ElfFighterGlovesID =
- +ElfFighterWeaponID =
- +# Elf Mage
- +ElfMageHelmID =
- +ElfMageChestID =
- +ElfMageLegsID =
- +ElfMageBootsID =
- +ElfMageGlovesID =
- +ElfMageWeaponID =
- +
- +# New players Starting Items ( DarkElf )
- +# Default: False
- +EnableDEReward = False
- +# DarkElf Fighter
- +DEFighterHelmID =
- +DEFighterChestID =
- +DEFighterLegsID =
- +DEFighterBootsID =
- +DEFighterGlovesID =
- +DEFighterWeaponID =
- +# DarkElf Mage
- +DEMageHelmID =
- +DEMageChestID =
- +DEMageLegsID =
- +DEMageBootsID =
- +DEMageGlovesID =
- +DEMageWeaponID =
- +
- +# New players Starting Items ( Orc )
- +# Default: False
- +EnableOrcReward = False
- +# Orc Fighter
- +OrcFighterHelmID =
- +OrcFighterChestID =
- +OrcFighterLegsID =
- +OrcFighterBootsID =
- +OrcFighterGlovesID =
- +OrcFighterWeaponID =
- +# Orc Mage
- +OrcMageHelmID =
- +OrcMageChestID =
- +OrcMageLegsID =
- +OrcMageBootsID =
- +OrcMageGlovesID =
- +OrcMageWeaponID =
- +
- +# New players Starting Items ( Dwarf )
- +# Default: False
- +EnableDwarfReward = False
- +# Dwarf Fighter
- +DwarfFighterHelmID =
- +DwarfFighterChestID =
- +DwarfFighterLegsID =
- +DwarfFighterBootsID =
- +DwarfFighterGlovesID =
- +DwarfFighterWeaponID =
- \ No newline at end of file
- Index: head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- head-src/com/l2jfrozen/Config.java (revision 1118)
- +++ head-src/com/l2jfrozen/Config.java (working copy)
- @@ -2169,7 +2169,67 @@
- public static String PM_TEXT1;
- public static String PM_TEXT2;
- public static boolean NEW_PLAYER_EFFECT;
- -
- + /** Configuration to allow custom armor to new characters By iSparky */
- + public static boolean ENABLE_HUMAN_REWARD;
- + public static boolean ENABLE_ELF_REWARD;
- + public static boolean ENABLE_DE_REWARD;
- + public static boolean ENABLE_ORC_REWARD;
- + public static boolean ENABLE_DWARF_REWARD;
- + public static int HUMAN_M_HELM_ID;
- + public static int HUMAN_M_CHEST_ID;
- + public static int HUMAN_M_LEGS_ID;
- + public static int HUMAN_M_BOOTS_ID;
- + public static int HUMAN_M_GLOVES_ID;
- + public static int HUMAN_M_WEAPON_ID;
- + public static int HUMAN_F_HELM_ID;
- + public static int HUMAN_F_CHEST_ID;
- + public static int HUMAN_F_LEGS_ID;
- + public static int HUMAN_F_BOOTS_ID;
- + public static int HUMAN_F_GLOVES_ID;
- + public static int HUMAN_F_WEAPON_ID;
- + public static int ELF_M_HELM_ID;
- + public static int ELF_M_CHEST_ID;
- + public static int ELF_M_LEGS_ID;
- + public static int ELF_M_BOOTS_ID;
- + public static int ELF_M_GLOVES_ID;
- + public static int ELF_M_WEAPON_ID;
- + public static int ELF_F_HELM_ID;
- + public static int ELF_F_CHEST_ID;
- + public static int ELF_F_LEGS_ID;
- + public static int ELF_F_BOOTS_ID;
- + public static int ELF_F_GLOVES_ID;
- + public static int ELF_F_WEAPON_ID;
- + public static int DE_M_HELM_ID;
- + public static int DE_M_CHEST_ID;
- + public static int DE_M_LEGS_ID;
- + public static int DE_M_BOOTS_ID;
- + public static int DE_M_GLOVES_ID;
- + public static int DE_M_WEAPON_ID;
- + public static int DE_F_HELM_ID;
- + public static int DE_F_CHEST_ID;
- + public static int DE_F_LEGS_ID;
- + public static int DE_F_BOOTS_ID;
- + public static int DE_F_GLOVES_ID;
- + public static int DE_F_WEAPON_ID;
- + public static int ORC_M_HELM_ID;
- + public static int ORC_M_CHEST_ID;
- + public static int ORC_M_LEGS_ID;
- + public static int ORC_M_BOOTS_ID;
- + public static int ORC_M_GLOVES_ID;
- + public static int ORC_M_WEAPON_ID;
- + public static int ORC_F_HELM_ID;
- + public static int ORC_F_CHEST_ID;
- + public static int ORC_F_LEGS_ID;
- + public static int ORC_F_BOOTS_ID;
- + public static int ORC_F_GLOVES_ID;
- + public static int ORC_F_WEAPON_ID;
- + public static int DWARF_F_HELM_ID;
- + public static int DWARF_F_CHEST_ID;
- + public static int DWARF_F_LEGS_ID;
- + public static int DWARF_F_BOOTS_ID;
- + public static int DWARF_F_GLOVES_ID;
- + public static int DWARF_F_WEAPON_ID;
- +
- // ============================================================
- public static void loadFrozenConfig()
- {
- @@ -2190,7 +2250,66 @@
- PM_TEXT1 = frozenSettings.getProperty("PMText1", "Have Fun and Nice Stay on");
- PM_TEXT2 = frozenSettings.getProperty("PMText2", "Vote for us every 24h");
- NEW_PLAYER_EFFECT = Boolean.parseBoolean(frozenSettings.getProperty("NewPlayerEffect", "True"));
- -
- + ENABLE_HUMAN_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableHumanReward", "True"));
- + ENABLE_ELF_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableElfReward", "True"));
- + ENABLE_DE_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableDEReward", "True"));
- + ENABLE_ORC_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableOrcReward", "True"));
- + ENABLE_DWARF_REWARD = Boolean.parseBoolean(frozenSettings.getProperty("EnableDwarfReward", "True"));
- + HUMAN_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageHelmID", ""));
- + HUMAN_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageChestID", ""));
- + HUMAN_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageLegsID", ""));
- + HUMAN_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageBootsID", ""));
- + HUMAN_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageGlovesID", ""));
- + HUMAN_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("HumanMageWeaponID", ""));
- + HUMAN_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterHelmID", ""));
- + HUMAN_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterChestID", ""));
- + HUMAN_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterLegsID", ""));
- + HUMAN_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterBootsID", ""));
- + HUMAN_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterGlovesID", ""));
- + HUMAN_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("HumanFighterWeaponID", ""));
- + ELF_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageHelmID", ""));
- + ELF_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageChestID", ""));
- + ELF_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageLegsID", ""));
- + ELF_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageBootsID", ""));
- + ELF_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageGlovesID", ""));
- + ELF_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("ElfMageWeaponID", ""));
- + ELF_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterHelmID", ""));
- + ELF_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterChestID", ""));
- + ELF_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterLegsID", ""));
- + ELF_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterBootsID", ""));
- + ELF_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterGlovesID", ""));
- + ELF_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("ElfFighterWeaponID", ""));
- + DE_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("DEMageHelmID", ""));
- + DE_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("DEMageChestID", ""));
- + DE_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("DEMageLegsID", ""));
- + DE_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("DEMageBootsID", ""));
- + DE_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("DEMageGlovesID", ""));
- + DE_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("DEMageWeaponID", ""));
- + DE_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterHelmID", ""));
- + DE_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterChestID", ""));
- + DE_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterLegsID", ""));
- + DE_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterBootsID", ""));
- + DE_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterGlovesID", ""));
- + DE_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("DEFighterWeaponID", ""));
- + ORC_M_HELM_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageHelmID", ""));
- + ORC_M_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageChestID", ""));
- + ORC_M_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageLegsID", ""));
- + ORC_M_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageBootsID", ""));
- + ORC_M_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageGlovesID", ""));
- + ORC_M_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("OrcMageWeaponID", ""));
- + ORC_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterHelmID", ""));
- + ORC_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterChestID", ""));
- + ORC_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterLegsID", ""));
- + ORC_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterBootsID", ""));
- + ORC_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterGlovesID", ""));
- + ORC_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("OrcFighterWeaponID", ""));
- + DWARF_F_HELM_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterHelmID", ""));
- + DWARF_F_CHEST_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterChestID", ""));
- + DWARF_F_LEGS_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterLegsID", ""));
- + DWARF_F_BOOTS_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterBootsID", ""));
- + DWARF_F_GLOVES_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterGlovesID", ""));
- + DWARF_F_WEAPON_ID = Integer.parseInt(frozenSettings.getProperty("DwarfFighterWeaponID", ""));
- +
- }
- catch (final Exception e)
- {
- Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/CharacterCreate.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/network/clientpackets/CharacterCreate.java (revision 1118)
- +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/CharacterCreate.java (working copy)
- @@ -37,6 +37,7 @@
- import com.l2jfrozen.gameserver.model.L2World;
- import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.base.Race;
- import com.l2jfrozen.gameserver.model.quest.Quest;
- import com.l2jfrozen.gameserver.model.quest.QuestState;
- import com.l2jfrozen.gameserver.network.L2GameClient;
- @@ -189,6 +190,270 @@
- if (Config.STARTING_AA > 0)
- newChar.addAncientAdena("Init", Config.STARTING_AA, null, false);
- + // by iSparky
- + if (Config.ENABLE_HUMAN_REWARD)
- + {
- + if (newChar.getRace() == Race.human || newChar.isMageClass())
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.HUMAN_M_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.HUMAN_M_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.HUMAN_M_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.HUMAN_M_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.HUMAN_M_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.HUMAN_M_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + else
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.HUMAN_F_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.HUMAN_F_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.HUMAN_F_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.HUMAN_F_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.HUMAN_F_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.HUMAN_F_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + }
- +
- + if (Config.ENABLE_ELF_REWARD)
- + {
- + if (newChar.getRace() == Race.elf || newChar.isMageClass())
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ELF_M_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ELF_M_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ELF_M_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ELF_M_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ELF_M_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ELF_M_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + else
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ELF_F_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ELF_F_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ELF_F_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ELF_F_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ELF_F_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ELF_F_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + }
- +
- + if (Config.ENABLE_DE_REWARD)
- + {
- + if (newChar.getRace() == Race.darkelf || newChar.isMageClass())
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.DE_M_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.DE_M_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.DE_M_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.DE_M_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.DE_M_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.DE_M_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + else
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.DE_F_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.DE_F_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.DE_F_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.DE_F_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.DE_F_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.DE_F_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + }
- +
- + if (Config.ENABLE_ORC_REWARD)
- + {
- + if (newChar.getRace() == Race.orc || newChar.isMageClass())
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ORC_M_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ORC_M_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ORC_M_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ORC_M_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ORC_M_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ORC_M_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + else
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.ORC_F_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.ORC_F_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.ORC_F_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.ORC_F_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.ORC_F_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.ORC_F_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + }
- +
- + if (Config.ENABLE_DWARF_REWARD)
- + {
- + if (newChar.getRace() == Race.dwarf)
- + {
- + final L2ItemInstance Helm = newChar.getInventory().addItem("Init", Config.DWARF_F_HELM_ID, 1, newChar, null);
- + if (Helm.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Helm.getItem().getType2() != L2Item.SLOT_HEAD))
- + newChar.getInventory().equipItemAndRecord(Helm);
- + final L2ItemInstance Chest = newChar.getInventory().addItem("Init", Config.DWARF_F_CHEST_ID, 1, newChar, null);
- + if (Chest.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Chest.getItem().getType2() != L2Item.SLOT_CHEST))
- + newChar.getInventory().equipItemAndRecord(Chest);
- + final L2ItemInstance Legs = newChar.getInventory().addItem("Init", Config.DWARF_F_LEGS_ID, 1, newChar, null);
- + if (Legs.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Legs.getItem().getType2() != L2Item.SLOT_LEGS))
- + newChar.getInventory().equipItemAndRecord(Legs);
- + final L2ItemInstance Boots = newChar.getInventory().addItem("Init", Config.DWARF_F_BOOTS_ID, 1, newChar, null);
- + if (Boots.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Boots.getItem().getType2() != L2Item.SLOT_FEET))
- + newChar.getInventory().equipItemAndRecord(Boots);
- + final L2ItemInstance Gloves = newChar.getInventory().addItem("Init", Config.DWARF_F_GLOVES_ID, 1, newChar, null);
- + if (Gloves.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Gloves.getItem().getType2() != L2Item.SLOT_GLOVES))
- + newChar.getInventory().equipItemAndRecord(Gloves);
- + final L2ItemInstance Weap = newChar.getInventory().addItem("Init", Config.DWARF_F_WEAPON_ID, 1, newChar, null);
- + if (Weap.isEquipable())
- + if (newChar.getActiveWeaponItem() == null || !(Weap.getItem().getType2() != L2Item.TYPE2_WEAPON))
- + newChar.getInventory().equipItemAndRecord(Weap);
- + }
- + }
- +
- if (Config.CUSTOM_STARTER_ITEMS_ENABLED)
- {
- if (newChar.isMageClass())
- @@ -233,8 +498,7 @@
- // Shortcuts
- newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // Attack
- - newChar.registerShortCut(new L2ShortCut(3, 0, 3, 5, -1, 1)); // Take
- - newChar.registerShortCut(new L2ShortCut(10, 0, 3, 0, -1, 1)); // Sit
- + newChar.registerShortCut(new L2ShortCut(1, 0, 3, 5, -1, 1)); // Take
- final ItemTable itemTable = ItemTable.getInstance();
- final L2Item[] items = template.getItems();
Add Comment
Please, Sign In to add comment