diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini index 2b1f563a3d..0df1f9064e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/General.ini @@ -576,6 +576,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java index 5c3e739e7c..91b5557351 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java @@ -576,6 +576,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2069,6 +2070,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 585930f7d4..8ab3f90fce 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12198,10 +12198,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12214,12 +12226,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/General.ini b/L2J_Mobius_2.5_Underground/dist/game/config/General.ini index e73a7de479..a5cbf4242e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/General.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/General.ini @@ -584,6 +584,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java index e6a5caf7a8..5d87ef7f1b 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java @@ -586,6 +586,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2092,6 +2093,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index ab0f76b710..a723dbdce8 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12205,10 +12205,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12221,12 +12233,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/General.ini b/L2J_Mobius_3.0_Helios/dist/game/config/General.ini index e73a7de479..a5cbf4242e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/General.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/General.ini @@ -584,6 +584,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java index db7a97875e..43595a4f9f 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java @@ -586,6 +586,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2105,6 +2106,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index a58321efc8..cf3216db8b 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12207,10 +12207,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12223,12 +12235,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini index e73a7de479..a5cbf4242e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/General.ini @@ -584,6 +584,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java index c5361b37b9..8853f3ca51 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java @@ -574,6 +574,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2085,6 +2086,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 7699466a11..1fed7f35ea 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12188,10 +12188,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12204,12 +12216,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_5.0_Salvation/dist/game/config/General.ini b/L2J_Mobius_5.0_Salvation/dist/game/config/General.ini index e73a7de479..a5cbf4242e 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/config/General.ini +++ b/L2J_Mobius_5.0_Salvation/dist/game/config/General.ini @@ -584,6 +584,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java index 0788fd8a30..fb0f4cc830 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java @@ -569,6 +569,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2086,6 +2087,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 65340a8e6a..df4ff5ce25 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12178,10 +12178,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12194,12 +12206,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/config/General.ini b/L2J_Mobius_5.5_EtinasFate/dist/game/config/General.ini index e73a7de479..a5cbf4242e 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/config/General.ini +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/config/General.ini @@ -584,6 +584,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java index 033510f868..06929fa8c6 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java @@ -569,6 +569,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2093,6 +2094,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 0311cd6627..9a68cd6cd3 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12181,10 +12181,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12197,12 +12209,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/config/General.ini b/L2J_Mobius_6.0_Fafurion/dist/game/config/General.ini index e73a7de479..a5cbf4242e 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/config/General.ini +++ b/L2J_Mobius_6.0_Fafurion/dist/game/config/General.ini @@ -584,6 +584,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java index 1b8e54bed0..045ebf4e32 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java @@ -570,6 +570,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2132,6 +2133,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index da52a709f8..f4f8fa7dc1 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12187,10 +12187,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12203,12 +12215,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/General.ini b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/General.ini index fc8cce65b3..c86dedb8d7 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/General.ini +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/General.ini @@ -586,6 +586,15 @@ CustomMultisellLoad = True CustomBuyListLoad = True +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java index 33dd5395bc..ea441f8ef6 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java @@ -570,6 +570,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2141,6 +2142,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 0e20809359..aab739fb54 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12204,10 +12204,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12220,12 +12232,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/config/General.ini b/L2J_Mobius_8.0_Homunculus/dist/game/config/General.ini index a5f0e2a21c..7e3bd4e7ac 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/config/General.ini +++ b/L2J_Mobius_8.0_Homunculus/dist/game/config/General.ini @@ -581,6 +581,15 @@ CustomMultisellLoad = True CustomBuyListLoad = True +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# Default: 20033 (Teleport Flag) +# No item consume: -1 +BookmarkConsumeItemId = -1 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/Config.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/Config.java index e3ad952c6a..ac4ba56402 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/Config.java @@ -567,6 +567,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2135,6 +2136,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index c9a335bbc7..130b4445b1 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12322,10 +12322,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12338,12 +12350,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/config/General.ini b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/config/General.ini index a5f0e2a21c..7e3bd4e7ac 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/config/General.ini +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/dist/game/config/General.ini @@ -581,6 +581,15 @@ CustomMultisellLoad = True CustomBuyListLoad = True +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# Default: 20033 (Teleport Flag) +# No item consume: -1 +BookmarkConsumeItemId = -1 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java index e3ad952c6a..ac4ba56402 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/Config.java @@ -567,6 +567,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2135,6 +2136,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 706b7bc610..2ad88b2343 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12349,10 +12349,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12365,12 +12377,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/General.ini b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/General.ini index dd5881d5ef..329991be27 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/General.ini +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/General.ini @@ -678,6 +678,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java index 8460669ad1..348b218961 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java @@ -668,6 +668,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2193,6 +2194,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 440b4752b2..4baa04d550 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -13022,10 +13022,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -13038,12 +13050,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_HAS_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement ps = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini index dd5881d5ef..329991be27 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/General.ini @@ -678,6 +678,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java index 0f19f65d34..c41157ae87 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java @@ -673,6 +673,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2198,6 +2199,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 0fa4f8885c..de29de6398 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12915,10 +12915,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12931,12 +12943,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_HAS_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement ps = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini index ed97b6fd69..9de4791aa7 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/General.ini @@ -580,6 +580,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java index ffa3204841..3b0f7e9b75 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java @@ -593,6 +593,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2037,6 +2038,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 1a7223ba3f..7da0966053 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12010,10 +12010,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12026,12 +12038,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini index ed97b6fd69..9de4791aa7 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/General.ini @@ -580,6 +580,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java index b0218340a6..79adc2014d 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java @@ -593,6 +593,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2041,6 +2042,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index c61c2220fa..a7fb30fd9a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12010,10 +12010,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12026,12 +12038,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini index ed97b6fd69..9de4791aa7 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/General.ini @@ -580,6 +580,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java index b0218340a6..79adc2014d 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java @@ -593,6 +593,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2041,6 +2042,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 6bb157be2e..6de55347f4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -11996,10 +11996,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12012,12 +12024,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/General.ini b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/General.ini index ed97b6fd69..9de4791aa7 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/General.ini @@ -580,6 +580,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java index aee4bb5f73..74744f3380 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java @@ -593,6 +593,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2042,6 +2043,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 2e532abef5..1f12488197 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12042,10 +12042,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12058,12 +12070,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/General.ini b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/General.ini index ed97b6fd69..9de4791aa7 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/General.ini @@ -580,6 +580,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java index 1d84ab3d54..6154136af2 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java @@ -593,6 +593,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2051,6 +2052,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index dbce4d76bd..83995918d5 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12042,10 +12042,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12058,12 +12070,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/General.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/General.ini index 23b3eecf18..7e32fa0868 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/General.ini @@ -581,6 +581,15 @@ CustomMultisellLoad = True CustomBuyListLoad = True +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java index 2c7aea0581..868657f35e 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java @@ -592,6 +592,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2053,6 +2054,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 906c08943f..659bca33e9 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12033,10 +12033,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12049,12 +12061,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Classic_Interlude/dist/game/config/General.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/General.ini index a0a849bfe4..ec443d27e8 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/config/General.ini +++ b/L2J_Mobius_Classic_Interlude/dist/game/config/General.ini @@ -612,6 +612,16 @@ CustomMultisellLoad = True # Default: False CustomBuyListLoad = True + +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# No item consume: -1 +# Default: 20033 (Teleport Flag) +BookmarkConsumeItemId = 20033 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java index b51a321964..f5144631be 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java @@ -600,6 +600,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2052,6 +2053,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index e5b6c2ce77..2c8f69c8e9 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12006,10 +12006,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12022,12 +12034,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/General.ini b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/General.ini index c9df7fcf50..e6cc91c10e 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/General.ini +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/config/General.ini @@ -581,6 +581,15 @@ CustomMultisellLoad = True CustomBuyListLoad = True +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# Default: 20033 (Teleport Flag) +# No item consume: -1 +BookmarkConsumeItemId = -1 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java index fe76901a8b..2389d47386 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/Config.java @@ -594,6 +594,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2087,6 +2088,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 087a5a60e8..9c5ca9ed39 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12293,10 +12293,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12309,12 +12321,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) { diff --git a/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/General.ini b/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/General.ini index d79154252b..073dd91dd4 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/General.ini +++ b/L2J_Mobius_Essence_5.0_Sylph/dist/game/config/General.ini @@ -581,6 +581,15 @@ CustomMultisellLoad = True CustomBuyListLoad = True +# --------------------------------------------------------------------------- +# Teleport Bookmark Settings +# --------------------------------------------------------------------------- +# Consume item for teleporting. +# Default: 20033 (Teleport Flag) +# No item consume: -1 +BookmarkConsumeItemId = -1 + + # --------------------------------------------------------------------------- # Birthday Event Settings # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java index c7be6f0598..1798542eb8 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/Config.java @@ -594,6 +594,7 @@ public class Config public static boolean CUSTOM_ITEMS_LOAD; public static boolean CUSTOM_MULTISELL_LOAD; public static boolean CUSTOM_BUYLIST_LOAD; + public static int BOOKMARK_CONSUME_ITEM_ID; public static int ALT_BIRTHDAY_GIFT; public static String ALT_BIRTHDAY_MAIL_SUBJECT; public static String ALT_BIRTHDAY_MAIL_TEXT; @@ -2090,6 +2091,7 @@ public class Config CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false); CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false); CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false); + BOOKMARK_CONSUME_ITEM_ID = General.getInt("BookmarkConsumeItemId", -1); ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187); ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!"); ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL + EOL + "Sincerely, Alegria"); diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 064cf46a43..48c9c04039 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -12360,10 +12360,22 @@ public class PlayerInstance extends Playable return; } - if (_inventory.getInventoryItemCount(20033, 0) == 0) + if (Config.BOOKMARK_CONSUME_ITEM_ID > 0) { - sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); - return; + if (_inventory.getInventoryItemCount(Config.BOOKMARK_CONSUME_ITEM_ID, -1) == 0) + { + if (Config.BOOKMARK_CONSUME_ITEM_ID == 20033) + { + sendPacket(SystemMessageId.YOU_CANNOT_BOOKMARK_THIS_LOCATION_BECAUSE_YOU_DO_NOT_HAVE_A_MY_TELEPORT_FLAG); + } + else + { + sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + } + return; + } + + destroyItem("Consume", _inventory.getItemByItemId(Config.BOOKMARK_CONSUME_ITEM_ID).getObjectId(), 1, null, true); } int id; @@ -12376,12 +12388,6 @@ public class PlayerInstance extends Playable } _tpbookmarks.put(id, new TeleportBookmark(id, x, y, z, icon, tag, name)); - destroyItem("Consume", _inventory.getItemByItemId(20033).getObjectId(), 1, null, false); - - final SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(20033); - sendPacket(sm); - try (Connection con = DatabaseFactory.getConnection(); PreparedStatement statement = con.prepareStatement(INSERT_TP_BOOKMARK)) {