Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: /trunk/Game/java/net/sf/l2j/Config.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/Config.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/Config.java (revision 681)
- @@ -171,10 +171,17 @@
- public static boolean TVT_EVENT_POTIONS_ALLOWED;
- public static boolean TVT_EVENT_SUMMON_BY_ITEM_ALLOWED;
- public static List<Integer> TVT_EVENT_DOOR_IDS = new FastList<Integer>();
- public static byte TVT_EVENT_MIN_LVL;
- public static byte TVT_EVENT_MAX_LVL;
- +
- + /** Raid Event Engine */
- + public static boolean RAID_SYSTEM_ENABLED;
- + public static int RAID_SYSTEM_MAX_EVENTS;
- + public static boolean RAID_SYSTEM_GIVE_BUFFS;
- + public static boolean RAID_SYSTEM_RESURRECT_PLAYER;
- + public static int RAID_SYSTEM_FIGHT_TIME;
- public static boolean L2JMOD_ALLOW_WEDDING;
- public static int L2JMOD_WEDDING_PRICE;
- public static boolean L2JMOD_WEDDING_PUNISH_INFIDELITY;
- public static boolean L2JMOD_WEDDING_TELEPORT;
- @@ -2011,10 +2018,21 @@
- }
- }
- }
- }
- }
- +
- + RAID_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("RaidEnginesEnabled", "false"));
- + RAID_SYSTEM_GIVE_BUFFS = Boolean.parseBoolean(L2JModSettings.getProperty("RaidGiveBuffs", "true"));
- + RAID_SYSTEM_RESURRECT_PLAYER = Boolean.parseBoolean(L2JModSettings.getProperty("RaidResurrectPlayer", "true"));
- + RAID_SYSTEM_MAX_EVENTS = Integer.parseInt(L2JModSettings.getProperty("RaidMaxNumEvents", "3"));
- + RAID_SYSTEM_FIGHT_TIME = Integer.parseInt(L2JModSettings.getProperty("RaidSystemFightTime", "60"));
- + if (RAID_SYSTEM_MAX_EVENTS == 0)
- + {
- + RAID_SYSTEM_ENABLED = false;
- + System.out.println("Raid Engine[Config.load()]: Invalid config property: Max Events = 0?!");
- + }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- Index: /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/DlgAnswer.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/DlgAnswer.java (revision 253)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/DlgAnswer.java (revision 681)
- @@ -20,10 +20,11 @@
- import java.util.logging.Logger;
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.model.actor.instance.L2EventManagerInstance;
- /**
- * @author Dezmond_snz
- * Format: cddd
- */
- @@ -48,13 +49,20 @@
- {
- if (Config.DEBUG)
- _log.fine(getType()+": Answer acepted. Message ID "+_messageId+", asnwer "+_answer+", unknown field "+_unk);
- if (_messageId == SystemMessageId.RESSURECTION_REQUEST.getId())
- getClient().getActiveChar().reviveAnswer(_answer);
- - else if (_messageId==614 && Config.L2JMOD_ALLOW_WEDDING)
- - getClient().getActiveChar().EngageAnswer(_answer);
- -
- + else if (_messageId==614 && getClient().getActiveChar().awaitingAnswer && Config.L2JMOD_ALLOW_WEDDING)
- + {
- + getClient().getActiveChar().EngageAnswer(_answer);
- + getClient().getActiveChar().awaitingAnswer = false;
- + }
- + else if (_messageId==614 && L2EventManagerInstance._awaitingplayers.contains(getClient().getActiveChar()))
- + {
- + getClient().getActiveChar().setRaidAnswear(_answer);
- + L2EventManagerInstance._awaitingplayers.remove(getClient().getActiveChar());
- + }
- }
- @Override
- public String getType()
- {
- Index: /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/RequestRestartPoint.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/RequestRestartPoint.java (revision 636)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/RequestRestartPoint.java (revision 681)
- @@ -24,10 +24,11 @@
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- import net.sf.l2j.gameserver.instancemanager.CastleManager;
- import net.sf.l2j.gameserver.instancemanager.ClanHallManager;
- import net.sf.l2j.gameserver.model.L2SiegeClan;
- import net.sf.l2j.gameserver.model.Location;
- +import net.sf.l2j.gameserver.model.entity.L2RaidEvent;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.entity.Castle;
- import net.sf.l2j.gameserver.model.entity.ClanHall;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.serverpackets.Revive;
- @@ -182,10 +183,34 @@
- {
- _log.warning("Living player ["+activeChar.getName()+"] called RestartPointPacket! Ban this player!");
- return;
- }
- + if (activeChar.inClanEvent || activeChar.inPartyEvent || activeChar.inSoloEvent)
- + {
- + activeChar.inClanEvent = false;
- + activeChar.inPartyEvent = false;
- + activeChar.inSoloEvent = false;
- + if (L2RaidEvent._eventType == 2)
- + {
- + if(L2RaidEvent._participatingPlayers.contains(activeChar))
- + // Clear player from Event.
- + L2RaidEvent._participatingPlayers.remove(activeChar);
- + }
- + if (L2RaidEvent._eventType == 3)
- + {
- + if (activeChar.getParty()!=null)
- + activeChar.leaveParty();
- + activeChar.sendMessage("You have been kicked from the party");
- + }
- + activeChar.sendMessage("You've been erased from the event!");
- + int num = L2RaidEvent._participatingPlayers.size();
- + if (num > 0 && num!=1)
- + num -= 1;
- + else
- + L2RaidEvent.hardFinish();
- + }
- Castle castle = CastleManager.getInstance().getCastle(activeChar.getX(), activeChar.getY(), activeChar.getZ());
- if (castle != null && castle.getSiege().getIsInProgress())
- {
- //DeathFinalizer df = new DeathFinalizer(10000);
- Index: /trunk/Game/java/net/sf/l2j/gameserver/skills/DocumentSkill.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/skills/DocumentSkill.java (revision 253)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/skills/DocumentSkill.java (revision 682)
- @@ -246,90 +246,76 @@
- }
- }
- }
- for (int i=lastLvl; i < lastLvl+enchantLevels1; i++)
- {
- + _currentSkill.currentLevel = lastLvl-1;
- + for (n=first; n != null; n = n.getNextSibling())
- + {
- + if ("cond".equalsIgnoreCase(n.getNodeName()))
- + {
- + Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- + Node msg = n.getAttributes().getNamedItem("msg");
- + if (condition != null && msg != null)
- + condition.setMessage(msg.getNodeValue());
- + _currentSkill.currentSkills.get(i).attach(condition,false);
- + }
- + if ("for".equalsIgnoreCase(n.getNodeName()))
- + {
- + parseTemplate(n, _currentSkill.currentSkills.get(i));
- + }
- + }
- _currentSkill.currentLevel = i-lastLvl;
- - boolean found = false;
- for (n=first; n != null; n = n.getNextSibling())
- {
- if ("enchant1cond".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- Node msg = n.getAttributes().getNamedItem("msg");
- if (condition != null && msg != null)
- condition.setMessage(msg.getNodeValue());
- _currentSkill.currentSkills.get(i).attach(condition,false);
- }
- if ("enchant1for".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- parseTemplate(n, _currentSkill.currentSkills.get(i));
- }
- }
- - // If none found, the enchanted skill will take effects from maxLvL of norm skill
- - if (!found)
- - {
- - _currentSkill.currentLevel = lastLvl-1;
- - for (n=first; n != null; n = n.getNextSibling())
- - {
- - if ("cond".equalsIgnoreCase(n.getNodeName()))
- - {
- - Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- - Node msg = n.getAttributes().getNamedItem("msg");
- - if (condition != null && msg != null)
- - condition.setMessage(msg.getNodeValue());
- - _currentSkill.currentSkills.get(i).attach(condition,false);
- - }
- - if ("for".equalsIgnoreCase(n.getNodeName()))
- - {
- - parseTemplate(n, _currentSkill.currentSkills.get(i));
- - }
- - }
- - }
- }
- for (int i=lastLvl+enchantLevels1; i < lastLvl+enchantLevels1+enchantLevels2; i++)
- {
- - boolean found = false;
- - _currentSkill.currentLevel = i-lastLvl-enchantLevels1;
- + _currentSkill.currentLevel = lastLvl-1;
- + for (n=first; n != null; n = n.getNextSibling())
- + {
- + if ("cond".equalsIgnoreCase(n.getNodeName()))
- + {
- + Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- + Node msg = n.getAttributes().getNamedItem("msg");
- + if (condition != null && msg != null)
- + condition.setMessage(msg.getNodeValue());
- + _currentSkill.currentSkills.get(i).attach(condition,false);
- + }
- + if ("for".equalsIgnoreCase(n.getNodeName()))
- + {
- + parseTemplate(n, _currentSkill.currentSkills.get(i));
- + }
- + }
- + _currentSkill.currentLevel = i-lastLvl-enchantLevels1;
- for (n=first; n != null; n = n.getNextSibling())
- {
- if ("enchant2cond".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- Node msg = n.getAttributes().getNamedItem("msg");
- if (condition != null && msg != null)
- condition.setMessage(msg.getNodeValue());
- _currentSkill.currentSkills.get(i).attach(condition,false);
- }
- if ("enchant2for".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- parseTemplate(n, _currentSkill.currentSkills.get(i));
- }
- - }
- - // If none found, the enchanted skill will take effects from maxLvL of norm skill
- - if(!found)
- - {
- - _currentSkill.currentLevel = lastLvl-1;
- - for (n=first; n != null; n = n.getNextSibling())
- - {
- - if ("cond".equalsIgnoreCase(n.getNodeName()))
- - {
- - Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- - Node msg = n.getAttributes().getNamedItem("msg");
- - if (condition != null && msg != null)
- - condition.setMessage(msg.getNodeValue());
- - _currentSkill.currentSkills.get(i).attach(condition,false);
- - }
- - if ("for".equalsIgnoreCase(n.getNodeName()))
- - {
- - parseTemplate(n, _currentSkill.currentSkills.get(i));
- - }
- - }
- }
- }
- _currentSkill.skills.addAll(_currentSkill.currentSkills);
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 382)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 682)
- @@ -31,10 +31,11 @@
- import net.sf.l2j.gameserver.SevenSignsFestival;
- import net.sf.l2j.gameserver.ThreadPoolManager;
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.datatables.ClanTable;
- +import net.sf.l2j.gameserver.datatables.BuffTemplateTable;
- import net.sf.l2j.gameserver.datatables.HelperBuffTable;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.SkillTable;
- import net.sf.l2j.gameserver.datatables.SpawnTable;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- @@ -122,10 +123,11 @@
- /** The castle index in the array of L2Castle this L2NpcInstance belongs to */
- private int _castleIndex = -2;
- public boolean isEventMob = false;
- + public boolean isPrivateEventMob = false;
- public boolean _isEventMobDM = false;
- private boolean _isInTown = false;
- private int _isSpoiledBy = 0;
- @@ -1021,10 +1023,14 @@
- player.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_FROM_WHICH_YOU_WISH_TO_REMOVE_AUGMENTATION));
- player.sendPacket(new ExShowVariationCancelWindow());
- break;
- }
- }
- + else if (command.startsWith("MakeBuffs"))
- + {
- + makeBuffs(player,command.substring(9).trim());
- + }
- else if (command.startsWith("npcfind_byid"))
- {
- try
- {
- L2Spawn spawn = SpawnTable.getInstance().getTemplate(Integer.parseInt(command.substring(12).trim()));
- @@ -1097,10 +1103,27 @@
- if (!(item instanceof L2Weapon))
- return null;
- return (L2Weapon)item;
- + }
- +
- + /**
- + * Throws an action command to L2BufferInstance.<br>
- + * @param player --> Target player
- + * @param buffTemplate --> Name of the Buff Template to Add
- + */
- + public void makeBuffs(L2PcInstance player, String buffTemplate)
- + {
- + int _templateId = 0;
- +
- + try
- + {_templateId = Integer.parseInt(buffTemplate);}
- + catch (NumberFormatException e)
- + {_templateId = BuffTemplateTable.getInstance().getTemplateIdByName(buffTemplate);}
- + if (_templateId>0)
- + {L2BufferInstance.makeBuffs(player, _templateId, this,true);}
- }
- /**
- * Return null (regular NPCs don't have weapons instancies).<BR><BR>
- */
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2EventManagerInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2EventManagerInstance.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2EventManagerInstance.java (revision 681)
- @@ -0,0 +1,225 @@
- +/*
- + * 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.actor.instance;
- +
- +import java.util.List;
- +import java.util.StringTokenizer;
- +import java.util.Vector;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.model.entity.L2EventChecks;
- +import net.sf.l2j.gameserver.serverpackets.ActionFailed;
- +import net.sf.l2j.gameserver.serverpackets.ConfirmDlg;
- +import net.sf.l2j.gameserver.templates.L2NpcTemplate;
- +
- +/**
- + * This Class manages all the Requests to join a Raid Event.
- + *
- + * @author polbat02
- + */
- +public class L2EventManagerInstance extends L2NpcInstance
- +{
- + //Local Variables Definition
- + //--------------------------
- + /** Number of Current Events */
- + public static int _currentEvents = 0;
- + /** Players from which we're waiting an answer */
- + public static Vector<L2PcInstance> _awaitingplayers = new Vector<L2PcInstance>();
- + /** Players that will finally get inside the Event */
- + public static Vector<L2PcInstance> _finalPlayers = new Vector<L2PcInstance>();
- +
- + public L2EventManagerInstance(int objectId, L2NpcTemplate template)
- + {
- + super(objectId, template);
- + }
- +
- + public void onBypassFeedback(L2PcInstance player, String command)
- + {
- + player.sendPacket(new ActionFailed());
- + StringTokenizer st = new StringTokenizer(command, " ");
- + String actualCommand = st.nextToken();
- + _finalPlayers = new Vector<L2PcInstance>();
- +
- + if (actualCommand.equalsIgnoreCase("iEvent"))
- + {
- + try
- + {
- + /*Type:1- Single //2- Clan //3- Party*/
- + int type = Integer.parseInt(st.nextToken());
- + /*Required Event Points needed to participate*/
- + int eventPoints = Integer.parseInt(st.nextToken());
- + /* NpcId of the Event mobs */
- + int npcId = Integer.parseInt(st.nextToken());
- + /* Number of NPcs */
- + int npcAm =Integer.parseInt(st.nextToken());
- + /* Minimum number of needed persons players to participate */
- + int minPeople = Integer.parseInt(st.nextToken());
- + /* Minimum level to participate */
- + int minLevel = Integer.parseInt(st.nextToken());
- + /* Buff List to apply */
- + int bufflist = Integer.parseInt(st.nextToken());
- + /* Level of The Prize to Hand out */
- + int prizeLevel = Integer.parseInt(st.nextToken());
- + if (player == null){return;}
- + this.setTarget(player);
- +
- + if (_currentEvents>=Config.RAID_SYSTEM_MAX_EVENTS)
- + {
- + player.sendMessage("There's alredy "+_currentEvents+" events in progress. " +
- + "Wait untill one of them ends to get into another one.");
- + return;
- + }
- +
- + if (L2EventChecks.usualChecks(player,minLevel))
- + _finalPlayers.add(player);
- + else return;
- + // If the player has passed the checks, then continue.
- + switch (type)
- + {
- + // Case Clan Events.
- + case 2:
- + {
- + if(player.getClan()== null)
- + {
- + player.sendMessage("You Don't have a Clan!");
- + return;
- + }
- + L2PcInstance[] onlineclanMembers = player.getClan().getOnlineMembers("");
- + for (L2PcInstance member: onlineclanMembers)
- + {
- + boolean eligible = true;
- + if(member == null)
- + continue;
- + if(!L2EventChecks.usualChecks(member,minLevel))
- + eligible = false;
- + if(eligible && !(_finalPlayers.contains(member)))
- + _finalPlayers.add(member);
- + }
- + if (_finalPlayers.size()>1 && _finalPlayers.size()>=minPeople)
- + {
- + player.setRaidParameters(player,type,eventPoints,npcId,npcAm,minPeople,bufflist,prizeLevel,this, _finalPlayers);
- + _awaitingplayers.add(player);
- + player.sendPacket(new ConfirmDlg(614," A total of "+(_finalPlayers.size())+" members of your "
- + +" clan are Eligible for the event. Do you want to continue?"));
- + }
- + else
- + {
- + String reason;
- + if(_finalPlayers.size()>1)
- + reason =": Only 1 Clan Member Online.";
- + else if(_finalPlayers.size()<minPeople)
- + reason =": Not enough members online to participate.";
- + else reason=".";
- + player.sendMessage("Cannot participate"+reason);
- + }
- + break;
- + }
- + // Case Party Events.
- + case 3:
- + {
- + if(player.getParty()== null)
- + {
- + player.sendMessage("You DON'T have a Party!");
- + return;
- + }
- + List<L2PcInstance> partyMembers = player.getParty().getPartyMembers();
- + for (L2PcInstance member: partyMembers)
- + {
- + boolean eligible = true;
- + if(member == null)
- + continue;
- + if(!L2EventChecks.usualChecks(member,minLevel))
- + eligible = false;
- + if(eligible && !(_finalPlayers.contains(member)))
- + _finalPlayers.add(member);
- + }
- + if ((_finalPlayers.size())>1 && _finalPlayers.size()>=minPeople)
- + {
- + player.setRaidParameters(player,type,eventPoints,npcId,npcAm,minPeople,bufflist,prizeLevel,this, _finalPlayers);
- + _awaitingplayers.add(player);
- + player.sendPacket(new ConfirmDlg(614," A total of "+(_finalPlayers.size())+" members of your " +
- + "party are Eligible for the event. Do you want to continue?"));
- + }
- + else
- + {
- + String reason;
- + if(_finalPlayers.size()>1)
- + reason =": Only 1 Party Member.";
- + else if(_finalPlayers.size()<minPeople)
- + reason =": Not enough members to participate.";
- + else reason=".";
- + player.sendMessage("Cannot participate"+reason);
- + }
- + break;
- + }
- +
- + default:
- + {
- + player.setRaidParameters(player,type,eventPoints,npcId,npcAm,minPeople,bufflist,prizeLevel,this, _finalPlayers);
- + player.setRaidAnswear(1);
- + }
- + }
- + return;
- +
- + }
- + catch (Exception e)
- + {
- + _log.warning("L2EventManagerInstance: Error while getting html command");
- + e.printStackTrace();
- + }
- + }
- + super.onBypassFeedback(player, command);
- + }
- +
- + public String getHtmlPath(int npcId, int val)
- + {
- + String pom = "";
- + if (val == 0)
- + {
- + pom = "" + npcId;
- + }
- + else
- + {
- + pom = npcId + "-" + val;
- + }
- +
- + return "data/html/event/" + pom + ".htm";
- + }
- +
- + public static boolean addEvent()
- + {
- + if (_currentEvents>=Config.RAID_SYSTEM_MAX_EVENTS)
- + return false;
- + else
- + {
- + _currentEvents += 1;
- + return true;
- + }
- + }
- +
- + public static boolean removeEvent()
- + {
- + if(_currentEvents>0)
- + {
- + _currentEvents-=1;
- + return true;
- + }
- + else return false;
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 681)
- @@ -19,10 +19,11 @@
- package net.sf.l2j.gameserver.model.actor.instance;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.util.Calendar;
- +import java.util.Vector;
- import java.util.Collection;
- import java.util.Date;
- import java.util.LinkedList;
- import java.util.List;
- import java.util.Map;
- @@ -92,10 +93,12 @@
- import net.sf.l2j.gameserver.model.entity.DM;
- import net.sf.l2j.gameserver.model.L2DropData;
- import net.sf.l2j.gameserver.model.L2Effect;
- import net.sf.l2j.gameserver.model.L2Fishing;
- import net.sf.l2j.gameserver.model.L2HennaInstance;
- +import net.sf.l2j.gameserver.model.entity.L2EventChecks;
- +import net.sf.l2j.gameserver.model.entity.L2RaidEvent;
- import net.sf.l2j.gameserver.model.L2ItemInstance;
- import net.sf.l2j.gameserver.model.L2Macro;
- import net.sf.l2j.gameserver.model.L2ManufactureList;
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Party;
- @@ -215,12 +218,12 @@
- private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?)";
- private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC";
- private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?";
- - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,donator=? WHERE obj_id=?";
- - private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,donator FROM characters WHERE obj_id=?";
- + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,donator=?, event_points=? WHERE obj_id=?";
- + private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,donator,event_points FROM characters WHERE obj_id=?";
- private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC";
- private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
- private static final String UPDATE_CHAR_SUBCLASS = "UPDATE character_subclasses SET exp=?,sp=?,level=?,class_id=? WHERE char_obj_id=? AND class_index =?";
- private static final String DELETE_CHAR_SUBCLASS = "DELETE FROM character_subclasses WHERE char_obj_id=? AND class_index=?";
- @@ -4251,10 +4254,15 @@
- if (killer instanceof L2PcInstance)
- pk = (L2PcInstance) killer;
- TvTEvent.onKill(killer, this);
- +
- + if (Config.RAID_SYSTEM_RESURRECT_PLAYER &&(inSoloEvent||inPartyEvent||inClanEvent))
- + {
- + L2RaidEvent.onPlayerDeath(this);
- + }
- if (atEvent && pk != null)
- {
- pk.kills.add(getName());
- }
- @@ -5713,10 +5721,11 @@
- player.setPkKills(rset.getInt("pkkills"));
- player.setOnlineTime(rset.getLong("onlinetime"));
- player.setNewbie(rset.getInt("newbie")==1);
- player.setNoble(rset.getInt("nobless")==1);
- player.setdonator(rset.getInt("donator")==1);
- + player.setEventPoints(rset.getInt("event_points"));
- player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time"));
- if (player.getClanJoinExpiryTime() < System.currentTimeMillis())
- {
- player.setClanJoinExpiryTime(0);
- @@ -6178,11 +6187,12 @@
- statement.setLong(53, getClanJoinExpiryTime());
- statement.setLong(54, getClanCreateExpiryTime());
- statement.setString(55, getName());
- statement.setLong(56, getDeathPenaltyBuffLevel());
- statement.setInt(57, isdonator() ? 1 : 0);
- - statement.setInt(58, getObjectId());
- + statement.setInt(58, getEventPoints());
- + statement.setInt(59, getObjectId());
- statement.execute();
- statement.close();
- }
- catch (Exception e) { _log.warning("Could not store char base data: "+ e); }
- @@ -10724,6 +10734,83 @@
- public void systemSendMessage(SystemMessageId id)
- {
- sendPacket(new SystemMessage(id));
- }
- +
- + /** Raid Event Parameters */
- + public boolean inClanEvent = false;
- + public boolean inPartyEvent = false;
- + public boolean inSoloEvent = false;
- + public boolean awaitingAnswer = false;
- + private int _event_points;
- + public static int eventType;
- + public static int eventPointsRequired;
- + public static int eventNpcId;
- + public static int eventNpcAmmount;
- + public static int eventMinPlayers;
- + public static int eventBufflist;
- + public static int eventRewardLevel;
- + public static L2Object eventEffector;
- + public static Vector<L2PcInstance> eventParticipatingPlayers;
- +
- + /** Raid Event Related Voids */
- + public void setEventPoints(int points)
- + {
- + _event_points = points;
- + }
- + public int getEventPoints()
- + {
- + return _event_points;
- + }
- +
- + /**
- + * Set Raid Event Parameters, this is needed to keep track of events while waiting for an answear from the Clan Leader.
- + * @param player
- + * @param type
- + * @param points
- + * @param npcId
- + * @param npcAm
- + * @param minPeople
- + * @param bufflist
- + * @param rewardLevel
- + * @param effector
- + * @param participatingPlayers
- + */
- + public void setRaidParameters(L2PcInstance player,int type,int points,int npcId,
- + int npcAm,int minPeople,int bufflist,int rewardLevel,L2Object effector,
- + Vector<L2PcInstance> participatingPlayers)
- + {
- + eventType = type;
- + eventPointsRequired = points;
- + eventNpcId = npcId;
- + eventNpcAmmount = npcAm;
- + eventMinPlayers = minPeople;
- + eventBufflist = bufflist;
- + eventRewardLevel = rewardLevel;
- + eventEffector = effector;
- + eventParticipatingPlayers = participatingPlayers;
- + }
- +
- + public void setRaidAnswear(int answer)
- + {
- + if (this == null)
- + return;
- + if(answer == 1)
- + {
- + if(L2EventChecks.checkPlayer(this,eventType,eventPointsRequired,eventMinPlayers,eventParticipatingPlayers))
- + {
- + L2RaidEvent event;
- + event = new L2RaidEvent(this,eventType,eventPointsRequired,eventNpcId,eventNpcAmmount,eventBufflist,eventRewardLevel,eventEffector,eventParticipatingPlayers);
- + sendMessage("You've choosen to continue the event with "+eventParticipatingPlayers+ "online Member/s.");
- + try
- + {Thread.sleep(5000);}
- + catch (InterruptedException e)
- + {e.printStackTrace();}
- + event.init();
- + }
- + }
- + else if (answer == 0)
- + sendMessage("You don't want to continue with the Event.");
- + else return;
- + }
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java (revision 681)
- @@ -0,0 +1,160 @@
- +/* 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.actor.instance;
- +
- +import java.util.logging.Logger;
- +
- +import javolution.util.FastList;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.datatables.BuffTemplateTable;
- +import net.sf.l2j.gameserver.model.L2Character;
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.L2Object;
- +import net.sf.l2j.gameserver.model.L2Skill.SkillTargetType;
- +import net.sf.l2j.gameserver.model.L2Skill;
- +import net.sf.l2j.gameserver.model.L2Skill.SkillType;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.serverpackets.MagicSkillUser;
- +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.templates.L2BuffTemplate;
- +
- +public class L2BufferInstance
- +{
- + static L2PcInstance selfBuffer;
- + static L2NpcInstance npcBuffer;
- +
- + /**
- + * Apply Buffs onto a player.
- + * @param player
- + * @param _templateId
- + * @param efector
- + * @param paymentRequired
- + */
- + public static void makeBuffs(L2PcInstance player, int _templateId, L2Object efector,boolean paymentRequired)
- + {
- + if (player == null)
- + return;
- + getbufferType(efector).setTarget(player);
- +
- + FastList<L2BuffTemplate> _templateBuffs = new FastList<L2BuffTemplate>();
- + _templateBuffs = BuffTemplateTable.getInstance().getBuffTemplate(_templateId);
- +
- + if (_templateBuffs == null || _templateBuffs.size() == 0)
- + return;
- +
- + int _priceTotal = 0;
- + int _pricePoints =0;
- +
- + for (L2BuffTemplate _buff:_templateBuffs)
- + {
- + if (paymentRequired)
- + {
- + if(!_buff.checkPrice(player))
- + {
- + player.sendMessage("Not enough Adena");
- + return;
- + }
- + if(!_buff.checkPoints(player))
- + {
- + player.sendMessage("Not enough Event Points");
- + return;
- + }
- + }
- +
- + getbufferType(efector).setTarget(player);
- +
- + if ( _buff.checkPlayer(player) && _buff.checkPrice(player))
- + {
- + if (player.getInventory().getAdena() >= (_priceTotal + _buff.getAdenaPrice())
- + && player.getEventPoints()>=_buff.getPointsPrice())
- + {
- + _priceTotal+=_buff.getAdenaPrice();
- + _pricePoints+=_buff.getPointsPrice();
- + if (_buff.forceCast() || (_buff.getSkill()) == null)
- + {
- + // regeneration ^^
- +
- + player.setCurrentHpMp(player.getMaxHp()+5000, player.getMaxMp()+5000);
- + /*
- + * Mensaje informativo al cliente sobre los buffs dados.
- + */
- + SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
- + sm.addSkillName(_buff.getSkill().getId());
- + player.sendPacket(sm);
- + sm = null;
- + if (_buff.getSkill().getTargetType() == SkillTargetType.TARGET_SELF)
- + {
- + // Ignora el tiempo de casteo del skill, hay unos 100ms de animacion de casteo
- + MagicSkillUser msu = new MagicSkillUser(player, player, _buff.getSkill().getId(), _buff.getSkill().getLevel(), 100, 0);
- + player.broadcastPacket(msu);
- +
- + for (L2Effect effect : _buff.getSkill().getEffectsSelf(player))
- + {
- + player.addEffect(effect);
- + }
- + // newbie summons
- + if (_buff.getSkill().getSkillType() == SkillType.SUMMON)
- + {
- + player.doCast(_buff.getSkill());
- + }
- + }
- + else
- + { // Ignora el tiempo de casteo del skill, hay unos 5ms de animacion de casteo
- + MagicSkillUser msu = new MagicSkillUser(getbufferType(efector), player, _buff.getSkill().getId(), _buff.getSkill().getLevel(), 5, 0);
- + player.broadcastPacket(msu);
- + }
- +
- + for (L2Effect effect : _buff.getSkill().getEffects(getbufferType(efector), player))
- + {
- + player.addEffect(effect);
- + }
- + try{
- + Thread.sleep(50);
- + }catch (Exception e) {}
- + }
- + }
- + }
- + }
- + if (paymentRequired &&(_pricePoints>0 ||_priceTotal>0))
- + {
- + if(_pricePoints>0)
- + {
- + int previousPoints = player.getEventPoints();
- + player.setEventPoints(player.getEventPoints()-_pricePoints);
- + player.sendMessage("You had "+previousPoints+" Event Points, and now you have "+ player.getEventPoints()+" Event Points.");
- + }
- + if (_priceTotal>0)
- + player.reduceAdena("NpcBuffer", _priceTotal, player.getLastFolkNPC(), true);
- + }
- + }
- + private static L2Character getbufferType(L2Object efector)
- + {
- + if (efector instanceof L2PcInstance)
- + {
- + selfBuffer = ((L2PcInstance)efector);
- + efector = selfBuffer;
- + }
- + if (efector instanceof L2NpcInstance)
- + {
- + npcBuffer = ((L2NpcInstance)efector);
- + efector = npcBuffer;
- + }
- + return (L2Character) efector;
- + }
- + static Logger _log = Logger.getLogger(Config.class.getName());
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/L2Attackable.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/L2Attackable.java (revision 253)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/L2Attackable.java (revision 681)
- @@ -34,10 +34,11 @@
- import net.sf.l2j.gameserver.ai.L2SiegeGuardAI;
- import net.sf.l2j.gameserver.clientpackets.Say2;
- import net.sf.l2j.gameserver.datatables.EventDroplist;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.EventDroplist.DateDrop;
- +import net.sf.l2j.gameserver.model.entity.L2RaidEvent;
- import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager;
- import net.sf.l2j.gameserver.model.actor.instance.L2BossInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2MinionInstance;
- @@ -623,10 +624,22 @@
- // Check for an over-hit enabled strike
- if (attacker instanceof L2PcInstance)
- {
- L2PcInstance player = (L2PcInstance)attacker;
- +
- + if (this.isPrivateEventMob)
- + {
- + L2RaidEvent.expHandOut();
- + exp = L2RaidEvent.exp;
- + sp = L2RaidEvent.sp;
- + if (L2RaidEvent.checkPossibleReward())
- + {
- + L2RaidEvent.chooseReward(player);
- + }
- + this.deleteMe();
- + }
- if (isOverhit() && attacker == getOverhitAttacker())
- {
- player.sendPacket(new SystemMessage(SystemMessageId.OVER_HIT));
- exp += calculateOverhitExp(exp);
- }
- @@ -739,10 +752,21 @@
- // Check for an over-hit enabled strike
- // (When in party, the over-hit exp bonus is given to the whole party and splitted proportionally through the party members)
- if (attacker instanceof L2PcInstance)
- {
- L2PcInstance player = (L2PcInstance)attacker;
- + if (this.isPrivateEventMob)
- + {
- + L2RaidEvent.expHandOut();
- + exp = L2RaidEvent.exp;
- + sp = L2RaidEvent.sp;
- + if (L2RaidEvent.checkPossibleReward())
- + {
- + L2RaidEvent.chooseReward(player);
- + }
- + this.deleteMe();
- + }
- if (isOverhit() && attacker == getOverhitAttacker())
- {
- player.sendPacket(new SystemMessage(SystemMessageId.OVER_HIT));
- exp += calculateOverhitExp(exp);
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventChecks.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventChecks.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventChecks.java (revision 681)
- @@ -0,0 +1,179 @@
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import java.util.Vector;
- +
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +
- +public class L2EventChecks
- +{
- + /**
- + * CheckIfOtherEvent --> Checks if the player is already inscribed in another event.
- + */
- + private static boolean checkIfOtherEvent (L2PcInstance player)
- + {
- + if (player.inSoloEvent||player.inPartyEvent||player.inClanEvent)
- + {
- + player.sendMessage("You're alredy registered in another event.");
- + return true;
- + }
- + return false;
- + }
- +
- + /**
- + * Check if Player/Clan/Party is eligible for Event.<br>
- + * Documentation can be found in the method.<br>
- + * @param player --> Basic Player Taking the action.
- + * @param eventType --> Type of Event to check.
- + * @param points --> Minimum Event Points Required to participate.
- + * @param minPeople --> Minimum allowed People Required to participate.
- + * @return --> True for Eligible Players and False for UnEligible Players.
- + */
- + public static boolean checkPlayer(L2PcInstance player,int eventType,int points, int minPeople, Vector<L2PcInstance>_eventPlayers)
- + {
- + int eventPoints = 0;
- + //Let's avoid NPEs
- + if (player == null)
- + return false;
- + //If there's not enough clan members online to fill the MinPeople requirement
- + //return false.
- + if (_eventPlayers.size()<=minPeople && eventType == (2|3))
- + {
- + //Notify to the requester.
- + player.sendMessage("Not enough "+eType(eventType)+" members of the connected at this mommtent, try again later.");
- + return false;
- + }
- + for (L2PcInstance member : _eventPlayers)
- + {
- + /*
- + * In case of finding a disconnected player, we will continue the for statement.
- + */
- + if (member == null)
- + continue;
- + //Let's check if any of the members is in another Event.
- + if(checkIfOtherEvent(member))
- + {
- + /* If this is the case, we will notify the request instance about the inconvenience produced.
- + * We will also return a false.*/
- + String badRequestor = member.getName();
- + notifyBadRequestor(player,badRequestor,2,_eventPlayers);
- + return false;
- + }
- +
- + // TODO: Add a Check asking members of the clan/party (ONLY) ACTUALLY WANT TO PARTICIPATE or not.
- +
- + /* Let's count all the points for every one of the event members, only in the case that
- + * the request instance and the Clan Members are from the same clan */
- + switch(eventType)
- + {
- + case 2:
- + {
- + if(_eventPlayers.contains(player) && member.getClan().getName().equals(player.getClan().getName()))
- + eventPoints +=member.getEventPoints();
- + break;
- + }
- + case 3:
- + {
- + //Let's add the points of each member to the Party General Clan Score.
- + eventPoints += member.getEventPoints();
- + break;
- + }
- + default:
- + {
- + eventPoints = member.getEventPoints();
- + break;
- + }
- + }
- + }
- + /* If the addition of all the points is bigger than the requested points, we will accept
- + * the Participation of this clan in the event */
- + if (eventPoints>=points)
- + {
- + for (L2PcInstance member : _eventPlayers)
- + {
- + // Deletion of all the Buffs from all the Clan members
- + for (L2Effect effect : member.getAllEffects())
- + {
- + if (effect != null)
- + effect.exit();
- + }
- + }
- + return true;
- + }
- + //Else The Clan doesn't have enough event points to participate.
- + else if (eventType != 1)
- + {
- + player.sendMessage("The totality of your "+eType(eventType)+" members don't have enough Event Points to participate.");
- + return false;
- + }
- + else
- + {
- + player.sendMessage("Not enough Event Points to participate into the Event.");
- + return false;
- + }
- + }
- + /**
- + * notifyOfBadRequestor --> Tell the members of the Clan/Party that the player is already inscribed in another event.
- + */
- + private static void notifyBadRequestor(L2PcInstance player, String badRequestor, int type, Vector<L2PcInstance>_eventPlayers)
- + {
- + if (type == 2)
- + {
- + for (L2PcInstance member : _eventPlayers)
- + {
- + member.sendMessage("You can't access the event while "+badRequestor+ "is singed up for another event.");
- + }
- + }
- + if (type ==3)
- + {
- + for (L2PcInstance member : _eventPlayers)
- + {
- + member.sendMessage("You can't access the event while "+badRequestor+ "is singed up for another event.");
- + }
- + }
- + }
- +
- + public static boolean usualChecks(L2PcInstance player, int minLevel)
- + {
- + if(player.getLevel()<minLevel)
- + {
- + player.sendMessage("The minimum level to participate in this Event is "+minLevel+". You cannot participate.");
- + return false;
- + }
- + if (player.inClanEvent || player.inPartyEvent || player.inSoloEvent)
- + {
- + player.sendMessage("You're alredy registered in another Event.");
- + return false;
- + }
- + if (player.isCursedWeaponEquiped())
- + {
- + player.sendMessage("You can Not register while Having a Cursed Weapon.");
- + return false;
- + }
- + if (player.isInStoreMode())
- + {
- + player.sendMessage("Cannot Participate while in Store Mode.");
- + return false;
- + }
- + if (player.isInJail())
- + {
- + player.sendMessage("Cannot Participate while in Jail.");
- + return false;
- + }
- + return true;
- + }
- +
- + public static String eType(int type)
- + {
- + String sType;
- + if(type == 1)
- + sType ="Single";
- + else if(type == 2)
- + sType ="Clan";
- + else if(type == 3)
- + sType="Party";
- + else sType="error ocurred while getting type of Event.";
- + return sType;
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2RaidEvent.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2RaidEvent.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2RaidEvent.java (revision 681)
- @@ -0,0 +1,1047 @@
- +/*
- + * 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.util.Vector;
- +import java.util.logging.Logger;
- +
- +import javolution.text.TextBuilder;
- +import net.sf.l2j.Config;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.datatables.ItemTable;
- +import net.sf.l2j.gameserver.datatables.NpcTable;
- +import net.sf.l2j.gameserver.datatables.SpawnTable;
- +import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;
- +import net.sf.l2j.gameserver.model.L2Object;
- +import net.sf.l2j.gameserver.model.L2Spawn;
- +import net.sf.l2j.gameserver.model.PcInventory;
- +import net.sf.l2j.gameserver.model.actor.instance.L2BufferInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2EventManagerInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.serverpackets.ItemList;
- +import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
- +import net.sf.l2j.gameserver.serverpackets.StatusUpdate;
- +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.templates.L2NpcTemplate;
- +
- +/**
- + * This Class implements and Manages All Raid Events.<br>
- + *
- + * @author polbat02
- + */
- +public class L2RaidEvent
- +{
- + //Local Variables Definition
- + //--------------------------
- + protected static final Logger _log = Logger.getLogger(L2RaidEvent.class.getName());
- + /**
- + * Definition of the Event Mob Spawn
- + */
- +
- + private static L2PcInstance _player;
- + private static L2Spawn _npcSpawn = null;
- + /**
- + * Definition of the Spawn as a L2NpcInstance
- + */
- + private static L2NpcInstance _lastNpcSpawn = null;
- + /**
- + * Custom Management of Experience upon NPC death.
- + */
- + public static int exp = 0;
- + /**
- + * Custom Management of SP upon NPC death.
- + */
- + public static int sp = 0;
- +
- + /**
- + * <b>Event Type:</b><br>
- + * 1- Solo Event (Single player)<br>
- + * 2- Clan Event<br>
- + * 3- Party Event<br>
- + */
- + public static int _eventType;
- + /**
- + * Number Of Event Mobs.
- + */
- + private static int _eventMobs = 0;
- + /**
- + * Reward Level: According to this reward level the players will be
- + * congratulated with different prizes.
- + */
- + private static int _rewardLevel;
- + /**
- + * Transport Locations
- + */
- + private static int _locX,_locY,_locZ,_pX,_pY,_pZ;
- +
- + /**
- + * NPC spawn positions
- + */
- + private static int _npcX,_npcY,_npcZ;
- +
- + /**
- + * DataBase Prize Parameters
- + */
- + private static int _first_id,_first_ammount,_second_id,_second_ammount,_event_ammount;
- +
- + /** Event points Required*/
- + private static int _points;
- +
- + /** NPC ID */
- + private static int _npcId;
- +
- + /** NPC Ammount */
- + private static int _npcAm;
- +
- + /** BuffList */
- + private static int _bufflist;
- +
- + /** BUFFER */
- + private static L2Object _effector;
- +
- + /**
- + * Vector Created to add Single/Party/Clan Players onto the event.
- + * TODO: Use this vector also to add another kind of event --> free Event with any player that may want to participate.
- + */
- + public static Vector<L2PcInstance> _participatingPlayers = new Vector<L2PcInstance>();
- +
- + /**
- + * Players from whom we're waiting for an answer in order to know it they want to join the event.
- + */
- + public static Vector<L2PcInstance> _awaitingplayers = new Vector<L2PcInstance>();
- + /**
- + * Vector Created to track all the Event Mobs and Delete them if needed.
- + */
- + public static Vector<L2NpcInstance> _eventMobList = new Vector<L2NpcInstance>();
- +
- + /** The state of the Event<br> */
- + private static EventState _state = EventState.INACTIVE;
- +
- + enum EventState
- + {
- + INACTIVE,
- + STARTING,
- + STARTED,
- + PARTICIPATING,
- + REWARDING,
- + INACTIVATING
- + }
- +
- + /**
- + * CONSTRUCTOR:<br>
- + * This is the start of the Event, defined from HTM files.<br>
- + * Documentation can be found in the method.<br>
- + * @param player --> Player taking the action on the Event Manager.
- + * @param type --> Type of Event: 1: Single Event || 2: Clan Event || 3: Party Event
- + * @param points --> Event Points Required to start event.
- + * @param npcId --> Id of the Event Raid/Mob
- + * @param npcAm --> Amount of Mobs
- + * @param minPeople --> Minimum People required to run event (Only functional on Clan and Party Events)
- + * @param bufflist --> BuffList to apply to the player. Defined in the SQL table buff_templates
- + * @param rewardLevel --> Reward level to apply upon player's victory.
- + * @param effector --> Effector of the Buffs (Previously defined in L2EventMAnagerInstance.java)
- + * @param participatingPlayers --> Players Enrolled in the Event.
- + */
- + public L2RaidEvent(L2PcInstance player,int type,int points,int npcId,int npcAm,int bufflist,
- + int rewardLevel,L2Object effector,Vector<L2PcInstance> participatingPlayers)
- + {
- + // Define the actual coordinates of the Player.
- + _player = player;
- + _pX = player.getClientX();
- + _pY = player.getClientY();
- + _pZ = player.getClientZ();
- + _eventType = type;
- + _points = points;
- + _npcId = npcId;
- + _npcAm = npcAm;
- + _bufflist = bufflist;
- + _rewardLevel = rewardLevel;
- + _effector = effector;
- + _participatingPlayers = participatingPlayers;
- + }
- +
- + /** Event Initialization given the Constructor defined variables.*/
- + public void init()
- + {
- + setState(EventState.STARTING);
- + //Increase the number of Current Events.
- + if(!L2EventManagerInstance.addEvent())
- + return;
- + //Set the coordinates for the Event.
- + if (setCoords(_player));
- + else{L2EventManagerInstance.removeEvent();
- + return;}
- + _log.warning("RaidEngine [setCoords]: Players: "+_locX+", "+_locY+", "+_locZ);
- + //Set Player inEvent
- + setInEvent(_player);
- + //Initialize event.
- + startEvent(_player, _npcId, _npcAm);
- + //Call the Function required to buff the player.
- + buffEventMembers(_player,_points, _bufflist,_effector);
- + return;
- + }
- +
- + /**
- + * Sets the spawn positions for the players in each event
- + */
- + private static boolean setCoords(L2PcInstance player)
- + {
- + int _ce = L2EventManagerInstance._currentEvents;
- + if (_ce == 0 || (_ce>Config.RAID_SYSTEM_MAX_EVENTS))
- + {
- + String reason = null;
- + if (_ce == 0)
- + reason = "Current Events = 0.";
- + else if(_ce>Config.RAID_SYSTEM_MAX_EVENTS)
- + reason = "Too many Events going on";
- + player.sendMessage("Raid Engines [setCoords()]: Error while setting spawn positions for players and Monsters. Reason: "+reason);
- + return false;
- + }
- + else
- + {
- + loadSpawns(_ce);
- + return true;
- + }
- + }
- +
- + /**
- + * We will set the player/party Member in an Event Status.<br>
- + * This way we will also make sure they don't enroll in any other event.<br>
- + * @param player --> Player to set in an Event Status
- + * @param type --> Type of event to be set In.
- + */
- + private synchronized void setInEvent(L2PcInstance player)
- + {
- + // Check if the type of event is defined.
- + if (_eventType != 1 && _eventType != 2 && _eventType != 3)
- + {
- + player.sendMessage("Debug: Error in The event type [Function: setInEvent]");
- + _log.warning("Event Manager: Error! Event not defined! [Function setInEvent]");
- + return;
- + }
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + switch(_eventType){
- + case 1:{member.inSoloEvent = true;
- + break;}
- + case 2:{member.inClanEvent = true;
- + break;}
- + case 3:{member.inPartyEvent = true;
- + break;}
- + default:return;}
- + member.sendMessage("Event Manager: You are now enroled in a "+L2EventChecks.eType(_eventType)+" Type of Event.");
- + }
- + }
- +
- + /**
- + * <b>Let's Apply the Buffs to the Event Members</b>
- + * <li> We don't need to check if the player can or can not have access to the buffing state since it has
- + * previously been checked.
- + * <li> We assign a value of previousEventPoints to notify the player.
- + * <li> Apply the buffs.
- + * <li> Notify the player once he/she has gotten the Buffs.
- + * <br>More Documentation can Be found inside the method's code.<br>
- + * We will apply the buffs previous to the Event following the parameters:
- + * @param player --> Player participating in the Event.
- + * @param eventPoints --> Event points to be deduced once the buffing takes place.
- + * @param buffList --> Buff list from where the buffs will be taken.
- + * @param efector --> Eefector taking the action (in this case NPC).
- + * @param eventType --> Type of Event.
- + */
- + private synchronized static void buffEventMembers(L2PcInstance player, int eventPoints, int buffList, L2Object efector)
- + {
- + /* Check if the event type has been defined.
- + * Once the event is fully functional this checks will be taken out */
- + if (_eventType!=1&&_eventType!=2&&_eventType!=3)
- + {
- + player.sendMessage("Debug: Error in The event type [Function: bufEventMembers]");
- + _log.warning("Se corta la funcion de entrega de buffs.");
- + return;
- + }
- + //Single event --> Direct Buffing.
- + if (_eventType == 1)
- + {
- + int previousPoints =player.getEventPoints();
- + if (Config.RAID_SYSTEM_GIVE_BUFFS)
- + L2BufferInstance.makeBuffs(player,buffList,efector,false);
- + player.setEventPoints(player.getEventPoints()-eventPoints);
- + player.sendMessage("Event Manager: "+eventPoints+" Event Points have Been used. " +
- + "You had "+previousPoints+" and now you have "+player.getEventPoints()+ "Event Points.");
- + }
- + // Clan Event: Let's buff all the clan members...
- + // TODO: Check if the distance of other clan members is important upon member buffing.
- + if (_eventType == 2)
- + {
- + // Define HOW many players are online at this very moment.
- + int cmCount = _participatingPlayers.size();
- + // Define the individual Event Points Price for every player.
- + int individualPrice = eventPoints/cmCount;
- + // Round up the price
- + //individualPrice = Math.round(individualPrice);
- + //Start the Buffing.
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + // Define the previous points for each member of the clan.
- + int previousPoints;
- + if (member == null)
- + continue;
- + // Apply the Buffs if allowed
- + if (Config.RAID_SYSTEM_GIVE_BUFFS)
- + L2BufferInstance.makeBuffs(member,buffList,efector,false);
- + /*
- + * In this case we will generate an HTML to notify the member of the action taken.
- + * 1. In the first case, we will check if the subject has enough Event Points as to pay the Buffs,
- + * and enroll into the event.
- + * 2. If that's not the case we will proceed into the first IF:
- + * 2a. The even points will be replaced by 0 since the player doesn't have enough event points
- + * to pay the normal quota.
- + * 2b. We will notify him of this situation. We will also deduce the missing points
- + * from other Clan Members. (Sharing is good right? xD)
- + * 3. If 1 is Affirmative we will proceed onto the second IF:
- + * 3a. Deduction of event points = to what's needed to participate in the event/online
- + * clan members.
- + * 3b. Notify this situation and inform the player of the amount of points that he/she has at
- + * this very moment.
- + */
- + if (individualPrice>member.getEventPoints())
- + {
- + previousPoints = member.getEventPoints();
- + member.setEventPoints(0);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You didn't have enough Event Points, so we've used all of your points.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and we needed "+individualPrice+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: polbat02 for the L2J community.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + else
- + {
- + previousPoints = member.getEventPoints();
- + member.setEventPoints(member.getEventPoints()-individualPrice);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and now you have "+(previousPoints-individualPrice)+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: polbat02 for the L2J community.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + }
- + }
- + // Party Event --> The same action as in Clan Events Will be taken.
- + if (_eventType == 3)
- + {
- + int pmCount = player.getParty().getMemberCount();
- + int individualPrice = eventPoints/pmCount;
- + //individualPrice = Math.round(individualPrice);
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + if (Config.RAID_SYSTEM_GIVE_BUFFS)
- + L2BufferInstance.makeBuffs(member,buffList,efector,false);
- + member.inPartyEvent = true;
- + if (individualPrice>member.getEventPoints())
- + {
- + int previousPoints = member.getEventPoints();
- + member.setEventPoints(0);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You didn't have enough Event Points, so we've used all of your points.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and we needed "+individualPrice+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: Polbat02 //Dragonlance Server.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + else
- + {
- + int previousPoints = member.getEventPoints();
- + member.setEventPoints(member.getEventPoints()-individualPrice);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and now you have "+(previousPoints-individualPrice)+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: Polbat02 //Dragonlance Server.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + }
- + }
- + }
- +
- + /**
- + * <b>Starting of the Event</b><br>
- + * This method checks it the total amount of events in process is > than the allowed and acts
- + * according to that and the parameters given.<br>
- + * In case X events are already taking place, the void returns and won't let us continue with the
- + * event.<br>
- + * This check is not needed since we already check this in L2EventManagerInstance.java, but i'll
- + * leave it in here for now since this is a very early stage of developing for now.<br>
- + * More documentation can be found in the Method.<br>
- + * @param player --> Player taking the action.
- + * @param npcId --> Event Monster ID.
- + * @param ammount --> Amount of Event Monsters
- + * @param type --> type of Event.
- + */
- + private static void startEvent(L2PcInstance player, int npcId, int ammount)
- + {
- + if (player == null)
- + return;
- + int currentEvents = L2EventManagerInstance._currentEvents;
- + if (currentEvents>=Config.RAID_SYSTEM_MAX_EVENTS)
- + return;
- + if (currentEvents == 0)
- + return;
- + setState(EventState.STARTED);
- + // Teleport Player or Members depending on the Event Type.
- + doTeleport(player,_locX,_locY,_locZ,10,false);
- + // Spawn The NPC Monster for the Event.
- + spawnMonster(npcId,60,ammount,_npcX,_npcY,_npcZ);
- + }
- +
- + /**
- + * Teleport the event participants to where the event is going to take place<br>
- + * A function has been created to make it easier for us to teleport the players
- + * every time we need them to teleport.<br>
- + * Added suport for different kind of events.
- + * @param player --> Player being teleported.
- + * @param cox --> Coord X
- + * @param coy --> Coord Y
- + * @param coz --> Coord Z
- + * @param delay --> Delay to be teleported in
- + * @param removeBuffs --> Boolean to removeBuffs uponTeleport or not.
- + */
- + private static void doTeleport(L2PcInstance player,int cox,int coy,int coz,int delay,boolean removeBuffs)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + new L2EventTeleporter(member,cox,coy,coz,delay,removeBuffs);
- + member.sendMessage("You will be teleported in 10 Seconds.");
- + }
- + }
- +
- + /**
- + * Spawning function of Event Monsters.<br>
- + * Added Support for multiple spawns and for each one of them being defined as Event Mob.
- + * @param monsterId --> Npc Id
- + * @param respawnTime --> Respawn Delay (in most cases this will be 0 as we're gonna
- + * cut the respawning of the Mobs upon death).
- + * @param mobCount --> MobCount to be spawned.
- + * @param locX --> Coordinate X for the mob to be spawned in.
- + * @param locY --> Coordinate Y for the mob to be spawned in.
- + * @param locZ --> Coordinate Z for the mob to be spawned in.
- + */
- + private static void spawnMonster(int monsterId, int respawnDelay, int mobCount,int locX,int locY, int locZ)
- + {
- + L2NpcTemplate template;
- + int monsterTemplate = monsterId;
- + template = NpcTable.getInstance().getTemplate(monsterTemplate);
- + if (template == null)
- + return;
- + _eventMobs = mobCount;
- + // Support for multiple spawns.
- + if (mobCount>1)
- + {
- + int n = 1;
- + while (n<=mobCount)
- + {
- + try
- + {
- + L2Spawn spawn = new L2Spawn(template);
- + // TODO: Add support for different spawning zones.
- + spawn.setLocx(locX);
- + spawn.setLocy(locY);
- + spawn.setLocz(locZ);
- + spawn.setAmount(1);
- + spawn.setHeading(0);
- + spawn.setRespawnDelay(respawnDelay);
- + if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcid()) != null)
- + RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getStatsSet().getDouble("baseHpMax"), template.getStatsSet().getDouble("baseMpMax"), false);
- + else
- + SpawnTable.getInstance().addNewSpawn(spawn, false);
- + spawn.init();
- + /* Define the properties of every spawn.
- + * TODO: Change the Mob statistics according on Event Participants and Server Rates.
- + */
- + _lastNpcSpawn = spawn.getLastSpawn();
- + _npcSpawn = spawn;
- + _lastNpcSpawn.isPrivateEventMob=true;
- + _lastNpcSpawn.setChampion(false);
- + _lastNpcSpawn.setTitle("Event Monster");
- + // Stop the Respawn of the Mob.
- + _npcSpawn.stopRespawn();
- + _eventMobList.add(_lastNpcSpawn);
- + n++;
- + }
- + catch (Exception e)
- + {
- + _log.warning("L2EventManager: Exception Upon MULTIPLE NPC SPAWN.");
- + e.printStackTrace();
- + }
- + }
- + setState(EventState.PARTICIPATING);
- + }
- + else
- + {
- + try
- + {
- + L2Spawn spawn = new L2Spawn(template);
- + spawn.setLocx(locX);
- + spawn.setLocy(locY);
- + spawn.setLocz(locZ);
- + spawn.setAmount(1);
- + spawn.setHeading(0);
- + spawn.setRespawnDelay(respawnDelay);
- + if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcid()) != null)
- + RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getStatsSet().getDouble("baseHpMax"), template.getStatsSet().getDouble("baseMpMax"), false);
- + else
- + SpawnTable.getInstance().addNewSpawn(spawn, false);
- + spawn.init();
- + _lastNpcSpawn = spawn.getLastSpawn();
- + _npcSpawn = spawn;
- + _lastNpcSpawn.isPrivateEventMob=true;
- + _lastNpcSpawn.setChampion(false);
- + _lastNpcSpawn.setTitle("Event Monster");
- + _npcSpawn.stopRespawn();
- + _eventMobList.add(_lastNpcSpawn);
- + }
- + catch (Exception e)
- + {
- + _log.warning("L2EventManager: Exception Upon SINGLE NPC SPAWN.");
- + e.printStackTrace();
- + }
- + setState(EventState.PARTICIPATING);
- + }
- + new RaidFightManager();
- + }
- +
- + /**
- + * Delete the mob from the Event.
- + */
- + private static void unSpawnNPC()
- + {
- + try
- + {
- + _lastNpcSpawn.deleteMe();
- + _npcSpawn.stopRespawn();
- + _npcSpawn = null;
- + _lastNpcSpawn = null;
- + }
- + catch(Exception e)
- + {
- + _log.warning("L2EventManager: Eception Upon NPC UNSPAWN.");
- + }
- + }
- + /**
- + * Function launched at every player death (if he/she's enrolled in any Raid event)
- + * @param player
- + */
- + public static void onPlayerDeath(L2PcInstance player)
- + {
- + /*
- + * TODO: Add support for:
- + * - Configurable Death rebirth system including:
- + * - Automatic respawn (Done)
- + * - Track deaths for player.
- + * - doRevive? (Done)
- + */
- + new L2EventTeleporter(player,_locX,_locY,_locZ,0,false);
- + player.setTarget(null);
- + player.breakAttack();
- + player.breakCast();
- + player.doRevive();
- + }
- +
- + /**
- + * This is the place where we define all the actions that take place after one Event Mob dies.
- + * a. Check if that was the last event mob of this instance.
- + * b. If not, decrease the number by one.
- + * c. Else return true.
- + */
- + public static boolean checkPossibleReward()
- + {
- + if (_eventMobs == 0)
- + return false;
- + if (_eventMobs<1)
- + {
- + _eventMobs = 0;
- + return false;
- + }
- + if (_eventMobs>1)
- + {
- + _eventMobs = _eventMobs -1;
- + return false;
- + }
- + setState(EventState.REWARDING);
- + return true;
- + }
- + /**
- + * This void picks the rewards and launches the hand out system.
- + * It also Ends the event.
- + * Added database support for this.
- + * @param player --> Player taking the action.
- + */
- + public static void chooseReward(L2PcInstance player)
- + {
- + if (_eventMobs == 1)
- + _eventMobs =0;
- + else return;
- + loadData(_rewardLevel);
- + //Case Single Event
- + if (_eventType == 1)
- + {
- + //Hand Out Items
- + handOutItems(player,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + //Genearal Clean-Up of the Event.
- + unSpawnNPC();
- + clearFromEvent(player);
- + //Teleport back to previous-event location.
- + doTeleport(player,_pX,_pY,_pZ,10,true);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + }
- + //Case Clan Event
- + if (_eventType == 2)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + handOutItems(member,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + doTeleport(member,_pX,_pY,_pZ,10,true);
- + }
- + unSpawnNPC();
- + clearFromEvent(player);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + }
- + //Case Party Event.
- + if (_eventType == 3)
- + {
- + if(player.getParty() != null)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + handOutItems(member,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + doTeleport(member,_pX,_pY,_pZ,10,true);
- + }
- + }
- + else
- + {
- + player.sendMessage("You don't have a party anymore?! Well then the rewards go for you only.");
- + //Hand Out Items
- + handOutItems(player,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + //General Clean-Up of the Event.
- + unSpawnNPC();
- + clearFromEvent(player);
- + //Teleport back to previous-event location.
- + doTeleport(player,_pX,_pY,_pZ,10,true);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + return;
- + }
- + unSpawnNPC();
- + clearFromEvent(player);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + }
- + return;
- + }
- +
- + /**
- + * Custom Definition of the Experience.
- + * TODO: Add custom definitions of Experience for different prize lists.
- + */
- + public static void expHandOut()
- + {
- + exp += exp;
- + sp +=sp;
- + }
- +
- + /**
- + * Clean the eventStatus from the players.
- + */
- + private synchronized static void clearFromEvent(L2PcInstance player)
- + {
- + setState(EventState.INACTIVATING);
- + if (_eventType !=1 && _eventType!=2 &&_eventType!=3)
- + return;
- + if (_eventType == 1)
- + {
- + player.inSoloEvent = false;
- + }
- + if (_eventType == 2)
- + {
- + if (_participatingPlayers.size()!=0)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + member.inClanEvent = false;
- + }
- + //Clear Clan Members from event.
- + if(_participatingPlayers.size()!=0)
- + _participatingPlayers.clear();
- + }
- + }
- + if (_eventType == 3)
- + {
- + if(player.getParty()!=null)
- + {
- + player.inPartyEvent = false;
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + member.inPartyEvent = false;
- + }
- + }
- + else
- + player.inPartyEvent = false;
- + }
- + setState(EventState.INACTIVE);
- + }
- +
- + /**
- + * Function with which we will hand out event Items.
- + * @param player
- + * @param item1
- + * @param ammount1
- + * @param item2
- + * @param ammount2
- + * @param eventPoints
- + */
- + private static void handOutItems(L2PcInstance player, int item1, int ammount1, int item2, int ammount2, int eventPoints)
- + {
- + boolean hasItem1 = false;
- + boolean hasItem2 = false;
- + boolean hasEventPoints = false;
- + if (item1 == 0 && item2 == 0 && eventPoints == 0)
- + return;
- + if (item1 != 0)
- + hasItem1 = true;
- + if (item2 != 0)
- + hasItem2 = true;
- + if (eventPoints != 0)
- + hasEventPoints = true;
- + PcInventory inv = player.getInventory();
- + if (hasItem1)
- + {
- + if (item1 == 57)
- + {
- + inv.addAdena("Event - Adena",ammount1,player,player);
- + SystemMessage smAdena;
- + smAdena = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smAdena.addItemName(57);
- + smAdena.addNumber(ammount1);
- + player.sendPacket(smAdena);
- + }
- + else
- + {
- + if (ItemTable.getInstance().createDummyItem(item1).isStackable())
- + inv.addItem("Event", item1, ammount1, player, player);
- + else
- + {
- + for (int i=0;i<=ammount1-1;i++)
- + inv.addItem("Event", item1, ammount1, player, player);
- + }
- + SystemMessage smItem;
- + smItem = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smItem.addItemName(item1);
- + smItem.addNumber(ammount1);
- + player.sendPacket(smItem);
- + }
- + }
- + if (hasItem2)
- + {
- + if (item2 == 57)
- + {
- + inv.addAdena("Event - Adena",ammount2,player,player);
- + SystemMessage smAdena;
- + smAdena = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smAdena.addItemName(57);
- + smAdena.addNumber(ammount2);
- + player.sendPacket(smAdena);
- + }
- + else
- + {
- + if (ItemTable.getInstance().createDummyItem(item2).isStackable())
- + inv.addItem("Event", item2, ammount2, player, player);
- + else
- + {
- + for (int i=0;i<=ammount2-1;i++)
- + inv.addItem("Event", item2, ammount2, player, player);
- + }
- + SystemMessage smItem;
- + smItem = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smItem.addItemName(item2);
- + smItem.addNumber(ammount2);
- + player.sendPacket(smItem);
- + }
- + }
- + if (hasEventPoints)
- + {
- + player.setEventPoints(player.getEventPoints()+eventPoints);
- + SystemMessage smp;
- + smp = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smp.addString("Event Points ");
- + smp.addNumber(2);
- + player.sendPacket(smp);
- + }
- + StatusUpdate su = new StatusUpdate(player.getObjectId());
- + su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
- + player.sendPacket(su);
- + player.sendPacket(new ItemList(player, true));
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>You won the event!</td></tr><br>");
- + replyMSG.append("<tr><td>You have Earned:</td></tr><br>");
- + if (hasItem1)
- + {
- + String item1name =ItemTable.getInstance().createDummyItem(item1).getItemName();
- + replyMSG.append("<tr><td>- "+ammount1+" "+item1name+".</td></tr><br>");
- + }
- + if (hasItem2)
- + {
- + String item2name =ItemTable.getInstance().createDummyItem(item2).getItemName();
- + replyMSG.append("<tr><td>- "+ammount2+" "+item2name+".</td></tr><br>");
- + }
- + if (hasEventPoints)
- + {
- + replyMSG.append("<tr><td>- "+eventPoints+" Event Points.</td></tr><br>");
- + }
- + replyMSG.append("<br><tr><td>Congratulations!!</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: Polbat02.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + player.sendPacket(adminReply);
- + }
- + /**
- + * Hard Finish Event (Case every Body dies)
- + */
- + public static void hardFinish()
- + {
- + for (L2NpcInstance eventMob: _eventMobList)
- + {
- + eventMob.decayMe();
- + eventMob.deleteMe();
- + L2EventManagerInstance._currentEvents -= 1;
- + }
- + _log.warning("Raid Engines: All the Members from the Event are now dead or Have Left The event. Event Finished.");
- + }
- + /**
- + * Load Data of the prizes for each event.
- + * Added DataBase support for this.
- + * @param prizePackage
- + */
- + private static void loadData(int prizePackage)
- + {
- + Connection con;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT first_prize_id, first_prize_ammount, second_prize_id, second_prize_ammount, event_points_ammount FROM raid_prizes WHERE `prize_package_id` = '"+prizePackage+"'");
- + ResultSet rset = statement.executeQuery();
- + while(rset.next())
- + {
- + _first_id = rset.getInt("first_prize_id");
- + _first_ammount = rset.getInt("first_prize_ammount");
- + _second_id = rset.getInt("second_prize_id");
- + _second_ammount = rset.getInt("second_prize_ammount");
- + _event_ammount = rset.getInt("event_points_ammount");
- + }
- + rset.close();
- + statement.close();
- + con.close();
- + }
- + catch (Exception e)
- + {
- + _log.severe("Error While loading Raids prizes." + e);
- + }
- + }
- +
- + /**
- + * Sets the Event state<br><br>
- + * @param state<br>
- + */
- + private static void setState(EventState state)
- + {
- + synchronized (_state)
- + {
- + _state = state;
- + }
- + }
- +
- + /**
- + * Is Event inactive?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isInactive()
- + {
- + boolean isInactive;
- +
- + synchronized (_state)
- + {
- + isInactive = _state == EventState.INACTIVE;
- + }
- +
- + return isInactive;
- + }
- +
- + /**
- + * Is Event in inactivating?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isInactivating()
- + {
- + boolean isInactivating;
- +
- + synchronized (_state)
- + {
- + isInactivating = _state == EventState.INACTIVATING;
- + }
- +
- + return isInactivating;
- + }
- +
- + /**
- + * Is Event in participation?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isParticipating()
- + {
- + boolean isParticipating;
- +
- + synchronized (_state)
- + {
- + isParticipating = _state == EventState.PARTICIPATING;
- + }
- +
- + return isParticipating;
- + }
- +
- + /**
- + * Is Event starting?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isStarting()
- + {
- + boolean isStarting;
- +
- + synchronized (_state)
- + {
- + isStarting = _state == EventState.STARTING;
- + }
- +
- + return isStarting;
- + }
- +
- + /**
- + * Is Event started?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isStarted()
- + {
- + boolean isStarted;
- +
- + synchronized (_state)
- + {
- + isStarted = _state == EventState.STARTED;
- + }
- +
- + return isStarted;
- + }
- +
- + /**
- + * Is Event rewarding?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isRewarding()
- + {
- + boolean isRewarding;
- +
- + synchronized (_state)
- + {
- + isRewarding = _state == EventState.REWARDING;
- + }
- +
- + return isRewarding;
- + }
- +
- + /**
- + * Send a SystemMessage to all participated players<br>
- + * 1. Send the message to all players of team number one<br>
- + * 2. Send the message to all players of team number two<br><br>
- + *
- + * @param message<br>
- + */
- + public static void sysMsgToAllParticipants(String message)
- + {
- + for (L2PcInstance player : _participatingPlayers)
- + {
- + if (player != null)
- + player.sendMessage(message);
- + }
- + }
- +
- +
- + private static void loadSpawns(int eventNum)
- + {
- + Connection con;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement
- + ("SELECT raid_locX, raid_locY, raid_locZ, player_locX, player_locY, player_locZ " +
- + "FROM raid_event_spawnlist WHERE `id` = '"+eventNum+"'");
- + ResultSet rset = statement.executeQuery();
- + while(rset.next())
- + {
- + _npcX = rset.getInt("raid_locX");
- + _npcY = rset.getInt("raid_locY");
- + _npcZ = rset.getInt("raid_locZ");
- + _locX = rset.getInt("player_locX");
- + _locY = rset.getInt("player_locY");
- + _locZ = rset.getInt("player_locZ");
- + }
- + rset.close();
- + statement.close();
- + con.close();
- + }
- + catch (Exception e)
- + {
- + _log.severe("Error While loading Raids Spawn Positions." + e);
- + }
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventTeleporter.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventTeleporter.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventTeleporter.java (revision 681)
- @@ -0,0 +1,91 @@
- +/*
- + * 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import net.sf.l2j.gameserver.ThreadPoolManager;
- +import net.sf.l2j.gameserver.datatables.SkillTable;
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.L2Summon;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.serverpackets.Ride;
- +
- +public class L2EventTeleporter implements Runnable
- +{
- + private L2PcInstance _player = null;
- + private int _coordinateX = 0;
- + private int _coordinateY = 0;
- + private int _coordinateZ = 0;
- + boolean _removeBuffs;
- +
- + /**
- + * Manages all Teleports done within a Raid Event.
- + * @param player --> Player being teleported
- + * @param coordinateX --> CX
- + * @param coordinateY --> CY
- + * @param coordinateZ --> CZ
- + * @param delay --> Delay to do the actual teleport.
- + * @param removeBuffs --> Boolean to allow removal of buffs.
- + */
- + public L2EventTeleporter(L2PcInstance player, int coordinateX, int coordinateY, int coordinateZ , int delay, boolean removeBuffs)
- + {
- + _player = player;
- + _coordinateX = coordinateX;
- + _coordinateY = coordinateY;
- + _coordinateZ = coordinateZ;
- + _removeBuffs = removeBuffs;
- + //Espera para hacer el teleport
- + long _delay = delay * 1000L;
- + if (delay == 0)
- + _delay = 0;
- + ThreadPoolManager.getInstance().scheduleGeneral(this, _delay);
- + }
- +
- + public void run()
- + {
- + if (_player == null)
- + return;
- +
- + if (_player.isMounted())
- + {
- + if (_player.isFlying())
- + _player.removeSkill(SkillTable.getInstance().getInfo(4289, 1));
- + Ride dismount = new Ride(_player.getObjectId(), Ride.ACTION_DISMOUNT, 0);
- + _player.broadcastPacket(dismount);
- + _player.setMountType(0);
- + _player.setMountObjectID(0);
- + }
- + L2Summon summon = _player.getPet();
- + if (_removeBuffs && summon != null)
- + summon.unSummon(_player);
- + if (_removeBuffs)
- + {
- + for (L2Effect effect : _player.getAllEffects())
- + {
- + if (effect != null)
- + effect.exit();
- + }
- + }
- + _player.setCurrentCp(_player.getMaxCp()+5000);
- + _player.setCurrentHp(_player.getMaxHp()+5000);
- + _player.setCurrentMp(_player.getMaxMp()+5000);
- + _player.teleToLocation(_coordinateX, _coordinateY, _coordinateZ, false);
- + _player.broadcastStatusUpdate();
- + _player.broadcastUserInfo();
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/RaidFightManager.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/RaidFightManager.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/RaidFightManager.java (revision 681)
- @@ -0,0 +1,85 @@
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.Announcements;
- +import net.sf.l2j.gameserver.model.actor.instance.L2EventManagerInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
- +
- +public class RaidFightManager
- +{
- + protected static final Logger _log = Logger.getLogger(RaidFightManager.class.getName());
- + /**
- + * The task method to handle cycles of the event<br><br>
- + *
- + * @see java.lang.Runnable#run()<br>
- + */
- + public void run()
- + {
- + //TODO: Add initial breaks. And check performance
- + for (;;)
- + {
- + waiter(Config.RAID_SYSTEM_FIGHT_TIME * 60); // in configuration given as minutes
- + for (L2NpcInstance eventMob: L2RaidEvent._eventMobList)
- + {
- + eventMob.decayMe();
- + eventMob.deleteMe();
- + L2EventManagerInstance._currentEvents -= 1;
- + }
- + _log.warning("Raid Engines: All the Members from the Event are now dead or Have Left The event. Event Finished.");
- + break;
- + }
- + }
- +
- + void waiter(int seconds)
- + {
- + while (seconds > 1)
- + {
- + seconds--; // here because we don't want to see two time announce at the same time
- +
- + if (L2RaidEvent.isParticipating())
- + {
- + switch (seconds)
- + {
- + case 3600: // 1 hour left
- + L2RaidEvent.sysMsgToAllParticipants("You have One our left to kill the Raid Boss.");
- +
- + break;
- + case 1800: // 30 minutes left
- + case 900: // 15 minutes left
- + case 600: // 10 minutes left
- + case 300: // 5 minutes left
- + case 240: // 4 minutes left
- + case 180: // 3 minutes left
- + case 120: // 2 minutes left
- + case 60: // 1 minute left
- + Announcements.getInstance().announceToAll("L2Raid Event: " + seconds / 60 + " minute(s) untill Boss Disapears!");
- + break;
- + case 30: // 30 seconds left
- + case 15: // 15 seconds left
- + case 10: // 10 seconds left
- + case 5: // 5 seconds left
- + case 4: // 4 seconds left
- + case 3: // 3 seconds left
- + case 2: // 2 seconds left
- + case 1: // 1 seconds left
- + Announcements.getInstance().announceToAll("L2Raid Event: " + seconds + " second(s) untill Boss Disapears!");
- + break;
- + }
- + }
- +
- + long oneSecWaitStart = System.currentTimeMillis();
- +
- + while (oneSecWaitStart + 1000L > System.currentTimeMillis())
- + {
- + try
- + {
- + Thread.sleep(1);
- + }
- + catch (InterruptedException ie)
- + {}
- + }
- + }
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java (revision 681)
- @@ -209,10 +209,11 @@
- return false;
- }
- ptarget.setEngageRequest(true, activeChar.getObjectId());
- //ptarget.sendMessage("Player "+activeChar.getName()+" wants to engage with you.");
- + activeChar.awaitingAnswer = true;
- ptarget.sendPacket(new ConfirmDlg(614,activeChar.getName()+" asking you to engage. Do you want to start a new relationship?"));
- return true;
- }
- public boolean GoToLove(L2PcInstance activeChar)
- Index: /trunk/Game/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java (revision 681)
- @@ -71,10 +71,16 @@
- if (activeChar.isInJail())
- {
- activeChar.sendMessage("You can not escape from jail.");
- return false;
- }
- +
- + if (activeChar.inClanEvent || activeChar.inPartyEvent || activeChar.inSoloEvent)
- + {
- + activeChar.sendPacket(SystemMessage.sendString("You can't escape while in Event."));
- + return false;
- + }
- SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
- sm.addString("After " + unstuckTimer/60000 + " min. you be returned to near village.");
- activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- Index: /trunk/Game/java/net/sf/l2j/gameserver/GameServer.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/GameServer.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/GameServer.java (revision 681)
- @@ -20,10 +20,11 @@
- import net.sf.l2j.gameserver.datatables.ArmorSetsTable;
- import net.sf.l2j.gameserver.datatables.AugmentationData;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- import net.sf.l2j.gameserver.datatables.CharTemplateTable;
- import net.sf.l2j.gameserver.datatables.ClanTable;
- +import net.sf.l2j.gameserver.datatables.BuffTemplateTable;
- import net.sf.l2j.gameserver.datatables.DoorTable;
- import net.sf.l2j.gameserver.datatables.EventDroplist;
- import net.sf.l2j.gameserver.datatables.ExtractableItemsData;
- import net.sf.l2j.gameserver.datatables.FishTable;
- import net.sf.l2j.gameserver.datatables.HelperBuffTable;
- @@ -365,10 +366,12 @@
- {
- throw new Exception("Could not initialize the Henna Tree Table");
- }
- _helperBuffTable = HelperBuffTable.getInstance();
- +
- + BuffTemplateTable.getInstance();
- if (!_helperBuffTable.isInitialized())
- {
- throw new Exception("Could not initialize the Helper Buff Table");
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/templates/L2BuffTemplate.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/templates/L2BuffTemplate.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/templates/L2BuffTemplate.java (revision 681)
- @@ -0,0 +1,249 @@
- +package net.sf.l2j.gameserver.templates;
- +
- +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.model.base.Race;
- +
- +/**
- + * This class represents a Buff Template
- + *
- + * @author: polbat02
- + */
- +
- +public class L2BuffTemplate
- +{
- + /** Id of buff template */
- + private int _templateId;
- +
- + /** Name of the buff template */
- + private String _templateName;
- +
- + /** Identifier of the skill (buff) to cast */
- + private int _skillId;
- +
- + /** Order of the skill in template */
- + private int _skillOrder;
- +
- + private L2Skill _skill;
- +
- + /** Level of the skill (buff) to cast */
- + private int _skillLevel;
- +
- + /** Force cast, even if same effect present */
- + private boolean _forceCast;
- +
- + /** Condition that player must have to obtain this buff */
- + /** Min player level */
- + private int _minLevel;
- +
- + /** Max player level */
- + private int _maxLevel;
- +
- + /** Player's faction */
- + private int _faction;
- +
- + /** Players's race */
- + private int _race;
- +
- + /** Magus/Fighter class of the player */
- + private int _class;
- +
- + /** Adena price */
- + private int _adena;
- +
- + /** Faction points price */
- + private int _points;
- +
- + /**
- + * Constructor of L2BuffTemplat.<BR><BR>
- + */
- + public L2BuffTemplate(StatsSet set)
- + {
- + _templateId = set.getInteger("id");
- + _templateName = set.getString("name");
- + _skillId = set.getInteger("skillId");
- + _skillLevel = set.getInteger("skillLevel");
- + _skillOrder = set.getInteger("skillOrder");
- +
- + if (_skillLevel == 0)
- + _skillLevel = SkillTable.getInstance().getMaxLevel(_skillId,_skillLevel);
- +
- + _skill = SkillTable.getInstance().getInfo(_skillId,_skillLevel);
- +
- + _forceCast = (set.getInteger("forceCast") == 1);
- + _minLevel = set.getInteger("minLevel");
- + _maxLevel = set.getInteger("maxLevel");
- + _race = set.getInteger("race");
- + _class = set.getInteger("class");
- + _faction = set.getInteger("faction");
- + _adena = set.getInteger("adena");
- + _points = set.getInteger("points");
- + }
- +
- + /**
- + * @return Returns the Id of the buff template
- + */
- + public int getId()
- + {
- + return _templateId;
- + }
- +
- + /**
- + * @return Returns the Name of the buff template
- + */
- + public String getName()
- + {
- + return _templateName;
- + }
- +
- + /**
- + * @return Returns the Id of the buff that the L2PcInstance will receive
- + */
- + public int getSkillId()
- + {
- + return _skillId;
- + }
- +
- + /**
- + * @return Returns the Id of the buff that the L2PcInstance will receive
- + */
- + public int getSkillOrder()
- + {
- + return _skillOrder;
- + }
- +
- + /**
- + * @return Returns the Level of the buff that the L2PcInstance will receive
- + */
- + public int getSkillLevel()
- + {
- + return _skillLevel;
- + }
- +
- + /**
- + * @return Returns the Skill that the L2PcInstance will receive
- + */
- + public L2Skill getSkill()
- + {
- + return _skill;
- + }
- +
- + /**
- + * @return Returns the L2PcInstance minimum level to receive buff
- + */
- + public int getMinLevel()
- + {
- + return _minLevel;
- + }
- +
- + /**
- + * @return Returns the L2PcInstance maximum level to receive buff
- + */
- + public int getMaxLevel()
- + {
- + return _maxLevel;
- + }
- +
- + /**
- + * @return Returns the requirement faction to receive buff
- + */
- + public int getFaction()
- + {
- + return _faction;
- + }
- +
- + /**
- + * @return Returns the price for buff in Adena
- + */
- + public int getAdenaPrice()
- + {
- + return _adena;
- + }
- +
- + /**
- + * @return Returns the price for buff in Event Points
- + */
- + public int getPointsPrice()
- + {
- + return _points;
- + }
- +
- + /**
- + * @return Is cast animation will be shown
- + */
- + public boolean forceCast()
- + {
- + return _forceCast;
- + }
- +
- + /**
- + * @return Returns the result of level check
- + */
- + public boolean checkLevel(L2PcInstance player)
- + {
- + return ((_minLevel == 0 || player.getLevel()>=_minLevel) && (_maxLevel == 0 || player.getLevel()<=_maxLevel));
- + }
- +
- + /**
- + * @return Returns the result of race check
- + */
- + public boolean checkRace(L2PcInstance player)
- + {
- + boolean cond = false;
- + if (_race == 0 || _race == 31) return true;
- + if ((player.getRace() == Race.human) && (_race & 16) != 0) cond=true;
- + if ((player.getRace() == Race.elf) && (_race & 8) != 0) cond=true;
- + if ((player.getRace() == Race.darkelf) && (_race & 4) != 0) cond=true;
- + if ((player.getRace() == Race.orc) && (_race & 2) != 0) cond=true;
- + if ((player.getRace() == Race.dwarf) && (_race & 1) != 0) cond=true;
- + return cond;
- + }
- +
- + /**
- + * @return Returns the result of Magus/Fighter class check
- + */
- + public boolean checkClass(L2PcInstance player)
- + {
- + return ((_class == 0 || _class == 3) || (_class == 1 && !player.isMageClass()) || (_class == 2 && player.isMageClass()));
- + }
- +
- + /**
- + * @return Returns the result of faction check
- + */
- + public boolean checkFaction(L2PcInstance player)
- + {
- + return true;
- + //return ((_faction == 0 ||player.getFaction = _faction)
- + }
- +
- + /**
- + * @return Returns the result of price check
- + */
- + public boolean checkPrice(L2PcInstance player)
- + {
- + return ((_adena == 0 || player.getInventory().getAdena()>=_adena) && (_points == 0 || (player.getEventPoints()>=_points)));
- + }
- + /**
- + * @return Returns the result of a the Event Point check
- + */
- + public boolean checkPoints(L2PcInstance player)
- + {
- + if (player.getEventPoints()>=_points)
- + return true;
- + return false;
- + }
- +
- + /**
- + * @return Returns the result of all player related conditions check
- + */
- + public boolean checkPlayer(L2PcInstance player)
- + {
- + return
- + (checkLevel(player)
- + && checkRace(player)
- + && checkClass(player)
- + && checkFaction(player));
- + }
- +
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/datatables/BuffTemplateTable.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/datatables/BuffTemplateTable.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/datatables/BuffTemplateTable.java (revision 681)
- @@ -0,0 +1,191 @@
- +package net.sf.l2j.gameserver.datatables;
- +
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +
- +import javolution.util.FastList;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.templates.L2BuffTemplate;
- +import net.sf.l2j.gameserver.templates.StatsSet;
- +
- +import org.apache.commons.logging.Log;
- +import org.apache.commons.logging.LogFactory;
- +
- +public class BuffTemplateTable
- +{
- + private final static Log _log = LogFactory.getLog(BuffTemplateTable.class.getName());
- +
- + private static BuffTemplateTable _instance;
- +
- + /** This table contains all the Buff Templates */
- + private FastList<L2BuffTemplate> _buffs;
- +
- +
- + public static BuffTemplateTable getInstance()
- + {
- + if (_instance == null)
- + {
- + _instance = new BuffTemplateTable();
- + }
- + return _instance;
- + }
- +
- + /**
- + * Creates and charges all the Buff templates from the SQL Table buff_templates
- + */
- + public BuffTemplateTable()
- + {
- + _buffs = new FastList<L2BuffTemplate>();
- + ReloadBuffTemplates();
- + }
- +
- + /**
- + * Reads and charges all the Buff templates from the SQL table
- + */
- + public void ReloadBuffTemplates()
- + {
- + _buffs.clear();
- +
- + java.sql.Connection con = null;
- + try
- + {
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT * FROM buff_templates ORDER BY id, skill_order");
- + ResultSet rset = statement.executeQuery();
- +
- + int _buffTemplates = 0;
- + int templateId = -1;
- +
- + while (rset.next())
- + {
- + StatsSet Buff = new StatsSet();
- +
- + if (templateId != rset.getInt("id")) _buffTemplates++;
- + templateId = rset.getInt("id");
- +
- + Buff.set("id", templateId);
- + Buff.set("name", rset.getString("name"));
- + Buff.set("skillId", rset.getInt("skill_id"));
- + Buff.set("skillLevel", rset.getInt("skill_level"));
- + Buff.set("skillOrder", rset.getInt("skill_order"));
- + Buff.set("forceCast", rset.getInt("skill_force"));
- + Buff.set("minLevel", rset.getInt("char_min_level"));
- + Buff.set("maxLevel", rset.getInt("char_max_level"));
- + Buff.set("race", rset.getInt("char_race"));
- + Buff.set("class", rset.getInt("char_class"));
- + Buff.set("faction", rset.getInt("char_faction"));
- + Buff.set("adena", rset.getInt("price_adena"));
- + Buff.set("points", rset.getInt("price_points"));
- +
- + // Add this buff to the Table.
- + L2BuffTemplate template = new L2BuffTemplate(Buff);
- + if (template.getSkill() == null)
- + {
- + _log.warn("Error while loading buff template Id " + template.getId() + " skill Id " + template.getSkillId());
- + }
- + else
- + _buffs.add(template);
- + }
- +
- + _log.info("BuffTemplateTable: Loaded " + _buffTemplates + " Buff Templates.");
- +
- + rset.close();
- + statement.close();
- + }
- + catch (Exception e)
- + {
- + _log.warn("Error while loading buff templates "+e.getMessage());
- + }
- +
- + }
- + finally
- + {
- + try { con.close(); } catch (Exception e) {}
- + }
- + }
- +
- + /**
- + * @return Returns the buffs of template by template Id
- + */
- + public FastList<L2BuffTemplate> getBuffTemplate(int Id)
- + {
- + FastList<L2BuffTemplate> _templateBuffs = new FastList<L2BuffTemplate>();
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if (_bt.getId()== Id)
- + {
- + _templateBuffs.add(_bt);
- + }
- + }
- +
- + return _templateBuffs;
- + }
- +
- + /**
- + * @return Returns the template Id by template Name
- + */
- + public int getTemplateIdByName(String _name)
- + {
- +
- + int _id = 0;
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if (_bt.getName().equals(_name))
- + {
- + _id = _bt.getId();
- + break;
- + }
- + }
- +
- + return _id;
- + }
- +
- + /**
- + * @return Returns the lowest char level for Buff template
- + */
- + public int getLowestLevel(int Id)
- + {
- + int _lowestLevel = 255;
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if ((_bt.getId()== Id) && (_lowestLevel>_bt.getMinLevel()))
- + {
- + _lowestLevel = _bt.getMinLevel();
- + }
- + }
- +
- + return _lowestLevel;
- + }
- +
- + /**
- + * @return Returns the highest char level for Buff template
- + */
- + public int getHighestLevel(int Id)
- + {
- + int _highestLevel = 0;
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if ((_bt.getId()== Id) && (_highestLevel<_bt.getMaxLevel()))
- + {
- + _highestLevel = _bt.getMaxLevel();
- + }
- + }
- +
- + return _highestLevel;
- + }
- +
- + /**
- + * @return Returns the buff templates list
- + */
- + public FastList<L2BuffTemplate> getBuffTemplateTable()
- + {
- + return _buffs;
- + }
- +
- +}
- Index: /trunk/Game/config/Modifications.properties
- ===================================================================
- --- /trunk/Game/config/Modifications.properties (revision 679)
- +++ /trunk/Game/config/Modifications.properties (revision 681)
- @@ -283,5 +283,25 @@
- # When event starts, the participants lose/keep their effects. (debuffing, etc.)
- DMOnStartRemoveAllEffects=true
- # Allow to unsummon the participants' pets, when event starts.
- DMOnStartUnsummonPet=true
- +
- +#------------------------------------#
- +# DeathMatch Event #
- +#------------------------------------#
- +# Enable Raid Engines
- +RaidEnginesEnabled = false
- +
- +# Max number of raid events taking place at the same time
- +# The number has to be equal or smaller than the number of spawns
- +# defined in the table: raid_event_spawnlist !?!
- +RaidMaxNumEvents = 2
- +
- +# Maximum Fighting time in minutes.
- +RaidSystemFightTime = 60
- +
- +# Give Buffs when Event Start !??
- +RaidGiveBuffs = true
- +
- +# Resurrect Player upon death automatically !??
- +RaidResurrectPlayer = true
- Index: /trunk/Data/sql/raid_prizes.sql
- ===================================================================
- --- /trunk/Data/sql/raid_prizes.sql (revision 683)
- +++ /trunk/Data/sql/raid_prizes.sql (revision 683)
- @@ -0,0 +1,28 @@
- +SET FOREIGN_KEY_CHECKS=0;
- +-- ----------------------------
- +-- Table structure for raid_prizes
- +-- ----------------------------
- +CREATE TABLE `raid_prizes` (
- + `prize_package_id` int(11) NOT NULL,
- + `first_prize_id` int(11) NOT NULL,
- + `first_prize_ammount` int(11) NOT NULL,
- + `second_prize_id` int(11) NOT NULL,
- + `second_prize_ammount` int(11) NOT NULL,
- + `event_points_ammount` int(11) NOT NULL,
- + PRIMARY KEY (`prize_package_id`)
- +) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- +
- +-- ----------------------------
- +-- Records
- +-- ----------------------------
- +INSERT INTO `raid_prizes` VALUES ('1', '3470', '15', '6393', '20', '3');
- +INSERT INTO `raid_prizes` VALUES ('2', '3470', '25', '6393', '35', '4');
- +INSERT INTO `raid_prizes` VALUES ('3', '3470', '40', '6393', '40', '5');
- +INSERT INTO `raid_prizes` VALUES ('4', '3470', '50', '6393', '50', '10');
- +INSERT INTO `raid_prizes` VALUES ('5', '3470', '75', '6393', '75', '15');
- +INSERT INTO `raid_prizes` VALUES ('6', '3470', '150', '6393', '150', '20');
- +INSERT INTO `raid_prizes` VALUES ('7', '3470', '3', '6393', '10', '1');
- +INSERT INTO `raid_prizes` VALUES ('8', '3470', '6', '6393', '15', '2');
- +INSERT INTO `raid_prizes` VALUES ('9', '3470', '8', '6393', '18', '2');
- +INSERT INTO `raid_prizes` VALUES ('10', '3470', '20', '6393', '30', '3');
- +INSERT INTO `raid_prizes` VALUES ('11', '3470', '30', '6393', '40', '5');
- Index: /trunk/Data/sql/characters.sql
- ===================================================================
- --- /trunk/Data/sql/characters.sql (revision 379)
- +++ /trunk/Data/sql/characters.sql (revision 683)
- @@ -79,8 +79,9 @@
- varka_ketra_ally int(1) NOT NULL DEFAULT 0,
- clan_join_expiry_time DECIMAL(20,0) NOT NULL DEFAULT 0,
- clan_create_expiry_time DECIMAL(20,0) NOT NULL DEFAULT 0,
- death_penalty_level int(2) NOT NULL DEFAULT 0,
- donator varchar(5) NOT NULL default 0,
- + `event_points` DECIMAL( 11,0 )default NUL;
- PRIMARY KEY (obj_Id),
- KEY `clanid` (`clanid`)
- ) ;
- Index: /trunk/Data/sql/npc.sql
- ===================================================================
- --- /trunk/Data/sql/npc.sql (revision 256)
- +++ /trunk/Data/sql/npc.sql (revision 683)
- @@ -6603,10 +6603,12 @@
- INSERT INTO `npc` VALUES
- (50007,31324,'Andromeda',1,'Wedding Manager',1,'NPC.a_casino_FDarkElf',8.00,23.00,70,'female','L2WeddingManager',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,316,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
- (70010,31606,'Catrina',1,'TvT Event Manager',1,'Monster2.queen_of_cat',8.00,15.00,70,'female','L2TvTEventNpc',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,28,132,NULL,0,0,0,'LAST_HIT');
- +INSERT INTO `npc` VALUES (12901,30598,'Event Manager',1,'Raid Event',1,'NPC.a_casino_MHuman',8.00,23.00,70,male,L2EventManager,40,3862,1493,3.95,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,120,NILL,0,1,0,'LAST_HIT');
- +
- UPDATE `npc` SET `type` = 'L2NpcWalker' WHERE `id` IN (31358,31359,31360,31361,31362,31363,31357,31356,31364,31365,32070,32072);
- -- Try lowering walkspeed of walking NPC since seems to walk faster than retail
- UPDATE `npc` SET `runspd` = '45', `walkspd` = '45' WHERE `id` = '31360';
- UPDATE `npc` SET `runspd` = '45', `walkspd` = '45' WHERE `id` = '31362';
- Index: /trunk/Data/sql/buff_templates.sql
- ===================================================================
- --- /trunk/Data/sql/buff_templates.sql (revision 683)
- +++ /trunk/Data/sql/buff_templates.sql (revision 683)
- @@ -0,0 +1,209 @@
- +-- ----------------------------
- +-- Table structure for buff_templates
- +-- ----------------------------
- +CREATE TABLE `buff_templates` (
- + `id` int(11) unsigned NOT NULL,
- + `name` varchar(35) NOT NULL default '',
- + `skill_id` int(10) unsigned NOT NULL,
- + `skill_name` varchar(35) default NULL,
- + `skill_level` int(10) unsigned NOT NULL default '1',
- + `skill_force` int(1) NOT NULL default '1',
- + `skill_order` int(10) unsigned NOT NULL,
- + `char_min_level` int(10) unsigned NOT NULL default '0',
- + `char_max_level` int(10) unsigned NOT NULL default '0',
- + `char_race` int(1) unsigned NOT NULL default '0',
- + `char_class` int(1) NOT NULL default '0',
- + `char_faction` int(10) unsigned NOT NULL default '0',
- + `price_adena` int(10) unsigned NOT NULL default '0',
- + `price_points` int(10) unsigned NOT NULL default '0',
- + PRIMARY KEY (`id`,`name`,`skill_order`)
- +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- +
- +-- ----------------------------
- +-- Records
- +-- ----------------------------
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1033', 'Resist Poison', '3', '1', '1', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1032', 'Invigor', '3', '0', '2', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1040', 'Shield', '3', '0', '3', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1035', 'Mental Shield', '4', '0', '4', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1259', 'Resist Shock', '4', '0', '5', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1204', 'Wind Walk', '2', '0', '6', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1257', 'Decrease Weight', '3', '0', '7', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1045', 'Bless the Body', '6', '0', '8', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1078', 'Concentration', '6', '0', '9', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1303', 'Wild Magic', '2', '0', '10', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1048', 'Bless the Soul', '6', '0', '11', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1085', 'Acumen', '3', '0', '12', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1059', 'Empower', '3', '0', '13', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1010', 'Soul Shield', '3', '0', '14', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1068', 'Might', '3', '0', '15', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1086', 'Haste', '2', '0', '16', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1077', 'Focus', '3', '0', '17', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1242', 'Death Whisper', '3', '0', '18', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1268', 'Vampiric Rage', '4', '0', '19', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1033', 'Resist Poison', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1032', 'Invigor', '3', '0', '2', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1352', 'Elemental Protection', '1', '0', '3', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1392', 'Holy Resistance', '3', '0', '4', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1393', 'Unholy Resistance', '3', '0', '5', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1035', 'Mental Shield', '4', '0', '6', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1259', 'Resist Shock', '4', '0', '7', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1354', 'Arcane Protection', '1', '0', '8', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1204', 'Wind Walk', '2', '0', '1', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1257', 'Decrease Weight', '3', '0', '2', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1073', 'Kiss of Eva', '2', '0', '3', '1', '80', '0', '0', '0', '20000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1040', 'Shield', '3', '0', '4', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1068', 'Might', '3', '0', '5', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1086', 'Haste', '2', '0', '6', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1077', 'Focus', '3', '0', '7', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1242', 'Death Whisper', '3', '0', '8', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1045', 'Bless the Body', '6', '0', '9', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1044', 'Regeneration', '3', '0', '10', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1240', 'Guidance', '3', '0', '11', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1087', 'Agility', '3', '0', '12', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1010', 'Soul Shield', '3', '0', '13', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1036', 'Magic Barrier', '2', '0', '14', '1', '80', '0', '1', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1243', 'Bless Shield', '6', '0', '15', '1', '80', '0', '1', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1268', 'Vampiric Rage', '4', '0', '16', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1303', 'Wild Magic', '2', '0', '17', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1048', 'Bless the Soul', '6', '0', '18', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1078', 'Concentration', '6', '0', '19', '1', '80', '0', '2', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1085', 'Acumen', '3', '0', '20', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1059', 'Empower', '3', '0', '21', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1062', 'Berserker Spirit', '2', '0', '22', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '275', 'Dance of Fury', '1', '0', '23', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '274', 'Dance of Fire', '1', '0', '24', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '271', 'Dance of Warrior', '1', '0', '25', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '264', 'Song of Earth', '1', '0', '26', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '269', 'Song of Hunter', '1', '0', '27', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '267', 'Song of Warding', '1', '0', '28', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '276', 'Dance of Concentration', '1', '0', '29', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '273', 'Dance of Mystic', '1', '0', '30', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '311', 'Dance of Protection', '1', '0', '31', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '265', 'Song of Life', '1', '0', '32', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '363', 'Song of Meditation', '1', '0', '33', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '349', 'Song of Renewal', '1', '0', '34', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1040', 'Shield', '3', '0', '1', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1036', 'Magic Barrier', '2', '0', '2', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1045', 'Bless the Body', '6', '0', '3', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1048', 'Bless the Soul', '6', '0', '4', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1243', 'Bless Shield', '6', '0', '5', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1352', 'Elemental Protection', '1', '0', '6', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1204', 'Wind Walk', '2', '0', '7', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1062', 'Berserker Spirit', '2', '0', '8', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1032', 'Invigor', '3', '0', '9', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1035', 'Mental Shield', '4', '0', '10', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1259', 'Resist Shock', '4', '0', '11', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1044', 'Regeneration', '3', '0', '12', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1068', 'Might', '3', '0', '13', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1086', 'Haste', '2', '0', '14', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1077', 'Focus', '3', '0', '15', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1242', 'Death Whisper', '3', '0', '16', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1268', 'Vampiric Rage', '4', '0', '17', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1087', 'Agility', '3', '0', '18', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1240', 'Guidance', '3', '0', '19', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1059', 'Empower', '3', '0', '20', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1078', 'Concentration', '6', '0', '21', '1', '80', '0', '2', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1085', 'Acumen', '3', '0', '22', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '364', 'Song of Champion', '1', '0', '1', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '264', 'Song of Earth', '1', '0', '2', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '306', 'Song of Flame Guard', '1', '0', '3', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '308', 'Song of Storm Guard', '1', '0', '4', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '270', 'Song of Invocation', '1', '0', '5', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '265', 'Song of Life', '1', '0', '6', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '349', 'Sonf of Renewal', '1', '0', '7', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '267', 'Song of Warding', '1', '0', '8', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '266', 'Song of Water', '1', '0', '9', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '268', 'Song of Wind', '1', '0', '10', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '305', 'Song of Vengance', '1', '0', '11', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '269', 'Song of Hunter', '1', '0', '12', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '363', 'Song of Meditation', '1', '0', '13', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '307', 'Dance of Aqua Guard', '1', '0', '1', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '309', 'Dance of Earth Guard', '1', '0', '2', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '311', 'Dance of Protection', '1', '0', '3', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '274', 'Dance of Fire', '1', '0', '4', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '275', 'Dance of Fury', '1', '0', '5', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '272', 'Dance of Inspiration', '1', '0', '6', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '277', 'Dance of Light', '1', '0', '7', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '310', 'Dance of Vampire', '1', '0', '8', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '271', 'Dance of Warrior', '1', '0', '9', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '276', 'Dance of Concentration', '1', '0', '10', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '273', 'Dance of Mystic', '1', '0', '11', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('7', 'WindWalk', '1204', 'Wind Walk', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('8', 'DWeight', '1257', 'Decrease Weight', '1', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('9', 'Shield', '1040', 'Shield', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('10', 'Might', '1068', 'Might', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('11', 'MShield', '1035', 'Mental Shield', '4', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('12', 'BTB', '1045', 'Bless the Body', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('13', 'BTS', '1048', 'Bless the Soul', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('14', 'MBarrier', '1036', 'Magic Barrier', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('15', 'RShock', '1259', 'Resist Shock', '4', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('16', 'Concentration', '1078', 'Concentration', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('17', 'BerserkerSpirit', '1062', 'Berserker Spirit', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('18', 'BTShield', '1243', 'Bless Shield', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('19', 'VRage', '1268', 'Vampiric Rage', '4', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('20', 'Acumen', '1085', 'Acumen', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('21', 'Empower', '1059', 'Empower', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('22', 'Haste', '1086', 'Haste', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('23', 'Guidance', '1240', 'Guidance', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('24', 'Focus', '1077', 'Focus', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('25', 'DeathWhisper', '1242', 'Death Whisper', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('26', 'DWarrior', '271', 'Dance of Warrior', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('27', 'DInspiration', '272', 'Dance of Inspiration', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('28', 'DMystic', '273', 'Dance of Mystic', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('29', 'DFire', '274', 'Dance of Fire', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('30', 'DFury', '275', 'Dance of Fury', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('31', 'DConecntration', '276', 'Dance of Concentration', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('32', 'DLight', '277', 'Dance of Light', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('33', 'DAqua', '307', 'Dance of Aqua Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('34', 'DEarth', '309', 'Dance of Earth Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('35', 'DVampire', '310', 'Dance of Vampire', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('36', 'DProtection', '311', 'Dance of Protection', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('37', 'SEarth', '264', 'Song of Earth', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('38', 'SLife', '265', 'Song of Life', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('39', 'SWater', '266', 'Song of Water', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('40', 'SWarding', '267', 'Song of Warding', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('41', 'SWind', '268', 'Song of Wind', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('42', 'SHunter', '269', 'Song of Hunter', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('43', 'SInvocation', '270', 'Song of Invocation', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('44', 'SVengance', '305', 'Song of Vengance', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('45', 'SFlameGuard', '306', 'Song of Flame Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('46', 'SStormGuard', '308', 'Song of Storm Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('47', 'SRenewal', '349', 'Song of Renewal', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('48', 'SChampion', '364', 'Song of Champion', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1204', 'Wind Walk', '2', '0', '1', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1257', 'Decrease Weight', '3', '0', '2', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1045', 'Bless The Body', '6', '0', '3', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1048', 'Bess The Soul', '6', '1', '4', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1085', 'Acumen', '3', '1', '5', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1059', 'Empower', '3', '1', '6', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1068', 'Might', '3', '1', '7', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1086', 'Haste', '2', '1', '8', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1268', 'Vampiric Rage', '4', '1', '9', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1040', 'Shield', '3', '1', '10', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1036', 'Magic Barrier', '2', '1', '11', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1035', 'Mental Shield', '4', '1', '12', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1204', 'Wind Walk', '1', '1', '1', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1257', 'Decrease Weight', '2', '1', '2', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1045', 'Bless The Body', '3', '1', '3', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1048', 'Bess The Soul', '3', '1', '4', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1085', 'Acumen', '2', '1', '5', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1059', 'Empower', '1', '1', '6', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1068', 'Might', '2', '1', '7', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1086', 'Haste', '1', '1', '8', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1268', 'Vampiric Rage', '2', '1', '9', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1040', 'Shield', '2', '1', '10', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1036', 'Magic Barrier', '1', '1', '11', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1035', 'Mental Shield', '2', '1', '12', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('51', 'SongOfVitality', '304', 'Song of Vitality', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('52', 'POF', '1356', 'Prophecy of Fire', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('53', 'GMight', '1388', 'Greater Might', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('54', 'GShield', '1389', 'Greater Shield', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('55', 'ChOV', '1363', 'Chant of Victory', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('56', 'ChOS', '1362', 'Chant of Spirit', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('57', 'ChOF', '1002', 'Chant of Flame', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('58', 'SirensDance', '365', 'Siren\'s Dance', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('59', 'WildMagic', '1303', 'Wild Magic', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('60', 'POW', '1355', 'Prophecy of Water', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('61', 'GiftOfQueen', '4700', 'Gift Of Queen', '1', '1', '1', '1', '80', '0', '0', '0', '0', '3');
- +INSERT INTO `buff_templates` VALUES ('62', 'BlessingofQueen', '4699', 'Blessing of Queen', '1', '1', '1', '1', '80', '0', '0', '0', '0', '3');
- Index: /trunk/Data/sql/raid_events_spawnlist.sql
- ===================================================================
- --- /trunk/Data/sql/raid_events_spawnlist.sql (revision 683)
- +++ /trunk/Data/sql/raid_events_spawnlist.sql (revision 683)
- @@ -0,0 +1,24 @@
- +SET FOREIGN_KEY_CHECKS=0;
- +-- ----------------------------
- +-- Table structure for raid_events_spawnlist
- +-- ----------------------------
- +CREATE TABLE `raid_event_spawnlist` (
- + `id` int(11) NOT NULL auto_increment,
- + `location` varchar(40) NOT NULL default '',
- + `raid_locX` int(9) NOT NULL,
- + `raid_locY` int(9) NOT NULL,
- + `raid_locZ` int(9) NOT NULL,
- + `player_locX` int(9) NOT NULL,
- + `player_locY` int(9) NOT NULL,
- + `player_locZ` int(9) NOT NULL,
- + PRIMARY KEY (`id`)
- +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- +
- +-- ----------------------------
- +-- Records
- +-- ----------------------------
- +INSERT INTO `raid_event_spawnlist` VALUES ('1', 'Test', '-93287', '-251026', '-3336', '-94347', '-251026', '-3136');
- +INSERT INTO `raid_event_spawnlist` VALUES ('2', 'Test', '-87131', '-257755', '-3336', '-88020', '-257755', '-3136');
- +INSERT INTO `raid_event_spawnlist` VALUES ('3', 'Test', '174167', '-75329', '-5107', '174085', '-76703', '-5007');
- +INSERT INTO `raid_event_spawnlist` VALUES ('4', 'Test', '174252', '-88483', '-5139', '174242', '-86548', '-5007');
- +INSERT INTO `raid_event_spawnlist` VALUES ('5', 'Test', '174091', '-82305', '-5123', '174103', '-80650', '-5007');
- Index: /trunk/Data/data/html/event/12901-1.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-1.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-1.htm (revision 683)
- @@ -0,0 +1,16 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center><br><br>
- +In this section you can select the mob type that you'd like to fight against.
- +<br>
- +Tell me, against which kind of mob would you like to fight against?
- +<br>
- +<br><a action="bypass -h npc_%objectId%_Chat 4">Group of Mobs</a>
- +<br><a action="bypass -h npc_%objectId%_Chat 5">Grand Bosses</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-10.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-10.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-10.htm (revision 683)
- @@ -0,0 +1,4 @@
- +<html>
- +<body>
- +</body>
- +</html>
- Index: /trunk/Data/data/html/event/12901-11.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-11.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-11.htm (revision 683)
- @@ -0,0 +1,4 @@
- +<html>
- +<body>
- +</body>
- +</html>
- Index: /trunk/Data/data/html/event/12901-2.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-2.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-2.htm (revision 683)
- @@ -0,0 +1,15 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Party Events</center><br><br>
- +In this section you can select the mob type that you'd like to fight against.
- +<br>
- +Tell me, against which kind of mob would you like to fight against?
- +<br>
- +<br><a action="bypass -h npc_%objectId%_Chat 7">Grand Bosses</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-3.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-3.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-3.htm (revision 683)
- @@ -0,0 +1,15 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the mob against whom you'd like to fight.
- +<br>
- +Tell me, against which of this mobs would you like to fight against?
- +
- +<br><a action="bypass -h npc_%objectId%_iEvent 1 1 21380 4 1 3 1">Tepra Scarab</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901.htm (revision 683)
- @@ -0,0 +1,18 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255><br>
- +Welcome Traveler. Are you up for a BIG fight?! If so, I can help you quite a bit!
- +<br>
- +I can set up a fully customized event for you!
- +<br>
- +Wich kind of Event would you like to try?<br>
- +IMPORTANT: This feature is still undergoing tests and may be buggy!If you freeze after a teleport please restart Lineage 2 by pressing ctrl+alt+del and ending lineage 2.Start the client again and your good to go!<br>
- +IMPORTANT2: If you die during the event and you go back to town you will be kicked out of the raid event!<br>
- +<br><a action="bypass -h npc_%objectId%_Chat 1">Clan Events</a>
- +<br><a action="bypass -h npc_%objectId%_Chat 2">Party Events</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-4.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-4.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-4.htm (revision 683)
- @@ -0,0 +1,18 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the raid you like to do.
- +<br>
- +Tell me, against which of these mobs would you like to fight against?<br>
- +The price is given to every participant.You will also receive several event points depending on the difficulty of the raid. These can be used at the npc buffer to get full buffs!
- +For these mobs a minimum of 4 players is required.<br>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 22062 30 4 30 3 1">30x difficulty 3x mobs - 3Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 22062 40 4 30 3 2">40x difficulty 3x mobs - 6Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 22062 50 4 30 3 5">50x difficulty 3x mobs - 8Gb </a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-5.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-5.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-5.htm (revision 683)
- @@ -0,0 +1,21 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the raid you like to do.
- +<br>
- +Tell me, against which of these mobs would you like to fight against?<br>
- +The price is given to every participant.You will also receive several event points depending on the difficulty of the raid. These can be used at the npc buffer to get full buffs!
- +For these bosses a minimum of 8 players is required.<br>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 25234 2 8 30 3 1">2x Ancient Dragon - 15Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 25125 2 8 30 3 2">2x Tiger King - 25Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 25126 2 8 30 3 3">2x Longhorn - 40Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 29020 2 8 30 3 4">2x Baium - 50Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 29019 1 8 30 3 5">1x Antharas - 75Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 29028 1 8 30 3 6">1x Valakas - 150Gb </a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-6.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-6.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-6.htm (revision 683)
- @@ -0,0 +1,16 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the mob against whom you'd like to fight.
- +<br>
- +Tell me, against which of this mobs would you like to fight against?
- +<br>
- +Others Will soon be aviable, this is only for testing purposes.
- +<br><a action="bypass -h npc_%objectId%_iEvent 1 1 21380 4 1 3 1">Tepra Scarab [Testing]</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-7.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-7.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-7.htm (revision 683)
- @@ -0,0 +1,19 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Party Events</center>
- +In this section you can select the raid you like to do.
- +<br>
- +Tell me, against which of these mobs would you like to fight against?<br>
- +The price is given to every participant.You will also receive several event points depending on the difficulty of the raid. These can be used at the npc buffer to get full buffs!
- +For these bosses a minimum of 3 players is required to be online.<br>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29001 1 3 30 3 1">1x Ant Queen - 15Gb</a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29014 1 3 30 3 1">1x Orfen - 15Gb</a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29022 1 3 30 3 10">1x Zaken - 20Gb</a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29020 1 3 30 3 11">1x Baium - 30Gb</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Game/java/net/sf/l2j/Config.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/Config.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/Config.java (revision 681)
- @@ -171,10 +171,17 @@
- public static boolean TVT_EVENT_POTIONS_ALLOWED;
- public static boolean TVT_EVENT_SUMMON_BY_ITEM_ALLOWED;
- public static List<Integer> TVT_EVENT_DOOR_IDS = new FastList<Integer>();
- public static byte TVT_EVENT_MIN_LVL;
- public static byte TVT_EVENT_MAX_LVL;
- +
- + /** Raid Event Engine */
- + public static boolean RAID_SYSTEM_ENABLED;
- + public static int RAID_SYSTEM_MAX_EVENTS;
- + public static boolean RAID_SYSTEM_GIVE_BUFFS;
- + public static boolean RAID_SYSTEM_RESURRECT_PLAYER;
- + public static int RAID_SYSTEM_FIGHT_TIME;
- public static boolean L2JMOD_ALLOW_WEDDING;
- public static int L2JMOD_WEDDING_PRICE;
- public static boolean L2JMOD_WEDDING_PUNISH_INFIDELITY;
- public static boolean L2JMOD_WEDDING_TELEPORT;
- @@ -2011,10 +2018,21 @@
- }
- }
- }
- }
- }
- +
- + RAID_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("RaidEnginesEnabled", "false"));
- + RAID_SYSTEM_GIVE_BUFFS = Boolean.parseBoolean(L2JModSettings.getProperty("RaidGiveBuffs", "true"));
- + RAID_SYSTEM_RESURRECT_PLAYER = Boolean.parseBoolean(L2JModSettings.getProperty("RaidResurrectPlayer", "true"));
- + RAID_SYSTEM_MAX_EVENTS = Integer.parseInt(L2JModSettings.getProperty("RaidMaxNumEvents", "3"));
- + RAID_SYSTEM_FIGHT_TIME = Integer.parseInt(L2JModSettings.getProperty("RaidSystemFightTime", "60"));
- + if (RAID_SYSTEM_MAX_EVENTS == 0)
- + {
- + RAID_SYSTEM_ENABLED = false;
- + System.out.println("Raid Engine[Config.load()]: Invalid config property: Max Events = 0?!");
- + }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- Index: /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/DlgAnswer.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/DlgAnswer.java (revision 253)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/DlgAnswer.java (revision 681)
- @@ -20,10 +20,11 @@
- import java.util.logging.Logger;
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.model.actor.instance.L2EventManagerInstance;
- /**
- * @author Dezmond_snz
- * Format: cddd
- */
- @@ -48,13 +49,20 @@
- {
- if (Config.DEBUG)
- _log.fine(getType()+": Answer acepted. Message ID "+_messageId+", asnwer "+_answer+", unknown field "+_unk);
- if (_messageId == SystemMessageId.RESSURECTION_REQUEST.getId())
- getClient().getActiveChar().reviveAnswer(_answer);
- - else if (_messageId==614 && Config.L2JMOD_ALLOW_WEDDING)
- - getClient().getActiveChar().EngageAnswer(_answer);
- -
- + else if (_messageId==614 && getClient().getActiveChar().awaitingAnswer && Config.L2JMOD_ALLOW_WEDDING)
- + {
- + getClient().getActiveChar().EngageAnswer(_answer);
- + getClient().getActiveChar().awaitingAnswer = false;
- + }
- + else if (_messageId==614 && L2EventManagerInstance._awaitingplayers.contains(getClient().getActiveChar()))
- + {
- + getClient().getActiveChar().setRaidAnswear(_answer);
- + L2EventManagerInstance._awaitingplayers.remove(getClient().getActiveChar());
- + }
- }
- @Override
- public String getType()
- {
- Index: /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/RequestRestartPoint.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/RequestRestartPoint.java (revision 636)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/clientpackets/RequestRestartPoint.java (revision 681)
- @@ -24,10 +24,11 @@
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- import net.sf.l2j.gameserver.instancemanager.CastleManager;
- import net.sf.l2j.gameserver.instancemanager.ClanHallManager;
- import net.sf.l2j.gameserver.model.L2SiegeClan;
- import net.sf.l2j.gameserver.model.Location;
- +import net.sf.l2j.gameserver.model.entity.L2RaidEvent;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.entity.Castle;
- import net.sf.l2j.gameserver.model.entity.ClanHall;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.serverpackets.Revive;
- @@ -182,10 +183,34 @@
- {
- _log.warning("Living player ["+activeChar.getName()+"] called RestartPointPacket! Ban this player!");
- return;
- }
- + if (activeChar.inClanEvent || activeChar.inPartyEvent || activeChar.inSoloEvent)
- + {
- + activeChar.inClanEvent = false;
- + activeChar.inPartyEvent = false;
- + activeChar.inSoloEvent = false;
- + if (L2RaidEvent._eventType == 2)
- + {
- + if(L2RaidEvent._participatingPlayers.contains(activeChar))
- + // Clear player from Event.
- + L2RaidEvent._participatingPlayers.remove(activeChar);
- + }
- + if (L2RaidEvent._eventType == 3)
- + {
- + if (activeChar.getParty()!=null)
- + activeChar.leaveParty();
- + activeChar.sendMessage("You have been kicked from the party");
- + }
- + activeChar.sendMessage("You've been erased from the event!");
- + int num = L2RaidEvent._participatingPlayers.size();
- + if (num > 0 && num!=1)
- + num -= 1;
- + else
- + L2RaidEvent.hardFinish();
- + }
- Castle castle = CastleManager.getInstance().getCastle(activeChar.getX(), activeChar.getY(), activeChar.getZ());
- if (castle != null && castle.getSiege().getIsInProgress())
- {
- //DeathFinalizer df = new DeathFinalizer(10000);
- Index: /trunk/Game/java/net/sf/l2j/gameserver/skills/DocumentSkill.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/skills/DocumentSkill.java (revision 253)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/skills/DocumentSkill.java (revision 682)
- @@ -246,90 +246,76 @@
- }
- }
- }
- for (int i=lastLvl; i < lastLvl+enchantLevels1; i++)
- {
- + _currentSkill.currentLevel = lastLvl-1;
- + for (n=first; n != null; n = n.getNextSibling())
- + {
- + if ("cond".equalsIgnoreCase(n.getNodeName()))
- + {
- + Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- + Node msg = n.getAttributes().getNamedItem("msg");
- + if (condition != null && msg != null)
- + condition.setMessage(msg.getNodeValue());
- + _currentSkill.currentSkills.get(i).attach(condition,false);
- + }
- + if ("for".equalsIgnoreCase(n.getNodeName()))
- + {
- + parseTemplate(n, _currentSkill.currentSkills.get(i));
- + }
- + }
- _currentSkill.currentLevel = i-lastLvl;
- - boolean found = false;
- for (n=first; n != null; n = n.getNextSibling())
- {
- if ("enchant1cond".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- Node msg = n.getAttributes().getNamedItem("msg");
- if (condition != null && msg != null)
- condition.setMessage(msg.getNodeValue());
- _currentSkill.currentSkills.get(i).attach(condition,false);
- }
- if ("enchant1for".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- parseTemplate(n, _currentSkill.currentSkills.get(i));
- }
- }
- - // If none found, the enchanted skill will take effects from maxLvL of norm skill
- - if (!found)
- - {
- - _currentSkill.currentLevel = lastLvl-1;
- - for (n=first; n != null; n = n.getNextSibling())
- - {
- - if ("cond".equalsIgnoreCase(n.getNodeName()))
- - {
- - Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- - Node msg = n.getAttributes().getNamedItem("msg");
- - if (condition != null && msg != null)
- - condition.setMessage(msg.getNodeValue());
- - _currentSkill.currentSkills.get(i).attach(condition,false);
- - }
- - if ("for".equalsIgnoreCase(n.getNodeName()))
- - {
- - parseTemplate(n, _currentSkill.currentSkills.get(i));
- - }
- - }
- - }
- }
- for (int i=lastLvl+enchantLevels1; i < lastLvl+enchantLevels1+enchantLevels2; i++)
- {
- - boolean found = false;
- - _currentSkill.currentLevel = i-lastLvl-enchantLevels1;
- + _currentSkill.currentLevel = lastLvl-1;
- + for (n=first; n != null; n = n.getNextSibling())
- + {
- + if ("cond".equalsIgnoreCase(n.getNodeName()))
- + {
- + Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- + Node msg = n.getAttributes().getNamedItem("msg");
- + if (condition != null && msg != null)
- + condition.setMessage(msg.getNodeValue());
- + _currentSkill.currentSkills.get(i).attach(condition,false);
- + }
- + if ("for".equalsIgnoreCase(n.getNodeName()))
- + {
- + parseTemplate(n, _currentSkill.currentSkills.get(i));
- + }
- + }
- + _currentSkill.currentLevel = i-lastLvl-enchantLevels1;
- for (n=first; n != null; n = n.getNextSibling())
- {
- if ("enchant2cond".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- Node msg = n.getAttributes().getNamedItem("msg");
- if (condition != null && msg != null)
- condition.setMessage(msg.getNodeValue());
- _currentSkill.currentSkills.get(i).attach(condition,false);
- }
- if ("enchant2for".equalsIgnoreCase(n.getNodeName()))
- {
- - found = true;
- parseTemplate(n, _currentSkill.currentSkills.get(i));
- }
- - }
- - // If none found, the enchanted skill will take effects from maxLvL of norm skill
- - if(!found)
- - {
- - _currentSkill.currentLevel = lastLvl-1;
- - for (n=first; n != null; n = n.getNextSibling())
- - {
- - if ("cond".equalsIgnoreCase(n.getNodeName()))
- - {
- - Condition condition = parseCondition(n.getFirstChild(), _currentSkill.currentSkills.get(i));
- - Node msg = n.getAttributes().getNamedItem("msg");
- - if (condition != null && msg != null)
- - condition.setMessage(msg.getNodeValue());
- - _currentSkill.currentSkills.get(i).attach(condition,false);
- - }
- - if ("for".equalsIgnoreCase(n.getNodeName()))
- - {
- - parseTemplate(n, _currentSkill.currentSkills.get(i));
- - }
- - }
- }
- }
- _currentSkill.skills.addAll(_currentSkill.currentSkills);
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 382)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 682)
- @@ -31,10 +31,11 @@
- import net.sf.l2j.gameserver.SevenSignsFestival;
- import net.sf.l2j.gameserver.ThreadPoolManager;
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.datatables.ClanTable;
- +import net.sf.l2j.gameserver.datatables.BuffTemplateTable;
- import net.sf.l2j.gameserver.datatables.HelperBuffTable;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.SkillTable;
- import net.sf.l2j.gameserver.datatables.SpawnTable;
- import net.sf.l2j.gameserver.idfactory.IdFactory;
- @@ -122,10 +123,11 @@
- /** The castle index in the array of L2Castle this L2NpcInstance belongs to */
- private int _castleIndex = -2;
- public boolean isEventMob = false;
- + public boolean isPrivateEventMob = false;
- public boolean _isEventMobDM = false;
- private boolean _isInTown = false;
- private int _isSpoiledBy = 0;
- @@ -1021,10 +1023,14 @@
- player.sendPacket(new SystemMessage(SystemMessageId.SELECT_THE_ITEM_FROM_WHICH_YOU_WISH_TO_REMOVE_AUGMENTATION));
- player.sendPacket(new ExShowVariationCancelWindow());
- break;
- }
- }
- + else if (command.startsWith("MakeBuffs"))
- + {
- + makeBuffs(player,command.substring(9).trim());
- + }
- else if (command.startsWith("npcfind_byid"))
- {
- try
- {
- L2Spawn spawn = SpawnTable.getInstance().getTemplate(Integer.parseInt(command.substring(12).trim()));
- @@ -1097,10 +1103,27 @@
- if (!(item instanceof L2Weapon))
- return null;
- return (L2Weapon)item;
- + }
- +
- + /**
- + * Throws an action command to L2BufferInstance.<br>
- + * @param player --> Target player
- + * @param buffTemplate --> Name of the Buff Template to Add
- + */
- + public void makeBuffs(L2PcInstance player, String buffTemplate)
- + {
- + int _templateId = 0;
- +
- + try
- + {_templateId = Integer.parseInt(buffTemplate);}
- + catch (NumberFormatException e)
- + {_templateId = BuffTemplateTable.getInstance().getTemplateIdByName(buffTemplate);}
- + if (_templateId>0)
- + {L2BufferInstance.makeBuffs(player, _templateId, this,true);}
- }
- /**
- * Return null (regular NPCs don't have weapons instancies).<BR><BR>
- */
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2EventManagerInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2EventManagerInstance.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2EventManagerInstance.java (revision 681)
- @@ -0,0 +1,225 @@
- +/*
- + * 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.actor.instance;
- +
- +import java.util.List;
- +import java.util.StringTokenizer;
- +import java.util.Vector;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.model.entity.L2EventChecks;
- +import net.sf.l2j.gameserver.serverpackets.ActionFailed;
- +import net.sf.l2j.gameserver.serverpackets.ConfirmDlg;
- +import net.sf.l2j.gameserver.templates.L2NpcTemplate;
- +
- +/**
- + * This Class manages all the Requests to join a Raid Event.
- + *
- + * @author polbat02
- + */
- +public class L2EventManagerInstance extends L2NpcInstance
- +{
- + //Local Variables Definition
- + //--------------------------
- + /** Number of Current Events */
- + public static int _currentEvents = 0;
- + /** Players from which we're waiting an answer */
- + public static Vector<L2PcInstance> _awaitingplayers = new Vector<L2PcInstance>();
- + /** Players that will finally get inside the Event */
- + public static Vector<L2PcInstance> _finalPlayers = new Vector<L2PcInstance>();
- +
- + public L2EventManagerInstance(int objectId, L2NpcTemplate template)
- + {
- + super(objectId, template);
- + }
- +
- + public void onBypassFeedback(L2PcInstance player, String command)
- + {
- + player.sendPacket(new ActionFailed());
- + StringTokenizer st = new StringTokenizer(command, " ");
- + String actualCommand = st.nextToken();
- + _finalPlayers = new Vector<L2PcInstance>();
- +
- + if (actualCommand.equalsIgnoreCase("iEvent"))
- + {
- + try
- + {
- + /*Type:1- Single //2- Clan //3- Party*/
- + int type = Integer.parseInt(st.nextToken());
- + /*Required Event Points needed to participate*/
- + int eventPoints = Integer.parseInt(st.nextToken());
- + /* NpcId of the Event mobs */
- + int npcId = Integer.parseInt(st.nextToken());
- + /* Number of NPcs */
- + int npcAm =Integer.parseInt(st.nextToken());
- + /* Minimum number of needed persons players to participate */
- + int minPeople = Integer.parseInt(st.nextToken());
- + /* Minimum level to participate */
- + int minLevel = Integer.parseInt(st.nextToken());
- + /* Buff List to apply */
- + int bufflist = Integer.parseInt(st.nextToken());
- + /* Level of The Prize to Hand out */
- + int prizeLevel = Integer.parseInt(st.nextToken());
- + if (player == null){return;}
- + this.setTarget(player);
- +
- + if (_currentEvents>=Config.RAID_SYSTEM_MAX_EVENTS)
- + {
- + player.sendMessage("There's alredy "+_currentEvents+" events in progress. " +
- + "Wait untill one of them ends to get into another one.");
- + return;
- + }
- +
- + if (L2EventChecks.usualChecks(player,minLevel))
- + _finalPlayers.add(player);
- + else return;
- + // If the player has passed the checks, then continue.
- + switch (type)
- + {
- + // Case Clan Events.
- + case 2:
- + {
- + if(player.getClan()== null)
- + {
- + player.sendMessage("You Don't have a Clan!");
- + return;
- + }
- + L2PcInstance[] onlineclanMembers = player.getClan().getOnlineMembers("");
- + for (L2PcInstance member: onlineclanMembers)
- + {
- + boolean eligible = true;
- + if(member == null)
- + continue;
- + if(!L2EventChecks.usualChecks(member,minLevel))
- + eligible = false;
- + if(eligible && !(_finalPlayers.contains(member)))
- + _finalPlayers.add(member);
- + }
- + if (_finalPlayers.size()>1 && _finalPlayers.size()>=minPeople)
- + {
- + player.setRaidParameters(player,type,eventPoints,npcId,npcAm,minPeople,bufflist,prizeLevel,this, _finalPlayers);
- + _awaitingplayers.add(player);
- + player.sendPacket(new ConfirmDlg(614," A total of "+(_finalPlayers.size())+" members of your "
- + +" clan are Eligible for the event. Do you want to continue?"));
- + }
- + else
- + {
- + String reason;
- + if(_finalPlayers.size()>1)
- + reason =": Only 1 Clan Member Online.";
- + else if(_finalPlayers.size()<minPeople)
- + reason =": Not enough members online to participate.";
- + else reason=".";
- + player.sendMessage("Cannot participate"+reason);
- + }
- + break;
- + }
- + // Case Party Events.
- + case 3:
- + {
- + if(player.getParty()== null)
- + {
- + player.sendMessage("You DON'T have a Party!");
- + return;
- + }
- + List<L2PcInstance> partyMembers = player.getParty().getPartyMembers();
- + for (L2PcInstance member: partyMembers)
- + {
- + boolean eligible = true;
- + if(member == null)
- + continue;
- + if(!L2EventChecks.usualChecks(member,minLevel))
- + eligible = false;
- + if(eligible && !(_finalPlayers.contains(member)))
- + _finalPlayers.add(member);
- + }
- + if ((_finalPlayers.size())>1 && _finalPlayers.size()>=minPeople)
- + {
- + player.setRaidParameters(player,type,eventPoints,npcId,npcAm,minPeople,bufflist,prizeLevel,this, _finalPlayers);
- + _awaitingplayers.add(player);
- + player.sendPacket(new ConfirmDlg(614," A total of "+(_finalPlayers.size())+" members of your " +
- + "party are Eligible for the event. Do you want to continue?"));
- + }
- + else
- + {
- + String reason;
- + if(_finalPlayers.size()>1)
- + reason =": Only 1 Party Member.";
- + else if(_finalPlayers.size()<minPeople)
- + reason =": Not enough members to participate.";
- + else reason=".";
- + player.sendMessage("Cannot participate"+reason);
- + }
- + break;
- + }
- +
- + default:
- + {
- + player.setRaidParameters(player,type,eventPoints,npcId,npcAm,minPeople,bufflist,prizeLevel,this, _finalPlayers);
- + player.setRaidAnswear(1);
- + }
- + }
- + return;
- +
- + }
- + catch (Exception e)
- + {
- + _log.warning("L2EventManagerInstance: Error while getting html command");
- + e.printStackTrace();
- + }
- + }
- + super.onBypassFeedback(player, command);
- + }
- +
- + public String getHtmlPath(int npcId, int val)
- + {
- + String pom = "";
- + if (val == 0)
- + {
- + pom = "" + npcId;
- + }
- + else
- + {
- + pom = npcId + "-" + val;
- + }
- +
- + return "data/html/event/" + pom + ".htm";
- + }
- +
- + public static boolean addEvent()
- + {
- + if (_currentEvents>=Config.RAID_SYSTEM_MAX_EVENTS)
- + return false;
- + else
- + {
- + _currentEvents += 1;
- + return true;
- + }
- + }
- +
- + public static boolean removeEvent()
- + {
- + if(_currentEvents>0)
- + {
- + _currentEvents-=1;
- + return true;
- + }
- + else return false;
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 681)
- @@ -19,10 +19,11 @@
- package net.sf.l2j.gameserver.model.actor.instance;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.util.Calendar;
- +import java.util.Vector;
- import java.util.Collection;
- import java.util.Date;
- import java.util.LinkedList;
- import java.util.List;
- import java.util.Map;
- @@ -92,10 +93,12 @@
- import net.sf.l2j.gameserver.model.entity.DM;
- import net.sf.l2j.gameserver.model.L2DropData;
- import net.sf.l2j.gameserver.model.L2Effect;
- import net.sf.l2j.gameserver.model.L2Fishing;
- import net.sf.l2j.gameserver.model.L2HennaInstance;
- +import net.sf.l2j.gameserver.model.entity.L2EventChecks;
- +import net.sf.l2j.gameserver.model.entity.L2RaidEvent;
- import net.sf.l2j.gameserver.model.L2ItemInstance;
- import net.sf.l2j.gameserver.model.L2Macro;
- import net.sf.l2j.gameserver.model.L2ManufactureList;
- import net.sf.l2j.gameserver.model.L2Object;
- import net.sf.l2j.gameserver.model.L2Party;
- @@ -215,12 +218,12 @@
- private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?)";
- private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC";
- private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?";
- - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,donator=? WHERE obj_id=?";
- - private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,donator FROM characters WHERE obj_id=?";
- + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,donator=?, event_points=? WHERE obj_id=?";
- + private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,donator,event_points FROM characters WHERE obj_id=?";
- private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC";
- private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
- private static final String UPDATE_CHAR_SUBCLASS = "UPDATE character_subclasses SET exp=?,sp=?,level=?,class_id=? WHERE char_obj_id=? AND class_index =?";
- private static final String DELETE_CHAR_SUBCLASS = "DELETE FROM character_subclasses WHERE char_obj_id=? AND class_index=?";
- @@ -4251,10 +4254,15 @@
- if (killer instanceof L2PcInstance)
- pk = (L2PcInstance) killer;
- TvTEvent.onKill(killer, this);
- +
- + if (Config.RAID_SYSTEM_RESURRECT_PLAYER &&(inSoloEvent||inPartyEvent||inClanEvent))
- + {
- + L2RaidEvent.onPlayerDeath(this);
- + }
- if (atEvent && pk != null)
- {
- pk.kills.add(getName());
- }
- @@ -5713,10 +5721,11 @@
- player.setPkKills(rset.getInt("pkkills"));
- player.setOnlineTime(rset.getLong("onlinetime"));
- player.setNewbie(rset.getInt("newbie")==1);
- player.setNoble(rset.getInt("nobless")==1);
- player.setdonator(rset.getInt("donator")==1);
- + player.setEventPoints(rset.getInt("event_points"));
- player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time"));
- if (player.getClanJoinExpiryTime() < System.currentTimeMillis())
- {
- player.setClanJoinExpiryTime(0);
- @@ -6178,11 +6187,12 @@
- statement.setLong(53, getClanJoinExpiryTime());
- statement.setLong(54, getClanCreateExpiryTime());
- statement.setString(55, getName());
- statement.setLong(56, getDeathPenaltyBuffLevel());
- statement.setInt(57, isdonator() ? 1 : 0);
- - statement.setInt(58, getObjectId());
- + statement.setInt(58, getEventPoints());
- + statement.setInt(59, getObjectId());
- statement.execute();
- statement.close();
- }
- catch (Exception e) { _log.warning("Could not store char base data: "+ e); }
- @@ -10724,6 +10734,83 @@
- public void systemSendMessage(SystemMessageId id)
- {
- sendPacket(new SystemMessage(id));
- }
- +
- + /** Raid Event Parameters */
- + public boolean inClanEvent = false;
- + public boolean inPartyEvent = false;
- + public boolean inSoloEvent = false;
- + public boolean awaitingAnswer = false;
- + private int _event_points;
- + public static int eventType;
- + public static int eventPointsRequired;
- + public static int eventNpcId;
- + public static int eventNpcAmmount;
- + public static int eventMinPlayers;
- + public static int eventBufflist;
- + public static int eventRewardLevel;
- + public static L2Object eventEffector;
- + public static Vector<L2PcInstance> eventParticipatingPlayers;
- +
- + /** Raid Event Related Voids */
- + public void setEventPoints(int points)
- + {
- + _event_points = points;
- + }
- + public int getEventPoints()
- + {
- + return _event_points;
- + }
- +
- + /**
- + * Set Raid Event Parameters, this is needed to keep track of events while waiting for an answear from the Clan Leader.
- + * @param player
- + * @param type
- + * @param points
- + * @param npcId
- + * @param npcAm
- + * @param minPeople
- + * @param bufflist
- + * @param rewardLevel
- + * @param effector
- + * @param participatingPlayers
- + */
- + public void setRaidParameters(L2PcInstance player,int type,int points,int npcId,
- + int npcAm,int minPeople,int bufflist,int rewardLevel,L2Object effector,
- + Vector<L2PcInstance> participatingPlayers)
- + {
- + eventType = type;
- + eventPointsRequired = points;
- + eventNpcId = npcId;
- + eventNpcAmmount = npcAm;
- + eventMinPlayers = minPeople;
- + eventBufflist = bufflist;
- + eventRewardLevel = rewardLevel;
- + eventEffector = effector;
- + eventParticipatingPlayers = participatingPlayers;
- + }
- +
- + public void setRaidAnswear(int answer)
- + {
- + if (this == null)
- + return;
- + if(answer == 1)
- + {
- + if(L2EventChecks.checkPlayer(this,eventType,eventPointsRequired,eventMinPlayers,eventParticipatingPlayers))
- + {
- + L2RaidEvent event;
- + event = new L2RaidEvent(this,eventType,eventPointsRequired,eventNpcId,eventNpcAmmount,eventBufflist,eventRewardLevel,eventEffector,eventParticipatingPlayers);
- + sendMessage("You've choosen to continue the event with "+eventParticipatingPlayers+ "online Member/s.");
- + try
- + {Thread.sleep(5000);}
- + catch (InterruptedException e)
- + {e.printStackTrace();}
- + event.init();
- + }
- + }
- + else if (answer == 0)
- + sendMessage("You don't want to continue with the Event.");
- + else return;
- + }
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java (revision 681)
- @@ -0,0 +1,160 @@
- +/* 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.actor.instance;
- +
- +import java.util.logging.Logger;
- +
- +import javolution.util.FastList;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.datatables.BuffTemplateTable;
- +import net.sf.l2j.gameserver.model.L2Character;
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.L2Object;
- +import net.sf.l2j.gameserver.model.L2Skill.SkillTargetType;
- +import net.sf.l2j.gameserver.model.L2Skill;
- +import net.sf.l2j.gameserver.model.L2Skill.SkillType;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.serverpackets.MagicSkillUser;
- +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.templates.L2BuffTemplate;
- +
- +public class L2BufferInstance
- +{
- + static L2PcInstance selfBuffer;
- + static L2NpcInstance npcBuffer;
- +
- + /**
- + * Apply Buffs onto a player.
- + * @param player
- + * @param _templateId
- + * @param efector
- + * @param paymentRequired
- + */
- + public static void makeBuffs(L2PcInstance player, int _templateId, L2Object efector,boolean paymentRequired)
- + {
- + if (player == null)
- + return;
- + getbufferType(efector).setTarget(player);
- +
- + FastList<L2BuffTemplate> _templateBuffs = new FastList<L2BuffTemplate>();
- + _templateBuffs = BuffTemplateTable.getInstance().getBuffTemplate(_templateId);
- +
- + if (_templateBuffs == null || _templateBuffs.size() == 0)
- + return;
- +
- + int _priceTotal = 0;
- + int _pricePoints =0;
- +
- + for (L2BuffTemplate _buff:_templateBuffs)
- + {
- + if (paymentRequired)
- + {
- + if(!_buff.checkPrice(player))
- + {
- + player.sendMessage("Not enough Adena");
- + return;
- + }
- + if(!_buff.checkPoints(player))
- + {
- + player.sendMessage("Not enough Event Points");
- + return;
- + }
- + }
- +
- + getbufferType(efector).setTarget(player);
- +
- + if ( _buff.checkPlayer(player) && _buff.checkPrice(player))
- + {
- + if (player.getInventory().getAdena() >= (_priceTotal + _buff.getAdenaPrice())
- + && player.getEventPoints()>=_buff.getPointsPrice())
- + {
- + _priceTotal+=_buff.getAdenaPrice();
- + _pricePoints+=_buff.getPointsPrice();
- + if (_buff.forceCast() || (_buff.getSkill()) == null)
- + {
- + // regeneration ^^
- +
- + player.setCurrentHpMp(player.getMaxHp()+5000, player.getMaxMp()+5000);
- + /*
- + * Mensaje informativo al cliente sobre los buffs dados.
- + */
- + SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
- + sm.addSkillName(_buff.getSkill().getId());
- + player.sendPacket(sm);
- + sm = null;
- + if (_buff.getSkill().getTargetType() == SkillTargetType.TARGET_SELF)
- + {
- + // Ignora el tiempo de casteo del skill, hay unos 100ms de animacion de casteo
- + MagicSkillUser msu = new MagicSkillUser(player, player, _buff.getSkill().getId(), _buff.getSkill().getLevel(), 100, 0);
- + player.broadcastPacket(msu);
- +
- + for (L2Effect effect : _buff.getSkill().getEffectsSelf(player))
- + {
- + player.addEffect(effect);
- + }
- + // newbie summons
- + if (_buff.getSkill().getSkillType() == SkillType.SUMMON)
- + {
- + player.doCast(_buff.getSkill());
- + }
- + }
- + else
- + { // Ignora el tiempo de casteo del skill, hay unos 5ms de animacion de casteo
- + MagicSkillUser msu = new MagicSkillUser(getbufferType(efector), player, _buff.getSkill().getId(), _buff.getSkill().getLevel(), 5, 0);
- + player.broadcastPacket(msu);
- + }
- +
- + for (L2Effect effect : _buff.getSkill().getEffects(getbufferType(efector), player))
- + {
- + player.addEffect(effect);
- + }
- + try{
- + Thread.sleep(50);
- + }catch (Exception e) {}
- + }
- + }
- + }
- + }
- + if (paymentRequired &&(_pricePoints>0 ||_priceTotal>0))
- + {
- + if(_pricePoints>0)
- + {
- + int previousPoints = player.getEventPoints();
- + player.setEventPoints(player.getEventPoints()-_pricePoints);
- + player.sendMessage("You had "+previousPoints+" Event Points, and now you have "+ player.getEventPoints()+" Event Points.");
- + }
- + if (_priceTotal>0)
- + player.reduceAdena("NpcBuffer", _priceTotal, player.getLastFolkNPC(), true);
- + }
- + }
- + private static L2Character getbufferType(L2Object efector)
- + {
- + if (efector instanceof L2PcInstance)
- + {
- + selfBuffer = ((L2PcInstance)efector);
- + efector = selfBuffer;
- + }
- + if (efector instanceof L2NpcInstance)
- + {
- + npcBuffer = ((L2NpcInstance)efector);
- + efector = npcBuffer;
- + }
- + return (L2Character) efector;
- + }
- + static Logger _log = Logger.getLogger(Config.class.getName());
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/L2Attackable.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/L2Attackable.java (revision 253)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/L2Attackable.java (revision 681)
- @@ -34,10 +34,11 @@
- import net.sf.l2j.gameserver.ai.L2SiegeGuardAI;
- import net.sf.l2j.gameserver.clientpackets.Say2;
- import net.sf.l2j.gameserver.datatables.EventDroplist;
- import net.sf.l2j.gameserver.datatables.ItemTable;
- import net.sf.l2j.gameserver.datatables.EventDroplist.DateDrop;
- +import net.sf.l2j.gameserver.model.entity.L2RaidEvent;
- import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager;
- import net.sf.l2j.gameserver.model.actor.instance.L2BossInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2MinionInstance;
- @@ -623,10 +624,22 @@
- // Check for an over-hit enabled strike
- if (attacker instanceof L2PcInstance)
- {
- L2PcInstance player = (L2PcInstance)attacker;
- +
- + if (this.isPrivateEventMob)
- + {
- + L2RaidEvent.expHandOut();
- + exp = L2RaidEvent.exp;
- + sp = L2RaidEvent.sp;
- + if (L2RaidEvent.checkPossibleReward())
- + {
- + L2RaidEvent.chooseReward(player);
- + }
- + this.deleteMe();
- + }
- if (isOverhit() && attacker == getOverhitAttacker())
- {
- player.sendPacket(new SystemMessage(SystemMessageId.OVER_HIT));
- exp += calculateOverhitExp(exp);
- }
- @@ -739,10 +752,21 @@
- // Check for an over-hit enabled strike
- // (When in party, the over-hit exp bonus is given to the whole party and splitted proportionally through the party members)
- if (attacker instanceof L2PcInstance)
- {
- L2PcInstance player = (L2PcInstance)attacker;
- + if (this.isPrivateEventMob)
- + {
- + L2RaidEvent.expHandOut();
- + exp = L2RaidEvent.exp;
- + sp = L2RaidEvent.sp;
- + if (L2RaidEvent.checkPossibleReward())
- + {
- + L2RaidEvent.chooseReward(player);
- + }
- + this.deleteMe();
- + }
- if (isOverhit() && attacker == getOverhitAttacker())
- {
- player.sendPacket(new SystemMessage(SystemMessageId.OVER_HIT));
- exp += calculateOverhitExp(exp);
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventChecks.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventChecks.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventChecks.java (revision 681)
- @@ -0,0 +1,179 @@
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import java.util.Vector;
- +
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +
- +public class L2EventChecks
- +{
- + /**
- + * CheckIfOtherEvent --> Checks if the player is already inscribed in another event.
- + */
- + private static boolean checkIfOtherEvent (L2PcInstance player)
- + {
- + if (player.inSoloEvent||player.inPartyEvent||player.inClanEvent)
- + {
- + player.sendMessage("You're alredy registered in another event.");
- + return true;
- + }
- + return false;
- + }
- +
- + /**
- + * Check if Player/Clan/Party is eligible for Event.<br>
- + * Documentation can be found in the method.<br>
- + * @param player --> Basic Player Taking the action.
- + * @param eventType --> Type of Event to check.
- + * @param points --> Minimum Event Points Required to participate.
- + * @param minPeople --> Minimum allowed People Required to participate.
- + * @return --> True for Eligible Players and False for UnEligible Players.
- + */
- + public static boolean checkPlayer(L2PcInstance player,int eventType,int points, int minPeople, Vector<L2PcInstance>_eventPlayers)
- + {
- + int eventPoints = 0;
- + //Let's avoid NPEs
- + if (player == null)
- + return false;
- + //If there's not enough clan members online to fill the MinPeople requirement
- + //return false.
- + if (_eventPlayers.size()<=minPeople && eventType == (2|3))
- + {
- + //Notify to the requester.
- + player.sendMessage("Not enough "+eType(eventType)+" members of the connected at this mommtent, try again later.");
- + return false;
- + }
- + for (L2PcInstance member : _eventPlayers)
- + {
- + /*
- + * In case of finding a disconnected player, we will continue the for statement.
- + */
- + if (member == null)
- + continue;
- + //Let's check if any of the members is in another Event.
- + if(checkIfOtherEvent(member))
- + {
- + /* If this is the case, we will notify the request instance about the inconvenience produced.
- + * We will also return a false.*/
- + String badRequestor = member.getName();
- + notifyBadRequestor(player,badRequestor,2,_eventPlayers);
- + return false;
- + }
- +
- + // TODO: Add a Check asking members of the clan/party (ONLY) ACTUALLY WANT TO PARTICIPATE or not.
- +
- + /* Let's count all the points for every one of the event members, only in the case that
- + * the request instance and the Clan Members are from the same clan */
- + switch(eventType)
- + {
- + case 2:
- + {
- + if(_eventPlayers.contains(player) && member.getClan().getName().equals(player.getClan().getName()))
- + eventPoints +=member.getEventPoints();
- + break;
- + }
- + case 3:
- + {
- + //Let's add the points of each member to the Party General Clan Score.
- + eventPoints += member.getEventPoints();
- + break;
- + }
- + default:
- + {
- + eventPoints = member.getEventPoints();
- + break;
- + }
- + }
- + }
- + /* If the addition of all the points is bigger than the requested points, we will accept
- + * the Participation of this clan in the event */
- + if (eventPoints>=points)
- + {
- + for (L2PcInstance member : _eventPlayers)
- + {
- + // Deletion of all the Buffs from all the Clan members
- + for (L2Effect effect : member.getAllEffects())
- + {
- + if (effect != null)
- + effect.exit();
- + }
- + }
- + return true;
- + }
- + //Else The Clan doesn't have enough event points to participate.
- + else if (eventType != 1)
- + {
- + player.sendMessage("The totality of your "+eType(eventType)+" members don't have enough Event Points to participate.");
- + return false;
- + }
- + else
- + {
- + player.sendMessage("Not enough Event Points to participate into the Event.");
- + return false;
- + }
- + }
- + /**
- + * notifyOfBadRequestor --> Tell the members of the Clan/Party that the player is already inscribed in another event.
- + */
- + private static void notifyBadRequestor(L2PcInstance player, String badRequestor, int type, Vector<L2PcInstance>_eventPlayers)
- + {
- + if (type == 2)
- + {
- + for (L2PcInstance member : _eventPlayers)
- + {
- + member.sendMessage("You can't access the event while "+badRequestor+ "is singed up for another event.");
- + }
- + }
- + if (type ==3)
- + {
- + for (L2PcInstance member : _eventPlayers)
- + {
- + member.sendMessage("You can't access the event while "+badRequestor+ "is singed up for another event.");
- + }
- + }
- + }
- +
- + public static boolean usualChecks(L2PcInstance player, int minLevel)
- + {
- + if(player.getLevel()<minLevel)
- + {
- + player.sendMessage("The minimum level to participate in this Event is "+minLevel+". You cannot participate.");
- + return false;
- + }
- + if (player.inClanEvent || player.inPartyEvent || player.inSoloEvent)
- + {
- + player.sendMessage("You're alredy registered in another Event.");
- + return false;
- + }
- + if (player.isCursedWeaponEquiped())
- + {
- + player.sendMessage("You can Not register while Having a Cursed Weapon.");
- + return false;
- + }
- + if (player.isInStoreMode())
- + {
- + player.sendMessage("Cannot Participate while in Store Mode.");
- + return false;
- + }
- + if (player.isInJail())
- + {
- + player.sendMessage("Cannot Participate while in Jail.");
- + return false;
- + }
- + return true;
- + }
- +
- + public static String eType(int type)
- + {
- + String sType;
- + if(type == 1)
- + sType ="Single";
- + else if(type == 2)
- + sType ="Clan";
- + else if(type == 3)
- + sType="Party";
- + else sType="error ocurred while getting type of Event.";
- + return sType;
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2RaidEvent.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2RaidEvent.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2RaidEvent.java (revision 681)
- @@ -0,0 +1,1047 @@
- +/*
- + * 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.util.Vector;
- +import java.util.logging.Logger;
- +
- +import javolution.text.TextBuilder;
- +import net.sf.l2j.Config;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.datatables.ItemTable;
- +import net.sf.l2j.gameserver.datatables.NpcTable;
- +import net.sf.l2j.gameserver.datatables.SpawnTable;
- +import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;
- +import net.sf.l2j.gameserver.model.L2Object;
- +import net.sf.l2j.gameserver.model.L2Spawn;
- +import net.sf.l2j.gameserver.model.PcInventory;
- +import net.sf.l2j.gameserver.model.actor.instance.L2BufferInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2EventManagerInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.serverpackets.ItemList;
- +import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
- +import net.sf.l2j.gameserver.serverpackets.StatusUpdate;
- +import net.sf.l2j.gameserver.serverpackets.SystemMessage;
- +import net.sf.l2j.gameserver.templates.L2NpcTemplate;
- +
- +/**
- + * This Class implements and Manages All Raid Events.<br>
- + *
- + * @author polbat02
- + */
- +public class L2RaidEvent
- +{
- + //Local Variables Definition
- + //--------------------------
- + protected static final Logger _log = Logger.getLogger(L2RaidEvent.class.getName());
- + /**
- + * Definition of the Event Mob Spawn
- + */
- +
- + private static L2PcInstance _player;
- + private static L2Spawn _npcSpawn = null;
- + /**
- + * Definition of the Spawn as a L2NpcInstance
- + */
- + private static L2NpcInstance _lastNpcSpawn = null;
- + /**
- + * Custom Management of Experience upon NPC death.
- + */
- + public static int exp = 0;
- + /**
- + * Custom Management of SP upon NPC death.
- + */
- + public static int sp = 0;
- +
- + /**
- + * <b>Event Type:</b><br>
- + * 1- Solo Event (Single player)<br>
- + * 2- Clan Event<br>
- + * 3- Party Event<br>
- + */
- + public static int _eventType;
- + /**
- + * Number Of Event Mobs.
- + */
- + private static int _eventMobs = 0;
- + /**
- + * Reward Level: According to this reward level the players will be
- + * congratulated with different prizes.
- + */
- + private static int _rewardLevel;
- + /**
- + * Transport Locations
- + */
- + private static int _locX,_locY,_locZ,_pX,_pY,_pZ;
- +
- + /**
- + * NPC spawn positions
- + */
- + private static int _npcX,_npcY,_npcZ;
- +
- + /**
- + * DataBase Prize Parameters
- + */
- + private static int _first_id,_first_ammount,_second_id,_second_ammount,_event_ammount;
- +
- + /** Event points Required*/
- + private static int _points;
- +
- + /** NPC ID */
- + private static int _npcId;
- +
- + /** NPC Ammount */
- + private static int _npcAm;
- +
- + /** BuffList */
- + private static int _bufflist;
- +
- + /** BUFFER */
- + private static L2Object _effector;
- +
- + /**
- + * Vector Created to add Single/Party/Clan Players onto the event.
- + * TODO: Use this vector also to add another kind of event --> free Event with any player that may want to participate.
- + */
- + public static Vector<L2PcInstance> _participatingPlayers = new Vector<L2PcInstance>();
- +
- + /**
- + * Players from whom we're waiting for an answer in order to know it they want to join the event.
- + */
- + public static Vector<L2PcInstance> _awaitingplayers = new Vector<L2PcInstance>();
- + /**
- + * Vector Created to track all the Event Mobs and Delete them if needed.
- + */
- + public static Vector<L2NpcInstance> _eventMobList = new Vector<L2NpcInstance>();
- +
- + /** The state of the Event<br> */
- + private static EventState _state = EventState.INACTIVE;
- +
- + enum EventState
- + {
- + INACTIVE,
- + STARTING,
- + STARTED,
- + PARTICIPATING,
- + REWARDING,
- + INACTIVATING
- + }
- +
- + /**
- + * CONSTRUCTOR:<br>
- + * This is the start of the Event, defined from HTM files.<br>
- + * Documentation can be found in the method.<br>
- + * @param player --> Player taking the action on the Event Manager.
- + * @param type --> Type of Event: 1: Single Event || 2: Clan Event || 3: Party Event
- + * @param points --> Event Points Required to start event.
- + * @param npcId --> Id of the Event Raid/Mob
- + * @param npcAm --> Amount of Mobs
- + * @param minPeople --> Minimum People required to run event (Only functional on Clan and Party Events)
- + * @param bufflist --> BuffList to apply to the player. Defined in the SQL table buff_templates
- + * @param rewardLevel --> Reward level to apply upon player's victory.
- + * @param effector --> Effector of the Buffs (Previously defined in L2EventMAnagerInstance.java)
- + * @param participatingPlayers --> Players Enrolled in the Event.
- + */
- + public L2RaidEvent(L2PcInstance player,int type,int points,int npcId,int npcAm,int bufflist,
- + int rewardLevel,L2Object effector,Vector<L2PcInstance> participatingPlayers)
- + {
- + // Define the actual coordinates of the Player.
- + _player = player;
- + _pX = player.getClientX();
- + _pY = player.getClientY();
- + _pZ = player.getClientZ();
- + _eventType = type;
- + _points = points;
- + _npcId = npcId;
- + _npcAm = npcAm;
- + _bufflist = bufflist;
- + _rewardLevel = rewardLevel;
- + _effector = effector;
- + _participatingPlayers = participatingPlayers;
- + }
- +
- + /** Event Initialization given the Constructor defined variables.*/
- + public void init()
- + {
- + setState(EventState.STARTING);
- + //Increase the number of Current Events.
- + if(!L2EventManagerInstance.addEvent())
- + return;
- + //Set the coordinates for the Event.
- + if (setCoords(_player));
- + else{L2EventManagerInstance.removeEvent();
- + return;}
- + _log.warning("RaidEngine [setCoords]: Players: "+_locX+", "+_locY+", "+_locZ);
- + //Set Player inEvent
- + setInEvent(_player);
- + //Initialize event.
- + startEvent(_player, _npcId, _npcAm);
- + //Call the Function required to buff the player.
- + buffEventMembers(_player,_points, _bufflist,_effector);
- + return;
- + }
- +
- + /**
- + * Sets the spawn positions for the players in each event
- + */
- + private static boolean setCoords(L2PcInstance player)
- + {
- + int _ce = L2EventManagerInstance._currentEvents;
- + if (_ce == 0 || (_ce>Config.RAID_SYSTEM_MAX_EVENTS))
- + {
- + String reason = null;
- + if (_ce == 0)
- + reason = "Current Events = 0.";
- + else if(_ce>Config.RAID_SYSTEM_MAX_EVENTS)
- + reason = "Too many Events going on";
- + player.sendMessage("Raid Engines [setCoords()]: Error while setting spawn positions for players and Monsters. Reason: "+reason);
- + return false;
- + }
- + else
- + {
- + loadSpawns(_ce);
- + return true;
- + }
- + }
- +
- + /**
- + * We will set the player/party Member in an Event Status.<br>
- + * This way we will also make sure they don't enroll in any other event.<br>
- + * @param player --> Player to set in an Event Status
- + * @param type --> Type of event to be set In.
- + */
- + private synchronized void setInEvent(L2PcInstance player)
- + {
- + // Check if the type of event is defined.
- + if (_eventType != 1 && _eventType != 2 && _eventType != 3)
- + {
- + player.sendMessage("Debug: Error in The event type [Function: setInEvent]");
- + _log.warning("Event Manager: Error! Event not defined! [Function setInEvent]");
- + return;
- + }
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + switch(_eventType){
- + case 1:{member.inSoloEvent = true;
- + break;}
- + case 2:{member.inClanEvent = true;
- + break;}
- + case 3:{member.inPartyEvent = true;
- + break;}
- + default:return;}
- + member.sendMessage("Event Manager: You are now enroled in a "+L2EventChecks.eType(_eventType)+" Type of Event.");
- + }
- + }
- +
- + /**
- + * <b>Let's Apply the Buffs to the Event Members</b>
- + * <li> We don't need to check if the player can or can not have access to the buffing state since it has
- + * previously been checked.
- + * <li> We assign a value of previousEventPoints to notify the player.
- + * <li> Apply the buffs.
- + * <li> Notify the player once he/she has gotten the Buffs.
- + * <br>More Documentation can Be found inside the method's code.<br>
- + * We will apply the buffs previous to the Event following the parameters:
- + * @param player --> Player participating in the Event.
- + * @param eventPoints --> Event points to be deduced once the buffing takes place.
- + * @param buffList --> Buff list from where the buffs will be taken.
- + * @param efector --> Eefector taking the action (in this case NPC).
- + * @param eventType --> Type of Event.
- + */
- + private synchronized static void buffEventMembers(L2PcInstance player, int eventPoints, int buffList, L2Object efector)
- + {
- + /* Check if the event type has been defined.
- + * Once the event is fully functional this checks will be taken out */
- + if (_eventType!=1&&_eventType!=2&&_eventType!=3)
- + {
- + player.sendMessage("Debug: Error in The event type [Function: bufEventMembers]");
- + _log.warning("Se corta la funcion de entrega de buffs.");
- + return;
- + }
- + //Single event --> Direct Buffing.
- + if (_eventType == 1)
- + {
- + int previousPoints =player.getEventPoints();
- + if (Config.RAID_SYSTEM_GIVE_BUFFS)
- + L2BufferInstance.makeBuffs(player,buffList,efector,false);
- + player.setEventPoints(player.getEventPoints()-eventPoints);
- + player.sendMessage("Event Manager: "+eventPoints+" Event Points have Been used. " +
- + "You had "+previousPoints+" and now you have "+player.getEventPoints()+ "Event Points.");
- + }
- + // Clan Event: Let's buff all the clan members...
- + // TODO: Check if the distance of other clan members is important upon member buffing.
- + if (_eventType == 2)
- + {
- + // Define HOW many players are online at this very moment.
- + int cmCount = _participatingPlayers.size();
- + // Define the individual Event Points Price for every player.
- + int individualPrice = eventPoints/cmCount;
- + // Round up the price
- + //individualPrice = Math.round(individualPrice);
- + //Start the Buffing.
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + // Define the previous points for each member of the clan.
- + int previousPoints;
- + if (member == null)
- + continue;
- + // Apply the Buffs if allowed
- + if (Config.RAID_SYSTEM_GIVE_BUFFS)
- + L2BufferInstance.makeBuffs(member,buffList,efector,false);
- + /*
- + * In this case we will generate an HTML to notify the member of the action taken.
- + * 1. In the first case, we will check if the subject has enough Event Points as to pay the Buffs,
- + * and enroll into the event.
- + * 2. If that's not the case we will proceed into the first IF:
- + * 2a. The even points will be replaced by 0 since the player doesn't have enough event points
- + * to pay the normal quota.
- + * 2b. We will notify him of this situation. We will also deduce the missing points
- + * from other Clan Members. (Sharing is good right? xD)
- + * 3. If 1 is Affirmative we will proceed onto the second IF:
- + * 3a. Deduction of event points = to what's needed to participate in the event/online
- + * clan members.
- + * 3b. Notify this situation and inform the player of the amount of points that he/she has at
- + * this very moment.
- + */
- + if (individualPrice>member.getEventPoints())
- + {
- + previousPoints = member.getEventPoints();
- + member.setEventPoints(0);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You didn't have enough Event Points, so we've used all of your points.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and we needed "+individualPrice+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: polbat02 for the L2J community.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + else
- + {
- + previousPoints = member.getEventPoints();
- + member.setEventPoints(member.getEventPoints()-individualPrice);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and now you have "+(previousPoints-individualPrice)+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: polbat02 for the L2J community.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + }
- + }
- + // Party Event --> The same action as in Clan Events Will be taken.
- + if (_eventType == 3)
- + {
- + int pmCount = player.getParty().getMemberCount();
- + int individualPrice = eventPoints/pmCount;
- + //individualPrice = Math.round(individualPrice);
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + if (Config.RAID_SYSTEM_GIVE_BUFFS)
- + L2BufferInstance.makeBuffs(member,buffList,efector,false);
- + member.inPartyEvent = true;
- + if (individualPrice>member.getEventPoints())
- + {
- + int previousPoints = member.getEventPoints();
- + member.setEventPoints(0);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You didn't have enough Event Points, so we've used all of your points.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and we needed "+individualPrice+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: Polbat02 //Dragonlance Server.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + else
- + {
- + int previousPoints = member.getEventPoints();
- + member.setEventPoints(member.getEventPoints()-individualPrice);
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>A total of "+eventPoints+" points have been deduced from your party TOTAL Event Point Score.</td></tr><br>");
- + replyMSG.append("<tr><td>You had "+previousPoints+", and now you have "+(previousPoints-individualPrice)+" points.</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: Polbat02 //Dragonlance Server.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + member.sendPacket(adminReply);
- + }
- + }
- + }
- + }
- +
- + /**
- + * <b>Starting of the Event</b><br>
- + * This method checks it the total amount of events in process is > than the allowed and acts
- + * according to that and the parameters given.<br>
- + * In case X events are already taking place, the void returns and won't let us continue with the
- + * event.<br>
- + * This check is not needed since we already check this in L2EventManagerInstance.java, but i'll
- + * leave it in here for now since this is a very early stage of developing for now.<br>
- + * More documentation can be found in the Method.<br>
- + * @param player --> Player taking the action.
- + * @param npcId --> Event Monster ID.
- + * @param ammount --> Amount of Event Monsters
- + * @param type --> type of Event.
- + */
- + private static void startEvent(L2PcInstance player, int npcId, int ammount)
- + {
- + if (player == null)
- + return;
- + int currentEvents = L2EventManagerInstance._currentEvents;
- + if (currentEvents>=Config.RAID_SYSTEM_MAX_EVENTS)
- + return;
- + if (currentEvents == 0)
- + return;
- + setState(EventState.STARTED);
- + // Teleport Player or Members depending on the Event Type.
- + doTeleport(player,_locX,_locY,_locZ,10,false);
- + // Spawn The NPC Monster for the Event.
- + spawnMonster(npcId,60,ammount,_npcX,_npcY,_npcZ);
- + }
- +
- + /**
- + * Teleport the event participants to where the event is going to take place<br>
- + * A function has been created to make it easier for us to teleport the players
- + * every time we need them to teleport.<br>
- + * Added suport for different kind of events.
- + * @param player --> Player being teleported.
- + * @param cox --> Coord X
- + * @param coy --> Coord Y
- + * @param coz --> Coord Z
- + * @param delay --> Delay to be teleported in
- + * @param removeBuffs --> Boolean to removeBuffs uponTeleport or not.
- + */
- + private static void doTeleport(L2PcInstance player,int cox,int coy,int coz,int delay,boolean removeBuffs)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + new L2EventTeleporter(member,cox,coy,coz,delay,removeBuffs);
- + member.sendMessage("You will be teleported in 10 Seconds.");
- + }
- + }
- +
- + /**
- + * Spawning function of Event Monsters.<br>
- + * Added Support for multiple spawns and for each one of them being defined as Event Mob.
- + * @param monsterId --> Npc Id
- + * @param respawnTime --> Respawn Delay (in most cases this will be 0 as we're gonna
- + * cut the respawning of the Mobs upon death).
- + * @param mobCount --> MobCount to be spawned.
- + * @param locX --> Coordinate X for the mob to be spawned in.
- + * @param locY --> Coordinate Y for the mob to be spawned in.
- + * @param locZ --> Coordinate Z for the mob to be spawned in.
- + */
- + private static void spawnMonster(int monsterId, int respawnDelay, int mobCount,int locX,int locY, int locZ)
- + {
- + L2NpcTemplate template;
- + int monsterTemplate = monsterId;
- + template = NpcTable.getInstance().getTemplate(monsterTemplate);
- + if (template == null)
- + return;
- + _eventMobs = mobCount;
- + // Support for multiple spawns.
- + if (mobCount>1)
- + {
- + int n = 1;
- + while (n<=mobCount)
- + {
- + try
- + {
- + L2Spawn spawn = new L2Spawn(template);
- + // TODO: Add support for different spawning zones.
- + spawn.setLocx(locX);
- + spawn.setLocy(locY);
- + spawn.setLocz(locZ);
- + spawn.setAmount(1);
- + spawn.setHeading(0);
- + spawn.setRespawnDelay(respawnDelay);
- + if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcid()) != null)
- + RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getStatsSet().getDouble("baseHpMax"), template.getStatsSet().getDouble("baseMpMax"), false);
- + else
- + SpawnTable.getInstance().addNewSpawn(spawn, false);
- + spawn.init();
- + /* Define the properties of every spawn.
- + * TODO: Change the Mob statistics according on Event Participants and Server Rates.
- + */
- + _lastNpcSpawn = spawn.getLastSpawn();
- + _npcSpawn = spawn;
- + _lastNpcSpawn.isPrivateEventMob=true;
- + _lastNpcSpawn.setChampion(false);
- + _lastNpcSpawn.setTitle("Event Monster");
- + // Stop the Respawn of the Mob.
- + _npcSpawn.stopRespawn();
- + _eventMobList.add(_lastNpcSpawn);
- + n++;
- + }
- + catch (Exception e)
- + {
- + _log.warning("L2EventManager: Exception Upon MULTIPLE NPC SPAWN.");
- + e.printStackTrace();
- + }
- + }
- + setState(EventState.PARTICIPATING);
- + }
- + else
- + {
- + try
- + {
- + L2Spawn spawn = new L2Spawn(template);
- + spawn.setLocx(locX);
- + spawn.setLocy(locY);
- + spawn.setLocz(locZ);
- + spawn.setAmount(1);
- + spawn.setHeading(0);
- + spawn.setRespawnDelay(respawnDelay);
- + if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcid()) != null)
- + RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template.getStatsSet().getDouble("baseHpMax"), template.getStatsSet().getDouble("baseMpMax"), false);
- + else
- + SpawnTable.getInstance().addNewSpawn(spawn, false);
- + spawn.init();
- + _lastNpcSpawn = spawn.getLastSpawn();
- + _npcSpawn = spawn;
- + _lastNpcSpawn.isPrivateEventMob=true;
- + _lastNpcSpawn.setChampion(false);
- + _lastNpcSpawn.setTitle("Event Monster");
- + _npcSpawn.stopRespawn();
- + _eventMobList.add(_lastNpcSpawn);
- + }
- + catch (Exception e)
- + {
- + _log.warning("L2EventManager: Exception Upon SINGLE NPC SPAWN.");
- + e.printStackTrace();
- + }
- + setState(EventState.PARTICIPATING);
- + }
- + new RaidFightManager();
- + }
- +
- + /**
- + * Delete the mob from the Event.
- + */
- + private static void unSpawnNPC()
- + {
- + try
- + {
- + _lastNpcSpawn.deleteMe();
- + _npcSpawn.stopRespawn();
- + _npcSpawn = null;
- + _lastNpcSpawn = null;
- + }
- + catch(Exception e)
- + {
- + _log.warning("L2EventManager: Eception Upon NPC UNSPAWN.");
- + }
- + }
- + /**
- + * Function launched at every player death (if he/she's enrolled in any Raid event)
- + * @param player
- + */
- + public static void onPlayerDeath(L2PcInstance player)
- + {
- + /*
- + * TODO: Add support for:
- + * - Configurable Death rebirth system including:
- + * - Automatic respawn (Done)
- + * - Track deaths for player.
- + * - doRevive? (Done)
- + */
- + new L2EventTeleporter(player,_locX,_locY,_locZ,0,false);
- + player.setTarget(null);
- + player.breakAttack();
- + player.breakCast();
- + player.doRevive();
- + }
- +
- + /**
- + * This is the place where we define all the actions that take place after one Event Mob dies.
- + * a. Check if that was the last event mob of this instance.
- + * b. If not, decrease the number by one.
- + * c. Else return true.
- + */
- + public static boolean checkPossibleReward()
- + {
- + if (_eventMobs == 0)
- + return false;
- + if (_eventMobs<1)
- + {
- + _eventMobs = 0;
- + return false;
- + }
- + if (_eventMobs>1)
- + {
- + _eventMobs = _eventMobs -1;
- + return false;
- + }
- + setState(EventState.REWARDING);
- + return true;
- + }
- + /**
- + * This void picks the rewards and launches the hand out system.
- + * It also Ends the event.
- + * Added database support for this.
- + * @param player --> Player taking the action.
- + */
- + public static void chooseReward(L2PcInstance player)
- + {
- + if (_eventMobs == 1)
- + _eventMobs =0;
- + else return;
- + loadData(_rewardLevel);
- + //Case Single Event
- + if (_eventType == 1)
- + {
- + //Hand Out Items
- + handOutItems(player,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + //Genearal Clean-Up of the Event.
- + unSpawnNPC();
- + clearFromEvent(player);
- + //Teleport back to previous-event location.
- + doTeleport(player,_pX,_pY,_pZ,10,true);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + }
- + //Case Clan Event
- + if (_eventType == 2)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + handOutItems(member,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + doTeleport(member,_pX,_pY,_pZ,10,true);
- + }
- + unSpawnNPC();
- + clearFromEvent(player);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + }
- + //Case Party Event.
- + if (_eventType == 3)
- + {
- + if(player.getParty() != null)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + handOutItems(member,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + doTeleport(member,_pX,_pY,_pZ,10,true);
- + }
- + }
- + else
- + {
- + player.sendMessage("You don't have a party anymore?! Well then the rewards go for you only.");
- + //Hand Out Items
- + handOutItems(player,_first_id,_first_ammount,_second_id,_second_ammount,_event_ammount);
- + //General Clean-Up of the Event.
- + unSpawnNPC();
- + clearFromEvent(player);
- + //Teleport back to previous-event location.
- + doTeleport(player,_pX,_pY,_pZ,10,true);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + return;
- + }
- + unSpawnNPC();
- + clearFromEvent(player);
- + if (L2EventManagerInstance._currentEvents!=0)
- + L2EventManagerInstance._currentEvents=L2EventManagerInstance._currentEvents-1;
- + }
- + return;
- + }
- +
- + /**
- + * Custom Definition of the Experience.
- + * TODO: Add custom definitions of Experience for different prize lists.
- + */
- + public static void expHandOut()
- + {
- + exp += exp;
- + sp +=sp;
- + }
- +
- + /**
- + * Clean the eventStatus from the players.
- + */
- + private synchronized static void clearFromEvent(L2PcInstance player)
- + {
- + setState(EventState.INACTIVATING);
- + if (_eventType !=1 && _eventType!=2 &&_eventType!=3)
- + return;
- + if (_eventType == 1)
- + {
- + player.inSoloEvent = false;
- + }
- + if (_eventType == 2)
- + {
- + if (_participatingPlayers.size()!=0)
- + {
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + member.inClanEvent = false;
- + }
- + //Clear Clan Members from event.
- + if(_participatingPlayers.size()!=0)
- + _participatingPlayers.clear();
- + }
- + }
- + if (_eventType == 3)
- + {
- + if(player.getParty()!=null)
- + {
- + player.inPartyEvent = false;
- + for (L2PcInstance member: _participatingPlayers)
- + {
- + if (member == null)
- + continue;
- + member.inPartyEvent = false;
- + }
- + }
- + else
- + player.inPartyEvent = false;
- + }
- + setState(EventState.INACTIVE);
- + }
- +
- + /**
- + * Function with which we will hand out event Items.
- + * @param player
- + * @param item1
- + * @param ammount1
- + * @param item2
- + * @param ammount2
- + * @param eventPoints
- + */
- + private static void handOutItems(L2PcInstance player, int item1, int ammount1, int item2, int ammount2, int eventPoints)
- + {
- + boolean hasItem1 = false;
- + boolean hasItem2 = false;
- + boolean hasEventPoints = false;
- + if (item1 == 0 && item2 == 0 && eventPoints == 0)
- + return;
- + if (item1 != 0)
- + hasItem1 = true;
- + if (item2 != 0)
- + hasItem2 = true;
- + if (eventPoints != 0)
- + hasEventPoints = true;
- + PcInventory inv = player.getInventory();
- + if (hasItem1)
- + {
- + if (item1 == 57)
- + {
- + inv.addAdena("Event - Adena",ammount1,player,player);
- + SystemMessage smAdena;
- + smAdena = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smAdena.addItemName(57);
- + smAdena.addNumber(ammount1);
- + player.sendPacket(smAdena);
- + }
- + else
- + {
- + if (ItemTable.getInstance().createDummyItem(item1).isStackable())
- + inv.addItem("Event", item1, ammount1, player, player);
- + else
- + {
- + for (int i=0;i<=ammount1-1;i++)
- + inv.addItem("Event", item1, ammount1, player, player);
- + }
- + SystemMessage smItem;
- + smItem = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smItem.addItemName(item1);
- + smItem.addNumber(ammount1);
- + player.sendPacket(smItem);
- + }
- + }
- + if (hasItem2)
- + {
- + if (item2 == 57)
- + {
- + inv.addAdena("Event - Adena",ammount2,player,player);
- + SystemMessage smAdena;
- + smAdena = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smAdena.addItemName(57);
- + smAdena.addNumber(ammount2);
- + player.sendPacket(smAdena);
- + }
- + else
- + {
- + if (ItemTable.getInstance().createDummyItem(item2).isStackable())
- + inv.addItem("Event", item2, ammount2, player, player);
- + else
- + {
- + for (int i=0;i<=ammount2-1;i++)
- + inv.addItem("Event", item2, ammount2, player, player);
- + }
- + SystemMessage smItem;
- + smItem = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smItem.addItemName(item2);
- + smItem.addNumber(ammount2);
- + player.sendPacket(smItem);
- + }
- + }
- + if (hasEventPoints)
- + {
- + player.setEventPoints(player.getEventPoints()+eventPoints);
- + SystemMessage smp;
- + smp = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + smp.addString("Event Points ");
- + smp.addNumber(2);
- + player.sendPacket(smp);
- + }
- + StatusUpdate su = new StatusUpdate(player.getObjectId());
- + su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
- + player.sendPacket(su);
- + player.sendPacket(new ItemList(player, true));
- + NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
- + TextBuilder replyMSG = new TextBuilder("<html><body>");
- + replyMSG.append("<tr><td>You won the event!</td></tr><br>");
- + replyMSG.append("<tr><td>You have Earned:</td></tr><br>");
- + if (hasItem1)
- + {
- + String item1name =ItemTable.getInstance().createDummyItem(item1).getItemName();
- + replyMSG.append("<tr><td>- "+ammount1+" "+item1name+".</td></tr><br>");
- + }
- + if (hasItem2)
- + {
- + String item2name =ItemTable.getInstance().createDummyItem(item2).getItemName();
- + replyMSG.append("<tr><td>- "+ammount2+" "+item2name+".</td></tr><br>");
- + }
- + if (hasEventPoints)
- + {
- + replyMSG.append("<tr><td>- "+eventPoints+" Event Points.</td></tr><br>");
- + }
- + replyMSG.append("<br><tr><td>Congratulations!!</td></tr><br><br><br>");
- + replyMSG.append("<tr><td>Developed by: Polbat02.</td></tr>");
- + replyMSG.append("</body></html>");
- + adminReply.setHtml(replyMSG.toString());
- + player.sendPacket(adminReply);
- + }
- + /**
- + * Hard Finish Event (Case every Body dies)
- + */
- + public static void hardFinish()
- + {
- + for (L2NpcInstance eventMob: _eventMobList)
- + {
- + eventMob.decayMe();
- + eventMob.deleteMe();
- + L2EventManagerInstance._currentEvents -= 1;
- + }
- + _log.warning("Raid Engines: All the Members from the Event are now dead or Have Left The event. Event Finished.");
- + }
- + /**
- + * Load Data of the prizes for each event.
- + * Added DataBase support for this.
- + * @param prizePackage
- + */
- + private static void loadData(int prizePackage)
- + {
- + Connection con;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT first_prize_id, first_prize_ammount, second_prize_id, second_prize_ammount, event_points_ammount FROM raid_prizes WHERE `prize_package_id` = '"+prizePackage+"'");
- + ResultSet rset = statement.executeQuery();
- + while(rset.next())
- + {
- + _first_id = rset.getInt("first_prize_id");
- + _first_ammount = rset.getInt("first_prize_ammount");
- + _second_id = rset.getInt("second_prize_id");
- + _second_ammount = rset.getInt("second_prize_ammount");
- + _event_ammount = rset.getInt("event_points_ammount");
- + }
- + rset.close();
- + statement.close();
- + con.close();
- + }
- + catch (Exception e)
- + {
- + _log.severe("Error While loading Raids prizes." + e);
- + }
- + }
- +
- + /**
- + * Sets the Event state<br><br>
- + * @param state<br>
- + */
- + private static void setState(EventState state)
- + {
- + synchronized (_state)
- + {
- + _state = state;
- + }
- + }
- +
- + /**
- + * Is Event inactive?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isInactive()
- + {
- + boolean isInactive;
- +
- + synchronized (_state)
- + {
- + isInactive = _state == EventState.INACTIVE;
- + }
- +
- + return isInactive;
- + }
- +
- + /**
- + * Is Event in inactivating?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isInactivating()
- + {
- + boolean isInactivating;
- +
- + synchronized (_state)
- + {
- + isInactivating = _state == EventState.INACTIVATING;
- + }
- +
- + return isInactivating;
- + }
- +
- + /**
- + * Is Event in participation?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isParticipating()
- + {
- + boolean isParticipating;
- +
- + synchronized (_state)
- + {
- + isParticipating = _state == EventState.PARTICIPATING;
- + }
- +
- + return isParticipating;
- + }
- +
- + /**
- + * Is Event starting?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isStarting()
- + {
- + boolean isStarting;
- +
- + synchronized (_state)
- + {
- + isStarting = _state == EventState.STARTING;
- + }
- +
- + return isStarting;
- + }
- +
- + /**
- + * Is Event started?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isStarted()
- + {
- + boolean isStarted;
- +
- + synchronized (_state)
- + {
- + isStarted = _state == EventState.STARTED;
- + }
- +
- + return isStarted;
- + }
- +
- + /**
- + * Is Event rewarding?<br><br>
- + * @return boolean<br>
- + */
- + public static boolean isRewarding()
- + {
- + boolean isRewarding;
- +
- + synchronized (_state)
- + {
- + isRewarding = _state == EventState.REWARDING;
- + }
- +
- + return isRewarding;
- + }
- +
- + /**
- + * Send a SystemMessage to all participated players<br>
- + * 1. Send the message to all players of team number one<br>
- + * 2. Send the message to all players of team number two<br><br>
- + *
- + * @param message<br>
- + */
- + public static void sysMsgToAllParticipants(String message)
- + {
- + for (L2PcInstance player : _participatingPlayers)
- + {
- + if (player != null)
- + player.sendMessage(message);
- + }
- + }
- +
- +
- + private static void loadSpawns(int eventNum)
- + {
- + Connection con;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement
- + ("SELECT raid_locX, raid_locY, raid_locZ, player_locX, player_locY, player_locZ " +
- + "FROM raid_event_spawnlist WHERE `id` = '"+eventNum+"'");
- + ResultSet rset = statement.executeQuery();
- + while(rset.next())
- + {
- + _npcX = rset.getInt("raid_locX");
- + _npcY = rset.getInt("raid_locY");
- + _npcZ = rset.getInt("raid_locZ");
- + _locX = rset.getInt("player_locX");
- + _locY = rset.getInt("player_locY");
- + _locZ = rset.getInt("player_locZ");
- + }
- + rset.close();
- + statement.close();
- + con.close();
- + }
- + catch (Exception e)
- + {
- + _log.severe("Error While loading Raids Spawn Positions." + e);
- + }
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventTeleporter.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventTeleporter.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/L2EventTeleporter.java (revision 681)
- @@ -0,0 +1,91 @@
- +/*
- + * 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 2, 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, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import net.sf.l2j.gameserver.ThreadPoolManager;
- +import net.sf.l2j.gameserver.datatables.SkillTable;
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.L2Summon;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.serverpackets.Ride;
- +
- +public class L2EventTeleporter implements Runnable
- +{
- + private L2PcInstance _player = null;
- + private int _coordinateX = 0;
- + private int _coordinateY = 0;
- + private int _coordinateZ = 0;
- + boolean _removeBuffs;
- +
- + /**
- + * Manages all Teleports done within a Raid Event.
- + * @param player --> Player being teleported
- + * @param coordinateX --> CX
- + * @param coordinateY --> CY
- + * @param coordinateZ --> CZ
- + * @param delay --> Delay to do the actual teleport.
- + * @param removeBuffs --> Boolean to allow removal of buffs.
- + */
- + public L2EventTeleporter(L2PcInstance player, int coordinateX, int coordinateY, int coordinateZ , int delay, boolean removeBuffs)
- + {
- + _player = player;
- + _coordinateX = coordinateX;
- + _coordinateY = coordinateY;
- + _coordinateZ = coordinateZ;
- + _removeBuffs = removeBuffs;
- + //Espera para hacer el teleport
- + long _delay = delay * 1000L;
- + if (delay == 0)
- + _delay = 0;
- + ThreadPoolManager.getInstance().scheduleGeneral(this, _delay);
- + }
- +
- + public void run()
- + {
- + if (_player == null)
- + return;
- +
- + if (_player.isMounted())
- + {
- + if (_player.isFlying())
- + _player.removeSkill(SkillTable.getInstance().getInfo(4289, 1));
- + Ride dismount = new Ride(_player.getObjectId(), Ride.ACTION_DISMOUNT, 0);
- + _player.broadcastPacket(dismount);
- + _player.setMountType(0);
- + _player.setMountObjectID(0);
- + }
- + L2Summon summon = _player.getPet();
- + if (_removeBuffs && summon != null)
- + summon.unSummon(_player);
- + if (_removeBuffs)
- + {
- + for (L2Effect effect : _player.getAllEffects())
- + {
- + if (effect != null)
- + effect.exit();
- + }
- + }
- + _player.setCurrentCp(_player.getMaxCp()+5000);
- + _player.setCurrentHp(_player.getMaxHp()+5000);
- + _player.setCurrentMp(_player.getMaxMp()+5000);
- + _player.teleToLocation(_coordinateX, _coordinateY, _coordinateZ, false);
- + _player.broadcastStatusUpdate();
- + _player.broadcastUserInfo();
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/model/entity/RaidFightManager.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/model/entity/RaidFightManager.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/model/entity/RaidFightManager.java (revision 681)
- @@ -0,0 +1,85 @@
- +package net.sf.l2j.gameserver.model.entity;
- +
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.Announcements;
- +import net.sf.l2j.gameserver.model.actor.instance.L2EventManagerInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
- +
- +public class RaidFightManager
- +{
- + protected static final Logger _log = Logger.getLogger(RaidFightManager.class.getName());
- + /**
- + * The task method to handle cycles of the event<br><br>
- + *
- + * @see java.lang.Runnable#run()<br>
- + */
- + public void run()
- + {
- + //TODO: Add initial breaks. And check performance
- + for (;;)
- + {
- + waiter(Config.RAID_SYSTEM_FIGHT_TIME * 60); // in configuration given as minutes
- + for (L2NpcInstance eventMob: L2RaidEvent._eventMobList)
- + {
- + eventMob.decayMe();
- + eventMob.deleteMe();
- + L2EventManagerInstance._currentEvents -= 1;
- + }
- + _log.warning("Raid Engines: All the Members from the Event are now dead or Have Left The event. Event Finished.");
- + break;
- + }
- + }
- +
- + void waiter(int seconds)
- + {
- + while (seconds > 1)
- + {
- + seconds--; // here because we don't want to see two time announce at the same time
- +
- + if (L2RaidEvent.isParticipating())
- + {
- + switch (seconds)
- + {
- + case 3600: // 1 hour left
- + L2RaidEvent.sysMsgToAllParticipants("You have One our left to kill the Raid Boss.");
- +
- + break;
- + case 1800: // 30 minutes left
- + case 900: // 15 minutes left
- + case 600: // 10 minutes left
- + case 300: // 5 minutes left
- + case 240: // 4 minutes left
- + case 180: // 3 minutes left
- + case 120: // 2 minutes left
- + case 60: // 1 minute left
- + Announcements.getInstance().announceToAll("L2Raid Event: " + seconds / 60 + " minute(s) untill Boss Disapears!");
- + break;
- + case 30: // 30 seconds left
- + case 15: // 15 seconds left
- + case 10: // 10 seconds left
- + case 5: // 5 seconds left
- + case 4: // 4 seconds left
- + case 3: // 3 seconds left
- + case 2: // 2 seconds left
- + case 1: // 1 seconds left
- + Announcements.getInstance().announceToAll("L2Raid Event: " + seconds + " second(s) untill Boss Disapears!");
- + break;
- + }
- + }
- +
- + long oneSecWaitStart = System.currentTimeMillis();
- +
- + while (oneSecWaitStart + 1000L > System.currentTimeMillis())
- + {
- + try
- + {
- + Thread.sleep(1);
- + }
- + catch (InterruptedException ie)
- + {}
- + }
- + }
- + }
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Wedding.java (revision 681)
- @@ -209,10 +209,11 @@
- return false;
- }
- ptarget.setEngageRequest(true, activeChar.getObjectId());
- //ptarget.sendMessage("Player "+activeChar.getName()+" wants to engage with you.");
- + activeChar.awaitingAnswer = true;
- ptarget.sendPacket(new ConfirmDlg(614,activeChar.getName()+" asking you to engage. Do you want to start a new relationship?"));
- return true;
- }
- public boolean GoToLove(L2PcInstance activeChar)
- Index: /trunk/Game/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java (revision 681)
- @@ -71,10 +71,16 @@
- if (activeChar.isInJail())
- {
- activeChar.sendMessage("You can not escape from jail.");
- return false;
- }
- +
- + if (activeChar.inClanEvent || activeChar.inPartyEvent || activeChar.inSoloEvent)
- + {
- + activeChar.sendPacket(SystemMessage.sendString("You can't escape while in Event."));
- + return false;
- + }
- SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
- sm.addString("After " + unstuckTimer/60000 + " min. you be returned to near village.");
- activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- Index: /trunk/Game/java/net/sf/l2j/gameserver/GameServer.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/GameServer.java (revision 679)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/GameServer.java (revision 681)
- @@ -20,10 +20,11 @@
- import net.sf.l2j.gameserver.datatables.ArmorSetsTable;
- import net.sf.l2j.gameserver.datatables.AugmentationData;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- import net.sf.l2j.gameserver.datatables.CharTemplateTable;
- import net.sf.l2j.gameserver.datatables.ClanTable;
- +import net.sf.l2j.gameserver.datatables.BuffTemplateTable;
- import net.sf.l2j.gameserver.datatables.DoorTable;
- import net.sf.l2j.gameserver.datatables.EventDroplist;
- import net.sf.l2j.gameserver.datatables.ExtractableItemsData;
- import net.sf.l2j.gameserver.datatables.FishTable;
- import net.sf.l2j.gameserver.datatables.HelperBuffTable;
- @@ -365,10 +366,12 @@
- {
- throw new Exception("Could not initialize the Henna Tree Table");
- }
- _helperBuffTable = HelperBuffTable.getInstance();
- +
- + BuffTemplateTable.getInstance();
- if (!_helperBuffTable.isInitialized())
- {
- throw new Exception("Could not initialize the Helper Buff Table");
- }
- Index: /trunk/Game/java/net/sf/l2j/gameserver/templates/L2BuffTemplate.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/templates/L2BuffTemplate.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/templates/L2BuffTemplate.java (revision 681)
- @@ -0,0 +1,249 @@
- +package net.sf.l2j.gameserver.templates;
- +
- +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.model.base.Race;
- +
- +/**
- + * This class represents a Buff Template
- + *
- + * @author: polbat02
- + */
- +
- +public class L2BuffTemplate
- +{
- + /** Id of buff template */
- + private int _templateId;
- +
- + /** Name of the buff template */
- + private String _templateName;
- +
- + /** Identifier of the skill (buff) to cast */
- + private int _skillId;
- +
- + /** Order of the skill in template */
- + private int _skillOrder;
- +
- + private L2Skill _skill;
- +
- + /** Level of the skill (buff) to cast */
- + private int _skillLevel;
- +
- + /** Force cast, even if same effect present */
- + private boolean _forceCast;
- +
- + /** Condition that player must have to obtain this buff */
- + /** Min player level */
- + private int _minLevel;
- +
- + /** Max player level */
- + private int _maxLevel;
- +
- + /** Player's faction */
- + private int _faction;
- +
- + /** Players's race */
- + private int _race;
- +
- + /** Magus/Fighter class of the player */
- + private int _class;
- +
- + /** Adena price */
- + private int _adena;
- +
- + /** Faction points price */
- + private int _points;
- +
- + /**
- + * Constructor of L2BuffTemplat.<BR><BR>
- + */
- + public L2BuffTemplate(StatsSet set)
- + {
- + _templateId = set.getInteger("id");
- + _templateName = set.getString("name");
- + _skillId = set.getInteger("skillId");
- + _skillLevel = set.getInteger("skillLevel");
- + _skillOrder = set.getInteger("skillOrder");
- +
- + if (_skillLevel == 0)
- + _skillLevel = SkillTable.getInstance().getMaxLevel(_skillId,_skillLevel);
- +
- + _skill = SkillTable.getInstance().getInfo(_skillId,_skillLevel);
- +
- + _forceCast = (set.getInteger("forceCast") == 1);
- + _minLevel = set.getInteger("minLevel");
- + _maxLevel = set.getInteger("maxLevel");
- + _race = set.getInteger("race");
- + _class = set.getInteger("class");
- + _faction = set.getInteger("faction");
- + _adena = set.getInteger("adena");
- + _points = set.getInteger("points");
- + }
- +
- + /**
- + * @return Returns the Id of the buff template
- + */
- + public int getId()
- + {
- + return _templateId;
- + }
- +
- + /**
- + * @return Returns the Name of the buff template
- + */
- + public String getName()
- + {
- + return _templateName;
- + }
- +
- + /**
- + * @return Returns the Id of the buff that the L2PcInstance will receive
- + */
- + public int getSkillId()
- + {
- + return _skillId;
- + }
- +
- + /**
- + * @return Returns the Id of the buff that the L2PcInstance will receive
- + */
- + public int getSkillOrder()
- + {
- + return _skillOrder;
- + }
- +
- + /**
- + * @return Returns the Level of the buff that the L2PcInstance will receive
- + */
- + public int getSkillLevel()
- + {
- + return _skillLevel;
- + }
- +
- + /**
- + * @return Returns the Skill that the L2PcInstance will receive
- + */
- + public L2Skill getSkill()
- + {
- + return _skill;
- + }
- +
- + /**
- + * @return Returns the L2PcInstance minimum level to receive buff
- + */
- + public int getMinLevel()
- + {
- + return _minLevel;
- + }
- +
- + /**
- + * @return Returns the L2PcInstance maximum level to receive buff
- + */
- + public int getMaxLevel()
- + {
- + return _maxLevel;
- + }
- +
- + /**
- + * @return Returns the requirement faction to receive buff
- + */
- + public int getFaction()
- + {
- + return _faction;
- + }
- +
- + /**
- + * @return Returns the price for buff in Adena
- + */
- + public int getAdenaPrice()
- + {
- + return _adena;
- + }
- +
- + /**
- + * @return Returns the price for buff in Event Points
- + */
- + public int getPointsPrice()
- + {
- + return _points;
- + }
- +
- + /**
- + * @return Is cast animation will be shown
- + */
- + public boolean forceCast()
- + {
- + return _forceCast;
- + }
- +
- + /**
- + * @return Returns the result of level check
- + */
- + public boolean checkLevel(L2PcInstance player)
- + {
- + return ((_minLevel == 0 || player.getLevel()>=_minLevel) && (_maxLevel == 0 || player.getLevel()<=_maxLevel));
- + }
- +
- + /**
- + * @return Returns the result of race check
- + */
- + public boolean checkRace(L2PcInstance player)
- + {
- + boolean cond = false;
- + if (_race == 0 || _race == 31) return true;
- + if ((player.getRace() == Race.human) && (_race & 16) != 0) cond=true;
- + if ((player.getRace() == Race.elf) && (_race & 8) != 0) cond=true;
- + if ((player.getRace() == Race.darkelf) && (_race & 4) != 0) cond=true;
- + if ((player.getRace() == Race.orc) && (_race & 2) != 0) cond=true;
- + if ((player.getRace() == Race.dwarf) && (_race & 1) != 0) cond=true;
- + return cond;
- + }
- +
- + /**
- + * @return Returns the result of Magus/Fighter class check
- + */
- + public boolean checkClass(L2PcInstance player)
- + {
- + return ((_class == 0 || _class == 3) || (_class == 1 && !player.isMageClass()) || (_class == 2 && player.isMageClass()));
- + }
- +
- + /**
- + * @return Returns the result of faction check
- + */
- + public boolean checkFaction(L2PcInstance player)
- + {
- + return true;
- + //return ((_faction == 0 ||player.getFaction = _faction)
- + }
- +
- + /**
- + * @return Returns the result of price check
- + */
- + public boolean checkPrice(L2PcInstance player)
- + {
- + return ((_adena == 0 || player.getInventory().getAdena()>=_adena) && (_points == 0 || (player.getEventPoints()>=_points)));
- + }
- + /**
- + * @return Returns the result of a the Event Point check
- + */
- + public boolean checkPoints(L2PcInstance player)
- + {
- + if (player.getEventPoints()>=_points)
- + return true;
- + return false;
- + }
- +
- + /**
- + * @return Returns the result of all player related conditions check
- + */
- + public boolean checkPlayer(L2PcInstance player)
- + {
- + return
- + (checkLevel(player)
- + && checkRace(player)
- + && checkClass(player)
- + && checkFaction(player));
- + }
- +
- +}
- Index: /trunk/Game/java/net/sf/l2j/gameserver/datatables/BuffTemplateTable.java
- ===================================================================
- --- /trunk/Game/java/net/sf/l2j/gameserver/datatables/BuffTemplateTable.java (revision 681)
- +++ /trunk/Game/java/net/sf/l2j/gameserver/datatables/BuffTemplateTable.java (revision 681)
- @@ -0,0 +1,191 @@
- +package net.sf.l2j.gameserver.datatables;
- +
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +
- +import javolution.util.FastList;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.templates.L2BuffTemplate;
- +import net.sf.l2j.gameserver.templates.StatsSet;
- +
- +import org.apache.commons.logging.Log;
- +import org.apache.commons.logging.LogFactory;
- +
- +public class BuffTemplateTable
- +{
- + private final static Log _log = LogFactory.getLog(BuffTemplateTable.class.getName());
- +
- + private static BuffTemplateTable _instance;
- +
- + /** This table contains all the Buff Templates */
- + private FastList<L2BuffTemplate> _buffs;
- +
- +
- + public static BuffTemplateTable getInstance()
- + {
- + if (_instance == null)
- + {
- + _instance = new BuffTemplateTable();
- + }
- + return _instance;
- + }
- +
- + /**
- + * Creates and charges all the Buff templates from the SQL Table buff_templates
- + */
- + public BuffTemplateTable()
- + {
- + _buffs = new FastList<L2BuffTemplate>();
- + ReloadBuffTemplates();
- + }
- +
- + /**
- + * Reads and charges all the Buff templates from the SQL table
- + */
- + public void ReloadBuffTemplates()
- + {
- + _buffs.clear();
- +
- + java.sql.Connection con = null;
- + try
- + {
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT * FROM buff_templates ORDER BY id, skill_order");
- + ResultSet rset = statement.executeQuery();
- +
- + int _buffTemplates = 0;
- + int templateId = -1;
- +
- + while (rset.next())
- + {
- + StatsSet Buff = new StatsSet();
- +
- + if (templateId != rset.getInt("id")) _buffTemplates++;
- + templateId = rset.getInt("id");
- +
- + Buff.set("id", templateId);
- + Buff.set("name", rset.getString("name"));
- + Buff.set("skillId", rset.getInt("skill_id"));
- + Buff.set("skillLevel", rset.getInt("skill_level"));
- + Buff.set("skillOrder", rset.getInt("skill_order"));
- + Buff.set("forceCast", rset.getInt("skill_force"));
- + Buff.set("minLevel", rset.getInt("char_min_level"));
- + Buff.set("maxLevel", rset.getInt("char_max_level"));
- + Buff.set("race", rset.getInt("char_race"));
- + Buff.set("class", rset.getInt("char_class"));
- + Buff.set("faction", rset.getInt("char_faction"));
- + Buff.set("adena", rset.getInt("price_adena"));
- + Buff.set("points", rset.getInt("price_points"));
- +
- + // Add this buff to the Table.
- + L2BuffTemplate template = new L2BuffTemplate(Buff);
- + if (template.getSkill() == null)
- + {
- + _log.warn("Error while loading buff template Id " + template.getId() + " skill Id " + template.getSkillId());
- + }
- + else
- + _buffs.add(template);
- + }
- +
- + _log.info("BuffTemplateTable: Loaded " + _buffTemplates + " Buff Templates.");
- +
- + rset.close();
- + statement.close();
- + }
- + catch (Exception e)
- + {
- + _log.warn("Error while loading buff templates "+e.getMessage());
- + }
- +
- + }
- + finally
- + {
- + try { con.close(); } catch (Exception e) {}
- + }
- + }
- +
- + /**
- + * @return Returns the buffs of template by template Id
- + */
- + public FastList<L2BuffTemplate> getBuffTemplate(int Id)
- + {
- + FastList<L2BuffTemplate> _templateBuffs = new FastList<L2BuffTemplate>();
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if (_bt.getId()== Id)
- + {
- + _templateBuffs.add(_bt);
- + }
- + }
- +
- + return _templateBuffs;
- + }
- +
- + /**
- + * @return Returns the template Id by template Name
- + */
- + public int getTemplateIdByName(String _name)
- + {
- +
- + int _id = 0;
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if (_bt.getName().equals(_name))
- + {
- + _id = _bt.getId();
- + break;
- + }
- + }
- +
- + return _id;
- + }
- +
- + /**
- + * @return Returns the lowest char level for Buff template
- + */
- + public int getLowestLevel(int Id)
- + {
- + int _lowestLevel = 255;
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if ((_bt.getId()== Id) && (_lowestLevel>_bt.getMinLevel()))
- + {
- + _lowestLevel = _bt.getMinLevel();
- + }
- + }
- +
- + return _lowestLevel;
- + }
- +
- + /**
- + * @return Returns the highest char level for Buff template
- + */
- + public int getHighestLevel(int Id)
- + {
- + int _highestLevel = 0;
- +
- + for(L2BuffTemplate _bt: _buffs)
- + {
- + if ((_bt.getId()== Id) && (_highestLevel<_bt.getMaxLevel()))
- + {
- + _highestLevel = _bt.getMaxLevel();
- + }
- + }
- +
- + return _highestLevel;
- + }
- +
- + /**
- + * @return Returns the buff templates list
- + */
- + public FastList<L2BuffTemplate> getBuffTemplateTable()
- + {
- + return _buffs;
- + }
- +
- +}
- Index: /trunk/Game/config/Modifications.properties
- ===================================================================
- --- /trunk/Game/config/Modifications.properties (revision 679)
- +++ /trunk/Game/config/Modifications.properties (revision 681)
- @@ -283,5 +283,25 @@
- # When event starts, the participants lose/keep their effects. (debuffing, etc.)
- DMOnStartRemoveAllEffects=true
- # Allow to unsummon the participants' pets, when event starts.
- DMOnStartUnsummonPet=true
- +
- +#------------------------------------#
- +# DeathMatch Event #
- +#------------------------------------#
- +# Enable Raid Engines
- +RaidEnginesEnabled = false
- +
- +# Max number of raid events taking place at the same time
- +# The number has to be equal or smaller than the number of spawns
- +# defined in the table: raid_event_spawnlist !?!
- +RaidMaxNumEvents = 2
- +
- +# Maximum Fighting time in minutes.
- +RaidSystemFightTime = 60
- +
- +# Give Buffs when Event Start !??
- +RaidGiveBuffs = true
- +
- +# Resurrect Player upon death automatically !??
- +RaidResurrectPlayer = true
- Index: /trunk/Data/sql/raid_prizes.sql
- ===================================================================
- --- /trunk/Data/sql/raid_prizes.sql (revision 683)
- +++ /trunk/Data/sql/raid_prizes.sql (revision 683)
- @@ -0,0 +1,28 @@
- +SET FOREIGN_KEY_CHECKS=0;
- +-- ----------------------------
- +-- Table structure for raid_prizes
- +-- ----------------------------
- +CREATE TABLE `raid_prizes` (
- + `prize_package_id` int(11) NOT NULL,
- + `first_prize_id` int(11) NOT NULL,
- + `first_prize_ammount` int(11) NOT NULL,
- + `second_prize_id` int(11) NOT NULL,
- + `second_prize_ammount` int(11) NOT NULL,
- + `event_points_ammount` int(11) NOT NULL,
- + PRIMARY KEY (`prize_package_id`)
- +) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- +
- +-- ----------------------------
- +-- Records
- +-- ----------------------------
- +INSERT INTO `raid_prizes` VALUES ('1', '3470', '15', '6393', '20', '3');
- +INSERT INTO `raid_prizes` VALUES ('2', '3470', '25', '6393', '35', '4');
- +INSERT INTO `raid_prizes` VALUES ('3', '3470', '40', '6393', '40', '5');
- +INSERT INTO `raid_prizes` VALUES ('4', '3470', '50', '6393', '50', '10');
- +INSERT INTO `raid_prizes` VALUES ('5', '3470', '75', '6393', '75', '15');
- +INSERT INTO `raid_prizes` VALUES ('6', '3470', '150', '6393', '150', '20');
- +INSERT INTO `raid_prizes` VALUES ('7', '3470', '3', '6393', '10', '1');
- +INSERT INTO `raid_prizes` VALUES ('8', '3470', '6', '6393', '15', '2');
- +INSERT INTO `raid_prizes` VALUES ('9', '3470', '8', '6393', '18', '2');
- +INSERT INTO `raid_prizes` VALUES ('10', '3470', '20', '6393', '30', '3');
- +INSERT INTO `raid_prizes` VALUES ('11', '3470', '30', '6393', '40', '5');
- Index: /trunk/Data/sql/characters.sql
- ===================================================================
- --- /trunk/Data/sql/characters.sql (revision 379)
- +++ /trunk/Data/sql/characters.sql (revision 683)
- @@ -79,8 +79,9 @@
- varka_ketra_ally int(1) NOT NULL DEFAULT 0,
- clan_join_expiry_time DECIMAL(20,0) NOT NULL DEFAULT 0,
- clan_create_expiry_time DECIMAL(20,0) NOT NULL DEFAULT 0,
- death_penalty_level int(2) NOT NULL DEFAULT 0,
- donator varchar(5) NOT NULL default 0,
- + `event_points` DECIMAL( 11,0 )default NUL;
- PRIMARY KEY (obj_Id),
- KEY `clanid` (`clanid`)
- ) ;
- Index: /trunk/Data/sql/npc.sql
- ===================================================================
- --- /trunk/Data/sql/npc.sql (revision 256)
- +++ /trunk/Data/sql/npc.sql (revision 683)
- @@ -6603,10 +6603,12 @@
- INSERT INTO `npc` VALUES
- (50007,31324,'Andromeda',1,'Wedding Manager',1,'NPC.a_casino_FDarkElf',8.00,23.00,70,'female','L2WeddingManager',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,316,0,0,55,132,NULL,0,1,0,'LAST_HIT'),
- (70010,31606,'Catrina',1,'TvT Event Manager',1,'Monster2.queen_of_cat',8.00,15.00,70,'female','L2TvTEventNpc',40,3862,1493,11.85,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,28,132,NULL,0,0,0,'LAST_HIT');
- +INSERT INTO `npc` VALUES (12901,30598,'Event Manager',1,'Raid Event',1,'NPC.a_casino_MHuman',8.00,23.00,70,male,L2EventManager,40,3862,1493,3.95,2.78,40,43,30,21,20,10,0,0,1314,470,780,382,278,0,333,0,0,0,55,120,NILL,0,1,0,'LAST_HIT');
- +
- UPDATE `npc` SET `type` = 'L2NpcWalker' WHERE `id` IN (31358,31359,31360,31361,31362,31363,31357,31356,31364,31365,32070,32072);
- -- Try lowering walkspeed of walking NPC since seems to walk faster than retail
- UPDATE `npc` SET `runspd` = '45', `walkspd` = '45' WHERE `id` = '31360';
- UPDATE `npc` SET `runspd` = '45', `walkspd` = '45' WHERE `id` = '31362';
- Index: /trunk/Data/sql/buff_templates.sql
- ===================================================================
- --- /trunk/Data/sql/buff_templates.sql (revision 683)
- +++ /trunk/Data/sql/buff_templates.sql (revision 683)
- @@ -0,0 +1,209 @@
- +-- ----------------------------
- +-- Table structure for buff_templates
- +-- ----------------------------
- +CREATE TABLE `buff_templates` (
- + `id` int(11) unsigned NOT NULL,
- + `name` varchar(35) NOT NULL default '',
- + `skill_id` int(10) unsigned NOT NULL,
- + `skill_name` varchar(35) default NULL,
- + `skill_level` int(10) unsigned NOT NULL default '1',
- + `skill_force` int(1) NOT NULL default '1',
- + `skill_order` int(10) unsigned NOT NULL,
- + `char_min_level` int(10) unsigned NOT NULL default '0',
- + `char_max_level` int(10) unsigned NOT NULL default '0',
- + `char_race` int(1) unsigned NOT NULL default '0',
- + `char_class` int(1) NOT NULL default '0',
- + `char_faction` int(10) unsigned NOT NULL default '0',
- + `price_adena` int(10) unsigned NOT NULL default '0',
- + `price_points` int(10) unsigned NOT NULL default '0',
- + PRIMARY KEY (`id`,`name`,`skill_order`)
- +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- +
- +-- ----------------------------
- +-- Records
- +-- ----------------------------
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1033', 'Resist Poison', '3', '1', '1', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1032', 'Invigor', '3', '0', '2', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1040', 'Shield', '3', '0', '3', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1035', 'Mental Shield', '4', '0', '4', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1259', 'Resist Shock', '4', '0', '5', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1204', 'Wind Walk', '2', '0', '6', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1257', 'Decrease Weight', '3', '0', '7', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1045', 'Bless the Body', '6', '0', '8', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1078', 'Concentration', '6', '0', '9', '1', '40', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1303', 'Wild Magic', '2', '0', '10', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1048', 'Bless the Soul', '6', '0', '11', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1085', 'Acumen', '3', '0', '12', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1059', 'Empower', '3', '0', '13', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1010', 'Soul Shield', '3', '0', '14', '1', '40', '0', '2', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1068', 'Might', '3', '0', '15', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1086', 'Haste', '2', '0', '16', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1077', 'Focus', '3', '0', '17', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1242', 'Death Whisper', '3', '0', '18', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('1', 'Newbie', '1268', 'Vampiric Rage', '4', '0', '19', '1', '40', '0', '1', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1033', 'Resist Poison', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1032', 'Invigor', '3', '0', '2', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1352', 'Elemental Protection', '1', '0', '3', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1392', 'Holy Resistance', '3', '0', '4', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1393', 'Unholy Resistance', '3', '0', '5', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1035', 'Mental Shield', '4', '0', '6', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1259', 'Resist Shock', '4', '0', '7', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('2', 'ResistBuffs', '1354', 'Arcane Protection', '1', '0', '8', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1204', 'Wind Walk', '2', '0', '1', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1257', 'Decrease Weight', '3', '0', '2', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1073', 'Kiss of Eva', '2', '0', '3', '1', '80', '0', '0', '0', '20000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1040', 'Shield', '3', '0', '4', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1068', 'Might', '3', '0', '5', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1086', 'Haste', '2', '0', '6', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1077', 'Focus', '3', '0', '7', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1242', 'Death Whisper', '3', '0', '8', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1045', 'Bless the Body', '6', '0', '9', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1044', 'Regeneration', '3', '0', '10', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1240', 'Guidance', '3', '0', '11', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1087', 'Agility', '3', '0', '12', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1010', 'Soul Shield', '3', '0', '13', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1036', 'Magic Barrier', '2', '0', '14', '1', '80', '0', '1', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1243', 'Bless Shield', '6', '0', '15', '1', '80', '0', '1', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1268', 'Vampiric Rage', '4', '0', '16', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1303', 'Wild Magic', '2', '0', '17', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1048', 'Bless the Soul', '6', '0', '18', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1078', 'Concentration', '6', '0', '19', '1', '80', '0', '2', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1085', 'Acumen', '3', '0', '20', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1059', 'Empower', '3', '0', '21', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '1062', 'Berserker Spirit', '2', '0', '22', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '275', 'Dance of Fury', '1', '0', '23', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '274', 'Dance of Fire', '1', '0', '24', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '271', 'Dance of Warrior', '1', '0', '25', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '264', 'Song of Earth', '1', '0', '26', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '269', 'Song of Hunter', '1', '0', '27', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '267', 'Song of Warding', '1', '0', '28', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '276', 'Dance of Concentration', '1', '0', '29', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '273', 'Dance of Mystic', '1', '0', '30', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '311', 'Dance of Protection', '1', '0', '31', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '265', 'Song of Life', '1', '0', '32', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '363', 'Song of Meditation', '1', '0', '33', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('3', 'DeluxeBuffs', '349', 'Song of Renewal', '1', '0', '34', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1040', 'Shield', '3', '0', '1', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1036', 'Magic Barrier', '2', '0', '2', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1045', 'Bless the Body', '6', '0', '3', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1048', 'Bless the Soul', '6', '0', '4', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1243', 'Bless Shield', '6', '0', '5', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1352', 'Elemental Protection', '1', '0', '6', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1204', 'Wind Walk', '2', '0', '7', '1', '80', '0', '0', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1062', 'Berserker Spirit', '2', '0', '8', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1032', 'Invigor', '3', '0', '9', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1035', 'Mental Shield', '4', '0', '10', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1259', 'Resist Shock', '4', '0', '11', '1', '80', '0', '0', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1044', 'Regeneration', '3', '0', '12', '1', '80', '0', '0', '0', '100000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1068', 'Might', '3', '0', '13', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1086', 'Haste', '2', '0', '14', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1077', 'Focus', '3', '0', '15', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1242', 'Death Whisper', '3', '0', '16', '1', '80', '0', '1', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1268', 'Vampiric Rage', '4', '0', '17', '1', '80', '0', '1', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1087', 'Agility', '3', '0', '18', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1240', 'Guidance', '3', '0', '19', '1', '80', '0', '1', '0', '150000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1059', 'Empower', '3', '0', '20', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1078', 'Concentration', '6', '0', '21', '1', '80', '0', '2', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('4', 'Prophet', '1085', 'Acumen', '3', '0', '22', '1', '80', '0', '2', '0', '250000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '364', 'Song of Champion', '1', '0', '1', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '264', 'Song of Earth', '1', '0', '2', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '306', 'Song of Flame Guard', '1', '0', '3', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '308', 'Song of Storm Guard', '1', '0', '4', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '270', 'Song of Invocation', '1', '0', '5', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '265', 'Song of Life', '1', '0', '6', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '349', 'Sonf of Renewal', '1', '0', '7', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '267', 'Song of Warding', '1', '0', '8', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '266', 'Song of Water', '1', '0', '9', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '268', 'Song of Wind', '1', '0', '10', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '305', 'Song of Vengance', '1', '0', '11', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '269', 'Song of Hunter', '1', '0', '12', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('5', 'Songs', '363', 'Song of Meditation', '1', '0', '13', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '307', 'Dance of Aqua Guard', '1', '0', '1', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '309', 'Dance of Earth Guard', '1', '0', '2', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '311', 'Dance of Protection', '1', '0', '3', '1', '80', '0', '0', '0', '750000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '274', 'Dance of Fire', '1', '0', '4', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '275', 'Dance of Fury', '1', '0', '5', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '272', 'Dance of Inspiration', '1', '0', '6', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '277', 'Dance of Light', '1', '0', '7', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '310', 'Dance of Vampire', '1', '0', '8', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '271', 'Dance of Warrior', '1', '0', '9', '1', '80', '0', '1', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '276', 'Dance of Concentration', '1', '0', '10', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('6', 'Dances', '273', 'Dance of Mystic', '1', '0', '11', '1', '80', '0', '2', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('7', 'WindWalk', '1204', 'Wind Walk', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('8', 'DWeight', '1257', 'Decrease Weight', '1', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('9', 'Shield', '1040', 'Shield', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('10', 'Might', '1068', 'Might', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('11', 'MShield', '1035', 'Mental Shield', '4', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('12', 'BTB', '1045', 'Bless the Body', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('13', 'BTS', '1048', 'Bless the Soul', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('14', 'MBarrier', '1036', 'Magic Barrier', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('15', 'RShock', '1259', 'Resist Shock', '4', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('16', 'Concentration', '1078', 'Concentration', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('17', 'BerserkerSpirit', '1062', 'Berserker Spirit', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('18', 'BTShield', '1243', 'Bless Shield', '6', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('19', 'VRage', '1268', 'Vampiric Rage', '4', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('20', 'Acumen', '1085', 'Acumen', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('21', 'Empower', '1059', 'Empower', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('22', 'Haste', '1086', 'Haste', '2', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('23', 'Guidance', '1240', 'Guidance', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('24', 'Focus', '1077', 'Focus', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('25', 'DeathWhisper', '1242', 'Death Whisper', '3', '0', '1', '1', '80', '0', '0', '0', '200000', '0');
- +INSERT INTO `buff_templates` VALUES ('26', 'DWarrior', '271', 'Dance of Warrior', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('27', 'DInspiration', '272', 'Dance of Inspiration', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('28', 'DMystic', '273', 'Dance of Mystic', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('29', 'DFire', '274', 'Dance of Fire', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('30', 'DFury', '275', 'Dance of Fury', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('31', 'DConecntration', '276', 'Dance of Concentration', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('32', 'DLight', '277', 'Dance of Light', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('33', 'DAqua', '307', 'Dance of Aqua Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('34', 'DEarth', '309', 'Dance of Earth Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('35', 'DVampire', '310', 'Dance of Vampire', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('36', 'DProtection', '311', 'Dance of Protection', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('37', 'SEarth', '264', 'Song of Earth', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('38', 'SLife', '265', 'Song of Life', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('39', 'SWater', '266', 'Song of Water', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('40', 'SWarding', '267', 'Song of Warding', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('41', 'SWind', '268', 'Song of Wind', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('42', 'SHunter', '269', 'Song of Hunter', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('43', 'SInvocation', '270', 'Song of Invocation', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('44', 'SVengance', '305', 'Song of Vengance', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('45', 'SFlameGuard', '306', 'Song of Flame Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('46', 'SStormGuard', '308', 'Song of Storm Guard', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('47', 'SRenewal', '349', 'Song of Renewal', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('48', 'SChampion', '364', 'Song of Champion', '1', '0', '1', '1', '80', '0', '0', '0', '1000000', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1204', 'Wind Walk', '2', '0', '1', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1257', 'Decrease Weight', '3', '0', '2', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1045', 'Bless The Body', '6', '0', '3', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1048', 'Bess The Soul', '6', '1', '4', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1085', 'Acumen', '3', '1', '5', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1059', 'Empower', '3', '1', '6', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1068', 'Might', '3', '1', '7', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1086', 'Haste', '2', '1', '8', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1268', 'Vampiric Rage', '4', '1', '9', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1040', 'Shield', '3', '1', '10', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1036', 'Magic Barrier', '2', '1', '11', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('49', 'Event1', '1035', 'Mental Shield', '4', '1', '12', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1204', 'Wind Walk', '1', '1', '1', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1257', 'Decrease Weight', '2', '1', '2', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1045', 'Bless The Body', '3', '1', '3', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1048', 'Bess The Soul', '3', '1', '4', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1085', 'Acumen', '2', '1', '5', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1059', 'Empower', '1', '1', '6', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1068', 'Might', '2', '1', '7', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1086', 'Haste', '1', '1', '8', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1268', 'Vampiric Rage', '2', '1', '9', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1040', 'Shield', '2', '1', '10', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1036', 'Magic Barrier', '1', '1', '11', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('50', 'Event2', '1035', 'Mental Shield', '2', '1', '12', '1', '80', '0', '0', '0', '0', '0');
- +INSERT INTO `buff_templates` VALUES ('51', 'SongOfVitality', '304', 'Song of Vitality', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('52', 'POF', '1356', 'Prophecy of Fire', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('53', 'GMight', '1388', 'Greater Might', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('54', 'GShield', '1389', 'Greater Shield', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('55', 'ChOV', '1363', 'Chant of Victory', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('56', 'ChOS', '1362', 'Chant of Spirit', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('57', 'ChOF', '1002', 'Chant of Flame', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('58', 'SirensDance', '365', 'Siren\'s Dance', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('59', 'WildMagic', '1303', 'Wild Magic', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('60', 'POW', '1355', 'Prophecy of Water', '1', '1', '1', '1', '80', '0', '0', '0', '0', '2');
- +INSERT INTO `buff_templates` VALUES ('61', 'GiftOfQueen', '4700', 'Gift Of Queen', '1', '1', '1', '1', '80', '0', '0', '0', '0', '3');
- +INSERT INTO `buff_templates` VALUES ('62', 'BlessingofQueen', '4699', 'Blessing of Queen', '1', '1', '1', '1', '80', '0', '0', '0', '0', '3');
- Index: /trunk/Data/sql/raid_events_spawnlist.sql
- ===================================================================
- --- /trunk/Data/sql/raid_events_spawnlist.sql (revision 683)
- +++ /trunk/Data/sql/raid_events_spawnlist.sql (revision 683)
- @@ -0,0 +1,24 @@
- +SET FOREIGN_KEY_CHECKS=0;
- +-- ----------------------------
- +-- Table structure for raid_events_spawnlist
- +-- ----------------------------
- +CREATE TABLE `raid_event_spawnlist` (
- + `id` int(11) NOT NULL auto_increment,
- + `location` varchar(40) NOT NULL default '',
- + `raid_locX` int(9) NOT NULL,
- + `raid_locY` int(9) NOT NULL,
- + `raid_locZ` int(9) NOT NULL,
- + `player_locX` int(9) NOT NULL,
- + `player_locY` int(9) NOT NULL,
- + `player_locZ` int(9) NOT NULL,
- + PRIMARY KEY (`id`)
- +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- +
- +-- ----------------------------
- +-- Records
- +-- ----------------------------
- +INSERT INTO `raid_event_spawnlist` VALUES ('1', 'Test', '-93287', '-251026', '-3336', '-94347', '-251026', '-3136');
- +INSERT INTO `raid_event_spawnlist` VALUES ('2', 'Test', '-87131', '-257755', '-3336', '-88020', '-257755', '-3136');
- +INSERT INTO `raid_event_spawnlist` VALUES ('3', 'Test', '174167', '-75329', '-5107', '174085', '-76703', '-5007');
- +INSERT INTO `raid_event_spawnlist` VALUES ('4', 'Test', '174252', '-88483', '-5139', '174242', '-86548', '-5007');
- +INSERT INTO `raid_event_spawnlist` VALUES ('5', 'Test', '174091', '-82305', '-5123', '174103', '-80650', '-5007');
- Index: /trunk/Data/data/html/event/12901-1.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-1.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-1.htm (revision 683)
- @@ -0,0 +1,16 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center><br><br>
- +In this section you can select the mob type that you'd like to fight against.
- +<br>
- +Tell me, against which kind of mob would you like to fight against?
- +<br>
- +<br><a action="bypass -h npc_%objectId%_Chat 4">Group of Mobs</a>
- +<br><a action="bypass -h npc_%objectId%_Chat 5">Grand Bosses</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-10.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-10.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-10.htm (revision 683)
- @@ -0,0 +1,4 @@
- +<html>
- +<body>
- +</body>
- +</html>
- Index: /trunk/Data/data/html/event/12901-11.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-11.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-11.htm (revision 683)
- @@ -0,0 +1,4 @@
- +<html>
- +<body>
- +</body>
- +</html>
- Index: /trunk/Data/data/html/event/12901-2.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-2.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-2.htm (revision 683)
- @@ -0,0 +1,15 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Party Events</center><br><br>
- +In this section you can select the mob type that you'd like to fight against.
- +<br>
- +Tell me, against which kind of mob would you like to fight against?
- +<br>
- +<br><a action="bypass -h npc_%objectId%_Chat 7">Grand Bosses</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-3.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-3.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-3.htm (revision 683)
- @@ -0,0 +1,15 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the mob against whom you'd like to fight.
- +<br>
- +Tell me, against which of this mobs would you like to fight against?
- +
- +<br><a action="bypass -h npc_%objectId%_iEvent 1 1 21380 4 1 3 1">Tepra Scarab</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901.htm (revision 683)
- @@ -0,0 +1,18 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255><br>
- +Welcome Traveler. Are you up for a BIG fight?! If so, I can help you quite a bit!
- +<br>
- +I can set up a fully customized event for you!
- +<br>
- +Wich kind of Event would you like to try?<br>
- +IMPORTANT: This feature is still undergoing tests and may be buggy!If you freeze after a teleport please restart Lineage 2 by pressing ctrl+alt+del and ending lineage 2.Start the client again and your good to go!<br>
- +IMPORTANT2: If you die during the event and you go back to town you will be kicked out of the raid event!<br>
- +<br><a action="bypass -h npc_%objectId%_Chat 1">Clan Events</a>
- +<br><a action="bypass -h npc_%objectId%_Chat 2">Party Events</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-4.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-4.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-4.htm (revision 683)
- @@ -0,0 +1,18 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the raid you like to do.
- +<br>
- +Tell me, against which of these mobs would you like to fight against?<br>
- +The price is given to every participant.You will also receive several event points depending on the difficulty of the raid. These can be used at the npc buffer to get full buffs!
- +For these mobs a minimum of 4 players is required.<br>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 22062 30 4 30 3 1">30x difficulty 3x mobs - 3Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 22062 40 4 30 3 2">40x difficulty 3x mobs - 6Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 22062 50 4 30 3 5">50x difficulty 3x mobs - 8Gb </a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-5.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-5.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-5.htm (revision 683)
- @@ -0,0 +1,21 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the raid you like to do.
- +<br>
- +Tell me, against which of these mobs would you like to fight against?<br>
- +The price is given to every participant.You will also receive several event points depending on the difficulty of the raid. These can be used at the npc buffer to get full buffs!
- +For these bosses a minimum of 8 players is required.<br>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 25234 2 8 30 3 1">2x Ancient Dragon - 15Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 25125 2 8 30 3 2">2x Tiger King - 25Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 25126 2 8 30 3 3">2x Longhorn - 40Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 29020 2 8 30 3 4">2x Baium - 50Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 29019 1 8 30 3 5">1x Antharas - 75Gb </a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 2 0 29028 1 8 30 3 6">1x Valakas - 150Gb </a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-6.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-6.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-6.htm (revision 683)
- @@ -0,0 +1,16 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Clan Events</center>
- +In this section you can select the mob against whom you'd like to fight.
- +<br>
- +Tell me, against which of this mobs would you like to fight against?
- +<br>
- +Others Will soon be aviable, this is only for testing purposes.
- +<br><a action="bypass -h npc_%objectId%_iEvent 1 1 21380 4 1 3 1">Tepra Scarab [Testing]</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/data/html/event/12901-7.htm
- ===================================================================
- --- /trunk/Data/data/html/event/12901-7.htm (revision 683)
- +++ /trunk/Data/data/html/event/12901-7.htm (revision 683)
- @@ -0,0 +1,19 @@
- +<html><title>FizBan Event Manager</title><body>
- +<br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left>
- +<br>
- +<table width=255><tr><td valign=top width=255>
- +<center>Party Events</center>
- +In this section you can select the raid you like to do.
- +<br>
- +Tell me, against which of these mobs would you like to fight against?<br>
- +The price is given to every participant.You will also receive several event points depending on the difficulty of the raid. These can be used at the npc buffer to get full buffs!
- +For these bosses a minimum of 3 players is required to be online.<br>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29001 1 3 30 3 1">1x Ant Queen - 15Gb</a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29014 1 3 30 3 1">1x Orfen - 15Gb</a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29022 1 3 30 3 10">1x Zaken - 20Gb</a>
- +<br><a action="bypass -h npc_%objectId%_iEvent 3 0 29020 1 3 30 3 11">1x Baium - 30Gb</a>
- +</td></tr></table>
- +<br><br><br>
- +<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>
- +</body></html>
- Index: /trunk/Data/tools/database_installer.bat
- ===================================================================
- --- /trunk/Data/tools/database_installer.bat (revision 505)
- +++ /trunk/Data/tools/database_installer.bat (revision 684)
- @@ -579,10 +579,13 @@
- random_spawn.sql
- random_spawn_loc.sql
- seven_signs.sql
- seven_signs_festival.sql
- seven_signs_status.sql
- +buff_templates.sql
- +raid_events_spawnlist.sql
- +raid_prizes.sql
- siege_clans.sql
- skill_learn.sql
- skill_spellbooks.sql
- skill_trees.sql
- spawnlist.sql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement