
addx20
Members-
Posts
34 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by addx20
-
Help Adapt To acis 398 one more
addx20 replied to addx20's question in Request Server Development Help [L2J]
It's already imported -
Hello Folks! again one more small problem! I need just to adapt the 2 red lines to acis 398 Thanks!!! package net.sf.l2j.gameserver.eola.eventengine; import net.sf.l2j.gameserver.model.location.Location; import net.sf.l2j.gameserver.enums.TeamType; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.model.memo.PlayerMemo; /** * @author Anarchy * * This class should hold all the information of a player * before he entered an event. It is used to restore * players' status after an event, or after disconnection. */ public class PlayerData { private int playerId; private int playerColor; private String playerTitle; private Location playerLocation; public PlayerData(Player player) { playerId = player.getObjectId(); playerColor = player.getAppearance().getNameColor(); playerTitle = player.getTitle(); playerLocation = new Location(player.getX(), player.getY(), player.getZ()); } public void restore(Player player) { if (player.isDead()) player.doRevive(); player.getAppearance().setNameColor(playerColor); player.setTitle(playerTitle); player.setTeam(TeamType.NONE); player.teleportTo(playerLocation, 0); player.sendMessage("Your status has been restored after leaving an event."); // Increase the participated in tasks int participates = PlayerMemo.getVarInt(player, "participated_automatic_events"); PlayerMemo.setVar(player, "participated_automatic_events", participates+1, -1); } public int getPlayerId() { return playerId; } public int getPlayerColor() { return playerColor; } public String getPlayerTitle() { return playerTitle; } }
-
Thanks Mate
-
Hello! The only problem that i am facing is the bold line i cant find the SetVar! Need to adapt it for Acis 398.If anyone can help! Thanks private void rewardPlayers() { // First Add Fixed Reward for (Player player : players) { PlayerMemo.setVar(player, "dungeon_atleast1time", "true", -1); for (Entry<Integer, Integer> itemId : template.getRewards().entrySet()) { player.addItem("dungeon reward", itemId.getKey(), itemId.getValue(), null, true); } } if (!template.getRewardHtm().equals("NULL")) { NpcHtmlMessage htm = new NpcHtmlMessage(0); htm.setFile(template.getRewardHtm()); for (Player player : players) player.sendPacket(htm); } else { for (Player player : players) { player.setInstance(InstanceManager.getInstance().getInstance(0), true); player.teleportTo(82635, 148798, -3464, 25); } } } =================================================================================================================================== Here is PlayerMemo package net.sf.l2j.gameserver.model.memo; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import net.sf.l2j.commons.data.MemoSet; import net.sf.l2j.commons.logging.CLogger; import net.sf.l2j.commons.pool.ConnectionPool; /** * An implementation of {@link MemoSet} used for Player. There is a restore/save system. */ public class PlayerMemo extends MemoSet { private static final long serialVersionUID = 1L; private static final CLogger LOGGER = new CLogger(PlayerMemo.class.getName()); private static final String SELECT_MEMOS = "SELECT * FROM character_memo WHERE charId = ?"; private static final String DELETE_MEMO = "DELETE FROM character_memo WHERE charId = ? AND var = ?"; private static final String INSERT_OR_UPDATE_MEMO = "INSERT INTO character_memo (charId, var, val) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE val = VALUES(val)"; private final int _objectId; public PlayerMemo(int objectId) { _objectId = objectId; // Restore memos. try (Connection con = ConnectionPool.getConnection(); PreparedStatement ps = con.prepareStatement(SELECT_MEMOS)) { ps.setInt(1, _objectId); try (ResultSet rs = ps.executeQuery()) { while (rs.next()) put(rs.getString("var"), rs.getString("val")); } } catch (Exception e) { LOGGER.error("Couldn't restore memos for player id {}.", e, _objectId); } } @Override protected void onSet(String key, String value) { // Insert memo, on duplicate update it. try (Connection con = ConnectionPool.getConnection(); PreparedStatement ps = con.prepareStatement(INSERT_OR_UPDATE_MEMO)) { ps.setInt(1, _objectId); ps.setString(2, key); ps.setString(3, value); ps.execute(); } catch (Exception e) { LOGGER.error("Couldn't set {} memo for player id {}.", e, key, _objectId); } } @Override protected void onUnset(String key) { // Clear memo. try (Connection con = ConnectionPool.getConnection(); PreparedStatement ps = con.prepareStatement(DELETE_MEMO)) { ps.setInt(1, _objectId); ps.setString(2, key); ps.execute(); } catch (Exception e) { LOGGER.error("Couldn't unset {} memo for player id {}.", e, key, _objectId); } } }
-
Hello i have this problem when i am running the GAMESERVER: ==================================================================-[ Handlers ] java.net.URISyntaxException: Illegal character in opaque part at index 39: jar:file:/C:/Users/Manolis/Desktop/Νέος φάκελος (5)/game/./gameserver.jar!/ru/catssoftware/gameserver/handler/itemhandlers at java.net.URI$Parser.fail(URI.java:2847) at java.net.URI$Parser.checkChars(URI.java:3020) at java.net.URI$Parser.parse(URI.java:3057) at java.net.URI.<init>(URI.java:588) at java.net.URL.toURI(URL.java:963) at ru.catssoftware.util.JarUtils.enumClasses(JarUtils.java:51) at ru.catssoftware.gameserver.handler.ItemHandler.<init>(ItemHandler.java:34) at ru.catssoftware.gameserver.handler.ItemHandler.getInstance(ItemHandler.java:26) at ru.catssoftware.gameserver.L2GameServer.<init>(L2GameServer.java:470) at ru.catssoftware.gameserver.util.BootManager.<init>(BootManager.java:150) at ru.catssoftware.gameserver.util.BootManager.main(BootManager.java:41)
-
Hello! I just wanna know wich l2j INTERLUDE platform using this antibot system! Thanks! https://ibb.co/D8yRJxx
-
Really good server... But i have a question.. they was using l2jAcis wich platform are using now?
-
Source L2Fandc, latest source with facebook share, twitch, phantom
addx20 replied to Akar0's topic in Server Shares & Files [L2J]
https://easyupload.io/gsoa6y -
Source L2Fandc, latest source with facebook share, twitch, phantom
addx20 replied to Akar0's topic in Server Shares & Files [L2J]
Create a folder in config name masterio and put this inside https://file.io/IiukwceS -
OMG thanks mate! i search for this 2 days non stop! ITS WAS Sooo f@ing easy... really dude thanks...
-
-
i cant do that... says that No projects are found to import... .
-
Hello i have a small problem... I have a new source and i wanna test it... iam trying to put it on eclipse to compile it but i cant because the .project is mising is any way to create one?
-
Thanks all.. I found the solution!
-
yes
-
https://streamable.com/8ivir3 This is the first time that i see that..Definitely monsters/summon/raidbosses/walking Npc are using drugs...Out of hunters village or Cemetery i dont know... Any solution?
-
hello! When i am opening loginserver/gameserver this happen when is trying to run the server.. Exception in thread "main" java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required
-
Hello! iam using a new l2j pack but i cant run the server even in gameserver/loginserver! I made the compile... build was succesfull but when i am running the server i am taking this... Starting GameServer. log4j:WARN No appenders could be found for logger (l2s.gameserver.GameServer). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" java.lang.NullPointerException at l2s.gameserver.config.xml.holder.HostsConfigHolder.log(HostsConfigHolder.java:65) at l2s.commons.data.xml.AbstractParser.load(AbstractParser.java:144) at l2s.gameserver.config.xml.ConfigParsers.parseAllOnLoad(ConfigParsers.java:13) at l2s.gameserver.GameServer.<init>(GameServer.java:194) at l2s.gameserver.GameServer.main(GameServer.java:536) Server terminated abnormaly ... Server terminated ... Press any key to continue . . .
-
Code FEATURE - Droplist Dashboard (Shift + Click)
addx20 replied to StinkyMadness's topic in Server Shares & Files [L2J]
good -
Thanks my friend! I found it!
-
When u press this button u register in academy list... somehow this button is dead!.. private static void registerAcademy(Clan clan, Player player, int itemId, long price) { Connection connection = null; PreparedStatement statement = null; try { connection = DatabaseFactory.getInstance().getConnection(); statement = connection.prepareStatement("INSERT INTO character_academy (clanId,charId,itemId,price,time) values(?,?,?,?,?)"); statement.setInt(1, clan.getClanId()); statement.setInt(2, player.getObjectId()); statement.setInt(3, itemId); statement.setLong(4, price); statement.setLong(5, System.currentTimeMillis() + Config.MAX_TIME_IN_ACADEMY); statement.execute(); deleteFromAcdemyList(player); scheduledDeleteTask(clan); } catch (final Exception e) { e.printStackTrace(); } finally { DbUtils.closeQuietly(connection, statement); } }
-
OK sry https://ibb.co/YhMm9M0
-
Hello! I have a problem i made an academy register button but when i am trying to REGISTER is done nothing! Everything is working perfect but i cannot press the Register Button! HTML is ok! for sure smt going wrong with the java code! Any suggestions?
-
thanks
-
Source L2Fandc, latest source with facebook share, twitch, phantom
addx20 replied to Akar0's topic in Server Shares & Files [L2J]
To fix the services button is easy..Open Eclpise and then Just open services.community and search for ''CommunityNpcs'' after that search if ("bbsgetfav".equals(cmd) || "bbsnpcs".equals(cmd)) { sendFileToPlayer(player, "bbs_npcs.htm", true); return; and UNGREEN IT..