Jump to content

Tryskell

Legendary Member
  • Posts

    5,343
  • Credits

  • Joined

  • Last visited

  • Days Won

    52
  • Feedback

    0%

Everything posted by Tryskell

  1. Well if the weapon is supposed to have a skill on it, you have to code the skill in data part, and code the weapon (add/remove skill when equip/unequip) on java part. You can't made it just from data. The result will be a weapon, when you equip it you got the skill, when you remove the item the skill dissapears. As skill, Braveheart c/p is fine. I don't know why it won't be. Just find the code about the cupid bow which give you "love arrow" skill as a good example. Or cursed weapons, which give you the 2 skills. ---- I don't get that last part : Why should it be a buff from what you say higher ? It isn't supposed to work as a OL CP heal ?
  2. numberToAdd have to been initalized, in the same place where "player" is initialized. http://download.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html Here is a help about data types possibilities. In this case, this is an int. Check how variables are initialized in any files of L2J, they're basically at the top of the class. Exemple in L2SiegeClan (this one because i'm working about). // =============================================================== // Data Field private int _clanId = 0; private List<L2Npc> _flag = new FastList<L2Npc>(); private int _numFlagsAdded = 0; About boolean error, you surely missed the return true from my code. Normally my code can't have this error, so you missed something. Last thing, why the fock are you using killer ? I said 2 times already (this is the third time) you mustn't use it to make your checks (only basic ones). What's wrong in my posts you don't understand ? Use the damn "player". Very last thing, when you try to use setPvpPoints(killer.getPvpPoints() + numberToAdd); well first about "killer" use I hope for god's sake you finally understood what I said (else I'm gonna cry), second when you put this one, you will get error. Why ? Because your code will search the setPvpPoints method inside this instance (L2PvpMobInstance), when it's supposed to be stored in L2PcInstance (as your code have been copied/pasted from it). I let you search about, but it's really simple. Don't search very far. All you have to remember is this method is based on L2PcInstance, and we have defined one in our code (not killer, the other one you never use...). And read my posts more than once time, because I feel like I post for nothing.
  3. My first squeleton was "wrong" (well too much codes). The light version is shown in this one, don't refer to the first squeleton. Use comments from my code squeleton. I said to you the killer check is the first. You use if (killer instanceof L2PcInstance) player = (L2PcInstance) killer; else if (killer instanceof L2Summon) player = ((L2Summon) killer).getOwner(); Which itself is a good code, but what about if killer == null in this case ? You got a NPE error. You have to circling each lower comment by upper levels. I give you the first 2 checks from my squeleton, and organize your check as the 3rd check : /** * Manages the doDie event<BR><BR> * * @param killer The L2Character that killed this instance.<BR><BR> */ @Override public boolean doDie(L2Character killer) { if (!super.doDie(killer)) return false; L2PcInstance player = null; // check if the killer is different of null (to avoid NPE error) if (killer != null) { // check if the killer was a player or a summon, because L2Character can be many things. if (killer instanceof L2PcInstance || killer instanceof L2SummonInstance) { if (killer instanceof L2PcInstance) player = (L2PcInstance) killer; // if killer is a summon, redirect to his owner else if (killer instanceof L2Summon) player = ((L2Summon) killer).getOwner(); // do a custom calcul using mob level // add the custom calcul result to the player total pvp points } return true; } I explain something more, try to understand : The goal is to aim with efficiency what instance is the "killer". L2Character is too much as it can be around 6 differents type of things, including L2PcInstance (players) and L2SummonInstance (their summons). When you do this sort of check : if (killer instanceof L2PcInstance) player = (L2PcInstance) killer; You are saying : if the L2Character instance named "killer" is a L2PcInstance, "killer" is a player instance, and stored in "player" variable. About "player" variable you initialized it yourself, perhaps without understanding what is it : L2PcInstance player = null; With that code you initialize a variable named "player", with is a part of L2PcInstance, and which is null. Why to create a null variable, when we try by all costs to remove all null checks ? Well if you take care of the code, you can understand we initialize a null variable but we fill it with data when we do that : if (killer instanceof L2PcInstance) player = (L2PcInstance) killer; So if "killer" isn't null from the first check, that can only means "player" couldn't be too. As you use "killer" to fill "player". Got it ? It's logical. I hope you get it from now, after all those instances morph, than you MUSTN'T use "killer", but "player" to make all your checks ! About my actual shared code, try to compile it, and give me eventual errors. About missing method etc, import good files and that's all. At worst there should have one, at best 0. ----- About checks The first check is a basic check, than many others methods got and must have. It's a security check to avoid NPEs. I hope you get it, at worst you can search NullPointerException over the internet, you will have results. The second check is to "separate" our conditions. We need L2PcInstance and L2Summon, not others L2Character types. Imagine an aggressive door (o_____o). It's a L2Character. Imagine the door kills the mob (!!!!!!!!!!!!!). If this check isn't made, and as a L2Door is a part of L2Character, all things are calculated ! But, as a door desn't have pvp points it will throw an error for sure, and bug your gameserver. This is the reason of this check : avoid all L2Characters to be able to use this part of code, and restrains only for players and summons. The third statement is a "organized" one. Both results, in any case, is the fill of "player" variable with something. But as a L2Summon is different from an L2PcInstance, and as you coded it (well, c/ped it :P), the calcul of player is different. The finality is the same, the ID number of this particular L2PcInstance. ---- About summons Imagine a summoner kill with weapon someone. His ID is 666 (IDs aren't like that, just example). You ask the calcul of mob lvl, and then ask to the server to get pvpkills from L2PcInstance 666 and add the first calcul result to it. Now a summoner got a summon, the summon kills someone. Both instances got their own IDs. But L2Summon is a L2Summon, we can't make comparison between 2 differents instances. We have to ask to the server who is the linked master. As this code already exists, we just use it. If ID of summon is 444 and L2PcInstance link master is 666, it sends back 666, which is a L2PcInstance variable and can be used in our calculs. I hope you get i all, some things are more harder to understand than others, but now you're in the final part : mob level calcul, and add the result to the player pvpkills.
  4. Well, you know now it doesn't come from environnement. We have to eliminate configs and java. - Is the LS give the exact same error when it bugs ? It could come from a code which isn't related to sieges then. - Have you tried configs reset ? C/p yours in security, and replace them by datapack ones. - What about siege dates reset ? Put them all to 0, they should recalculate alone when you launch GS. - What about java ? Have you modded it ? If yes, have you touched to SiegeManager ? You don't give all answers in my questions, please condense your answers to make your problem faster to solve. And don't double post, it's bad seen in this forum.
  5. Give more infos about chronicle / pack used, event used, and more, a detailed request, because I understood nothing (and I'm the sort of person who can understand a sentence from a russian using 2 words and ingame emotes, so...). I have to add your code is messy or you deleted parts of it, some { } have no need to exist. I suppose you have created your file from an exemple, which one ?
  6. handlers / itemhandlers / Soulshots.java You have to recode S restrictions, adding D ss/bss itemIDs to S grade check. ItemIDs of ss/bss are all shown in this file, so don't search anywhere. In IL and before, handlers are stocked to the gameserver, postIL handlers are stored in datapack. So don't search in the useless place.
  7. I let post-IL experts answer for you, cause I have no clue what a costum is. Lol. And when you type "Lineage 2 costum" in google, you have only "custom". Errrrrmmm google.
  8. DELETE FROM `characters` WHERE `level` = '1' Next time use google :P. http://www.1keydata.com/sql/sqldelete.html You will need to restart your gameserver for a full clean, as a character isn't only a character, it's too macros, inventory, clan, etc. This clean is automade at startup.
  9. Well, try reset your siege configs. Make a reset of your siege dates aswell, dunno if that can help. I tried to low database connections to 1, but that just don't bug at all ;o. Server corrects it alone to 2 if value is < 2. You can too make a save of your custom properties (copy/paste to a new folder), and copy / paste fresh ones. Add only servers infos needed to connect you (login/psw/database name), don't mod it at all, it's just to try if it comes from configs or not. If your server is in local, put down both gs/ls (aka close all), if you use wamp/lamp restart services, and after try anew. I already had some weird errors when I tried to restart wamp services when LS was still connected but gs no, errors in gs. But wasn't related to connections :(. About your LS / GS stuff, it's pretty strange too... If you run the GS alone, it loads all and wait for a LS to connect ("waiting for loginserver, retry in xx seconds") ? When you do in this order (start gs and then start ls) what is the error ? On which window ? And when you do "ls first gs second", any error in LS ? You just talked about GS error :P.
  10. Do a search in your project with "No item handler registered for item ID", you will have only 3 results, 2 haven't the Config.DEBUG thing, they both look like that : if (handler == null) _log.fine("No item handler registered for item ID " + target.getItemId() + "."); instead of upper code, put : if (handler == null) { if (Config.DEBUG) _log.fine("No item handler registered for item ID " + target.getItemId() + "."); } All errors will be shown only on debug.
  11. Epilogue patch notes : http://www.lineage2.com/epilogue/patch-notes.html Freya one : http://boards.lineage2.com/showthread.php?t=209953 If you talk about edit lvl etc, just edit npc 29176 (day) and 29022 (night) in npc.sql The level of Zaken should be raised to 83, but L2 databases show lvl 60. So you will have only custom data.
  12. Topic creator talk about L2J ideas, not about L2J complete server :). Don't worry about me, really :D. My 14 pages gameplay bible is fine for my server, and my second project got even a bigger one. I fully agree with you Fhinytau (it's for the @Triskel :D), but it's not a part of this discussion, except if you can modify commands to make them aion like (ZQSD). From the moment you have some limitations (client sided), you can't do so much. The best is still to use another game then lol :). And some "events" can be the center of a whole new gameplay. Just be creative :). An event isn't forcefully an event. The 7 signs is an event, but it's so melted in L2 than you don't even see it. Olympiads are too an event. From the moment there is a cycle, repetable to infinite or not, with winners/losers, and if possible with gift to reward people, this is an event. By events then, I didn't only talk about christmas trees, kill flying pigs with music hammer and spawn elpies in giran :). Well I guess you get my point. About attributes, a window which show current value could be usefull on IL, as there are no way to see it. It's really easy to do, something like a couple of hours. About others attributes or attributes system post IL, I disagree :). The attribute system from IL is enough, not need more, or need complete rebalance of buffs, blabla boring. Except if you want implement it on failed x5k rate with weapon +30, which is a fail about gameplay (as we talk about gameplay :P). But people like failed servers. Another question to ask to my dark gods...
  13. Well I don't think I will help a lot, I just confirm things :D. About 2 gameservers on the same loginserver, you just have to make gameservers use different port. http://l2jserver.com/forum/viewtopic.php?f=81&t=10976 About the revision, what do you try to do ? Revisions are by default different (for Interlude : 0x0102, for L2J last one before freya (epilogue ? I dunno the name lmao) : 0x0103). I don't want to say bullshit, but you tried to put 0x0104 ? It seems it's off the array. Try with 102 and 103, or any lower numbers. You shouldn't go out from the array. The error can be translated like that : The world is flat, and your caravel just jumped in the void. About WHY it doesn't allow highers numbers, if you have a translator nerd -> english, you can try to understand from that : public final byte[] readB(int length) { byte[] result = new byte[length]; for(int i = 0; i < length; i++) { result[i]=_decrypt[_off+i]; <<<<< error line } _off += length; return result; } Aka, I have no clue why it bugs, but it bugs :).
  14. It's not client mod related. In UseItem.java find // Items that cannot be used if (_itemId == 57) return; and make it like that (xxxx is your custom item ID which use your aion icon) : // Items that cannot be used if (_itemId == 57 || _itemId == xxxx) return; It should correct your problem.
  15. Hehe Sido, I had exactly the same feeling than you about the topic (aka he develop bad ideas and will keep good ones for him), so I just didn't bother, until you talk of me :p. Well you didn't have to make publicity about my concept server, but I appreciate you think I got decent ideas, even if I'm not so good you pretend :D. The problem of good ideas, they're often heavy and make the server only one way possible, and not another (aka faction server). ---- About ideas, you can try to invent a new event type. There are less than 10 differents in all. Just thinking of the concept will spend you some times. Remember some things can't be ported (or semi-broken) in some chronicles, as transform/untransform. It's the only good thing post-IL have on IL. ---- In the help section, someone is doing a code about stealing pvpkills when pvp occurs, and same code for monsters (earn pvpkills according to mob level). At default it's an "awesome" idea, it's still a fresh one. You can help him (but don't give him the final solution in one post, just work in paralel from him). Thread here : http://www.maxcheaters.com/forum/index.php?topic=186576.0 You have all concept, calcul part and even the code squeleton. ---- About the christmas event why not... I can't say it's a main feature, but it's still pleasing. Even if it's pretty heavy just for one season (christmas mainly), lol. ---- Someone have begun once time a project about dwarves spoil players (to pick adenas for example), but never finished. Can be a decent custom. I will add something like that in my server, even if it's not my top priority... ---- You can too search on others games. What have more wow/guild wars/lotro/etc than L2 haven't, excepting the main gameplay. Search just in special features of games, which make them unique :). As L2 is an asiatic MMO, all is basic, except graphic design :). PS : Currently, my project got only 1132 files (-200 files from the beginning), the last commit was 3 months ago, and the next commit is atm 2299 added / 3339 removed lines. Just to stay personal ideas are the longest to code :D.
  16. I think the 7th point isn't a real point... And I agree it means nothing for me too lol. What's "Order" refers to ? :) Have you tried to see ingame what happened ? I'm not a zone pro, but it should work with first 6 steps. Btw, before trying with a fish zone, try to make it an easier recognizable area type (like pvpzone). When you will enter in the zone, you will have directly a message like "You enter now in a combat zone", which is a easier way to see if your zone works or no. And as said in the guide, don't try with an admin character.
  17. Hi dude could you explain more about your problem and if you can use punctuation like . ; ? , that would be cool actually it is surely boring to read my own post so imagine your and you are the one who asks help consider giving more details about your problem like screenshots or whatever which could help because it's fine to help you but your problem isn't clear and mean nothing for people who never played to L2mafia I have to add stealing ideas from others servers is just lame and lack of imagination anyway good luck and dont forget to give more informations bb tyyyyy
  18. CPU usage 100%, you're focked something for sure, which make your server loading forever something. Problem is there are no real errors in your logs, so except if you find yourself or if you do a patch of the overall changes, we can't help you. Try to search in SiegeManager.java if you modified something. ---- You're right saying you need more ram, but you're wrong saying it's a normal thing :). Your server is flooded, loading a thing over and over, and grow in weight.
  19. It's related to your database, it's like if you had connections flood. Dunno if you modified something about load, but perhaps a connection isn't closed or something like that. It's pretty rare error, so...
  20. You have a simple error, you try to put a long into a int. Define _playerAdena as a long type (in PrivateStoreListBuy) : - private int _playerAdena; + private long _playerAdena; ----- Or modify getBuyStoreCurrency() method to be an int type (in L2PcInstance). - public synchronized long getBuyStoreCurrency() + public synchronized int getBuyStoreCurrency() ----- It's fully depends of the chronicle I think, if from basic you got an int type, an int type is enough. DON'T MODIFY BOTH CODES, YOU WILL HAVE EXACTLY SAME ERROR ELSE.
  21. Replace that : + if(getPvpKills() > 0) + { + int nameColor = Integer.decode("0x" + ColorNameManager.getInstance().getColor(getPvpKills(), true)); + getAppearance().setNameColor(nameColor); + } # + if(getPkKills() > 0) + { + int titleColor = Integer.decode("0x" + ColorNameManager.getInstance().getColor(getPkKills(), false)); + getAppearance().setTitleColor(titleColor); + } for + if(getPvpKills() > 0) + { + int nameColor = Integer.decode("0x" + ColorNameManager.getInstance().getColor(getPvpKills(), true)); + getAppearance().setTitleColor(titleColor); + } # + if(getPkKills() > 0) + { + int titleColor = Integer.decode("0x" + ColorNameManager.getInstance().getColor(getPkKills(), false)); + getAppearance().setNameColor(nameColor); + } There are 2 times the same code, so copy paste twice. If you fail... Just forget to develop. It's already very, very simple, and if you can't replace 4 lines alone, what will be next problem.
  22. Dunno if the instance engine is independent for each instances, but you surely to have delete the engine, or remove the instance from the instance engine. If there are no configs for it, it would mean heavy java modifications.
  23. I read your PM, all i can say is try it more :P. If you want to pay for something as simple as that, you should forget to develop at all. Plus, that won't correct your errors in your future programs. Why to give a man a fish when you can give him a polefish, well you got it. I agree there is some difficulties, but all my answers were helpfull and made 50% of the work (logical parts are made, you just have the copy/paste work). You are better than many of self-calling L2J developers aswell. Just try harder, and give me a decent code (even bugged, i don't care) but with all supposed checks made. Don't give me piece per piece, as I said it could make the thread 5000 posts. ---- And this null check about killer means : if L2Character killer is different of nothing. Your exemple is wrong in the way than the null check is useless, and you can have NPE error (when this check exists to avoid it). An NPE error occurs when the asking object (in this exemple, L2Character killer) is empty. It can happens very rarely (exemple, you disconnect, so instance doesn't exist anymore), but it can happens, and the result is a NullPointerException (aka a NPE). To avoid that, we check before all things if killer is null. If killer isn't empty, we continue the program, else we skip. Try to include too my last code as calculation method. You can compare with the existing files too. You have 12xx files to help you. Try to find another null check for killer (search tool for eclipse = ctrl+F), and see what happens in others files and adapt it for your case.
  24. If this npc instance is supposed to exist in your server (I mean, a "retail" spawn one), you can shift click on him to see his instance, after that you just have to create your custom npc and put it L2SomethingInstance (something = a rel thing of course) in his type. If you know only a name, you have to interrogate your database, npc.sql. This quest is post IL ? Never heard about a reputation quest... You can try L2VillageMasterInstance, as they are related to clan/alliance stuf...
  25. Reverse getAppearance().setTitleColor(titleColor); for getAppearance().setNameColor(nameColor); and the contrary as well. x2, so 4 changes in all.
×
×
  • Create New...