Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Custom PvP Titles

Iniciado por Swarlog, Ago 19, 2022, 01:18 AM

Tema anterior - Siguiente tema

Swarlog

### Eclipse Workspace Patch 1.0
#P L2J_DataPack_BETA
Index: dist/game/data/scripts/custom/PvPTitle/PvPTitleParser.java
===================================================================
--- dist/game/data/scripts/custom/PvPTitle/PvPTitleParser.java (revision 0)
+++ dist/game/data/scripts/custom/PvPTitle/PvPTitleParser.java (working copy)
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvPTitle;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.logging.Level;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.l2jserver.gameserver.engines.DocumentParser;
+import com.l2jserver.gameserver.model.StatsSet;
+
+/**
+ * @author UnAfraid
+ */
+public class PvPTitleParser extends DocumentParser
+{
+ private final List<PvPTitleDTO> _pvpData = new LinkedList<>();
+
+ protected PvPTitleParser()
+ {
+ load();
+ }
+
+ @Override
+ public void load()
+ {
+ parseDatapackFile("data/scripts/custom/PvPTitle/data.xml");
+ _log.log(Level.INFO, PvPTitle.class.getSimpleName() + ": Loaded " + _pvpData.size() + " Custom PvP titles.");
+ }
+
+ @Override
+ protected void parseDocument()
+ {
+ Node att;
+ NamedNodeMap attrs;
+ StatsSet set;
+ for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
+ {
+ if ("list".equalsIgnoreCase(n.getNodeName()))
+ {
+ for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
+ {
+ if ("title".equalsIgnoreCase(d.getNodeName()))
+ {
+ attrs = d.getAttributes();
+ set = new StatsSet();
+ for (int i = 0; i < attrs.getLength(); i++)
+ {
+ att = attrs.item(i);
+ set.set(att.getNodeName(), att.getNodeValue());
+ }
+ set.set("title", d.getTextContent());
+ _pvpData.add(new PvPTitleDTO(set));
+ }
+ }
+ }
+ }
+ }
+
+ public List<PvPTitleDTO> getData()
+ {
+ return _pvpData;
+ }
+}
\ No newline at end of file
Index: dist/game/data/scripts/custom/PvPTitle/PvPTitle.java
===================================================================
--- dist/game/data/scripts/custom/PvPTitle/PvPTitle.java (revision 0)
+++ dist/game/data/scripts/custom/PvPTitle/PvPTitle.java (working copy)
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvPTitle;
+
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.events.DeathEvent;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script;
+
+/**
+ * @author UnAfraid
+ */
+public final class PvPTitle extends L2Script
+{
+ private final PvPTitleParser _parser = new PvPTitleParser();
+
+ private PvPTitle(String name, String descr)
+ {
+ super(name, descr);
+ addLoginLogoutNotify();
+ }
+
+ /**
+ * When reloading the script would be nice to release all links to current instance of this class.
+ * @param removeFromList
+ */
+ @Override
+ public boolean unload(boolean removeFromList)
+ {
+ removeLoginLogoutNotify();
+ for (L2PcInstance player : L2World.getInstance().getAllPlayersArray())
+ {
+ removeDeathNotify(player);
+ }
+ return super.unload(removeFromList);
+ }
+
+ /**
+ * When player login request death notifications. Also set title if possible
+ * @param player
+ */
+ @Override
+ public void onPlayerLogin(L2PcInstance player)
+ {
+ addDeathNotify(player);
+ applyTitle(player);
+ }
+
+ /**
+ * When player logout removing him from death notification listeners.
+ * @param player
+ */
+ @Override
+ public void onPlayerLogout(L2PcInstance player)
+ {
+ removeDeathNotify(player);
+ }
+
+ /**
+ * Received death event make sure player killed another player and try to change his title if possible.
+ * @param event
+ */
+ @Override
+ public boolean onDeath(DeathEvent event)
+ {
+ final L2Character victim = event.getVictim();
+ final L2Character killer = event.getKiller();
+ if ((killer != null) && killer.isPlayer() && (victim != null) && victim.isPlayer())
+ {
+ applyTitle(killer.getActingPlayer());
+ }
+ return true;
+ }
+
+ /**
+ * Trying to set title.
+ * @param player
+ */
+ private void applyTitle(L2PcInstance player)
+ {
+ PvPTitleDTO dto = null;
+ for (PvPTitleDTO val : _parser.getData())
+ {
+ if ((dto == null) || ((player.getPvpKills() >= val.getMinKills()) && (val.getMinKills() > dto.getMinKills())))
+ {
+ dto = val;
+ }
+ }
+
+ // If we have new title for the player and the current is not the same change it.
+ if ((dto != null) && !hasSameTitle(player, dto))
+ {
+ if (!dto.getTitle().isEmpty()) // If custom title is empty don't set it
+ {
+ player.setTitle(dto.getTitle());
+ }
+ player.getAppearance().setTitleColor(dto.getTitleColor());
+ player.broadcastTitleInfo();
+ }
+ }
+
+ /**
+ * @param player
+ * @param dto
+ * @return {@code true} if player have the same title settings as requested, {@code false} otherwise.
+ */
+ private static boolean hasSameTitle(L2PcInstance player, PvPTitleDTO dto)
+ {
+ return (dto.getTitle().isEmpty() || player.getTitle().equals(dto.getTitle())) && (player.getAppearance().getTitleColor() == dto.getTitleColor());
+ }
+
+ public static void main(String[] args)
+ {
+ new PvPTitle(PvPTitle.class.getSimpleName(), "custom");
+ }
+}
Index: dist/game/data/scripts/custom/PvPTitle/PvPTitleDTO.java
===================================================================
--- dist/game/data/scripts/custom/PvPTitle/PvPTitleDTO.java (revision 0)
+++ dist/game/data/scripts/custom/PvPTitle/PvPTitleDTO.java (working copy)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvPTitle;
+
+import com.l2jserver.gameserver.model.StatsSet;
+
+/**
+ * @author UnAfraid
+ */
+public class PvPTitleDTO
+{
+ private final int _minKills;
+ private final int _titleColor;
+ private final String _title;
+
+ public PvPTitleDTO(StatsSet set)
+ {
+ _minKills = set.getInteger("minKills");
+ _titleColor = Integer.decode(set.getString("color", "0xFFFFFF"));
+ _title = set.getString("title");
+ }
+
+ public int getMinKills()
+ {
+ return _minKills;
+ }
+
+ public int getTitleColor()
+ {
+ return _titleColor;
+ }
+
+ public String getTitle()
+ {
+ return _title;
+ }
+}
Index: dist/game/data/scripts/custom/PvPTitle/data.xsd
===================================================================
--- dist/game/data/scripts/custom/PvPTitle/data.xsd (revision 0)
+++ dist/game/data/scripts/custom/PvPTitle/data.xsd (working copy)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="list">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="title" maxOccurs="unbounded" minOccurs="0">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute type="xs:short" name="minKills" use="required" />
+ <xs:attribute type="xs:string" name="color" use="required" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
\ No newline at end of file
Index: dist/game/data/scripts/custom/PvPTitle/data.xml
===================================================================
--- dist/game/data/scripts/custom/PvPTitle/data.xml (revision 0)
+++ dist/game/data/scripts/custom/PvPTitle/data.xml (working copy)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="data.xsd">
+ <title minKills="0" color="0xFFFF77" /> <!-- Only color change without title is possible -->
+ <title minKills="5" color="0xFFFFFF">PvP Noobje</title>
+ <title minKills="10" color="0xFF00FF">PvP Rookie</title>
+ <title minKills="20" color="0x00FF00">PvP Pro</title>
+ <title minKills="40" color="0xF0FF0F">PvP Master</title>
+ <title minKills="80" color="0x0F0FF0">PvP Grand Master</title>
+ <title minKills="160" color="0x000000">Player Ass Raper</title>
+</list>
\ No newline at end of file

