
adenaman
Members-
Posts
369 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by adenaman
-
Any java developer Free? :P
adenaman replied to dubluw's question in Request Server Development Help [L2J]
holy sh1t, you are so pr0! -
Any java developer Free? :P
adenaman replied to dubluw's question in Request Server Development Help [L2J]
holy sh1t, you are so pr0! -
Any java developer Free? :P
adenaman replied to dubluw's question in Request Server Development Help [L2J]
holy sh1t, you are so pr0! -
Find a team, at least the main members and then and only then think about the chronicle. Also there are already a pack of that chronicle (what ever you choose) so then next question that you need to ask is, what will ours have that the old one doesn't. That may be less bugs, more customs, more retail like, more plug and play system, better efficiency, ... If it is educational purpose, then how far do you want to go? just create the javadocs or remake the whole system, starting with diagrams of all types. But the main point to start is to find and organize a competitive team for your goals
-
Find a team, at least the main members and then and only then think about the chronicle. Also there are already a pack of that chronicle (what ever you choose) so then next question that you need to ask is, what will ours have that the old one doesn't. That may be less bugs, more customs, more retail like, more plug and play system, better efficiency, ... If it is educational purpose, then how far do you want to go? just create the javadocs or remake the whole system, starting with diagrams of all types. But the main point to start is to find and organize a competitive team for your goals
-
Find a team, at least the main members and then and only then think about the chronicle. Also there are already a pack of that chronicle (what ever you choose) so then next question that you need to ask is, what will ours have that the old one doesn't. That may be less bugs, more customs, more retail like, more plug and play system, better efficiency, ... If it is educational purpose, then how far do you want to go? just create the javadocs or remake the whole system, starting with diagrams of all types. But the main point to start is to find and organize a competitive team for your goals
-
[HELP] Implementing NPC Relations
adenaman replied to dpbBryan's question in Request Server Development Help [L2J]
You can copy the Varka/Ketra system, if you add the Tryskell idea -100 to -20 = love completly Varka -20 to +20 = neutral +20 to 100 = love Ketra If you want any interface then it must be something like Comparable (or Comparator dont remmember now) but i dont think that you need it. if it is personal player based (love Dion or love Heine) then just add a int / boolean at L2PcInstance and some help method "boolean isDionFriend()" or "int getDionHeineFriendship()" if it is not, (like Hellbound levels more or less) then you need a manager that store that var, it can be singleton because there will be only one (no 2 Dion-Heine relationship) Btw the link is about behavior simulations, dont think that is relevant -
[HELP] Implementing NPC Relations
adenaman replied to dpbBryan's question in Request Server Development Help [L2J]
i got a bit lost: "Instances": check how postIl did it, but it must be just controling knownList or smth like that Relations between Npc's you can create a manager that save the info (Joe alive?) onCreate() turn it true, onDie() false [no idea if Npcs have onCreate(), they must, because some make an animation or a skill, i dont know] that manager may be static so you can access it easy. AIs, there are some usefull information about this, i have read long time ago something about birds/fish simulations that are based on 3 keys: - they follow a leader - they have a formation - they do random moves inside that formation or something like that Edit: http://www.red3d.com/cwr/boids/ -
[Help] pvppoints system
adenaman replied to dymek1984's question in Request Server Development Help [L2J]
java.lang.StackOverflowError = recursive error aka: public void a (){ b(); } public void b (){ a(); } or public void a (){ a(); } -
about connect with freya
adenaman replied to cute's question in Request Server Development Help [L2J]
disable gameguard in configs -
[Help] PC Bang Points Event
adenaman replied to NumL0ck's question in Request Server Development Help [L2J]
60 *60 * 1000 / 1000, omg math! Srsly it was so hard to find where that config ends? next time try to fix it by yourself before asking here -
[REQUEST]Pvp Reward System
adenaman replied to andrei23's question in Request Server Development Help [L2J]
use forum search engine, take a look at sticked topics, ... we are not google -
Ahm, problem wich need alot discuss...
adenaman replied to Stewie's question in Request Server Development Help [L2J]
and that is what scientists call "bitch slapped" -
[Help] PC Bang Points Event
adenaman replied to NumL0ck's question in Request Server Development Help [L2J]
and when you make it 6? -
PK Cleaner NPC Problem
adenaman replied to ~~Darius~~'s question in Request Server Development Help [L2J]
the main point to use final is to be better readable, when you see a final var you know what is going to be used for. -
PK Cleaner NPC Problem
adenaman replied to ~~Darius~~'s question in Request Server Development Help [L2J]
they do, since you have a var that can only de intialized once, the VM can use it read-only, and that will increase the performance. http://www.ibm.com/developerworks/java/library/j-jtp1029/index.html http://renaud.waldura.com/doc/java/final-keyword.shtml Example of Strings differences (final/ not final). nothing to do with our case, but still a relation between "final" and "performance" http://www.coderanch.com/t/518466/Performance/java/Compiler-optimization-final-variables This is a minimal impove. And there are things that can give a lot more than this (for example direct access and not getters/setters, inside the class) or use C++. But still impact on performance -
PK Cleaner NPC Problem
adenaman replied to ~~Darius~~'s question in Request Server Development Help [L2J]
add the {} to the else block before player.setKarma(0); { after player.sendMessage("Your karma cleaned, continue to play!"); } add an else before the super(...) call, we dont need it if it was CleanPK add "final" to L2ItemInstance item = player.getInventory().getItemByItemId(Config.PK_CLEAN_ID); this is not an error but will have better performance -
Best L2j Interlude Pack
adenaman replied to predator50's topic in Server Development Discussion [L2J]
l2 rusteam , and there are some more, just can remmember them atm -
Source aCis - another CRAPPY interlude server
adenaman replied to Tryskell's topic in Server Shares & Files [L2J]
i thought about it but, if i: [playerA][timeB][playerB]... -task remove playerA and next time (timeB), but didnt warned him yet -now i try to remove the next player to be warned (playerB), so i cancel the task and interupt it i dont warn player A, nor add it to the queue to be warned next time -
Source aCis - another CRAPPY interlude server
adenaman replied to Tryskell's topic in Server Shares & Files [L2J]
you are right, i just looked at the doc of fastlist, it implements FastCollection, that is thread-safe, anyway my problem was that when i remove player that is the next player to be warned: - I need to remove him from the queue: no problem here - cancel the programed task - create new task for the next player to be warned and the problem was that if i was warning that player in the moment that i wanted to remove him, the old task will create the new task for the next player and the remove will create another new task. -
Best L2j Interlude Pack
adenaman replied to predator50's topic in Server Development Discussion [L2J]
There are also some russian packs, that are kinda famous there, no idea how good/bad they are -
Source aCis - another CRAPPY interlude server
adenaman replied to Tryskell's topic in Server Shares & Files [L2J]
Well, i just synchronized all the function so it will be executed all before we could delete any player. It works fine, couldnt get any exceptions, or create extra task, so no problems with a lot of times trying 150 mils, 6000 players and removing random players one by one If any expert of concurrence want to help, or just comment, it is welcome FastList will improve the speed of adding and removing (FastMap has synchronizatio implemented, but FastList doesnt), so with FastList it will be faster but eith the same behavor well the code: package test; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ScheduledFuture; public class TakeBreakManager { private final static long TIME_EACH_BREAK = 150; //2h by default private static volatile List<Object> queue; private static TakeBreakManager instance; private static ScheduledFuture<?> task; private WarnUserTakeBreak warn; private TakeBreakManager(){ queue = new ArrayList<Object>(); warn = new WarnUserTakeBreak(); } public static TakeBreakManager getInstance(){ if (instance == null) instance = new TakeBreakManager(); return instance; } public void addPlayer(L2PcInstance player){ synchronized(this){ queue.add(System.currentTimeMillis()); queue.add(player); if (task == null) start(); } } private void start(){ task = ThreadPoolManager.getInstance().scheduleGeneral(warn ,TIME_EACH_BREAK - (System.currentTimeMillis() - (Long)queue.remove(0)) ); } public void removePlayer(L2PcInstance player){ if (player == queue.get(0)){ synchronized(this){ queue.remove(0); task.cancel(false); if (!queue.isEmpty()) start(); } return; } int index = 2; while (index < queue.size()-1){ if (queue.get(index) == player){ synchronized(this){ queue.remove(index); queue.remove(index-1); } return; } index = 2; } } protected class WarnUserTakeBreak implements Runnable { @Override public void run() { synchronized(TakeBreakManager.this){ L2PcInstance player; long time = 0; do{ // synchronized(TakeBreakManager.this){ if (queue.size() > 1){ player = (L2PcInstance) queue.remove(0); time = (Long) queue.remove(0); } else if (queue.size() == 1) player = (L2PcInstance) queue.remove(0); else{ task = null; return; } // } if (player.isOnline()) { //SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.PLAYING_FOR_LONG_TIME); //player.sendPacket(msg); // System.out.println("time: " System.currentTimeMillis() " player: " player); if (queue.isEmpty()){ // synchronized(TakeBreakManager.this){ queue.add(player); // } time = System.currentTimeMillis(); break; } else // synchronized(TakeBreakManager.this){ queue.add(System.currentTimeMillis()); queue.add(player); // } } } while (System.currentTimeMillis() <= time); if (!queue.isEmpty()) task = ThreadPoolManager.getInstance().scheduleGeneral(this , TIME_EACH_BREAK - (System.currentTimeMillis() - time) ); else task = null; } } } } -
Source aCis - another CRAPPY interlude server
adenaman replied to Tryskell's topic in Server Shares & Files [L2J]
thats why i said that it had bo be synchronized, synchronized(this) queue.add(System.getTimeInMillis(), queue.length); queue.add(player, queue.length); if (task == null) start(); ... run() ... synchronized(this){ queue.add(System.getTimeInMillis(), queue.length); queue.add(player, queue.length); } I had some problems with my main pc, so now im working with my laptop, i dont have here server nor client EDIT: i made a new java project in eclipse to try this, made some tests its usually working great but in extreme tests (break warn each 150 milis) and 600 players, i found that sometimes i get a problem on remove the first element it is some problem of synchronization, because im trying to cancel the task and create another one and they make evil things. But all other things are working great EDIT2: Ok i found where as my main problem, atm its sometimes creating one extra task, that may be anotheer synchr problem. 5 am, time to sleep