AlexHack Posted May 27, 2012 Posted May 27, 2012 Index: java/com/l2jserver/Config.java =================================================================== public static boolean TVT_ALLOW_VOICED_COMMAND; + public static List<int[]> TVT_EVENT_REWARDS_KILL; + ///////////////////////////////////////////////////// + public static int TVT_EVENT_FAMA_KILL; + public static boolean TVT_ARENA_KILL_ENABLE; public static boolean L2JMOD_ALLOW_WEDDING; public static int L2JMOD_WEDDING_PRICE; public static boolean L2JMOD_WEDDING_PUNISH_INFIDELITY; TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(L2JModSettings.getProperty("TvTEventParticipationTime", "3600")); TVT_EVENT_RUNNING_TIME = Integer.parseInt(L2JModSettings.getProperty("TvTEventRunningTime", "1800")); TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(L2JModSettings.getProperty("TvTEventParticipationNpcId", "0")); - + //////////////////////////////////////////////////////////////////////////// + TVT_ARENA_KILL_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("TvTArenaKillEnable", "False")); TVT_EVENT_REWARDS = new ArrayList<int[]>(); + //////////////////////////////////////////// + TVT_EVENT_REWARDS_KILL = new ArrayList<int[]>(); + TVT_EVENT_FAMA_KILL = Integer.parseInt(L2JModSettings.getProperty("TvTEventFamaKill", "0")); + //////////////////////////////////////////// TVT_DOORS_IDS_TO_OPEN = new ArrayList<Integer>(); TVT_DOORS_IDS_TO_CLOSE = new ArrayList<Integer>(); TVT_EVENT_PARTICIPATION_NPC_COORDINATES = new int[4]; - + //////////////////////////////////////////////////////////////////////////// + propertySplit = L2JModSettings.getProperty("TvTEventRewardKill", "57,2").split(";"); + for (String reward : propertySplit) + { + String[] rewardSplit = reward.split(","); + if (rewardSplit.length != 2) + _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventRewardKill \"", reward, "\"")); + else + { + try + { + TVT_EVENT_REWARDS_KILL.add(new int[] { Integer.parseInt(rewardSplit[0]), Integer.parseInt(rewardSplit[1]) }); + } + catch (NumberFormatException nfe) + { + if (!reward.isEmpty()) + _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventRewardKill \"", reward, "\"")); + } + } + } + //////////////////////////////////////////////////////////////////////////// TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED = Boolean.parseBoolean(L2JModSettings.getProperty("TvTEventTargetTeamMembersAllowed", "true")); TVT_EVENT_SCROLL_ALLOWED = Boolean.parseBoolean(L2JModSettings.getProperty("TvTEventScrollsAllowed", "false")); TVT_EVENT_POTIONS_ALLOWED = Boolean.parseBoolean(L2JModSettings.getProperty("TvTEventPotionsAllowed", "false")); Index: java/com/l2jserver/gameserver/model/entity/TvTEvent.java =================================================================== import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.StatusUpdate; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; +import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo; +import com.l2jserver.gameserver.network.serverpackets.UserInfo; import com.l2jserver.gameserver.templates.chars.L2NpcTemplate; killerTeam.increasePoints(); CreatureSay cs = new CreatureSay(killerPlayerInstance.getObjectId(), Say2.TELL, killerPlayerInstance.getName(), "I have killed " + killedPlayerInstance.getName() + "!"); + ///////////////////////////////////////////////////////////////////////// + killerPlayerInstance.setFame(killerPlayerInstance.getFame() + Config.TVT_EVENT_FAMA_KILL); + killerPlayerInstance.sendPacket(new UserInfo(killerPlayerInstance)); + killerPlayerInstance.sendPacket(new ExBrExtraUserInfo(killerPlayerInstance)); + + for (int[] reward : Config.TVT_EVENT_REWARDS_KILL) + { + if (ItemTable.getInstance().createDummyItem(reward[0]).isStackable()) + { + killerPlayerInstance.addItem("TvT Kill", reward[0], reward[1], killedPlayerInstance, true); + } + else + { + for (int i = 0; i < reward[1]; ++i) + { + killerPlayerInstance.addItem("TvT Kill", reward[0], reward[1], killedPlayerInstance, true); + } + } + } + ///////////////////////////////////////////////////////////////////////// for (L2PcInstance playerInstance : _teams[killerTeamId].getParticipatedPlayers().values()) Index: java/config/l2jmods.properties =================================================================== --- java/config/l2jmods.properties (revision 4433) +++ java/config/l2jmods.properties (working copy) @@ -219,7 +219,72 @@ # Voiced command (.tvt) working during TVT event to get information about event status TvTAllowVoicedInfoCommand = false +##################################################################################### +# Reward for kill +# Example: TvTEventRewardKill = itemId,a-beep-t;itemId,a-beep-t;itemId,a-beep-t +TvTEventRewardKill = +# Fama for kill +TvTEventFamaKill = 0 + +# PvP Count [Arena and TvT] +TvTArenaKillEnable = False + + Quote
Fanky Posted May 28, 2012 Posted May 28, 2012 use [ code ] [ / code ] tags please.. thanks for share anyway.. Quote
EdenEternal Posted June 10, 2012 Posted June 10, 2012 Works on l2jfrozen? if its works i need to test it anyway seems cool. Quote
dymek1984 Posted August 26, 2012 Posted August 26, 2012 Maybe u know how to add fame to all players in team. For killer 20 for team members 10. Quote
Recommended Posts
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.