Jump to content

Kyboi

Members
  • Posts

    10
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About Kyboi

Profile Information

  • Gender
    Male
  • Country
    Chile

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kyboi's Achievements

Apprentice

Apprentice (3/16)

  • Collaborator Rare
  • First Post Rare
  • Dedicated Rare
  • Conversation Starter Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. What column though? I know there's a column for the P.Atk of the weapon but that's just for the base P.Atk, and my problem is for the weapon P.Atk after its enchanted. example: Base weapon P.Atk is 100, so weapongrp.dat has 100 on the patk column for that weapon, an enchant gives +3 P.Atk, so now in game I have a +1 weapon with 103 P.Atk But I modified the amount of P.Atk that the enchants give, so the weapon's base P.Atk is still 100, when enchanted it gives 105 P.Atk, but the game is still showing 103, that's why I think there should be something else that takes care of doing the "calculation" of the P.Atk added by enchants
  2. Hi, I changed the amount of P.Atk/P.Def/M.Atk/M.Def given by enchants in the core, however in the game when I enchant an item it still shows the P.Atk of the item as it had the old bonus, ex: Base Samurai Longsword's damage is 156, each enchant gives +3 P.Atk to a One-Handed sword so a +3 Samurai Longsword shows 165 P.Atk I changed the P.Atk that each enchant gives to +5, so a +3 Samurai Longsword should show 171 P.Atk, but the game is still showing me 165 Does anyone know where its located the file that I need to modify in order to make the game show the proper stats of the item? I tried looking in all the files of the system folder that I could with no success Thx in advance
  3. Are there any servers or customers using this at the moment? I'm interested but $300 is a lot (which I know that L2 related stuff is expensive anyway) so I'd like to test and experience the interface before making a decision
  4. Hello, I searched on the forum and this was asked before but with no answer I know that on itemname-e you can choose between 4 different colors (gray, white, purple and yellow) depending on the number you set, numbers above 3 don't affect the color, however I saw a video with the item with a different color (on the pic) As you can see the item has a blueish color on the name, that pic is from a video showing the L2Aqua interface, I don't plan on adding the interface or anything but that pic makes me think that its actually possible to have more than 4 colors for the names Has anyone solved the way to do it?
  5. I made it, the error was being caused by the way the L2RecipeList parsed the xml, I fixed it by making a dupe of the boolean for the "productionRare2" function, the final result is: L2RecipeList.java: RecipeData.java: RecipeController.java: Of course I had te declare the boolean on the RecipeData.java: I tested it and its working
  6. If I try with that only (only by adding that to RecipeData.java and not modifying L2RecipeController.java and L2RecipeList.java) then I don't get an error but the masterwork system stops working entirely (only base item ID results from the production) Ah that was only for example purposes, I have the proper item IDs on the recipes.xml file (currently using samurai longsword to test): <item id="246" recipeId="2353" name="mk_samurai_longsword" craftLevel="6" type="dwarven" successRate="100"> <ingredient id="2115" count="11" /> <ingredient id="1891" count="3" /> <ingredient id="1890" count="82" /> <ingredient id="1888" count="41" /> <ingredient id="5220" count="164" /> <ingredient id="1459" count="410" /> <ingredient id="2131" count="248" /> <production id="135" count="1" /> <productionRare id="135" count="2" rarity="30" /> <productionRare2 id2="204" count="1" rarity2="30" /> <statUse name="MP" value="165" /> </item> Maybe the problem is not on RecipeData.java but in one of the other 2 files: L2RecipeList.java: I tried adding it like this: if (haveRare) { _rareItemId = set.getInt("rareItemId"); _rareItemId2 = set.getInt("rareItemId2"); _rareCount = set.getInt("rareCount"); _rarity = set.getInt("rarity"); _rarity2 = set.getInt("rarity2"); } And with that I get the error on the console, I think here is where the problem is (because it points to this line in the console) RecipeController.java: I tried by adding stuff here too with no luck, my guess based on the error given by the console is that I have to preperly add the stuff to L2RecipeList so it doesn't return an error and start working from there
  7. The error on the console is definitely coming from the core, I tried running the server with no modifications on the xml and xsd and still get the error, and running the xml and xsd modificated but with no modification in the core results in no error but ofc the crafting works like vanilla The only different scenario is when I modify the xml and xsd to: and In which case I get the error for not being able to load the file: [17/05 08:31:24] RecipeData: Could not parse file recipes.xml java.lang.NullPointerException at com.l2jserver.gameserver.data.xml.impl.RecipeData.parseDocument(RecipeData.java:178) at com.l2jserver.util.data.xml.IXmlReader.parseDocument(IXmlReader.java:185) at com.l2jserver.util.data.xml.IXmlReader.parseFile(IXmlReader.java:89) at com.l2jserver.util.data.xml.IXmlReader.parseDatapackFile(IXmlReader.java:63) at com.l2jserver.gameserver.data.xml.impl.RecipeData.load(RecipeData.java:57) at com.l2jserver.gameserver.data.xml.impl.RecipeData.<init>(RecipeData.java:50) at com.l2jserver.gameserver.data.xml.impl.RecipeData$SingletonHolder.<clinit>(RecipeData.java:280) at com.l2jserver.gameserver.data.xml.impl.RecipeData.getInstance(RecipeData.java:272) at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:228) at com.l2jserver.gameserver.GameServer.main(GameServer.java:617) Which is kinda obvious since "rarity2" and "id2" are not in the core part. I've been trying duplicating and moving things around in the core but the most I've achieved is that I can get the "second" rare to work, something like if I have recipe for item A, productionRare is B and productionRare2 is C, then A and C work, I haven't been able to make both rares to work at the same time The problem is that I don't quite understand how the whole system works, and since I don't know much java I'm trying to figure things out by logic but this case isn't as obvious as some other stuff
  8. Hello, I want to add an option to have the chance of 2 different masterwork items when crafting something (for example when crafting Vesper Helmet having the chance of getting the normal item, the masterwork item and the chance of getting a custom masterwork one) Something like this: I don't know much about java but I've made things by looking at others stuff that works similar and copying/adapting, this is what my RecipeData.java looks like: But when I start the server I get the error on the pic Any ideas of what is wrong?
  9. I made a stat that increased Drop chance/amount, you can add that stat to items, skills, etc. Post your drop related files (all multiplierstrategies.java) to see if its compatible with the one I made (I use l2jmaster files)
  10. Hello, I'm having a problem with my drop rates, due to the high amount of loot that Champions give I made it so that non-stackable items drop on the ground (since going over 500 items in the inventory disables a character), the problem is that in the long run sometimes Champions dropped hundreds or thousands of non-stackable items on the ground, causing massive lag, lowering the drop rate/chance isn't a possibility since that would mean massively decreasing the chance of item to be dropped from a regular mob, to solve this I just set the MultipleItemDrop config to False, with that only 1 item is created if the item is non-stackable HOWEVER the problem is that now whenever I'm doing a quest and the NPC gives 2 or more items of the same ID (like the Spirit of Mirrors quest in the Human Village) I get only 1 instead, making the quest impossible to complete, I went into the core and noticed 2 variables affected by the MultipleItemDrop config: dropItem and addItem, I thought that maybe creating a new config and separating both would solve the problem, and it did, but after that if someone logged out while having equipped any item other than NG then the character would be unable to enter again, and a massive error appears on the console when someone tries to login said character, the error was basically StackOverflowError which with my really lacking knowledge of java it means that something is on an infinite loop With that situation happening I think that now my safest option is to just limit the amount of items dropped on the ground, how can I do this? here's the code for the item drop: public L2ItemInstance dropItem(L2PcInstance player, int itemId, long itemCount) { L2ItemInstance item = null; for (int i = 0; i < itemCount; i++) { // Randomize drop position. final int newX = (getX() + Rnd.get((RANDOM_ITEM_DROP_LIMIT * 2) + 1)) - RANDOM_ITEM_DROP_LIMIT; final int newY = (getY() + Rnd.get((RANDOM_ITEM_DROP_LIMIT * 2) + 1)) - RANDOM_ITEM_DROP_LIMIT; final int newZ = getZ() + 20; if (ItemTable.getInstance().getTemplate(itemId) == null) { LOG.error("Item doesn't exist so cannot be dropped. Item ID: {} Quest: {}", itemId, getName()); return null; } item = ItemTable.getInstance().createItem("Loot", itemId, itemCount, player, this); if (item == null) { return null; } if (player != null) { item.getDropProtection().protect(player); } item.dropMe(this, newX, newY, newZ); // Add drop to auto destroy item task. if (!Config.LIST_PROTECTED_ITEMS.contains(itemId)) { if (((Config.AUTODESTROY_ITEM_AFTER > 0) && !item.getItem().hasExImmediateEffect()) || ((Config.HERB_AUTO_DESTROY_TIME > 0) && item.getItem().hasExImmediateEffect())) { ItemsAutoDestroy.getInstance().addItem(item); } } item.setProtected(false); // If stackable, end loop as entire count is included in 1 instance of item. if (item.isStackable() || !Config.MULTIPLE_ITEM_DROP) { break; } } return item; } And the code for the itemdrop on L2Attackable.java: public void doItemDrop(L2NpcTemplate npcTemplate, L2Character mainDamageDealer) { if (mainDamageDealer == null) { return; } L2PcInstance player = mainDamageDealer.getActingPlayer(); // Don't drop anything if the last attacker or owner isn't L2PcInstance if (player == null) { return; } CursedWeaponsManager.getInstance().checkDrop(this, player); if (isSpoiled()) { _sweepItems.set(npcTemplate.calculateDrops(DropListScope.CORPSE, this, player)); } Collection<ItemHolder> deathItems = npcTemplate.calculateDrops(DropListScope.DEATH, this, player); if (deathItems != null) { for (ItemHolder drop : deathItems) { L2Item item = ItemTable.getInstance().getTemplate(drop.getId()); // Check if the autoLoot mode is active if (isFlying() || ((!item.hasExImmediateEffect() && ((!isRaid() && Config.AUTO_LOOT) && (item.isStackable() || (isRaid() && Config.AUTO_LOOT_RAIDS)))) || (item.hasExImmediateEffect() && Config.AUTO_LOOT_HERBS))) { player.doAutoLoot(this, drop); // Give the item(s) to the L2PcInstance that has killed the L2Attackable } else { dropItem(player, drop); // drop the item on the ground } // Broadcast message if RaidBoss was defeated if (isRaid() && !isRaidMinion() && (drop.getCount() > 0)) { final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_DIED_DROPPED_S3_S2); sm.addCharName(this); sm.addItemName(item); sm.addLong(drop.getCount()); broadcastPacket(sm); } } } } Thanks in advance
×
×
  • Create New...