
dpbBryan
Members-
Posts
370 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by dpbBryan
-
[DeathMatch]Find winner
dpbBryan replied to Medisept's question in Request Server Development Help [L2J]
>Pasting code with over 1000+ lines and expecting somebody to actually read and understand it. >mfw Maybe just the relevant details would be nice. @Medisept for (L2PcInstance onlinePlayer : ples) { if (onlinePlayer.isInDm() == true) { onlinePlayer.teleToLocation(81220, 148588, -3472); onlinePlayer.isInDm = false; } if (onlinePlayer.getDmKills() > maxkills) { winner = onlinePlayer; maxkills = onlinePlayer.getDmKills(); } onlinePlayer.isInDm = false; onlinePlayer.setDmKills(0); } if (maxkills != 0) { for (int[] reward : Config.DM_EVENT_REWARDS) { winner.addItem("Death Match", reward[1], reward[2], winner, true); winner.broadcastUserInfo(); winner.sendPacket(new InventoryUpdate()); winner.sendPacket(new ItemList(winner, false)); winner.sendPacket(new StatusUpdate(winner)); } winner.sendMessage("Congratulations! You have won Death Match Event."); } Now featuring non-shitty tabbing so it's readable. I'm guessing you loop across the entire table of players looking for the one who has the most kills and you set maxkills equal to that. The one conclusion that I can jump too is that the variable that is being returned by onlinePlayer.getDmKills() is not doing what it should be doing. Have you used the debugger? -
Hey everybody, One habit I have is creating a lot of stuff for Lineage 2 (java at least) and deleting it after I'm done with it. As I've recently been working on a project related to L2 with a friend I decided instead to release building blocks of my code that people can use to implement in their own solutions. So part of my project involves a custom character creation process via a web user interface. One of the things I wanted to implement was a hexagonal style chart displaying the spread of statistical points. Live test example of my objects in use: http://www.qzmpox.nl/l2/hexagon/hexagontest.php So, I made it! And because I love all you guys so much (not really, most of you release the same pvp buffers over and over again and ask the same inane java questions, but oh well) I decided to release the building blocks I'm using to create the above image. So, let me explain: - This requires a knowledge of PHP Programming - This requires object oriented knowledge. - This requires basic trigonometry knowledge. Firstly, let me explain what this isn't: This isn't code that will effect your gameserver. This isn't code that will have an impact on your data. This isn't a final solution to ready to be deployed. This also isn't the graphical information you see above in the picture. Ok, then what is it? Building block objects, provided to help you easily implement this style of solution in your own forum/website/project. Then why is this useful? Versatility! These objects have been built to be used with each other but also these objects can be use independently in projects even outside of Lineage 2! Perhaps you're even just curious and would like to see the code how it's done. - CVector2.php This is a general 2 dimensional vector object. You have an X and Y value. This object also includes static helper functions for doing mathematical operations upon vectors easily without having to pull their individual X and Y values out from the object. This can be used in all applications that involve some points in a coordinate system. - CHexagon.php This is a general hexagon calculated within a unit circle. An offset can be provided to this class since images in browsers are calculated with the origin of (0,0) being the top left corner instead of in the center. This hexagon can also be scaled to whichever size fits your application the best. I'm not sure how Lineage 2 is involved. No problem, because there are more objects! - CL2StatsRepository.php Following Domain Driven Design this object is responsible for pulling up information regarding the different classes which are defined in a seperate file (classes.json, but we'll talk about that in a bit). This repository will collect information from the JSON file, create instances of domain objects (CL2Stats) and place them in an array. - CL2Stats.php Following Domain Driven Design still this object contains all the information about a particular class. This object also calculates the scalar values for each statistic. The scalar value is a percentage of the actual stat value versus the max possible stat value. I originally had Interlude in mind but I know the later chronicles have higher values so I left this value adjustable. - classes.json A json string that contains information about avaliable classes. If your server features custom classes or you've removed some than this list is adjustable whenever so it's no problem! The inside hexagon points will be calculated automatically for the new class. You said earlier theres no graphics, how do you use it then? However you want! The geometrical information describing the entire picture is already completed for you. How you choose to draw or present these to players is left up to you using whichever graphical library you'd like to use. Maybe you don't even want to use in the same sense as I do. This can be applied to statistical things regarding L2 as well. There is an example of how I did it which you can see via files hexagontext.php and hexagonpng.php. I know this one isn't very fantastic for most of you guys, but I'll be releasing my work as I go along. So perhaps I'll have some nice goodies in the future. Download: http://www.qzmpox.nl/l2/hexagon/L2Hexagon.zip
-
[HELP] Respawn time
dpbBryan replied to GodDamNeD's question in Request Server Development Help [L2J]
Check spawnlist on your sql database. -
Cant Connect to MySQL after rr!
dpbBryan replied to Kouma's question in Request Server Development Help [L2J]
I would probably look into the real cause of it, it's going to be really unhandy if you have to reinstall your mysql db every time you want to restart. Have you thought about checking the error logs by the way? Perhaps there was something prevent mysql from starting up, such as something using the same port. -
[Help]Unique errors in gameserver console.
dpbBryan replied to Stewie's question in Request Server Development Help [L2J]
Have you tried using the debugger to step through the code to see the values? -
[HELP]Getting DC on game server select
dpbBryan replied to Squirtle's question in Request Server Development Help [L2J]
Is this what you get when a user is attempting to connect to a gameserver or when he is logged into the login server? -
Well there is a weight limit and on top of that the inventory limit for each character (80 items on humans at least). Also it's setup so non-stackable items can be stacked to be presentable and keep a smaller list to search through. I think what I'll do is adapt the table of just icons, and underneath it display a number representing the quantity and a small button next to it perhaps, like if I make a mockup: That start be either a lnk or a button to take everything, clicking the icon takes 1 By the way the html replacement you talk about is how I implemented the list already :P I just have worked on the details.
-
http://maxcheaters.com/forum/index.php?topic=260762.0 ain't this you?
-
[HELP]Getting DC on game server select
dpbBryan replied to Squirtle's question in Request Server Development Help [L2J]
Thats ok :) Have you tried turning on the debug and developer mode on your login/game server? It'll display more specific messages as to whats going on, perhaps you can see it there. Are you sure by the way that the protocol version is the same? -
Antibot system for farm and enchant
dpbBryan replied to `NeverMore's topic in Marketplace [L2Packs & Files]
Not to be rude but this very disruptive to all of your players in the server, botting or not. It's like those single player games that make you keep a constant internet connection so they screw paying customers as well as a few pirates. -
[HELP]Getting DC on game server select
dpbBryan replied to Squirtle's question in Request Server Development Help [L2J]
My post was positive. I basically said if you come in here looking like an asshole and treating the other people like they're assholes, why would they help you and why do you even deserve their help? *Hint hint you can make this better*. -
Well once again I'm going for those odd features that most L2'ers wouldn't like. I'm going for experimental features that I've got some real-life friends willing to help test out. I've been absolutely addicted as well to the roguelike genre like the dwarf fortress adventure mode, elona, or ToME. One of the other features I'm implementing as well is permanent death of a character. If you die your character becomes unplayable ( I haven't come up with whether it'll be like diablo where a character exists but can't be played or just deleting the character all together ). The point of the grave is because after you die you won't be needing whatever items anyway, you're dead! I do like displaying the killer, or maybe perhaps not to add a mysterious roleplaying element of who-dun-it. Either way my focus goggles are indeed on the items mostly only :P Disregardless of their bigger picture image or the implementation with L2, I'd just like to find a nice presentation that isn't too complex within the means of what I can present in L2. Perhaps just making the icons clickable buttons?
-
[help]compile error
dpbBryan replied to EdenEternal's question in Request Server Development Help [L2J]
I was just going to recommend that you go look at the interface function and make sure you check if the arguments match, but the post earlier: Read your post a bit better than me. In the function public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) You added the String target argument. Because this doesn't match the interface definition you've actually made a completely different function. The @override macro is reporting an error because that definition doesn't exist in the interface. -
[help]compile error
dpbBryan replied to EdenEternal's question in Request Server Development Help [L2J]
Then that @override probably should have been left alone. I'm pretty sure you've implemented something incorrectly. -
[HELP]Getting DC on game server select
dpbBryan replied to Squirtle's question in Request Server Development Help [L2J]
You come in here with your arms flailing with all those reddit face icons, and then you insult us and wonder why we're not helping you. Yea, really? -
[help]compile error
dpbBryan replied to EdenEternal's question in Request Server Development Help [L2J]
That @override macro tells java that the object you're in is taking over a method in the object you extended. It'll stop the compiler if it can't find the method it's overriding. Maybe just remove @override? Or should it be overriding something? In which case you've implemented it incorrectly or it's just a mistake. -
[HELP] interlude potion reloading
dpbBryan replied to l2howto's question in Request Server Development Help [L2J]
perhaps you've got all those items linked to the same skill with the same cooldown in your xml/sql? -
This guy doesn't even speak english, he's just using a translator. Why don't you just ask in your own language susneadita?
-
Hey everybody! I've started l2j development again (nice to see maybe the 2 people who will remember me). Either way one of the next things I'm planning on implementing is permanent death (much like roguelikes). Something I made a while ago was player graves. When players died all of their SP and Adena was removed from the player and attached to the grave. I was going to try to implement something like dark souls where if you die, your death site will have your remains and you have once chance to get back to it. If you died again with an active grave, the grave disappeared: I've come back with this idea except I'm reworking it to add permanent death to players. So I've thought about: 1) Reporting the name of the player that deceased along with his/her level. 2) Reporting a list of items the player had on their possession when they died Something like, this! FYI the count for stackable items is corrected, little logic bug when working with the counts You'll notice theres a 3 next to the Drac bow. I have a custom implemention of a grave item which'll store an item definition along with a quantity so I can neatly stack non-stackable items in a list. When they are returned from the grave it'll be converted into an L2ItemInstance: public class _L2GraveItem { private int _count; private L2Item _item; public _L2GraveItem(int count, L2Item item) { _count = count; _item = item; } public int getCount() { return _count; } public L2Item getItem() { return _item; } public void setCount(int count) { this._count = count; } public L2ItemInstance removeStackableItem(int count) { if(count < 1 || count > this._count) return null; count -= this._count; return _createNewItemInstance(); } public L2ItemInstance removeItem() { _count--; return _createNewItemInstance(); } private L2ItemInstance _createNewItemInstance() { L2ItemInstance item = new L2ItemInstance( IdFactory.getInstance().getNextId(), this._item ); return item; } } I'll share because I love you guys, even though I don't know you. Theres obviously way more to it but it's too much to share. Either way what I'm asking is ideas for creating an interface with the limited options of chat windows or multisells. As of now I have a list I manually programmed in with a link between an item ID and it's icon on the client. I'm wondering what you guys might find better: 1) A chat window with a button allowing you to take the weapon (with condition checks of course such as if the item is still there and if you can hold it) or 2) The grave will have a link to a generated unique multisell which will contain definitions of the items that exist on the grave when the player selects it. The grave will then instead just have a bunch of information about the player. Whatca guys think? If you have other ideas say it :) Also I'm using L2acis freemium build 270, thanks Tryskell and the l2acis team :P
-
[Question]Facebook likes
dpbBryan replied to niksan1's question in Request Server Development Help [L2J]
It's possible to do, Facebook has an API which allows developers to do things like this. xdem is just a retarded troll. I'm not sure if there is something released as a general solution to do this, maybe you can ask the developers of those sites for help as to where to begin. -
[Question]Facebook likes
dpbBryan replied to niksan1's question in Request Server Development Help [L2J]
Trolling? http://developers.facebook.com/docs/guides/web/ "There are a number of options for the Like Button, including the option to include the names and profile pictures of the user's friends who have also liked the page. Here is a Like Button for the Facebook Developers site:" "The JavaScript SDK saves the details for the logged in user in such a way that it can be accessed by the PHP SDK." -
[Question]Facebook likes
dpbBryan replied to niksan1's question in Request Server Development Help [L2J]
There are actually a lot of apps and such already that request that you like their article and can detect whether or not your logged in user liked it. -
[HELP] Implementing NPC Relations
dpbBryan replied to dpbBryan's question in Request Server Development Help [L2J]
Well I'm going to start with something simple to begin with. I have an enumation object with 2 statuses. Either the NPC's are going to like each other or they're going to hate each other (two poles to start simple). Let's just say they're both merchants. If you deal with Merchant A, Merchant B is going to hate you, and vice versa: If you deal with B, A is going to hate you. For now deal 2 is going to the player additional as I will have to add things in the L2PcInstance for that. Deal 1 my focus now is how the two NPC's see each other and how to bind them uniquely. I'm making the decision right now that all boss NPC's and all interactable NPC's are only going to be allowed 1 spawn. I'm blocking spawning two uniquely identified NPC's from being spawned at the same time. This way the NPC id is going to become a reliable key for looking up relations. I don't want to make a global solution for the implementation but I'd like to have a generic interface with a function ( RelationInterface.CheckRelations(L2Player ) ) with classes that implement the interface based on whom you're talking with. public interface RelationInterface { public Something getRelations(); } Keep in mind I'm focusing on simple relations of NPC's right now, the addition of players will come next (need to take this one step at a time since it's quite ambitious). Adenaman: I'll take a look at the link and give it a read over, thanks for the link. -
[HELP] Implementing NPC Relations
dpbBryan posted a question in Request Server Development Help [L2J]
Hello everybody, nice to see all the useless help posts and some fimilar names. Something that I've been working on is creating your own 'Instance' of the world independent of what other players do. To create a bit more of a dynamic role playing situation for players I've been wanting to implement relationships between NPC's. I'm currently using standard interlude L2j from the nightlies folder (r1434) incase you're wondering, though I'm wondering more about the concept of it rather than the practice. The idea to paint an example of what I mean: There is Tom and there is Joe. Tom is a trader. Tom receives his supplies from Joe and resells them. Joe is a traveling NPC which travels from location A to B. Joe dies, either by the hands of the player or a hostile NPC. Because Tom no longer has a supplier he cannot sell supplies anymore to the player. Obviously it won't be so specific every time and it was just to illustrate what I mean but I want to implement something generic enough that I can define an entry point interface ( like checkRelation or something ) and from there script it myself in specific classes. However I'm running into trouble with a good implementation with the current system of npc's and spawning. 1) My original idea was to have the NPC's have a Map with the NPC id as the key and the value being some kind of relation interface (classes implement this with a doCheck as stated above, or something when the player interacts with the NPC). However NPC's can have multiple spawns, which means this is unreliable (or it can be managed if I'm the one managing the custom npcs) 2) The second idea is to use the spawn id's of npcs, however this wouldn't be known at compile time. To manage this I'd have to completely overwrite the current spawn system to make something to keep track of it then, which would then have to spawn things inside of a relation 'group'. Anybody maybe have some kind of idea about how to go about this? -
Anything graphical or visual is done on the client. The server (l2j) is not responsible for this.