diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java index 8f6fce39c901e05592fe3f614edeec5893ab3043..615d35484c728f31eabf0114ff2ad130e0890bb2 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -44,6 +44,9 @@ public final class EffectMasterHandler Betray.class, BigHead.class, Blink.class, + BlockAction.class, + BlockChat.class, + BlockParty.class, BlockBuffSlot.class, BlockResurrection.class, Bluff.class, @@ -88,6 +91,7 @@ public final class EffectMasterHandler FatalBlow.class, Fear.class, FocusEnergy.class, + Flag.class, FocusMaxEnergy.class, FocusSouls.class, Fusion.class, diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java new file mode 100644 index 0000000000000000000000000000000000000000..cba96c49cc689c67980c1e65211bb2687f3132d2 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockAction.java @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package handlers.effecthandlers; + +import java.util.ArrayList; + +import com.l2jserver.gameserver.datatables.BotReportTable; +import com.l2jserver.gameserver.instancemanager.PunishmentManager; +import com.l2jserver.gameserver.model.effects.EffectTemplate; +import com.l2jserver.gameserver.model.effects.L2Effect; +import com.l2jserver.gameserver.model.effects.L2EffectType; +import com.l2jserver.gameserver.model.punishment.PunishmentAffect; +import com.l2jserver.gameserver.model.punishment.PunishmentTask; +import com.l2jserver.gameserver.model.punishment.PunishmentType; +import com.l2jserver.gameserver.model.stats.Env; + +/** + * @author BiggBoss + */ +public final class BlockAction extends L2Effect +{ + private final ArrayList<Integer> _blockedActions; + + /** + * @param env + * @param template + */ + public BlockAction(Env env, EffectTemplate template) + { + super(env, template); + String[] rawActions = template.getParameters().getString("blockedActions").split(","); + _blockedActions = new ArrayList<>(rawActions.length); + for (String act : rawActions) + { + int id = -1; + try + { + id = Integer.parseInt(act); + _blockedActions.add(id); + } + catch (Exception e) + { + } + } + } + + @Override + public boolean onStart() + { + if ((getEffected() == null) || !getEffected().isPlayer()) + { + return false; + } + + if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) + { + PunishmentManager.getInstance().startPunishment(new PunishmentTask(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN, 0, "block action debuff", "system")); + } + + if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) + { + PunishmentManager.getInstance().startPunishment(new PunishmentTask(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN, 0, "block action debuff", "system")); + } + + return true; + } + + @Override + public void onExit() + { + if (_blockedActions.contains(BotReportTable.PARTY_ACTION_BLOCK_ID)) + { + PunishmentManager.getInstance().stopPunishment(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + } + if (_blockedActions.contains(BotReportTable.CHAT_BLOCK_ID)) + { + PunishmentManager.getInstance().stopPunishment(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + } + } + + @Override + public boolean checkCondition(Object id) + { + return !_blockedActions.contains(id); + } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.ACTION_BLOCK; + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java new file mode 100644 index 0000000000000000000000000000000000000000..fdde92286ee7674ead18ee2c7869e122267451e0 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockChat.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package handlers.effecthandlers; + +import com.l2jserver.gameserver.instancemanager.PunishmentManager; +import com.l2jserver.gameserver.model.effects.EffectTemplate; +import com.l2jserver.gameserver.model.effects.L2Effect; +import com.l2jserver.gameserver.model.effects.L2EffectType; +import com.l2jserver.gameserver.model.punishment.PunishmentAffect; +import com.l2jserver.gameserver.model.punishment.PunishmentTask; +import com.l2jserver.gameserver.model.punishment.PunishmentType; +import com.l2jserver.gameserver.model.stats.Env; + +/** + * @author BiggBoss + */ +public final class BlockChat extends L2Effect +{ + public BlockChat(Env env, EffectTemplate template) + { + super(env, template); + } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.CHAT_BLOCK; + } + + @Override + public boolean onStart() + { + if ((getEffected() == null) || !getEffected().isPlayer()) + { + return false; + } + + PunishmentManager.getInstance().startPunishment(new PunishmentTask(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN, 0, "Chat banned bot report", "system")); + return true; + } + + @Override + public void onExit() + { + PunishmentManager.getInstance().stopPunishment(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); + } + + @Override + public boolean isInstant() + { + return true; + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java new file mode 100644 index 0000000000000000000000000000000000000000..f6fb3283966c4857d1e8f3e6edbf89d54e115974 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/BlockParty.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package handlers.effecthandlers; + +import com.l2jserver.gameserver.instancemanager.PunishmentManager; +import com.l2jserver.gameserver.model.effects.EffectTemplate; +import com.l2jserver.gameserver.model.effects.L2Effect; +import com.l2jserver.gameserver.model.effects.L2EffectType; +import com.l2jserver.gameserver.model.punishment.PunishmentAffect; +import com.l2jserver.gameserver.model.punishment.PunishmentTask; +import com.l2jserver.gameserver.model.punishment.PunishmentType; +import com.l2jserver.gameserver.model.stats.Env; + +/** + * @author BiggBoss + */ +public final class BlockParty extends L2Effect +{ + /** + * @param env + * @param template + */ + public BlockParty(Env env, EffectTemplate template) + { + super(env, template); + } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public boolean onStart() + { + if ((getEffected() == null) || !getEffected().isPlayer()) + { + return false; + } + + PunishmentManager.getInstance().startPunishment(new PunishmentTask(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN, 0, "Party banned by bot report", "system")); + return true; + } + + @Override + public void onExit() + { + PunishmentManager.getInstance().stopPunishment(getEffected().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.PARTY_BAN); + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Flag.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Flag.java new file mode 100644 index 0000000000000000000000000000000000000000..97012f0ab258c392a35c027cd31204cc4c83c800 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Flag.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2004-2013 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +package handlers.effecthandlers; + +import com.l2jserver.gameserver.model.effects.EffectTemplate; +import com.l2jserver.gameserver.model.effects.L2Effect; +import com.l2jserver.gameserver.model.effects.L2EffectType; +import com.l2jserver.gameserver.model.stats.Env; + +/** + * @author BiggBoss + */ +public final class Flag extends L2Effect +{ + /** + * @param env + * @param template + */ + public Flag(Env env, EffectTemplate template) + { + super(env, template); + } + + @Override + public L2EffectType getEffectType() + { + return L2EffectType.NONE; + } + + @Override + public boolean onStart() + { + if ((getEffected() == null) || !getEffected().isPlayer()) + { + return false; + } + + getEffected().updatePvPFlag(1); + + return true; + } + + @Override + public boolean onActionTime() + { + getEffected().updatePvPFlag(1); + + return super.onActionTime(); + } + + @Override + public void onExit() + { + getEffected().getActingPlayer().updatePvPFlag(0); + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/stats/skills/06000-06099.xml b/L2J_DataPack_BETA/dist/game/data/stats/skills/06000-06099.xml index 4d33e04df6950454d4fc7a19dc66372664102856..3009051208e9080b1795f19343b7c6a47e49626b 100644 --- a/L2J_DataPack_BETA/dist/game/data/stats/skills/06000-06099.xml +++ b/L2J_DataPack_BETA/dist/game/data/stats/skills/06000-06099.xml @@ -314,13 +314,17 @@ <skill id="6038" levels="1" name="Report Status"> <set name="abnormalLvl" val="1" /> <set name="abnormalTime" val="600" /> - <set name="abnormalType" val="BOT_PENALTY" /> + <set name="abnormalType" val="NONE" /> <set name="icon" val="icon.skill6038" /> <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="BlockChat" val="0" /> + </for> </skill> <skill id="6039" levels="1" name="Report Status"> <set name="abnormalLvl" val="1" /> @@ -330,8 +334,12 @@ <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="BlockParty" val="0" /> + </for> </skill> <skill id="6040" levels="1" name="Report Status"> <set name="abnormalLvl" val="1" /> @@ -341,8 +349,12 @@ <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="Flag" val="0" /> + </for> </skill> <skill id="6041" levels="1" name="Phoenix Rush"> <!-- Confirmed CT2.5 --> @@ -626,8 +638,14 @@ <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="BlockAction" val="0"> + <param blockedActions="-2" /> + </effect> + </for> </skill> <skill id="6056" levels="1" name="Report Status"> <set name="abnormalLvl" val="1" /> @@ -637,8 +655,14 @@ <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="BlockAction" val="0"> + <param blockedActions="-2" /> + </effect> + </for> </skill> <skill id="6057" levels="1" name="Report Status"> <set name="abnormalLvl" val="1" /> @@ -648,8 +672,14 @@ <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="Debuff" val="0"> + <mul order="0x30" stat="runSpd" val="0.0" /> + </effect> + </for> </skill> <skill id="6058" levels="1" name="Report Status"> <set name="abnormalLvl" val="1" /> @@ -659,8 +689,14 @@ <set name="isMagic" val="2" /> <!-- Static Skill --> <set name="magicLvl" val="-1" /> <set name="operateType" val="A2" /> - <set name="skillType" val="NOTDONE" /> - <set name="targetType" val="NONE" /> + <set name="skillType" val="DEBUFF" /> + <set name="targetType" val="ONE" /> + <set name="stayAfterDeath" val="True" /> + <for> + <effect name="Debuff" val="0"> + <mul order="0x30" stat="runSpd" val="0.0" /> + </effect> + </for> </skill> <skill id="6059" levels="1" name="Counter Critical"> <!-- Confirmed CT2.5 --> diff --git a/L2J_DataPack_BETA/dist/sql/game/bot_reported_char_data.sql b/L2J_DataPack_BETA/dist/sql/game/bot_reported_char_data.sql new file mode 100644 index 0000000000000000000000000000000000000000..f6db4d65ccae374b0179e04a7f6d0e3d1a20fcae --- /dev/null +++ b/L2J_DataPack_BETA/dist/sql/game/bot_reported_char_data.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS `bot_reported_char_data` ( + `botId` INT UNSIGNED NOT NULL DEFAULT 0, + `reporterId` INT UNSIGNED NOT NULL DEFAULT 0, + `reportDate` BIGINT(13) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`botId`, `reporterId`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file