Jump to content

Zake

Global Moderator
  • Posts

    5,304
  • Credits

  • Joined

  • Last visited

  • Days Won

    13
  • Feedback

    100%

Everything posted by Zake

  1. Can you post your script here? Although consider writing a new one in java.
  2. As i said i am doing this very often, any of the moderators can confirm that. There is nothing personal on you or any other guy, i don't even know you actually, do i? Also, unfortunately i don't have access to deleted posts only Maxtor does, all i remember is one taylor swift gif and a meme for java classes or something. You are smart enough to understand that such comments should be avoided in share/contribute sections.
  3. It's my responsibility as a moderator to clean spam replies, i'm doing this (almost) on a daily basis. Any opinion is welcome as long as you don't offend someone (not only me ofcourse). Also, if you scroll up you can see that ReentrantLock is my suggestion based on the author's approach, i never said that i would use this instead of threadpool. According to author's approach is the fastest thread-safe solution (although i do know that the difference is waaaaaaay too small). Last but not least,my intention on deleting your replies was not bad, i hope that you are not offended.
  4. You will have to pay a shitload of money. Also, mxc is not the right place for this request
  5. Well being immature on this level is not a scam action. There is nothing we can do about it. On the other hand, if you can provide evidence that he used those chat logs on a fraud/illegal way we are going to ban him.
  6. Nope, it's better than synchronized keyword in such occasions. There is no reason putting in queue a bunch of requests when all you want to achieve is synchronizing a connection.
  7. You may avoid duplicate connections this way, although if a new player asks for data while 1st one is still processing he will get temporarily an empty table. Even critical error maybe if table is half fed. You could remove final modifiers from your structures, then create temporary StringBuilders during connection time and change the address of the pvp/pk to these temps when they are fully fed. Edit: gonna investigate about topic edit issue and let you know
  8. It's not quite easy to produce this with low population. You can always benchmark this. Fill your characters table with a lot of data, and create a bunch of db connection tasks to keep connection pool busy enough, so that you have time to execute 2 requests at the same time.
  9. Avoiding a ScheduledFuture task is a fancy way to "rest" your ThreadPool, although you have a vulnerable area (the one that you are doing db connection). This area can delay some times due to connection pool being busy or your query executing slow due to a lot of calculations. During that computation time (delay mentioned above) 2 or more threads (player clicks) can access this area at the same time aka multiple connections at the same time which will lead to duplicate data in your StringBuilder as StringBuilder is a not synchronized structure itself. You can either use StringBuffer, which is not prefered for the same reason CopyOnWriteArrayList is not prefered (slow writing operations) OR synchronize the vulnerable area. My suggestion: private final Lock _connectionLock = new ReentrantLock() private final void generateBuilder(...) { if (!_connectionLock.tryLock()) return; final StringBuilder sb = new StringBuilder(); //probably more builders try { //connections and computations here _lastUpdate = System.currentTimeMillis(); OR _nextUpdate = ... (depends on your approach) } finally { //empty PVP/PK builder here //feed PVP/PK with the corresponding builder _connectionLock.unlock(); } During the vulnerable time this will return the old PVP/PK stored data when they are requested. Also static fields are redundant in singleton classes so you can declare builders as private final StringBuilder PVP = new StringBuilder(); private final StringBuilder PKS = new StringBuilder(); although CAPS is not a proper naming convention for those.
  10. This isn't the right place for such requests. You should create a topic in marketplace section.
  11. I don't think that you will find any off classic sources. Even if you do, you are going to have a better time using a java project.
  12. Private support (anydesk/teamviewer) is against the rules for this board ( Read rule 6 ). You can always create a marketplace request.
  13. I can't see any restriction there too. You can start debugging a bit. While parsing data on NpcParser try to print in console the name for barakiel. set.set("npcId", npcId); set.set("displayId", templateId); set.set("name", name); after this part paste this if (npcId == 1234) //barakiel id here info(name); and NpcHolder.java method addTemplate public void addTemplate(NpcTemplate template) { if (template.getNpcId() == 1234) // barakiel id here too info(template.getName()); _npcs.put(template.npcId, template); } Let me know about results
  14. There is no restriction in this file. I can think of 2 things, 1) It's handled in NpcInfo.java and returns a substring of the name if it's more than x characters. 2) In your system folder/npcname-e.dat the name is not fully written.
  15. You didn't mention that you have a source code. Anyway, probably NpcParser.java
  16. If you have no source you should mention this to the pack owner
  17. You should probably post this in acis forum
  18. 9014 is pointless, did you add firewall exception for these 2 ports?
  19. People may want to stream. It's not pleasant to display your ip in public.
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock