Jump to content

addx20

Members
  • Posts

    34
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

1 Follower

About addx20

Profile Information

  • Gender
    Male
  • Country
    Greece

Recent Profile Visitors

689 profile views

addx20's Achievements

Newbie

Newbie (1/16)

0

Reputation

1

Community Answers

  1. It's already imported
  2. 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; } }
  3. 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); } } }
  4. 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)
  5. Hello! I just wanna know wich l2j INTERLUDE platform using this antibot system! Thanks! https://ibb.co/D8yRJxx
  6. Really good server... But i have a question.. they was using l2jAcis wich platform are using now?
  7. Create a folder in config name masterio and put this inside https://file.io/IiukwceS
  8. OMG thanks mate! i search for this 2 days non stop! ITS WAS Sooo f@ing easy... really dude thanks...
  9. Hello! When i am starting the gameserver this happens... found the solution thanks
  10. i cant do that... says that No projects are found to import... .
  11. 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?
  12. Thanks all.. I found the solution!
×
×
  • Create New...