Jump to content

Tryskell

Legendary Member
  • Posts

    5,365
  • Credits

  • Joined

  • Last visited

  • Days Won

    67
  • Feedback

    0%

Everything posted by Tryskell

  1. What is supposed to be the error ? Any translator plox...
  2. Lol ? Have you read the totality of my message ? A boolean will have to return true/false, and why create a method about it ? Just add custom code in an existing zone, or create your own custom zone from a clean template. BTW if you want to add it on an exisiting event, give more infos, because adding it to an existing zone wouldn't be the best solution. Solutions are multiple, and the best one depends of what you need. So explain your case in totality.
  3. SQL part : http://www.maxcheaters.com/forum/index.php?topic=98212.0 More accurate about monster part (avoid to read the first topic) : http://www.maxcheaters.com/forum/index.php?topic=187184.0 ---- Custom mob instances part (perhaps you just want to change drops but else it's fine for any adanced idea you could have) : http://www.maxcheaters.com/forum/index.php?topic=186576.0
  4. From the moment you got BUILD SUCCESSFUL There are no real error, just warnings. BTW to fail a DP compilation you have to be pro, because there is nothing to compile, it's more a organization than a compilation. Yes about Pentium II, it was a joke :). 55 secs is more normal than 5min ^^. About svnversion, see my first post, search on google :P. But you haven't to busy as it doesn't influence the build.
  5. If it's an item which supposed to give a boost in xp rate, I guess you have to create an itemhandler with an onEquip method and using itemIDs and ItemType you need. Analyze others itemhandlers from datapack (after IL) or in core (before IL).
  6. Reading stickied topics on this board : http://www.maxcheaters.com/forum/index.php?board=37.0 If you're lazy just forget develop a server.
  7. You include a onEnter / onExit code in a given zone, or create a custom area. Basically it could be : protected void onEnter(L2Character character) { if (character instanceof L2PcInstance) { //register yourself in a town zone character.setInsideZone(L2Character.ZONE_TOWN, true); // if event up, make the sky red for all people in this area if eventIsInProgress put redsky } } protected void onExit(L2Character character) { if (character instanceof L2PcInstance) { //register yourself in a town zone character.setInsideZone(L2Character.ZONE_TOWN, false); // if event up, make the sky red for all people in this area if eventIsInProgress remove redsky } } Of course you have to code, as I take only exemple : // if event up, make the sky red for all people in this area if eventIsInProgress remove redsky
  8. Means what it means, build is successful. If you're really bothered with your error, type "svnversion" in google or edit your build.xml. I would be more bored about compiling time (5min to "compile" DP, you do it on Pentium II or what ?).
  9. It's between 4 and 6 lines fix. With configs, 10. PS : Dunno your chronicle, but I hope I will never find a server like your lol. Like if tanks were imba in pvp servers...
  10. Haha, funny : http://forum.ragezone.com/f325/damage-gets-drops-635769/ I didn't analyze this one, but if this is the same thing, you have to study the way of shared XP (when you kill a mob). The mob give xxxxx XP amount, but XP is shared equally to damage inflicted. Must be something similar, except instead cutting total damages in little portions, you have to pick up the biggest little portion and put the drop true for him. Dunno if it's really clear, but anyway House code was experience, and it still isn't implemented on regular L2J (anyway, it isn't on DropProtection.java). Search on L2J forum, because if you think House posts here, you're wrong :P.
  11. Try to find if there isn't another fresh update, this one is around 6 months ago. BTW, code is from Dr House, the guy just reshared it.
  12. Link 1 download an "archive.exe", which isn't the expected file (surely a virus). Link 2 is broken link. Enjoy.
  13. AutoAccount off ? You try to login, but have you first created your account ? Verify if your account is created first (accounts table), else you have perhaps entered a wrong password in creation and thought you entered another. I suggest you to delete your account and recreate another. If it was a bad chronicle client, it would says than the revision protocol is wrong.
  14. When come this error ? At GS load, or when you try to use this NPC ? Basically it's a connection you forget to close. The bad thing is you have no help about failing line. I would search around here, where all connections are supposed to be closed : try: pvps.close() pks.close() pvprs.close() pkrs.close() con.close() except : pass I have no clue how works Python, well try to check how works others scripts which use SQL stuff.
  15. MMOCore is apart of L2J project : I have no idea where the project can be found (didn't search), but you have to compile it anew and change the jar file stored in lib folder of your L2J project. By default when you svn a L2J project, the mmocore is already compiled and you nearly don't need to modify it, so MMO project isn't svned. I hope it was the question o_o ?
  16. Well, this is work for sure :D. First you should make a diff patch right now before doing all those things. You will have a secured copy of your work, if you fail in the future (like, a BIG fail) you would be happy to find a fresh clean custom code to apply it easily on a fresh L2J copy. You would be happy to know than my first project have failed because I hadn't any copy (around 1 month of work). About NPC exchanger, I made one for my personal project, and which trade custom karma value for AA. So it's doable and I could help you when you have code. Ofc it's a new instance, you can name it L2PvPExchanger. About party support, you will have to rewrite both your L2PcInstance and L2PvpMobInstance custom codes. The goal is to first pick up the L2PcInstance, second is to pick the party of this L2PcInstance (or the party of the summoner's owner), and third to share experience / pvp points between them. About sharing pvp points, you have to use for. I'm too interested by this point, because I got others things to think about my project actually and I never checked it in depth. Teleporter is the easiest thing. Instead of adena check, you put a getPvpKills check. Still, you have to create a new instance as L2PvpMob one. Would be L2PvPTeleporter, based on a clean copy of L2Teleporter.
  17. Check Paagrio's Fist, it's suppose to heal CP and put a buff on you too.
  18. Well done :) You saw, it was easy. Remove both { }, it's used only if there was an if before. You should declare numberToAdd in the top of the file too, but there is no real problem. It's just a convention. int numberToAdd = 0; Complete code : package com.l2jserver.gameserver.model.actor.instance; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Summon; 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; L2PcInstance player = null; int numberToAdd = 0; // 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 numberToAdd = (getLevel()-79)*2; // add the custom calcul result to the player total pvp points and send a message player.setPvpPoints(player.getPvpPoints() + numberToAdd); player.sendMessage("You have earned " + numberToAdd + " PvP Points"); } } return true; } } -------- About if, while, for, etc : When you have only one thing, you can forget using {} : if (killer instanceof L2PcInstance) player = (L2PcInstance) killer; else if (killer instanceof L2Summon) player = ((L2Summon) killer).getOwner(); The next code is the same, but for me it's harder to read and very long : if (killer instanceof L2PcInstance) { player = (L2PcInstance) killer; } else if (killer instanceof L2Summon) { player = ((L2Summon) killer).getOwner(); } The use of {} is needed when your if got many results. You can't remove them else it will bug. ---- After all that, you can propose to make a diff patch about your work, in the developement section. Use [sHARE] as tag :).
  19. No infos about (chronicle / pack), no explained problem, post title too much generic. Explain that or just code it yourself. Boring to repeat each time the same things. Topics like that should be deleted without warning. I invite you to read section rules http://www.maxcheaters.com/forum/index.php?topic=76581.0
  20. It can come too from L2JBrasil. Many IL packs got more bugs than corrected ones you know. Packs add bugs when it should be only fixes. Anyway. I could say to upload your SiegeManager and Siege files, but better ask directly to them. I have no idea if it's only sieges related or if the bug happens during sieges stuff BECAUSE OF something bigger. If you put fresh configs files, it shouldn't be configs then... Try with a full fresh L2JBrasil pack, if you got exactly the same problem, consider change of pack. I lack of ideas, sorry.
  21. 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 ?
  22. 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.
  23. 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.
  24. 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.
  25. 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 ?
×
×
  • 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