Everything posted by Tryskell
-
[Help?]Is there any complete decompiler for .class files?
Rename a .jar to .zip. Dezip it after. After that all classes are able to be seen with a decompiler. I don't think you can reverse engineering the totality of a source without handmaded work. I'm perhaps wrong as I used only one free decompiler to see L2J 0.4.1 source code. Some parts of code were just off the main classes. I have to add different decompilers don't give the same result http://stackoverflow.com/questions/3898391/choose-and-test-java-decompiler
-
[Help] Pvp points from Mobs
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE2, player, member, true)); Try to explain with words what does this line. Explain all, variables, [glow=red,2,300]symbols[/glow] (one word is important in this post). Basically, your code is good, but you do a mistake. Check again the important word of the post. Another thing I can say to help you. Basically, the code works if you're FAR but not if you're NEAR. It means the range checker works (if it wasn't working at all, you will never have points in party), but not like you want. Why ? This was another big tip :).
-
Noblesse code
I loled. I have no idea what is the "test server helper" instance, but you can add a bypass on it too, or modify the bypass if this is the npc which give you the noblesse. The bypass is the command written in htm. for example if the test server had a "noblesse me" command, you just have to edit it to add a condition "if else". That avoid both to create new instance and create new quest ;). ---- Here is the classmaster <html><body> <center>Human Fighter Class Master:</center><br> <a action="bypass -h npc_%objectId%_change_class 1">Advance to Warrior</a><br> <a action="bypass -h npc_%objectId%_change_class 4">Advance to Knight</a><br> <a action="bypass -h npc_%objectId%_change_class 7">Advance to Rogue</a> </body></html> As you can see, he uses the same bypass (change_class) 3 times, only option (1,4,7) is modified. The bypass got an option because of the bypass code, not all bypasses got option. Basically if you wanted to add gb on the change class characters, you will have to edit "change_class". With an eclipse search in sources, you won't have any difficulty to locate it. I hope my example is fine o_o.
-
anyone know Import this java code epilogue to freya?
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.
-
[Help] Pvp points from Mobs
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.
-
aCis - another CRAPPY interlude server
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.
-
[Help] Pvp points from Mobs
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.
-
[Help] Which file to Run ?
build.xml. On eclipse, right click on it > run as -> ant build.
-
aCis - another CRAPPY interlude server
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.
-
aCis - another CRAPPY interlude server
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.
-
[Help] can't find config
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.
-
[Help] Pvp points from Mobs
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.
-
[HElP] Soneone plz help!!
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.
-
coustom mob
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.
-
aCis - another CRAPPY interlude server
Introduction aCis (an acronym for "another crappy interlude server") is a Java emulator, based on L2J work, focusing on the Interlude chronicle. The project leader is Tryskell. It began around December 2010, right after L2JArchid shut down — at that moment, no European L2J Interlude pack was still maintained. Sixteen years later, aCis is still active, still on master, and still shipping commits. Particularities We focus on retailness — a big emphasis is placed on reproducing the genuine aspects of L2OFF behavior, using every piece of information still available about how retail actually worked, down to reverse-engineered network opcodes and binary-level formulas. Customs are dropped when not needed. That means you're free to build what you actually want, without fighting pre-baked features you never asked for. The time saved not maintaining customs goes straight back into polishing retail accuracy. The pack runs on a freemium model: contribute with money or with code, and get rewarded with access to the latest sources. (See the dedicated forum thread for the full breakdown of how that works.) By the numbers 16 years of continuous development (2010 → 2026) 3778 commits at the date of today (3442 commits from revision 365 to 412, previous commits were entire revisions before so overall number is flawed). 47 contributors who've earned Cookies for committed reports and bugfixes 20 retired developers plus an active core team — see the full Hall of Fame roster Get involved Website: anothercrappyinterludeserver.com — your first crappy step Forum: acis.i-live.eu — announcements, changelog, support, technical discussion, release tracking Discord: discord.com/invite/TbDSqby — real-time chat, quick help, dev discussion Public sources: gitlab.com/Tryskell/acis_public — discover the codebase and start contributing Public Test Server (Blackbird): 161.97.185.208 — use //help in-game for admin commands
-
[Help] Pvp points from Mobs
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).
-
[Help] Compile Interlude
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).
-
[REQUEST]L2j ACM limit make 2 account by IP
It's stupid, disconnect your box and reload, gg you got another IP. Hard is the time where IPs are dynamic :(.
-
Blessed enchant rates
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
-
[Help] Pvp points from Mobs
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.
-
Adminkick - AdminBan commands doesnt work.
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.
-
[Help] Action Shift for L2PcInstance
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 :).
-
[Help] Pvp points from Mobs
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.
-
Adminkick - AdminBan commands doesnt work.
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...
-
PT/Clan and debuffs
You're welcomed, post errors logs / actual code if you got problems :).