Jump to content

Tryskell

Legendary Member
  • Posts

    5,367
  • Joined

  • Last visited

  • Days Won

    68
  • Feedback

    0%

Everything posted by Tryskell

  1. As said roy.rm, you have to add 2 methods and one config. The 2 methods are located in L2PcInstance, and are named getSellStoreCurrency() getBuyStoreCurrency() You have to copy paste them. The config is just a variable initialization, find all occurences of STORE_BUY_CURRENCY in your epilogue pack. With those 3 errors corrected all errors will dissapear. PS : if a method disappear from a chronicle to a newer chronicle, it's 3 things : ----> name of method have been changed, even slightly ----> method have moved in another file ----> methods are supposed to be custom aswell, so your diff patch is bugged / misses some part of codes. Anyway, with what I said higher, you should be able to correct it.
  2. Well first do as I said, post a clean code and try to add ONLY the range check. I know (!(Util.checkIfInRange... is for range, but that doesn't have any relation with ToReward lol. I want to see how you include the check, I think you did one or 2 errors, and I perhaps know them. About the location of the check, take one minute to think. When do you want to verify the range ? "Only when I got a party" is a first point. Second point is "who is affected ?" Only the killer, or each member ? With those 2 questions you got the location.
  3. Some ppl (I don't want to name them, they got their own voodoo dolls on my desk) make me the remark the forum wasn't looking professional, and the publicity (because of free forum) sux (which I agree if you don't use the wonderful AdBlock Plus plugin of Mozilla FF). So basically Sido came to me to talk about that, and a new forum is made. More pro according to some. Link is here, and the main post is updated aswell. As Sido is noob :-X, the subdomain doesn't work right now. I will update topic if there's any change, but for the moment use this adress. You won't have to recreate account if you register now. The existing topics will be teleported.
  4. Take back your code of the 20th december, it was near all good. I don't get why you began to use ToReward stuff. public boolean doDie(L2Character killer) { if (!super.doDie(killer)) return false; L2PcInstance player = null; if (killer instanceof L2PcInstance) player = (L2PcInstance) killer; else if (killer instanceof L2Summon) player = ((L2Summon) killer).getOwner(); if (player != null) { int numberToAdd = (500/(player.getParty().getMemberCount())); broadcastPacket(new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL)); if (player.getParty() != null) { for (L2PcInstance member : player.getParty().getPartyMembers()) { member.setPvpPoints(member.getPvpPoints() + numberToAdd); member.sendMessage("You have earned " + numberToAdd + " PvP Points"); RaidBossPointsManager.addPoints(member, this.getNpcId(), (this.getLevel() / 2) + Rnd.get(-5, 5)); if(member.isNoble()) Hero.getInstance().setRBkilled(member.getObjectId(), this.getNpcId()); } } else { player.setPvpPoints(player.getPvpPoints() + numberToAdd ); player.sendMessage("You have earned " + numberToAdd + " PvP Points"); RaidBossPointsManager.addPoints(player, this.getNpcId(), (this.getLevel() / 2) + Rnd.get(-5, 5)); if(player.isNoble()) Hero.getInstance().setRBkilled(player.getObjectId(), this.getNpcId()); } } RaidBossSpawnManager.getInstance().updateStatus(this, true); return true; } Instead of int numberToAdd = (500/(player.getParty().getMemberCount())); write int numberToAdd = 500;. You will initialize it to 500. I explain why after. Now we have to change value on numberToAdd, right ? The value differs from if you got a party (numberToAdd divided by party members) or if you solo (numberToAdd). Again right ? So basically, we initialized numberToAdd with a fixed number, 500. Where to calculate this value for the team ? Logically, you have to put it after the party check. if (player.getParty() != null) { numberToAdd = (500/(player.getParty().getMemberCount())); The solo part will use the basic value, 500. So you haven't to change anything on it.
  5. build.xml. On eclipse, right click on it > run as -> ant build.
  6. As you know (and as the name of project suggests it aswell), it isn't the first IL fork. I don't want this project fails after 2 weeks because of bad organization. This is why in first time, I will be 'normally' alone, to give the way I want to the developement. Trusted people will come with time. As I said to Akken (via PM), there is a straight way to develop an IL server. The goal isn't to innovate, but to repair code with current L2J code. A massive but meticulous work of copy-paste, no more, no less. It's stupid to fix little things which will dissapear with a full rewritten code. I see big. ----- I make a little synopsis of what I have msging to a guy who proposed his time as developer. I search developers, but my criterias are higher than current projects. Basically, if you want to help to develop aCis, you can, and I will thanks you (frenchkissing o_o). But one step after another. First compile server, test, find bugs, and make patches about. You can post them on forum, and I can have an eye on your work, and about the quality too. With time, I will trust (or the contrary haha) you. So basically even thinking to help, you can fail to my criterias. This is an "inner-circle" type team, biggest circle represents all unknown people :). ----- As a project isn't only developers, but community, I need testers. More they are, more bugs are found, faster they are fixed. Sido is already on the "wishing list" for forum moderation if community grows enough, so don't apply for it please :). I talked with Sido about a new place for forum, which basically will be free of publicities. I will change links when time will come, but until the moment you can (and encouraged to) use the forum to report bugs. ----- I made some commits this night, the last have never been made on a IL fork from what I know (and sorry if I'm wrong, didn't test ALL CRAPPY FORKS :D). Ty all for posts, Tk.
  7. I profite about the number 15 commit to make a bump :). In program, full config refactor, and around 10 deleted configs. Think to update all your .properties files. Next commit tomorrow or in 2 days, full MMOCore refactor.
  8. Sethek shared between gameserver.properties and database.properties. Use a search tool next time, notepad++ is enough to scan a folder with a specific name (you could try with GameserverPort, InternalHostname etc). Btw you will have many problems with Archid, so just forgive it. This pack isn't finished and won't be finished according to Sethek words.
  9. I just reread your code, wtf are you using List<L2PcInstance> ToReward = FastList.newInstance(); int count = 500 / ToReward.size(); Drop the ToReward stuff, it's what it bugs. You initialize a FastList in a list, and divide this empty list from 500. Total illogismadnessupawesomerror. Just do as you did later about the number of party mmebers, I don't get this "new List feature" lol. ---- I don't think you understand you have to initialize the variable OUT of the for loop, but must add this variable INSIDE it aswell. And remove the CONTINUE after the "if" omg. Try to understand what you copy/paste. ---- Reread correctly all my posts, you have all answers. If you're blocked in a point I already talked sooner, you won't have any answer. Post back your code with error in the same post, that will avoid me to ask for error or for the code.
  10. You got a bug at L2Skill.getTargetList(L2Skill.java:1431) => method getTargetList at line 1431 According to message, it's about a use of L2ItemInstance, you can't use it in this (dunno what, no code) condition.
  11. You can create a new mob in npc.sql c/ping another existant template, and spawn instances of this mob with //spawn customIDofyourmob. Remember, the ID is unique to your mob, when the template have to be an existing mob.
  12. Links aCis forums aCis Discord channel aCis facebook page crappy YouTube channel Blackbird PTS informations Introduction aCis (acronym for "another CRAPPY interlude server") is a Java emulator, based on L2J work, focusing on Interlude chronicle. Project leader is named Tryskell. The project begun around december 2010, after the end of L2JArchid. At this moment, none European L2JIL pack was maintained. Particularities We focus about retailness ; a big emphasis is done to reproduce the good aspects of L2OFF behavior, using all informations we still have. The customs are dropped when not needed. It allows you to make WHAT YOU REALLY WANT, avoiding any conflict. The time saved not developing customs is fully used to enhance retail behavior. The pack is under a freemium concept, which mean you can contribute with money or with code, and get rewarded with latest sources access. Read the dedicated thread to understand the whole concept. Achievements Countless reworks have been done, but the biggest could be named as: XMLization of all static tables. Completion of quests under Java, with drop rates and behaviors checked using L2OFF. Rewritten AIs using L2OFF behavior. Numerous reworked systems : movement, duel, knownlist, retail-like spawn manager, admincommands,... 800+ reported bugfixes - without counting my own edits/fixes. Types of groups Supporters/donators have to be active to stay in sources. It doesn't have to be a particular amount, you just have to share from time to time *anything*. I don't accept anymore silent ppl. Only useful people will be kept. FREE USER Public branch is updated every year. The stability state isn't guaranteed - it is delivered "as it". Free users can access to the Discord channel to get support. Free users, even based on outdated branch, can contribute to project, and be rewarded for their work (see "Contribution" section). DONATOR You will be registered into the private Gitlab, for the time of your subscription. You will have access to specific forums boards, such as "custom" && "FAQ". I will give support for any retail issue you report, based on my own IRL timelapse / project handling. I don't busy about customs. If you contribute to project, you can be rewarded for your work (see "Contribution" section). SUPPORTER Free users, as Donators, can reach that status sharing enough bugfixes or contributing enough to the pack they're declared "essential". Main contributors are rewarded by "Supporter" status, they got a direct access to sources, to all boards and don't pay any fee. That access is maintained until they stop to contribute or contribution amount becomes too low. Cookies All your reports and shares (bugfixes) are counted as a CONTRIBUTION. Contribution is taken in consideration when your work is COMMITED, and is based on the complexity of the report/bugfix. The contribution system is visible on forums. A specific field, named "Cookies" was added. Cookies can be used instead of money, and is spent on a ratio 1:1 over either the initial Donator subscription (100 cookies) or to pay the monthly fee (10 cookies / month). If you stack up 12 free months, cookies are then translated as money reward (paid over Paypal). Ratios are as following : one report : 2 to 10 cookies, depending about the severity one bugfix : from 2 to 100+ cookies (from typos fix to complete reworks) Bounties & Bounty Hunters #bounties Discord channel allow you to deliver some tasks as a requested code for a fixed fee and based on a description. That fee is paid using subscription money. Any game feature or bug can be considered as a task. The priority is given to bugs generating instability. Tasks are defined by either me or Donators. The fee is paid only if requested code is committed and final part of the files. A variable part of the fee can be cut depending about how buggy the proposed code is. If the code is too buggy, it will be rejected. That fee can be either translated to : Supporter or a Donator with enough credits (> 12 stacked subscription months) : real money, payment is done using Paypal ONLY. Donator with good contribution background : Supporter rank. Other : cookies, which can be stacked and spent as a regular money-base upon initial fee or monthly fee. Any @@donator can actually use his own spent money to lead its own bounties. As an exemple, sending me 100€ as initial fee allow you to "spend them" on whatever task you want to be prioritized. Giving no direction means I can use them as I want. If multiple concurrent people deliver code for the same task, the less buggier version and the most "aCis-friendly" (documented code, using aCis standards, etc) version will be chosen. The only rewarded people will be the chosen code's author. In case multiple concurrent people propose identical solutions in terms of "code coolness" and "features", the first posted version got the priority. If multiple friendly people work together to propose a code, the reward will be splitted between authors. Define the % of authorship between yourselves. In order everyone works on the same stuff, and as L2OFF is as bad as L2J in terms of data stability, here's a unique source for data : https://drive.google.com/file/d/1bk1etsVeHsEdBmLhXd-6TKjKSTfzTWU-/view?usp=sharing In this zip, you will find following : AdvExt Setp2019 HTM folder AdvExt Setp2019 scripts folder (since L2OFF IL fstring.txt sucks ass, both IL and GF versions are added. L2OFF GF version must be used, since it's far better translated. Decompiled ai.obj for L2OFF IL Vanganth and L2OFF GF Price Joining donation: 200€ + 100 cookies, or 200 cookies This fee has to be paid if you are joining aCis project. Next month, and all other months, you will have to donate only basic monthly donation. Monthly donation: 10€ / 10 cookies This fee has to be paid every month. I reserve the right to refuse your private access based on any type of criterias. Once you donated, send me a PM on one of following platforms, I will manually setup your forum account : aCis forums, via my profile (send PM) MxC forums, via my profile (send PM) aCis Discord channel If your payment doesn't follow my conditions, I will return it back to you. Blackbird PTS aCis got its own Public Test Server, named Blackbird ! This server got the latest master branch pushed, and can also welcome experimental branches - in this case, special announcement is done on Discord. All accounts and characters got admin level. You can use //help ingame to refer to the admin commands and see what you can do. More infos can be found on both aCis forums and Discord about how to reach it.
  13. What doesn't work, be more accurate. Compilation ? If yes, give error. Ingame ? If yes, try to make your code talks for you, adding some player.sendMessage("Test to see if that work"); in good places (after each conditions).
  14. Archid is closed, and this rev 11 is the "free" version of it, which is fully bugged (but still have nice codes to ninja). Anyway, archid internal errors have nothing to see with compilation. So you should be able to compile fine, but will have errors ingame (like custom NPCs in giran, basic datatable item error, stuff added via enterworld,...). You really should forgive Archid, as you won't have any support for it. Try with another project. Well, I profite of this topic to begin my marketing campaign :P. Currently I work on my own IL project, aCis. It's L2J based, aim to correct IL lacks and will be free (both timeline/source). More infos here : http://www.assembla.com/wiki/show/acis_project As I'm working alone, I would be glad if someone can try to test it. You shouldn't have any problem, both of compilation and installation. About eventual ingame bugs or GS log bugs, I invite you to report on the forum shown in the wiki page. About L2Jfree, it can work, but you have to use Maven, not Ant (from what I rem of L2JFree).
  15. It's stupid, disconnect your box and reload, gg you got another IP. Hard is the time where IPs are dynamic :(.
  16. You have to add them, by default all types of scrolls (blessed, crystal and normal) have the same rate. You must edit config.java and requestEnchantItem.java requestEnchantItem.java (removed packages / open license to be more readable) - the code isn't from me, but from a distrib I got - I think you can c/p the overall code, if you don't trust me just verify, it's around the middle : public final class RequestEnchantItem extends L2GameClientPacket { protected static final Logger _log = Logger.getLogger(Inventory.class.getName()); private static final int[] ENCHANT_SCROLLS = { 729, 730, 947, 948, 951, 952, 955, 956, 959, 960 }; private static final String _C__58_REQUESTENCHANTITEM = "[C] 58 RequestEnchantItem"; private static final int[] CRYSTAL_SCROLLS = { 731, 732, 949, 950, 953, 954, 957, 958, 961, 962 }; private static final int[] BLESSED_SCROLLS = { 6569, 6570, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6578 }; private int _objectId; @Override protected void readImpl() { _objectId = readD(); } @Override protected void runImpl() { L2PcInstance activeChar = getClient().getActiveChar(); if (activeChar == null || _objectId == 0) return; if (activeChar.isProcessingTransaction()) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); return; } L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem(); activeChar.setActiveEnchantItem(null); if (item == null || scroll == null) return; // can't enchant rods, hero weapons and shadow items if(item.getItem().getItemType() == L2WeaponType.ROD || item.getItemId() >= 6611 && item.getItemId() <= 6621 || item.isShadowItem()) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); return; } if (activeChar.getActiveTradeList() != null) { activeChar.cancelActiveTrade(); activeChar.sendMessage("Your trade canceled"); return; } if(item.isWear()) { Util.handleIllegalPlayerAction(activeChar,"Player "+activeChar.getName()+" tried to enchant a weared Item", IllegalPlayerAction.PUNISH_KICK); return; } int itemType2 = item.getItem().getType2(); boolean enchantItem = false; boolean blessedScroll = false; int crystalId = 0; /** pretty code ;D */ switch (item.getItem().getCrystalType()) { case L2Item.CRYSTAL_A: crystalId = 1461; switch(scroll.getItemId()) { case 729: case 731: case 6569: if(itemType2 == L2Item.TYPE2_WEAPON) enchantItem = true; break; case 730: case 732: case 6570: if((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) enchantItem = true; break; } break; case L2Item.CRYSTAL_B: crystalId = 1460; switch(scroll.getItemId()) { case 947: case 949: case 6571: if(itemType2 == L2Item.TYPE2_WEAPON) enchantItem = true; break; case 948: case 950: case 6572: if((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) enchantItem = true; break; } break; case L2Item.CRYSTAL_C: crystalId = 1459; switch(scroll.getItemId()) { case 951: case 953: case 6573: if(itemType2 == L2Item.TYPE2_WEAPON) enchantItem = true; break; case 952: case 954: case 6574: if((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) enchantItem = true; break; } break; case L2Item.CRYSTAL_D: crystalId = 1458; switch(scroll.getItemId()) { case 955: case 957: case 6575: if(itemType2 == L2Item.TYPE2_WEAPON) enchantItem = true; break; case 956: case 958: case 6576: if((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) enchantItem = true; break; } break; case L2Item.CRYSTAL_S: crystalId = 1462; switch(scroll.getItemId()) { case 959: case 961: case 6577: if(itemType2 == L2Item.TYPE2_WEAPON) enchantItem = true; break; case 960: case 962: case 6578: if((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY)) enchantItem = true; break; } break; } if (!enchantItem) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); return; } // Get the scroll type - Yesod if (scroll.getItemId() >= 6569 && scroll.getItemId() <= 6578) blessedScroll = true; else for (int crystalscroll : CRYSTAL_SCROLLS) if(scroll.getItemId() == crystalscroll) { blessedScroll = true; break; } scroll = activeChar.getInventory().destroyItem("Enchant", scroll, activeChar, item); if(scroll == null) { activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS)); Util.handleIllegalPlayerAction(activeChar,"Player "+activeChar.getName()+" tried to enchant with a scroll he doesnt have", Config.DEFAULT_PUNISH); return; } // SystemMessage sm = new // SystemMessage(SystemMessageId.ENCHANT_SCROLL_CANCELLED); // activeChar.sendPacket(sm); SystemMessage sm; int chance = 0; int maxEnchantLevel = 0; if (item.getItem().getType2() == L2Item.TYPE2_WEAPON) { maxEnchantLevel = Config.ENCHANT_MAX_WEAPON; for (int scrollId : ENCHANT_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_WEAPON; break; } } for (int scrollId : CRYSTAL_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_WEAPON_CRYSTAL; ; break; } } for (int scrollId : BLESSED_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_WEAPON_BLESSED; break; } } } else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR) { maxEnchantLevel = Config.ENCHANT_MAX_ARMOR; for (int scrollId : ENCHANT_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_ARMOR; break; } } for (int scrollId : CRYSTAL_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_ARMOR_CRYSTAL; break; } } for (int scrollId : BLESSED_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_ARMOR_BLESSED; break; } } } else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY) { maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY; for (int scrollId : ENCHANT_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_JEWELRY; break; } } for (int scrollId : CRYSTAL_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_JEWELRY_CRYSTAL; break; } } for (int scrollId : BLESSED_SCROLLS) { if (scroll.getItemId() == scrollId) { chance = Config.ENCHANT_CHANCE_JEWELRY_BLESSED; break; } } } if (item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX || (item.getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR && item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL)) chance = 100; if (Rnd.get(100) < chance) { synchronized(item) { if (item.getOwnerId() != activeChar.getObjectId() // has just lost the item || (item.getEnchantLevel() >= maxEnchantLevel && maxEnchantLevel != 0)) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); return; } if (item.getLocation() != L2ItemInstance.ItemLocation.INVENTORY && item.getLocation() != L2ItemInstance.ItemLocation.PAPERDOLL) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); return; } if (item.getEnchantLevel() == 0) { sm = new SystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessageId.S1_S2_SUCCESSFULLY_ENCHANTED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } item.setEnchantLevel(item.getEnchantLevel()+1); item.updateDatabase(); } } else { if (!blessedScroll) { if (item.getEnchantLevel() > 0) { sm = new SystemMessage(SystemMessageId.ENCHANTMENT_FAILED_S1_S2_EVAPORATED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessageId.ENCHANTMENT_FAILED_S1_EVAPORATED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } } else { sm = new SystemMessage(SystemMessageId.BLESSED_ENCHANT_FAILED); activeChar.sendPacket(sm); } if (!blessedScroll) { if (item.getEnchantLevel() > 0) { sm = new SystemMessage(SystemMessageId.EQUIPMENT_S1_S2_REMOVED); sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } else { sm = new SystemMessage(SystemMessageId.S1_DISARMED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); } L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot()); if (item.isEquipped()) { InventoryUpdate iu = new InventoryUpdate(); for (int i = 0; i < unequiped.length; i++) { iu.addModifiedItem(unequiped[i]); } activeChar.sendPacket(iu); activeChar.broadcastUserInfo(); } int count = item.getCrystalCount() - (item.getItem().getCrystalCount() +1) / 2; if (count < 1) count = 1; L2ItemInstance destroyItem = activeChar.getInventory().destroyItem("Enchant", item, activeChar, null); if (destroyItem == null) return; L2ItemInstance crystals = activeChar.getInventory().addItem("Enchant", crystalId, count, activeChar, destroyItem); sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S); sm.addItemName(crystals.getItemId()); sm.addNumber(count); activeChar.sendPacket(sm); if (!Config.FORCE_INVENTORY_UPDATE) { InventoryUpdate iu = new InventoryUpdate(); if (destroyItem.getCount() == 0) iu.addRemovedItem(destroyItem); else iu.addModifiedItem(destroyItem); iu.addItem(crystals); activeChar.sendPacket(iu); } else activeChar.sendPacket(new ItemList(activeChar, true)); StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); activeChar.sendPacket(su); activeChar.broadcastUserInfo(); L2World world = L2World.getInstance(); world.removeObject(destroyItem); } else { item.setEnchantLevel(0); item.updateDatabase(); } } sm = null; StatusUpdate su = new StatusUpdate(activeChar.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad()); activeChar.sendPacket(su); su = null; activeChar.sendPacket(new EnchantResult(item.getEnchantLevel())); //FIXME i'm really not sure about this... activeChar.sendPacket(new ItemList(activeChar, false)); //TODO update only the enchanted item activeChar.broadcastUserInfo(); } /* (non-Javadoc) * @see net.sf.l2j.gameserver.network.clientpackets.ClientBasePacket#getType() */ @Override public String getType() { return _C__58_REQUESTENCHANTITEM; } } Config.java > Search existing enchant variables to find where to put it. /** Chance blessed-crystal enchants */ public static int ENCHANT_CHANCE_WEAPON_CRYSTAL; public static int ENCHANT_CHANCE_ARMOR_CRYSTAL; public static int ENCHANT_CHANCE_JEWELRY_CRYSTAL; public static int ENCHANT_CHANCE_WEAPON_BLESSED; public static int ENCHANT_CHANCE_ARMOR_BLESSED; public static int ENCHANT_CHANCE_JEWELRY_BLESSED; /** Chance blessed-crystal enchants */ ENCHANT_CHANCE_WEAPON_CRYSTAL = Integer.parseInt(otherSettings.getProperty("EnchantChanceWeaponCrystal", "100")); ENCHANT_CHANCE_ARMOR_CRYSTAL = Integer.parseInt(otherSettings.getProperty("EnchantChanceArmorCrystal", "100")); ENCHANT_CHANCE_JEWELRY_CRYSTAL = Integer.parseInt(otherSettings.getProperty("EnchantChanceJewelryCrystal", "100")); ENCHANT_CHANCE_WEAPON_BLESSED = Integer.parseInt(otherSettings.getProperty("EnchantChanceWeaponBlessed", "85")); ENCHANT_CHANCE_ARMOR_BLESSED = Integer.parseInt(otherSettings.getProperty("EnchantChanceArmorBlessed", "85")); ENCHANT_CHANCE_JEWELRY_BLESSED = Integer.parseInt(otherSettings.getProperty("EnchantChanceJewelryBlessed", "85")); others.properties # Chance a Crystal Enchant Scroll will succeed after safe enchant. EnchantChanceWeaponCrystal = 100 EnchantChanceArmorCrystal = 100 EnchantChanceJewelryCrystal = 100 # Chance a Blessed Enchant Scroll will succeed after safe enchant. EnchantChanceWeaponBlessed = 85 EnchantChanceArmorBlessed = 85 EnchantChanceJewelryBlessed = 85
  17. You have to test the range of each party member, so you have to test inside the loop. for (L2PcInstance member : player.getParty().getPartyMembers()) { if(Util.checkIfInRange(.... { member.setPvpPoints(me... } } You should check the checkIfInRange about the boolean in the method. checkIfInRange(Config.ALT_PARTY_RANGE2, player, member, true) As you can see, it takes a config range, the player loc, the member loc, and a boolean. Be sure what does this boolean. Just as security. I don't want to bitch, but you should have problem with your code if you haven't a party. Well, ok, RB can't be made w/o party, but imagine if a destro leave the party and kill the boss alone. Well, you guess it, the numberToAdd check about the member count of the party, but the party will be null. So normally you have a NPE error. Initialize numberToAdd without any values. int numberToAdd; if player.get.party != null ---------> numberToAdd = (500/(player.getParty().getMemberCount())); and for the "else" part ----------------> numberToAdd = 500 Put this just before .setPvpPoints methods. first part will look like that : for (L2PcInstance member : player.getParty().getPartyMembers()) { if(Util.checkIfInRange(.... { numberToAdd = (500/(player.getParty().getMemberCount())); member.setPvpPoints(me... } } Basically you don't even need to use "numberToAdd" for a single player. else { player.setPvpPoints(player.getPvpPoints() + 500); ------------ Remember the checkIfInRange is a boolean type. It returns true if it's in range, and false if not.
  18. I answered, the next part of my post was optional and reflected the talking voice in my brain. This is nothing about noob trolling, if you read my previous messages in help section (must be around 70%) you can be assured of my "skills". Sometimes, it's good to try to understand and think by yourself. It was the polefish part. What the use to give you answer if next time you can't deal with problem. Giving you METHODS to do it alone is : - 1st, more clever from us ; - 2nd, auto satisfaction if you can correct it alone ; - 3rd, make less stupid questions IN THE FUTURE. As it's a forum, all can read those methods and apply for themselves. If you don't like the polefish / fish, replace it with a silex / firecamp. Giving you fire won't help next time it will rain. ---- Sooooo, to add more consistency on my post because it's too much about morale => adapt current handlers to IL, and post problems if you have. But not before. You can search too from the logout() thing, which is perhaps bugged.
  19. I learnt the existence of actionShift with your thread (I dev only on IL), so I miss of study :). Anyway, it can only be some sort of restrictions. I don't know what is the actual accesslevel system in L2J, but in IL there was something like that. As you got only this problem with GMs, it can be related to "basic" accesslevel system. We eliminated all eventual problems : - the target check is the GM one, so normally works. - the html part have been replaced by a simple sendMessage. So basically, it can only be a shift restriction :).
  20. Never initialize a variable inside a (for, while) loop. if (player != null) { int numberToAdd = 500; broadcastPacket(new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL)); if (player.getParty() != null) { for (L2PcInstance member : player.getParty().getPartyMembers()) { member.setPvpPoints(member.getPvpPoints() + numberToAdd ); member.sendMessage("You have earned " + numberToAdd + " PvP Points"); RaidBossPointsManager.addPoints(member, this.getNpcId(), (this.getLevel() / 2) + Rnd.get(-5, 5)); if(member.isNoble()) Hero.getInstance().setRBkilled(member.getObjectId(), this.getNpcId()); } } else { player.setPvpPoints(player.getPvpPoints() + numberToAdd ); player.sendMessage("You have earned " + numberToAdd + " PvP Points"); RaidBossPointsManager.addPoints(player, this.getNpcId(), (this.getLevel() / 2) + Rnd.get(-5, 5)); if(player.isNoble()) Hero.getInstance().setRBkilled(player.getObjectId(), this.getNpcId()); } } And don't say "I got an error", send the error :p. I'm not 3 years old indian programmer genius. I want to add your code give 500 pvppoints to each member. It's not 500 points in total splitted in "x" party members. Well perhaps you know it, but better to say. PS :I reread your message, and it's what you were asking lol :). Check the xp/sp sharing system for party members, you have your answer here.
  21. I invite you to check L2JFree actual adminhandlers. It's stupid to answer you, as IL have never been finished. If you ask help for "that", what about geodata, zonemanager, punishement system, missing skills,... If you haven't the logic to think "L2J/Free actual code must be corrected nowadays, so I will pick an eye on it", well... I don't give a lot about the survivability of your project. Well your problem if you want post more errors bugs on this forum than try to correct it by yourself. And for eventual haters, he asks for "fix". This is "help" section, not "make my own pack" one. Give a man a polefish, blablabla...
  22. You're welcomed, post errors logs / actual code if you got problems :).
  23. On L2PcInstanceActionShift : public boolean action(L2PcInstance activeChar, L2Object target, boolean interact) { // Check if the player already target this l2pcinstance if (activeChar.getTarget() != target) { // Set the target of the L2PcInstance activeChar activeChar.setTarget(target); // Send a Server->Client packet MyTargetSelected to the L2PcInstance activeChar activeChar.sendPacket(new MyTargetSelected(target.getObjectId(), 0)); } // Send a Server->Client packet ValidateLocation to correct the L2PcInstance position and heading on the client if (activeChar != target) activeChar.sendPacket(new ValidateLocation((L2Character)target)); if (activeChar.isGM()) { IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler("admin_character_info"); if (ach != null) ach.useAdminCommand("admin_character_info " + target.getName(), activeChar); } else activeChar.sendMessage(target.getName() + " is a noob."); return true; } If that compile fine but don't work, consider there are somewhere restrictions. I moved the target check out of the GM one, because shift is both for players and GMs now. So keeping old structure will be redundant (must add x2 the same check both for players and GMs). If you can see a message with the target name, replace the message by your html. Btw, your html format is really strange. Check the NPC action shift one to see how they form it. Wel it's fine it if works like you did, but just use conventions they use :p.
  24. I have misread factionholder, my bad. Try replace the gm stuff in L2PcInstance for your html part. As Gm is working you will know if it comes form the structure of handler itself OR about what you try to call. So basically try as a GM to call the faction window. If it works, it's because of missing "targetting stuff" in your factionholder.
  25. I don't get why you delete the GM stuff, because it will make your code FAR simplier. if GM GM code else others guys After that, you recopy in the "other guys" this part of code about target check // Check if the guy already target this l2pcinstance if (activeChar.getTarget() != target) { // Set the target of the L2PcInstance activeChar activeChar.setTarget(target); // Send a Server->Client packet MyTargetSelected to the L2PcInstance activeChar activeChar.sendPacket(new MyTargetSelected(target.getObjectId(), 0)); } // Send a Server->Client packet ValidateLocation to correct the L2PcInstance position and heading on the client if (activeChar != target) activeChar.sendPacket(new ValidateLocation((L2Character)target)); And you complete with your code below...
×
×
  • 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