### Eclipse Workspace Patch 1.0
#P L2J_DataPack_BETA
Index: dist/game/data/scripts/custom/PvP/model/handlers/PvPOneTimeRewardsHandler.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/handlers/PvPOneTimeRewardsHandler.java  (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/handlers/PvPOneTimeRewardsHandler.java (working copy)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model.handlers;
+
+import com.l2jserver.gameserver.model.PlayerVariables;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.holders.SkillHolder;
+
+import custom.PvP.PvPManager;
+import custom.PvP.model.PlayerData;
+import custom.PvP.model.PvPData;
+import custom.PvP.model.PvPSkill;
+
+/**
+ * @author UnAfraid
+ */
+public final class PvPOneTimeRewardsHandler implements IPvPHandler
+{
+ private static final String DATABASE_VAR_PVPS = "PvP-";
+ private static final String DATABASE_VAR_STEAK = "PvP-Steak-";
+
+ @Override
+ public void handlePvP(final L2PcInstance player, final PvPData data, final PvPData oldData, final PlayerData playerData, final PvPManager manager)
+ {
+ // Prevent from useless database entries.
+ if (data.getItems().isEmpty() && data.getSkills().isEmpty() && data.getEffects().isEmpty())
+ {
+ return;
+ }
+
+ PlayerVariables vars = player.getScript(PlayerVariables.class);
+ if (vars == null)
+ {
+ vars = player.addScript(new PlayerVariables(player.getObjectId()));
+ }
+
+ final String key = (data.isKillSteak() ? DATABASE_VAR_STEAK : DATABASE_VAR_PVPS) + data.getFixedKills();
+ if (!vars.getBool(key, false)) // Make sure player hasn't received this rewards yet!
+ {
+ // Give items
+ for (ItemHolder holder : data.getItems())
+ {
+ manager.giveItems(player, holder); // Give item.
+ }
+
+ // Apply effects.
+ for (SkillHolder holder : data.getEffects())
+ {
+ holder.getSkill().getEffects(player, player); // Activate effect.
+ }
+
+ // Give skills.
+ for (PvPSkill skill : data.getSkills())
+ {
+ if (skill.getTime() > 0) // Only temporarily skills.
+ {
+ PvPManager.addSkill(player, skill);
+ }
+ }
+
+ // Mark rewards as received.
+ vars.set(key, true);
+ }
+ }
+}
Index: dist/game/data/scripts/custom/PvP/data.xsd
===================================================================
--- dist/game/data/scripts/custom/PvP/data.xsd (revision 0)
+++ dist/game/data/scripts/custom/PvP/data.xsd (working copy)
@@ -0,0 +1,38 @@
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="list">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="pvp" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute type="xs:integer" name="id" />
+ <xs:attribute type="xs:long" name="amount" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="skill" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute type="xs:integer" name="id" />
+ <xs:attribute type="xs:integer" name="level" />
+ <xs:attribute type="xs:integer" name="time" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="effect" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute type="xs:integer" name="id" />
+ <xs:attribute type="xs:integer" name="level" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute type="xs:short" name="fixedKills" use="optional" />
+ <xs:attribute type="xs:short" name="killSteak" use="optional" />
+ <xs:attribute type="xs:string" name="nameColor" use="optional" />
+ <xs:attribute type="xs:string" name="titleColor" use="optional" />
+ <xs:attribute type="xs:string" name="title" use="optional" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
\ No newline at end of file
Index: dist/game/data/scripts/custom/PvP/PvPDataParser.java
===================================================================
--- dist/game/data/scripts/custom/PvP/PvPDataParser.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/PvPDataParser.java (working copy)
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.logging.Level;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.l2jserver.gameserver.engines.DocumentParser;
+import com.l2jserver.gameserver.model.StatsSet;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.holders.SkillHolder;
+
+import custom.PvP.model.PvPData;
+import custom.PvP.model.PvPSkill;
+
+/**
+ * @author UnAfraid
+ */
+public class PvPDataParser extends DocumentParser
+{
+ private final List<PvPData> _fixedKillsData = new LinkedList<>();
+ private final List<PvPData> _killSteakData = new LinkedList<>();
+
+ protected PvPDataParser()
+ {
+ load();
+ }
+
+ @Override
+ public void load()
+ {
+ // Initial objects used for calculation.
+ _fixedKillsData.add(new PvPData(true));
+ _killSteakData.add(new PvPData(false));
+
+ parseDatapackFile("data/scripts/custom/PvP/data.xml");
+ _log.log(Level.INFO, PvPManager.class.getSimpleName() + ": Loaded " + _fixedKillsData.size() + " Min Kill settings.");
+ _log.log(Level.INFO, PvPManager.class.getSimpleName() + ": Loaded " + _killSteakData.size() + " Kill Steak settings.");
+ }
+
+ @Override
+ protected void parseDocument()
+ {
+ Node att;
+ NamedNodeMap attrs;
+ StatsSet set;
+ for (Node n = getCurrentDocument().getFirstChild(); n != null; n = n.getNextSibling())
+ {
+ if ("list".equalsIgnoreCase(n.getNodeName()))
+ {
+ for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
+ {
+ if ("pvp".equalsIgnoreCase(d.getNodeName()))
+ {
+ attrs = d.getAttributes();
+ set = new StatsSet();
+ for (int i = 0; i < attrs.getLength(); i++)
+ {
+ att = attrs.item(i);
+ set.set(att.getNodeName(), att.getNodeValue());
+ }
+ final PvPData data = new PvPData(set);
+ for (Node a = d.getFirstChild(); a != null; a = a.getNextSibling())
+ {
+ if ("item".equals(a.getNodeName()))
+ {
+ attrs = a.getAttributes();
+ final int itemId = parseInt(attrs, "id");
+ final int itemAmount = parseInt(attrs, "amount");
+ data.addItem(new ItemHolder(itemId, itemAmount));
+ }
+ else if ("effect".equals(a.getNodeName()))
+ {
+ attrs = a.getAttributes();
+ final int skillId = parseInt(attrs, "id");
+ final int skillLvl = parseInt(attrs, "level");
+ data.addEffect(new SkillHolder(skillId, skillLvl));
+ }
+ else if ("skill".equals(a.getNodeName()))
+ {
+ attrs = a.getAttributes();
+ final int skillId = parseInt(attrs, "id");
+ final int skillLvl = parseInt(attrs, "level");
+ final int time = parseInt(attrs, "time");
+ data.addSkill(new PvPSkill(skillId, skillLvl, time));
+ }
+ }
+ if (!data.isKillSteak() && data.isFixedPvPs())
+ {
+ _fixedKillsData.add(data);
+ }
+ else if (data.isKillSteak() && !data.isFixedPvPs())
+ {
+ _killSteakData.add(data);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public List<PvPData> getFixedKillsData()
+ {
+ return _fixedKillsData;
+ }
+
+ public List<PvPData> getKillsSteakData()
+ {
+ return _killSteakData;
+ }
+}
\ No newline at end of file
Index: dist/game/data/scripts/custom/PvP/model/PvPSkillRemover.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/PvPSkillRemover.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/PvPSkillRemover.java (working copy)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model;
+
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.SkillHolder;
+
+import custom.PvP.PvPManager;
+
+/**
+ * @author UnAfraid
+ */
+public final class PvPSkillRemover implements Runnable
+{
+ private final int _objectId;
+ private final SkillHolder _holder;
+
+ public PvPSkillRemover(int objectId, SkillHolder holder)
+ {
+ _objectId = objectId;
+ _holder = holder;
+ }
+
+ @Override
+ public void run()
+ {
+ final L2PcInstance player = L2World.getInstance().getPlayer(_objectId);
+ if (player != null)
+ {
+ PvPManager.removeSkill(player, _holder.getSkillId());
+ }
+ }
+}
\ No newline at end of file
Index: dist/game/data/scripts/custom/PvP/data.xml
===================================================================
--- dist/game/data/scripts/custom/PvP/data.xml (revision 0)
+++ dist/game/data/scripts/custom/PvP/data.xml (working copy)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="data.xsd">
+ <!-- Settings for static PvP flags! -->
+ <pvp fixedKills="5" titleColor="0x00FFFF" title="PvP Noobje" />
+ <pvp fixedKills="10" titleColor="0xFF00FF" title="PvP Rookie" />
+ <pvp fixedKills="20" titleColor="0x00FF00" title="PvP Pro" />
+ <pvp fixedKills="40" titleColor="0xF0FF0F" title="PvP Master">
+ <effect id="396" level="1" /> <!-- Heroic Berserker -->
+ </pvp>
+ <pvp fixedKills="80" titleColor="0x0F0FF0" title="PvP Grand Master">
+ <skill id="395" level="1" time="600" /> <!-- Heroic Miracle for 10 mins -->
+ </pvp>
+ <pvp fixedKills="160" titleColor="0x000000" title="Player Ass Raper">
+ <item id="-200" amount="1000" /> <!-- Clan Reputation Points -->
+ <item id="-300" amount="5000" /> <!-- Fame -->
+ <item id="6673" amount="10" /> <!-- Festival Adena -->
+ </pvp>
+ <!-- Settings for kill steak! -->
+ <pvp killSteak="5">
+ <item id="6673" amount="1" /> <!-- Festival Adena -->
+ </pvp>
+ <pvp killSteak="10">
+ <item id="-200" amount="500" /> <!-- Clan Reputation Points -->
+ <item id="6673" amount="5" /> <!-- Festival Adena -->
+ <effect id="396" level="1" /> <!-- Heroic Berserker -->
+ </pvp>
+ <pvp killSteak="15">
+ <item id="-200" amount="1000" /> <!-- Clan Reputation Points -->
+ <item id="6673" amount="10" /> <!-- Festival Adena -->
+ <skill id="395" level="1" time="600" /> <!-- Heroic Miracle for 10 mins -->
+ <effect id="396" level="1" /> <!-- Heroic Berserker -->
+ </pvp>
+</list>
\ No newline at end of file
Index: dist/game/data/scripts/custom/PvP/PvPManager.java
===================================================================
--- dist/game/data/scripts/custom/PvP/PvPManager.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/PvPManager.java (working copy)
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.datatables.MultiSell;
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.skills.L2Skill;
+import com.l2jserver.gameserver.scripting.scriptengine.events.DeathEvent;
+
+import custom.PvP.model.PlayerData;
+import custom.PvP.model.PvPData;
+import custom.PvP.model.PvPSkill;
+import custom.PvP.model.PvPSkillRemover;
+import custom.PvP.model.handlers.IPvPHandler;
+import custom.PvP.model.handlers.PvPOneTimeRewardsHandler;
+import custom.PvP.model.handlers.PvPPermanentRewardsHandler;
+import custom.PvP.model.handlers.PvPTitleHandler;
+
+/**
+ * @author UnAfraid
+ */
+public final class PvPManager extends AbstractNpcAI
+{
+ private final PvPDataParser _parser = new PvPDataParser();
+ private final List<IPvPHandler> _handlers = new ArrayList<>();
+
+ private PvPManager(String name, String descr)
+ {
+ super(name, descr);
+ addLoginLogoutNotify();
+
+ // Init handlers.
+ _handlers.add(new PvPOneTimeRewardsHandler());
+ _handlers.add(new PvPPermanentRewardsHandler());
+ _handlers.add(new PvPTitleHandler());
+ }
+
+ /**
+ * When reloading the script would be nice to release all links to current instance of this class.
+ * @param removeFromList
+ */
+ @Override
+ public boolean unload(boolean removeFromList)
+ {
+ _handlers.clear();
+ removeLoginLogoutNotify();
+ for (L2PcInstance player : L2World.getInstance().getAllPlayersArray())
+ {
+ removeDeathNotify(player);
+ }
+ return super.unload(removeFromList);
+ }
+
+ /**
+ * When player login request death notifications. Also set title if possible
+ * @param player
+ */
+ @Override
+ public void onPlayerLogin(L2PcInstance player)
+ {
+ addDeathNotify(player);
+ handlePvP(player);
+ }
+
+ /**
+ * When player logout removing him from death notification listeners.
+ * @param player
+ */
+ @Override
+ public void onPlayerLogout(L2PcInstance player)
+ {
+ removeDeathNotify(player);
+ }
+
+ /**
+ * Received death event make sure player killed another player and try to change his title if possible.
+ * @param event
+ */
+ @Override
+ public boolean onDeath(DeathEvent event)
+ {
+ final L2Character victim = event.getVictim();
+ final L2Character killer = event.getKiller();
+ if ((killer != null) && killer.isPlayer() && (victim != null) && victim.isPlayer())
+ {
+ final L2PcInstance player = killer.getActingPlayer();
+ if (player.getKarma() == 0) // If player has no karma then he killed him in pvp.
+ {
+ // Null kill steak of the victim.
+ PlayerData data = victim.getScript(PlayerData.class);
+ if (data != null) // If no data then he haven't made a kill yet we will create an instance for him when he kill a player.
+ {
+ data.setKillSteak(0);
+ }
+
+ // Increase kill steak of the killer.
+ data = killer.getScript(PlayerData.class);
+ if (data == null)
+ {
+ data = killer.addScript(new PlayerData()); // Killer must have an instance.
+ }
+ data.increaseKillSteak();
+
+ // Handle rewards.
+ handlePvP(player);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Trying to set title.
+ * @param player
+ */
+ private void handlePvP(L2PcInstance player)
+ {
+ final PlayerData playerData = getPlayerData(player);
+
+ // Kill Steak!
+ final PvPData steakData = findKillSteakData(playerData);
+ if (steakData != null)
+ {
+ notifyHandlers(player, steakData, findPreviousKillSteak(playerData), playerData);
+ }
+
+ // Fixed PvPs
+ final PvPData data = findPvPData(player);
+ if (data != null)
+ {
+ notifyHandlers(player, data, playerData.getPvPData(), playerData);
+
+ // store current data.
+ playerData.setPvPData(data);
+ }
+ }
+
+ private void notifyHandlers(L2PcInstance player, PvPData data, PvPData oldData, PlayerData playerData)
+ {
+ for (IPvPHandler handler : _handlers)
+ {
+ try
+ {
+ handler.handlePvP(player, data, oldData, playerData, this);
+ }
+ catch (Throwable t)
+ {
+ _log.log(Level.WARNING, "Exception in: " + handler.getClass().getSimpleName() + " Message: " + t.getMessage(), t);
+ }
+ }
+ }
+
+ private PvPData findPvPData(L2PcInstance player)
+ {
+ PvPData result = null;
+ for (PvPData data : _parser.getFixedKillsData())
+ {
+ if ((result == null) || ((player.getPvpKills() >= data.getFixedKills()) && (data.getFixedKills() > result.getFixedKills())))
+ {
+ result = data;
+ }
+ }
+ return result;
+ }
+
+ private PvPData findKillSteakData(PlayerData playerData)
+ {
+ PvPData result = null;
+ for (PvPData data : _parser.getKillsSteakData())
+ {
+ if (data.getKillSteak() == playerData.getKillSteak())
+ {
+ result = data;
+ break;
+ }
+ }
+ return result;
+ }
+
+ private PvPData findPreviousKillSteak(PlayerData playerData)
+ {
+ PvPData result = null;
+ for (PvPData data : _parser.getKillsSteakData())
+ {
+ if ((result == null) || ((data.getKillSteak() < playerData.getKillSteak()) && (data.getFixedKills() > result.getFixedKills())))
+ {
+ result = data;
+ }
+ }
+ return result;
+ }
+
+ private PlayerData getPlayerData(L2PcInstance player)
+ {
+ PlayerData result = player.getScript(PlayerData.class);
+ if (result == null)
+ {
+ result = player.addScript(new PlayerData());
+ }
+ return result;
+ }
+
+ /**
+ * @param player
+ * @param skill
+ */
+ public static void addSkill(L2PcInstance player, PvPSkill skill)
+ {
+ if (player.getKnownSkill(skill.getSkillId()) != null) // Make sure player doesn't already knows that skill.
+ {
+ throw new IllegalStateException("Player " + player + " has already learned skill " + skill.getSkill() + " that should be given by pvp rank system!");
+ }
+ player.addSkill(skill.getSkill(), false);
+ if (skill.getTime() > 0)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new PvPSkillRemover(player.getObjectId(), skill), skill.getTime() * 1000); // Schedule skill removal task.
+ }
+ }
+
+ /**
+ * @param player
+ * @param skillId
+ */
+ public static void removeSkill(L2PcInstance player, int skillId)
+ {
+ final L2Skill sk = player.getKnownSkill(skillId);
+ if (sk == null)
+ {
+ throw new IllegalStateException("Removing skill " + skillId + " from " + player + " but he wasn't knowing it!");
+ }
+ player.removeSkill(sk, false, sk.isPassive()); // Cancel only passive effects.
+ }
+
+ /**
+ * @param player
+ * @param holder
+ */
+ @Override
+ public void giveItems(L2PcInstance player, ItemHolder holder)
+ {
+ switch (holder.getId())
+ {
+ case MultiSell.PC_BANG_POINTS:
+ {
+ throw new UnsupportedOperationException("PC Bang points are not supported yet!");
+ }
+ case MultiSell.CLAN_REPUTATION:
+ {
+ if (player.getClan() == null)
+ {
+ return;
+ }
+ }
+ case MultiSell.FAME:
+ {
+ MultiSell.addSpecialProduct(holder.getId(), holder.getCount(), player);
+ break;
+ }
+ default:
+ {
+ super.giveItems(player, holder);
+ break;
+ }
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new PvPManager(PvPManager.class.getSimpleName(), "custom");
+ }
+}
Index: dist/game/data/scripts/custom/PvP/model/PvPSkill.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/PvPSkill.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/PvPSkill.java (working copy)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model;
+
+import com.l2jserver.gameserver.model.holders.SkillHolder;
+
+/**
+ * @author UnAfraid
+ */
+public class PvPSkill extends SkillHolder
+{
+ private final int _time;
+
+ /**
+ * @param skillId
+ * @param skillLvl
+ * @param time
+ */
+ public PvPSkill(int skillId, int skillLvl, int time)
+ {
+ super(skillId, skillLvl);
+ _time = time;
+ }
+
+ /**
+ * @return time in seconds.
+ */
+ public int getTime()
+ {
+ return _time;
+ }
+}
Index: dist/game/data/scripts/custom/PvP/model/PvPData.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/PvPData.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/PvPData.java (working copy)
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import com.l2jserver.gameserver.model.StatsSet;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.holders.SkillHolder;
+
+/**
+ * @author UnAfraid
+ */
+public class PvPData
+{
+ public static final int DEFAULT_NAME_COLOR = 0xFFFFFF;
+ public static final int DEFAULT_TITLE_COLOR = 0xFFFF77;
+
+ private final int _fixedKills;
+ private final int _killSteak;
+ private final int _nameColor;
+ private final int _titleColor;
+ private final String _title;
+
+ private final List<ItemHolder> _items = new LinkedList<>();
+ private final List<SkillHolder> _effects = new LinkedList<>();
+ private final List<PvPSkill> _skills = new LinkedList<>();
+
+ public PvPData(StatsSet set)
+ {
+ _fixedKills = set.getInteger("fixedKills", -1);
+ _killSteak = set.getInteger("killSteak", -1);
+ _nameColor = Integer.decode(set.getString("nameColor", Integer.toString(DEFAULT_NAME_COLOR)));
+ _titleColor = Integer.decode(set.getString("titleColor", Integer.toString(DEFAULT_TITLE_COLOR)));
+ _title = set.getString("title", "");
+ }
+
+ /**
+ * Dummy constructor for place holders
+ * @param minKills
+ */
+ public PvPData(boolean minKills)
+ {
+ _fixedKills = minKills ? 0 : -1;
+ _killSteak = minKills ? 1 : -1;
+ _nameColor = DEFAULT_NAME_COLOR;
+ _titleColor = DEFAULT_TITLE_COLOR;
+ _title = "";
+ }
+
+ public int getFixedKills()
+ {
+ return _fixedKills;
+ }
+
+ public int getKillSteak()
+ {
+ return _killSteak;
+ }
+
+ public int getNameColor()
+ {
+ return _nameColor;
+ }
+
+ public int getTitleColor()
+ {
+ return _titleColor;
+ }
+
+ public String getTitle()
+ {
+ return _title;
+ }
+
+ public void addItem(ItemHolder holder)
+ {
+ _items.add(holder);
+ }
+
+ public void addEffect(SkillHolder holder)
+ {
+ _effects.add(holder);
+ }
+
+ public void addSkill(PvPSkill holder)
+ {
+ _skills.add(holder);
+ }
+
+ public List<ItemHolder> getItems()
+ {
+ return _items;
+ }
+
+ public List<SkillHolder> getEffects()
+ {
+ return _effects;
+ }
+
+ public List<PvPSkill> getSkills()
+ {
+ return _skills;
+ }
+
+ public boolean isKillSteak()
+ {
+ return _killSteak != -1;
+ }
+
+ public boolean isFixedPvPs()
+ {
+ return _fixedKills != -1;
+ }
+}
Index: dist/game/data/scripts/custom/PvP/model/PlayerData.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/PlayerData.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/PlayerData.java (working copy)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * @author UnAfraid
+ */
+public class PlayerData
+{
+ private volatile PvPData _data;
+ private final AtomicInteger _killSteak = new AtomicInteger();
+
+ public PlayerData()
+ {
+ }
+
+ public PvPData getPvPData()
+ {
+ return _data;
+ }
+
+ public int getKillSteak()
+ {
+ return _killSteak.get();
+ }
+
+ public void setKillSteak(int val)
+ {
+ _killSteak.set(val);
+ }
+
+ public int increaseKillSteak()
+ {
+ return _killSteak.incrementAndGet();
+ }
+
+ public void setPvPData(PvPData data)
+ {
+ _data = data;
+ }
+}
Index: dist/game/data/scripts/custom/PvP/model/handlers/IPvPHandler.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/handlers/IPvPHandler.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/handlers/IPvPHandler.java (working copy)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model.handlers;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+import custom.PvP.PvPManager;
+import custom.PvP.model.PlayerData;
+import custom.PvP.model.PvPData;
+
+/**
+ * @author UnAfraid
+ */
+public interface IPvPHandler
+{
+ public void handlePvP(L2PcInstance player, PvPData data, PvPData oldData, PlayerData playerData, PvPManager manager);
+}
Index: dist/game/data/scripts/custom/PvP/model/handlers/PvPTitleHandler.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/handlers/PvPTitleHandler.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/handlers/PvPTitleHandler.java (working copy)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model.handlers;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+import custom.PvP.PvPManager;
+import custom.PvP.model.PlayerData;
+import custom.PvP.model.PvPData;
+
+/**
+ * @author UnAfraid
+ */
+public final class PvPTitleHandler implements IPvPHandler
+{
+ @Override
+ public void handlePvP(final L2PcInstance player, final PvPData data, final PvPData oldData, final PlayerData playerData, final PvPManager manager)
+ {
+ boolean broadcast = false;
+
+ // Title
+ if (!data.getTitle().isEmpty()) // If custom title is empty don't set it.
+ {
+ player.setTitle(data.getTitle());
+ broadcast = true;
+ }
+
+ // Title Color
+ if (data.getTitleColor() != PvPData.DEFAULT_TITLE_COLOR) // If custom color is default one don't set it.
+ {
+ player.getAppearance().setTitleColor(data.getTitleColor());
+ broadcast = true;
+ }
+
+ // Name Color
+ if (data.getNameColor() != PvPData.DEFAULT_NAME_COLOR) // If custom color is default one don't set it.
+ {
+ player.getAppearance().setNameColor(data.getNameColor());
+ broadcast = true;
+ }
+
+ // Broadcast if something has changed.
+ if (broadcast)
+ {
+ player.broadcastTitleInfo();
+ }
+ }
+}
Index: dist/game/data/scripts/custom/PvP/model/handlers/PvPPermanentRewardsHandler.java
===================================================================
--- dist/game/data/scripts/custom/PvP/model/handlers/PvPPermanentRewardsHandler.java (revision 0)
+++ dist/game/data/scripts/custom/PvP/model/handlers/PvPPermanentRewardsHandler.java (working copy)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2004-2013 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 custom.PvP.model.handlers;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+import custom.PvP.PvPManager;
+import custom.PvP.model.PlayerData;
+import custom.PvP.model.PvPData;
+import custom.PvP.model.PvPSkill;
+
+/**
+ * @author UnAfraid
+ */
+public final class PvPPermanentRewardsHandler implements IPvPHandler
+{
+ @Override
+ public void handlePvP(final L2PcInstance player, final PvPData data, final PvPData oldData, final PlayerData playerData, final PvPManager manager)
+ {
+ if (oldData != null)
+ {
+ // Remove bonuses from previous rank.
+ for (PvPSkill skill : oldData.getSkills())
+ {
+ if (skill.getTime() == -1) // Permanent skill.
+ {
+ PvPManager.removeSkill(player, skill.getSkillId());
+ }
+ }
+ }
+
+ // Apply bonuses from the new rank.
+ for (PvPSkill skill : data.getSkills())
+ {
+ if (skill.getTime() == -1) // Permanent skill.
+ {
+ PvPManager.addSkill(player, skill);
+ }
+ }
+ }
+}

Cita de: UnAfraidSince a lot of community members are requesting for such feature finally i managed to code one simple.

Here's what i've got for now:
  • Ability to set custom title when player reach specified amount of pvps.
  • Ability to set custom title color when player reach specified amount of pvps.
TODO:
  • Ability to receive Item on specified amount of pvps. (Done in 2.0b)
  • Ability to receive Fame on specified amount of pvps. (Done in 2.0b)
  • Ability to receive Clan Reputation Points on specified amount of pvps. (Done in 2.0b)
  • Ability to receive Skill (For certain period of time?)on specified amount of pvps. (Done in 2.0b)
  • Ability to receive Buff on specified amount of pvps. (Done in 2.0b)
  • Ability to  change color on the character name.
Title is updated after each PvP or logging in.
Reloading of xml data is possible through the fallowing command:
Código (text) [Seleccionar]
//script_load PvPTitle
Version: 1.0
Status: Tested & Working!
Patch: Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate :)

Beta version containing all todo features.
Version: 2.0b
Status: Not tested yet!
Patch: Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Alpha version containing all todo features:
Version: 3.0a
Status: Not tested  at all!
Patch: Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Requires:
Core: [changeset]5815[/changeset]
DP: [dpchangeset]9467[/dpchangeset]

Requested by: Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate


Feel free to suggest anything regarding it.