SHOW:
|
|
- or go back to the newest paste.
| 1 | ### Eclipse Workspace Patch 1.0 | |
| 2 | #P aCis_datapack | |
| 3 | Index: data/xml/skills/8000-8099.xml | |
| 4 | =================================================================== | |
| 5 | --- data/xml/skills/8000-8099.xml (revision 0) | |
| 6 | +++ data/xml/skills/8000-8099.xml (working copy) | |
| 7 | @@ -0,0 +1,8 @@ | |
| 8 | +<?xml version='1.0' encoding='utf-8'?> | |
| 9 | +<list> | |
| 10 | + <skill id="8000" levels="2" name="Escape Teleport"> | |
| 11 | - | + <set name="target" val="TARGET_SELF" /> |
| 11 | + | + <set name="target" val="SELF" /> |
| 12 | + <set name="skillType" val="NOTDONE" /> | |
| 13 | - | + <set name="operateType" val="OP_PASSIVE" /> |
| 13 | + | + <set name="operateType" val="PASSIVE" /> |
| 14 | + </skill> | |
| 15 | +</list> | |
| 16 | \ No newline at end of file | |
| 17 | #P aCis_gameserver | |
| 18 | Index: java/net/sf/l2j/Config.java | |
| 19 | =================================================================== | |
| 20 | --- java/net/sf/l2j/Config.java (revision 193) | |
| 21 | +++ java/net/sf/l2j/Config.java (working copy) | |
| 22 | @@ -310,6 +310,7 @@ | |
| 23 | public static boolean ANNOUNCE_MAMMON_SPAWN; | |
| 24 | public static boolean ALT_MOB_AGRO_IN_PEACEZONE; | |
| 25 | public static boolean ALT_GAME_FREE_TELEPORT; | |
| 26 | + public static boolean EFFECT_TELEPORT; | |
| 27 | public static boolean SHOW_NPC_LVL; | |
| 28 | public static boolean SHOW_NPC_CREST; | |
| 29 | public static boolean SHOW_SUMMON_CREST; | |
| 30 | @@ -1022,6 +1023,7 @@ | |
| 31 | CLASS_MASTER_SETTINGS = new ClassMasterSettings(npcs.getProperty("ConfigClassMaster"));
| |
| 32 | ||
| 33 | ALT_GAME_FREE_TELEPORT = npcs.getProperty("AltFreeTeleporting", false);
| |
| 34 | + EFFECT_TELEPORT = npcs.getProperty("EffectTeleport", false);
| |
| 35 | ANNOUNCE_MAMMON_SPAWN = npcs.getProperty("AnnounceMammonSpawn", true);
| |
| 36 | ALT_MOB_AGRO_IN_PEACEZONE = npcs.getProperty("AltMobAgroInPeaceZone", true);
| |
| 37 | SHOW_NPC_LVL = npcs.getProperty("ShowNpcLevel", false);
| |
| 38 | Index: config/npcs.properties | |
| 39 | =================================================================== | |
| 40 | --- config/npcs.properties (revision 191) | |
| 41 | +++ config/npcs.properties (working copy) | |
| 42 | @@ -81,6 +81,9 @@ | |
| 43 | # Allow free teleportation around the world. | |
| 44 | AltFreeTeleporting = False | |
| 45 | ||
| 46 | +# teleportation Effect Escape around the world. | |
| 47 | +EffectTeleport = True | |
| 48 | + | |
| 49 | # Announce to players the location of the Mammon NPCs during Seal Validation. | |
| 50 | # Default is False. | |
| 51 | AnnounceMammonSpawn = False | |
| 52 | Index: java/net/sf/l2j/gameserver/datatables/SkillTable.java | |
| 53 | =================================================================== | |
| 54 | --- java/net/sf/l2j/gameserver/datatables/SkillTable.java (revision 190) | |
| 55 | +++ java/net/sf/l2j/gameserver/datatables/SkillTable.java (working copy) | |
| 56 | @@ -193,6 +193,7 @@ | |
| 57 | DWARVEN_CRAFT(1321, 1), | |
| 58 | COMMON_CRAFT(1322, 1), | |
| 59 | LARGE_FIREWORK(2025, 1), | |
| 60 | + ESCAPE_TELEPORT(8000, 1), | |
| 61 | SPECIAL_TREE_RECOVERY_BONUS(2139, 1), | |
| 62 | ||
| 63 | ANTHARAS_JUMP(4106, 1), | |
| 64 | Index: java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java | |
| 65 | =================================================================== | |
| 66 | - | --- java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java (revision 190) |
| 66 | + | --- java/net/sf/l2j/gameserver/model/actor/instance/Npc.java (revision 190) |
| 67 | - | +++ java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java (working copy) |
| 67 | + | +++ java/net/sf/l2j/gameserver/model/actor/instance/Npc.java (working copy) |
| 68 | @@ -20,14 +20,17 @@ | |
| 69 | import net.sf.l2j.Config; | |
| 70 | import net.sf.l2j.gameserver.cache.HtmCache; | |
| 71 | import net.sf.l2j.gameserver.datatables.MapRegionTable; | |
| 72 | +import net.sf.l2j.gameserver.datatables.SkillTable; | |
| 73 | import net.sf.l2j.gameserver.datatables.TeleportLocationTable; | |
| 74 | import net.sf.l2j.gameserver.instancemanager.CastleManager; | |
| 75 | import net.sf.l2j.gameserver.instancemanager.SiegeManager; | |
| 76 | +import net.sf.l2j.gameserver.model.L2Skill; | |
| 77 | import net.sf.l2j.gameserver.model.L2TeleportLocation; | |
| 78 | import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; | |
| 79 | import net.sf.l2j.gameserver.model.zone.ZoneId; | |
| 80 | import net.sf.l2j.gameserver.network.SystemMessageId; | |
| 81 | import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; | |
| 82 | +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; | |
| 83 | import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; | |
| 84 | ||
| 85 | /** | |
| 86 | @@ -193,8 +196,21 @@ | |
| 87 | price /= 2; | |
| 88 | } | |
| 89 | ||
| 90 | + if (Config.EFFECT_TELEPORT) | |
| 91 | + {
| |
| 92 | + L2Skill skill = SkillTable.FrequentSkill.ESCAPE_TELEPORT.getSkill(); | |
| 93 | + if (skill != null) | |
| 94 | + {
| |
| 95 | + MagicSkillUse MSU = new MagicSkillUse(player, player, 8000, 1, 1, 0); | |
| 96 | + player.sendPacket(MSU); | |
| 97 | + player.broadcastPacket(MSU); | |
| 98 | + player.useMagic(skill, false, false); | |
| 99 | + } | |
| 100 | + } | |
| 101 | + | |
| 102 | - | if (Config.ALT_GAME_FREE_TELEPORT || player.destroyItemByItemId("Teleport " + (list.getIsForNoble() ? " nobless" : ""), 57, price, this, true))
|
| 102 | + | if (Config.FREE_TELEPORT || teleport.getPriceCount() == 0 || player.destroyItemByItemId("InstantTeleport", teleport.getPriceId(), teleport.getPriceCount(), this, true))
|
| 103 | - | player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), 20); |
| 103 | + | player.teleportTo(teleport, 20); |
| 104 | ||
| 105 | - | } |
| 105 | + | |
| 106 | - | else |
| 106 | + | ------------------------------------------------------------------------------------------------------------------------------------------ |
| 107 | - | _log.warning("No teleport destination with id:" + val); |
| 107 | + | Bonus efect teleport gm de adaugat in AdminTeleport.java dupa |
| 108 | ||
| 109 | else if (command.startsWith("admin_teleport"))
| |
| 110 | {
| |
| 111 | try | |
| 112 | {
| |
| 113 | final int x = Integer.parseInt(st.nextToken()); | |
| 114 | final int y = Integer.parseInt(st.nextToken()); | |
| 115 | final int z = (st.hasMoreTokens()) ? Integer.parseInt(st.nextToken()) : GeoEngine.getInstance().getHeight(x, y, player.getZ()); |