Jump to content

wongerlt

Members
  • Posts

    539
  • Credits

  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Everything posted by wongerlt

  1. give me url and i tell u what here wrong.
  2. this line: votes = Integer.valueOf(inputLine.split(">")[2].replace("</b", "")); change to: votes = Integer.valueOf(inputLine.split(">")[2].replace("</b", "").replaceAll(",",""));
  3. and uncomment this lines // e.printStackTrace(); remove slashes from start. and try again.
  4. then u can make like this: 2033 1 [Hopzone] Current Votes: $s1 0 79 CC E5 FF 8 0 3 1 0 [Hopzone] Current Votes: $s1 server 100% all will see :D
  5. hmm i think not possible, but what point to flood on down? :D very nervous while you chating and server messages start going to bottom tab.
  6. 2033 1 [Hopzone] Current Votes: $s1 0 79 CC E5 FF 0 0 0 0 0 none change to 2 2033 1 [Hopzone] Current Votes: $s1 2 79 CC E5 FF 0 0 0 0 0 none
  7. You can make it with systemmsg.dat and choose any color you want in rgb example: SystemMessage sm = new SystemMessage(2033); // 2033 - id from systemmsg-e.dat sm.addString(Integer.toString(hopzone_votes)); Broadcast.toAllOnlinePlayers(sm); // example 2033, add this line to systemmsg-e.dat // 2033 1 [Hopzone] Current Votes: $s1 0 79 CC E5 FF 0 0 0 0 0 none // R = 79, G = CC , B = E5 , aplha = FF with this shit u can save and server bandwidth. :D
  8. maybe somewhere infinite loop, try debug with l2phx on what packet it stuck.
  9. Because vote sites updated and old methods to get vote count no longer works.
  10. you mean l2jguard.org?? don't even try this!
  11. yes ovh vps protected from ddos, but still you need configure ovh firewall , example block all protocols (tcp,udp, icmp, gre ant etc...), all ports and open only which one you need. always someone appear who will try to ddos you :D
  12. any error on console when try to delete?
  13. Hello, how change font or font size on H5 client? all text look bigger than normal Example on h5 look: http://prntscr.com/m28bea And example Iterlude client: http://prntscr.com/m28bkv On interlude look much better.
  14. wrong java version. Java SE 10 = 54 Java SE 9 = 53 Java SE 8 = 52 Java SE 7 = 51 open cmd win+r [cmd] and check with command: java -version
  15. /** * Restore Type 1 The remaning skills lost effect upon logout but were still under a high reuse delay. */ statement = con.prepareStatement(RESTORE_SKILL_SAVE); statement.setInt(1, getObjectId()); statement.setInt(2, getClassIndex()); statement.setInt(3, 1); rset = statement.executeQuery(); while (rset.next()) { final int skillId = rset.getInt("skill_id"); final int skillLvl = rset.getInt("skill_level"); final long reuseDelay = rset.getLong("reuse_delay"); final long systime = rset.getLong("systime"); if (reuseDelay <= 0) { continue; } final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl); if (skill == null) continue; final long remainingTime = systime - System.currentTimeMillis(); ++ if (remainingTime > 10) ++ { disableSkill(skill, remainingTime); addTimeStamp(skill, reuseDelay, systime); ++ } } this if condition if (remainingTime > 10) helped me with this bug, idk why,
  16. easy, example java -XX:+UseConcMarkSweepGC -Xmx2G -cp ./libs/*; net.sf.l2j.gameserver.GameServer just write: "C:\Program Files\Java\jdk1.8.0_171\bin\java" -XX:+UseConcMarkSweepGC -Xmx2G -cp ./libs/*; net.sf.l2j.gameserver.GameServer dont remove quates "
  17. you looking not here.. there is any web app? how player donate?
  18. thed edit spawn admin command add +50 on z cordinate maybe it will work :D idk
  19. your config file or index txt file not empty? "geo_index" or just try to hit with bow to mob behind the wall to check :D
  20. show ur problem, screenshot ar video
  21. delete this.
  22. crappy code but still u can see example: fencetable.java package com.l2jfrozen.gameserver.datatables; import java.util.ArrayList; import java.util.Collection; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.actor.instance.L2FenceInstance; import java.util.logging.Logger; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.idfactory.IdFactory; import com.l2jfrozen.util.CloseUtil; public class FenceTable { protected static Logger _log = Logger.getLogger(FenceTable.class.getName()); public static void fencedelsql(int type,int locx,int locy,int locz,int width,int length){ Connection con; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("DELETE FROM `fences` WHERE `type`='"+type+"' AND `locx`='"+locx+"' AND `locy`='"+locy+"' AND `locz`='"+locz+"' AND `width`='"+width+"' AND `length`='"+length+"'"); statement.execute(); statement.close(); CloseUtil.close(con); } catch (Exception e) { e.printStackTrace(); } } public static void fencetogame(){ int g=0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); ResultSet rset; PreparedStatement statement = con.prepareStatement("SELECT * FROM `fences` WHERE 1"); rset = statement.executeQuery(); int type; int width; int length; int height; int locx; int locy; int locz; String name; while (rset.next()) { g++; type = rset.getInt("type"); width = rset.getInt("width"); length = rset.getInt("length"); height = rset.getInt("height"); locx = rset.getInt("locx"); locy = rset.getInt("locy"); locz = rset.getInt("locz"); name = rset.getString("name"); // spawn fence for (int i = 0;i < height;i++) { L2FenceInstance fence = new L2FenceInstance(IdFactory.getInstance().getNextId(), type, width, length, locz, locy, name); fence.spawnMe(locx, locy, locz); addFence(fence); } // spawn fence } } catch (Exception e) { e.printStackTrace(); } finally { CloseUtil.close(con); } _log.warning("Loaded "+g+" fences to world."); } public static ArrayList<L2FenceInstance> fences = new ArrayList<>(); public static void addFence(L2FenceInstance fence) { fences.add(fence); } public static ArrayList<L2FenceInstance> getAllFences() { return fences; } public static void removeFence(L2FenceInstance fence) { if (fences.contains(fence)) fences.remove(fence); } public static boolean canSeeTarget(L2Object source, int x, int y) { Collection<L2Object> objects = source.getKnownList().getKnownObjects().values(); for (L2Object obj : objects) { if (obj instanceof L2FenceInstance) { L2FenceInstance fence = (L2FenceInstance) obj; if (fence.isBetween(source.getX(), source.getY(), x, y)) return false; } } return true; } public static boolean canSeeTarget(int x, int y, int tx, int ty) { for (L2FenceInstance fence : fences) { if (fence.isBetween(x, y, tx, ty)) return false; } return true; } } gameserver java FenceTable.fencetogame(); admin command: else if (command.startsWith("admin_spawnfence")) { StringTokenizer st = new StringTokenizer(command, " "); try { st.nextToken(); int type = Integer.parseInt(st.nextToken()); int width = Integer.parseInt(st.nextToken()); int length = Integer.parseInt(st.nextToken()); int height = 1; String name = ""; if (st.hasMoreTokens()) height = Math.min(Integer.parseInt(st.nextToken()), 3); if (st.hasMoreTokens()) name = st.nextToken(); for (int i = 0;i < height;i++) { L2FenceInstance fence = new L2FenceInstance(IdFactory.getInstance().getNextId(), type, width, length, activeChar.getX(), activeChar.getY(), name); fence.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ()); FenceTable.addFence(fence); fence.fencetosql(type,activeChar.getX(),activeChar.getY(),activeChar.getZ(),width,length, height,name); } } catch (Exception e) { activeChar.sendMessage("Usage: //spawnfence <type> <width> <length> [<height>]"); } } else if (command.startsWith("admin_deletefence")) { StringTokenizer st = new StringTokenizer(command, " "); st.nextToken(); int idas = Integer.parseInt(st.nextToken()); for (L2FenceInstance fencex : FenceTable.getAllFences()) { if(fencex.getObjectId()==idas) { FenceTable.fencedelsql(fencex.getType(),fencex.getX(),fencex.getY(),fencex.getZ(),fencex.getWidth(),fencex.getLength()); L2WorldRegion region = fencex.getWorldRegion(); fencex.decayMe(); region.removeVisibleObject(fencex); fencex.getKnownList().removeAllKnownObjects(); L2World.getInstance().removeObject(fencex); FenceTable.removeFence(fencex); activeChar.sendMessage("Deleted fence " + fencex.getObjectId()); listFences(activeChar); } } } else if (command.startsWith("admin_listfence")) listFences(activeChar); .... private static void listFences(L2PcInstance activeChar) { NpcHtmlMessage html = new NpcHtmlMessage(0); StringBuilder sb = new StringBuilder(); sb.append("<html><body>Total Fences: " + FenceTable.getAllFences().size() + "<br><br>"); for (L2FenceInstance fence : FenceTable.getAllFences()) sb.append("<a action=\"bypass admin_deletefence " + fence.getObjectId() + " 1\">Fence: "+fence.getNamex()+" " + fence.getObjectId() + " [" + fence.getX() + " " + fence.getY() + " " + fence.getZ() + "]</a><br>"); sb.append("</body></html>"); html.setHtml(sb.toString()); activeChar.sendPacket(html); }
×
×
  • Create New...