Jump to content

Tryskell

Legendary Member
  • Posts

    5,365
  • Credits

  • Joined

  • Last visited

  • Days Won

    68
  • Feedback

    0%

Everything posted by Tryskell

  1. 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...
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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...
  7. Reverse getAppearance().setTitleColor(titleColor); for getAppearance().setNameColor(nameColor); and the contrary as well. x2, so 4 changes in all.
  8. You don't specialy need to create a void method addPvpPoints neither :P. Try to complete/correct all checks first. It's like my last post was nothing :'(. Try to post when you think you completed all, we will correct together. Because if I correct each time you post, this topic will be 1000 pages long :D. Before L2PcInstance player = null;, you have to put the // check if the killer is different of null (to avoid NPE error) + the check ofc... I prefer say that if you think adding only the comment.. About the mob lvl calcul you don't need nothing special more than doing : numberToAdd = (getLevel()-79)*2; And add numberToAdd to pvp total of "player", like you did in your player vs player code. I don't get why you do 500 methods :P. Circling the calcul, you only have some checks to made, and I put them all in //comments.
  9. This is the dog which eats his tail, but : You have to adapt events to your chronicle, no other way.
  10. Search in sticky topics or in collections ones, people like do collections dunno why, but at least tkey keep links "alive". It's not possible all links are deads.
  11. Erm, sometimes people doesn't give enough informations, but you, you give too much lol. What's the finality of your NPC ? Don't bother with what he was before, just explain what he must do.
  12. Well, it's the begin... I won't cry for now :P. All my comments are right, so if there is an "if", be sure to make a "if" check :P. I refer to : L2PcInstance player = null; Which isn't a check at all :P. The concerned check is a check on killer. But you're right, you have to initialize a L2PcInstance type (could be the same name, killer, but player is fine as well). You're right about the summon check, good hit :). My imbricated "if" example was AN EXEMPLE, don't use it. Just inspire from it. The good path to follow is the commentaries one, coded just top of the if example. When you do a commentary do like that : //A commentary if blablabla { //result result } Using tabulations. Because the code you show is perfectly messed in presentation and pretty hard to read. I made efforts in my last post, do the same :P. What about the GetParty ? You hope to share pvp points between party members ? The idea could be good if it was xp, but pvppoints... Lol :). Except you got another idea, you haven't to use it. I let you time to upload a decent code ^^. And take care about { }, you miss some.
  13. Sry to say that, but Is the normal way. Except if you have a population of 5000 players with 1000 GMs, I don't see the problem. In the normal way, you edit accesslevel of only GMs. So 1 number for admin, 1 other for each GM. What's wrong ? ---- Btw, I just saw that : I am thinking of running an Interlude GM Server What's supposed to be an "Interlude GM Server"...? If it's supposed to be players got some GM powers, refers to myself : And instead a 0 in accesslevel, put a 75. ---- as DarkKnightCZ said, you got too normally sql about accesslevel. If not, it's java part. You will have to change accesses too to differenciate admins, gms, and semi-gms (players).
  14. Well, I don't think you understand how the whole thing works, so let's explain some things, even if that goes beyond X-Files and Mulder + Scully must search me atm :). ---- This instance is specially made for your mob. Other codes made for the old particular instance (here, it's L2Minion) have to be deleted or corrected. We take L2Minion because of the pre-made template, and we delete all others things in. That's all. ---- Second thing you have to understand, an instance IS the thing the instance is created for. Why I say that, it's because you have to put yourself in the point of view of the instance. Here you have to think as a L2PvpMob. It's surealist, but good question could be : "why I exist ?". Good answer : "To reward players with pvp points when I die." I said to you about X-Files, aren't you ? :D ---- Third thing for you to understand it's all about variables. Some variables are taken from others java parts. You have to do the inventory about what you got on your instance, and use it as tools. ---- Ok, I stop saying bullshit now, you must be already sleeping on your keyboard. Let's take all points one by one. From your code, you have first to delete things which are useless. It will make your code easier to read, and easier to find bugs if there are. The @Override means this method already exists in the main model this instance inherits for (in this exemple, your L2PvpMob inherits from L2MonsterInstance because of the extends, public class L2PvpMobInstance extends L2MonsterInstance and use your method written in L2PvpMobInstance instead of the super model one (which is, I hope you follow, the L2MobInstance one). You have to keep only the doDie override method. Shorter version = main method + override = override. The main method is pushed out by your custom one. Secondly, in the L2MinionInstance code, it's normal there is a master, as a L2Minion is nothing without a master. You already played to L2 aren't you ? So delete all things related to master too, we aren't a L2Minion anymore, but a proud L2PvpMob. NOTE ABOUT THE CLEAN ON IMPORT PACKAGES. As we don't need the OnSpawn override, near all old imports are useless. Imports don't count at all in your compiled project, but it's more cleaner like that. NOTE ABOUT COMMENTS. Comments are cool, but not-related ones are hell. Clean or modify useless/outdated comments, it can save you some minutes in the future. As 1 + 2 are clean related, I made only one code part : package com.l2jserver.gameserver.model.actor.instance; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.templates.chars.L2NpcTemplate; /** * This class manages special pvpkill rewards mobs. */ public class L2PvpMobInstance extends L2MonsterInstance { public L2PvpMobInstance(int objectId, L2NpcTemplate template) { super(objectId, template); setInstanceType(InstanceType.L2PvpMobInstance); } /** * 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; return true; } } See how the code have been reduced ? The code upper is supposed to work as a L2Monster, with a custom doDie method. I don't know L2J higher than IL, as I work only on it, so if you have problems with setInstanceType(InstanceType.L2MinionInstance);, please send an error report or try to correct it. ---- Second part was a part of clean, but it's a part of creation too. The question is : "How to give to player an amount of pvppoints, as the mob haven't this feature ?" I already answered higher, saying something about mob lvl :P. So why do you try to copy past your old code ? Ofc it will bug. As you tried to do it, it's related on the doDie method. The doDie method says : if I die, what I (the current instance, so see from the PoV of a L2PvpMobInstance)'m supposed to do". ---- Third about the variable stuff. We have to exploit possibilities we have. @Override public boolean doDie(L2Character killer) { if (!super.doDie(killer)) return false; return true; } What do you understand from that ? 1 - it's an override method, so a main method exists. Basically if you change the supermethod, your custom mob won't be affected. 2 - (L2Character killer) is VERY important. It significates : when I die, I remember the L2Character which killed me. A L2Character is many things, but mainly players and summons. If you open L2Character, you know more about it : /** * Mother class of all character objects of the world (PC, NPC...)<BR><BR> * * L2Character :<BR><BR> * <li>L2CastleGuardInstance</li> * <li>L2DoorInstance</li> * <li>L2NpcInstance</li> * <li>L2PlayableInstance </li><BR><BR> Currently, L2PlayableInstance is the main class of L2SummonInstance and L2PcInstance. ---- Now about your custom code : you will have to interrogate killer. As killer is a L2Character, you will have to transform it to a L2PcInstance at one point of your code. Try to find codes which do that, they are a lot - do a search with (L2Character). as killer can be many things, you have to make checks (NPEs checks, but too others checks if L2Character is related more than summons and players). As example, if the killer is a L2Summon, it's stupid to give pvpkills points to the summon, so you have to redirect points to summon owner. as there are no pvp points on the mob, you have to use a custom calculation. So find how to get the mob level instead (anywhere in your java project). Many, many things already exists. If I want to poke you, I could say you don't have to code anything, because all is already existing. You have to read existing circumpstances to make your own circumpstance. How work the system if a player is killed by a summon ? You got the summon -> owner redirection here. Think like that for all, and little by little you will have all pieces in your pocket. ---- Basically your code would be like that. You can keep the comments to help you, and code between it. @Override public boolean doDie(L2Character killer) { if (!super.doDie(killer)) return false; // check if the killer is different of null (to avoid NPE error) // check if the killer was a player or a summon // if killer is a summon, redirect to a L2PcInstance type // do a custom calcul using mob level // add the custom calcul result to the L2PcInstance total pvp points // if killer is a player // do a custom calcul using mob level // add the custom calcul result to the L2PcInstance total pvp points return true; } FOR EACH IF, YOU GOT AN IF { LOWER LEVELS COMMENTS }. So yeah, you will have imbricated "if" statements. Example below if { if { if { } } if { } }
  15. I talk of pvp in low rate type. Archers Daggers Mages Healers Tanks Dwarves (they got 3 skills : stun, craft/spoil and their emote dance). ---- In high rate the solution is simplier : archers / daggers mages healers Other classes are often disbalanced, so unplayable.
  16. Many players (i'm the part of it) are stucked to IL because this is the last "not Aion" chronicle, after IL, it's not even L2 anymore, it's a pre-Aion like. PvP in IL is far funnier than Aion, and believe me or not, Aion is more disbalanced than L2. About new skills etc, why to add new skills in L2, when 30 to 60% on some classes aren't used. L2 nowadays is a sort of Aion, and this is the main error. They create contents because their servers are full of high lvl players. I don't even talk of heretic things from Freya, like low lvl areas becomes high lvl. Or kamalols. Anyway, in L2 IL you still can have massive amount of fun, all depends of the balance the server owner will made. And this is the main point, because even low rate, there are balances to do, and many things to correct because IL chronicle have never been finished correctly. On a x5 server, you can have around 1y playtime before get bored, without any customs from server devs. And death to all x5k rate with stuff +25. They missed something.
  17. Ask a magical wand for Christmas. What about revision/chronicle/pack ? ---- 1 - Check another datapack about "antqueen.py". 2 - No clue what is it, mmocore fails. 3 - Missing NPE check on useAdminCommand method from AdminSiege. 4 - Missing NPE check, check an updated version of "PartySmallWindowAll" to see if they corrected it. 5 - o_o 6 - Ban the cheater, with a name like that he can only be created for cheats purpose. 7 - Missing NPE check on "MonsterKnownList" in removeKnownObject method. ---- Btw what about those unknown source, can't see right line so... ---- NPE checks are supposed to be things like : if (something == null) or if (something != null)
  18. You have to adapt events to your chronicle, no other way. I would like an Interlude server with all third skills, geodata and balanced low rate faction server, but unfortunately, no one made the patch so I have to develop it since 5 months.
  19. If it's last L2J rev, just make a ticket on their website, it would be more helpful. And wait a fix, I don't think it's MxC to fix L2J errors :P. + It's normal to have those types of erros from a new chronicle...
  20. From what i tested from L2J Archid standard version it's a normal error, and from the moment Sethek doesn't continue Archid, you can give up this pack. Btw, this isn't the only bug. So just give up Archid standard, it's not finished (from Sethek words). I don't say that because I'm an evil hater, I myself made my own server on L2J Archid, simply it's the old project which is far more stable. Just go in Giran in Archid standard to see it's full of customs. It's supposed to be custom items from what I saw, which has been removed on the Premium -> Standard port. ---- As I'm not a bitch : Any newbie items are given through database, on the "char_templates" table, last rows are item1, item2, etc to 5. If not, Sethek coded it another way, and it's boring to search.
  21. Well, the way I said is far easier than trying to make weapons giving pvp... Just copy/paste L2MinionInstance, you rename it, you delete code inside (just keep the doDie override method) and put your custom code when a mob die. Once coded, the only thing you have to do is to create mobs in your database with your custom name instance (like L2Minion dpeends of L2MinionInstance, etc), and to //spawn ingame. I don't get how to code weapon could be easier neither, anyway, gl with it. If you don't like L2Minion, just pick up another. What's your errors and mainly, what are you trying to do ?
  22. L2SummonAI about summon behavior, else you can force the unsummon of the summon when the summoner die (in the doDie method, L2PcInstance). As cubics are unsummoned when you die, you can do the smae for summons.
  23. I don't get your problem, if you put EverybodyHasAdminRights = false, it gives rights only for >0 access (aka gm/admin). You don't need anything more. If you want absolutely your chars got access lvl 75 you have to edit java file around the part the character is created and stored in database. But it's totally useless, considering banned got negative number, players got 0, GMs got a number between 1 and 99 and admin got lvl 100. Why reinventing the system ?
  24. You can create a complete new mob type, like L2FarmZoneMobInstance, depending of the L2MobInstance. On your datapack, copy paste a mob and instead of L2Mob type it will be a L2FarmZoneMob. Well you got the idea. Check L2Minion for example, it's a class who inherits caracters from L2Monster, L2Monster inherit from others classes too etc etc. About the calcul to have pvppoints : take the result number of the difference between the mob level - 79, and multiply it by 2. (mobLevel - 79)*2 lvl 80 = 80-79 = 1*2 = 2 lvl 82 = 82 - 79 = 3*2 = 6 Well my exemple doesn't follow your logic suit, but else you have to do an exception for lvl 80, and others lvl can be calcultated automatically. If > 80 exception to the rule else normal calcul
  25. TheMental is right, you forget to put the NPCID of your NPC in the related file. For example you create a new Npc for clan.alliance stuff, which is supposed to be ID 49000, he is L2MasterVillage etc etc. But same problem than you, because he won't have his ID in the quest. So :
×
×
  • 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