criss22 Posted October 24, 2019 Share Posted October 24, 2019 I try to make individual zones for premium. And i try to add in table Teleport, tab Premium, like fornoble. I make setting in L2TeleportLocation.java public void setIsPremium(boolean val) { _premiumService = val; } +++ private boolean _premiumService; +++ public boolean IsPremium() { return _premiumService; } TeleportLocationTable.java public void reloadAll() { _teleports.clear(); try (Connection con = L2DatabaseFactory.getInstance().getConnection(); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("SELECT id, loc_x, loc_y, loc_z, price, fornoble, premium, itemId FROM teleport")) { L2TeleportLocation teleport; while (rs.next()) { teleport = new L2TeleportLocation(); teleport.setTeleId(rs.getInt("id")); teleport.setX(rs.getInt("loc_x")); teleport.setY(rs.getInt("loc_y")); teleport.setZ(rs.getInt("loc_z")); teleport.setPrice(rs.getInt("price")); teleport.setIsForNoble(rs.getInt("fornoble") == 1); teleport.setIsPremium(rs.getInt("premium") == 1); teleport.setItemId(rs.getInt("itemId")); _teleports.put(teleport.getTeleId(), teleport); } _log.info(getClass().getSimpleName() + ": Loaded " + _teleports.size() + " Teleport Location Templates."); } catch (Exception e) { _log.error(getClass().getSimpleName() + ": Error loading Teleport Table.", e); } if (Config.CUSTOM_TELEPORT_TABLE) { int _cTeleCount = _teleports.size(); try (Connection con = L2DatabaseFactory.getInstance().getConnection(); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("SELECT id, loc_x, loc_y, loc_z, price, fornoble, premium, itemId FROM custom_teleport")) { L2TeleportLocation teleport; while (rs.next()) { teleport = new L2TeleportLocation(); teleport.setTeleId(rs.getInt("id")); teleport.setX(rs.getInt("loc_x")); teleport.setY(rs.getInt("loc_y")); teleport.setZ(rs.getInt("loc_z")); teleport.setPrice(rs.getInt("price")); teleport.setIsForNoble(rs.getInt("fornoble") == 1); teleport.setIsPremium(rs.getInt("premium") == 1); teleport.setItemId(rs.getInt("itemId")); _teleports.put(teleport.getTeleId(), teleport); } _cTeleCount = _teleports.size() - _cTeleCount; if (_cTeleCount > 0) { _log.info(getClass().getSimpleName() + ": Loaded " + _cTeleCount + " Custom Teleport Location Templates."); } } catch (Exception e) { _log.warn(getClass().getSimpleName() + ": Error while creating custom teleport table " + e.getMessage(), e); } } } Table Design http:// And in Teleports table i set premium to 1, and nothing happend Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 24, 2019 Author Share Posted October 24, 2019 But lol, i try to set zone for noble only, but no work...i still can teleport without noblesse. LOL? Quote Link to comment Share on other sites More sharing options...
0 SweeTs Posted October 24, 2019 Share Posted October 24, 2019 Obviously you are doing something wrong. Highly doubt anyone will debug, explain or do it for you. There is simple logic, copy it, follow the pattern. It must work. Quote Link to comment Share on other sites More sharing options...
0 criss22 Posted October 24, 2019 Author Share Posted October 24, 2019 I delete what i did. But teleport for noble still no working...at custom npc i mean. And this npc comes with project. Quote Link to comment Share on other sites More sharing options...
0 Rootware Posted October 24, 2019 Share Posted October 24, 2019 "А мыши плакали и кололись, но продолжали грызть кактус.", russian metaphor. I told you what you need to do for avoid stupid actions and got result w/o outside help. Quote Link to comment Share on other sites More sharing options...
Question
criss22
I try to make individual zones for premium. And i try to add in table Teleport, tab Premium, like fornoble. I make setting in
L2TeleportLocation.java
+++
+++
TeleportLocationTable.java
Table Design
http://
And in Teleports table i set premium to 1, and nothing happend
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.