Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_datapack
- Index: data/xml/skills/8000-8099.xml
- ===================================================================
- --- data/xml/skills/8000-8099.xml (revision 0)
- +++ data/xml/skills/8000-8099.xml (working copy)
- @@ -0,0 +1,8 @@
- +<?xml version='1.0' encoding='utf-8'?>
- +<list>
- + <skill id="8000" levels="2" name="Escape Teleport">
- + <set name="target" val="SELF" />
- + <set name="skillType" val="NOTDONE" />
- + <set name="operateType" val="PASSIVE" />
- + </skill>
- +</list>
- \ No newline at end of file
- #P aCis_gameserver
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 193)
- +++ java/net/sf/l2j/Config.java (working copy)
- @@ -310,6 +310,7 @@
- public static boolean ANNOUNCE_MAMMON_SPAWN;
- public static boolean ALT_MOB_AGRO_IN_PEACEZONE;
- public static boolean ALT_GAME_FREE_TELEPORT;
- + public static boolean EFFECT_TELEPORT;
- public static boolean SHOW_NPC_LVL;
- public static boolean SHOW_NPC_CREST;
- public static boolean SHOW_SUMMON_CREST;
- @@ -1022,6 +1023,7 @@
- CLASS_MASTER_SETTINGS = new ClassMasterSettings(npcs.getProperty("ConfigClassMaster"));
- ALT_GAME_FREE_TELEPORT = npcs.getProperty("AltFreeTeleporting", false);
- + EFFECT_TELEPORT = npcs.getProperty("EffectTeleport", false);
- ANNOUNCE_MAMMON_SPAWN = npcs.getProperty("AnnounceMammonSpawn", true);
- ALT_MOB_AGRO_IN_PEACEZONE = npcs.getProperty("AltMobAgroInPeaceZone", true);
- SHOW_NPC_LVL = npcs.getProperty("ShowNpcLevel", false);
- Index: config/npcs.properties
- ===================================================================
- --- config/npcs.properties (revision 191)
- +++ config/npcs.properties (working copy)
- @@ -81,6 +81,9 @@
- # Allow free teleportation around the world.
- AltFreeTeleporting = False
- +# teleportation Effect Escape around the world.
- +EffectTeleport = True
- +
- # Announce to players the location of the Mammon NPCs during Seal Validation.
- # Default is False.
- AnnounceMammonSpawn = False
- Index: java/net/sf/l2j/gameserver/datatables/SkillTable.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/datatables/SkillTable.java (revision 190)
- +++ java/net/sf/l2j/gameserver/datatables/SkillTable.java (working copy)
- @@ -193,6 +193,7 @@
- DWARVEN_CRAFT(1321, 1),
- COMMON_CRAFT(1322, 1),
- LARGE_FIREWORK(2025, 1),
- + ESCAPE_TELEPORT(8000, 1),
- SPECIAL_TREE_RECOVERY_BONUS(2139, 1),
- ANTHARAS_JUMP(4106, 1),
- Index: java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/instance/Npc.java (revision 190)
- +++ java/net/sf/l2j/gameserver/model/actor/instance/Npc.java (working copy)
- @@ -20,14 +20,17 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.datatables.MapRegionTable;
- +import net.sf.l2j.gameserver.datatables.SkillTable;
- import net.sf.l2j.gameserver.datatables.TeleportLocationTable;
- import net.sf.l2j.gameserver.instancemanager.CastleManager;
- import net.sf.l2j.gameserver.instancemanager.SiegeManager;
- +import net.sf.l2j.gameserver.model.L2Skill;
- import net.sf.l2j.gameserver.model.L2TeleportLocation;
- import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
- import net.sf.l2j.gameserver.model.zone.ZoneId;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- /**
- @@ -193,8 +196,21 @@
- price /= 2;
- }
- + if (Config.EFFECT_TELEPORT)
- + {
- + L2Skill skill = SkillTable.FrequentSkill.ESCAPE_TELEPORT.getSkill();
- + if (skill != null)
- + {
- + MagicSkillUse MSU = new MagicSkillUse(player, player, 8000, 1, 1, 0);
- + player.sendPacket(MSU);
- + player.broadcastPacket(MSU);
- + player.useMagic(skill, false, false);
- + }
- + }
- +
- if (Config.FREE_TELEPORT || teleport.getPriceCount() == 0 || player.destroyItemByItemId("InstantTeleport", teleport.getPriceId(), teleport.getPriceCount(), this, true))
- player.teleportTo(teleport, 20);
- ------------------------------------------------------------------------------------------------------------------------------------------
- Bonus efect teleport gm de adaugat in AdminTeleport.java dupa
- else if (command.startsWith("admin_teleport"))
- {
- try
- {
- final int x = Integer.parseInt(st.nextToken());
- final int y = Integer.parseInt(st.nextToken());
- final int z = (st.hasMoreTokens()) ? Integer.parseInt(st.nextToken()) : GeoEngine.getInstance().getHeight(x, y, player.getZ());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement